Changeset 13843
- Timestamp:
- 2020-11-20T16:00:36+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/plot_station_asf_ICE.py
r13835 r13843 28 28 rDPI=100. 29 29 30 l_color = [ '0.85' , '#ffed00' , '#008ab8' , '0.4' ] ; # colors to differentiate algos on the plot 31 l_width = [ 4 , 3 , 2 , 1 ] ; # line-width to differentiate algos on the plot 32 l_style = [ '-' , '-' , '-' , '--' ] ; # line-style 30 #ffed00: yellow ON 31 #E8A727: ornage 32 33 l_color = [ '0.3' , '#E8A727', '0.1' , '#008ab8' ] ; # colors to differentiate algos on the plot 34 l_width = [ 2 , 2 , 1.5 , 2 ] ; # line-width to differentiate algos on the plot 35 l_style = [ '-' , '-' , '--' , '-' ] ; # line-style 33 36 34 37 … … 43 46 L_PREC = [ 3 , 3 , 0 , 0 , 0 , 0 , 0 , 2 ] 44 47 L_ANOM = [ False , False , True , True , True , True , True , True ] 48 L_MAXT = [ 10000. , 10000., 10000. , 10000. , 10000. , 10000. , 10000. , 1.5 ] 49 L_MINT = [ 0.001 , 0.001 , -10000. , -10000. , -10000. , -10000. ,-10000. , -10000. ] 50 45 51 46 52 # About STATION_ASF output files to read: … … 92 98 cf_in = [] 93 99 list_exp = [] 100 list_ext = [] ; # for title 94 101 list_frc = [] 95 102 for fn in ldir: … … 100 107 clab = fn[np:-nc-ns] 101 108 [ cexp, cfrc ] = str.split(clab, '_', 1) 102 print(' ===> Experiment = '+cexp+', Forcing = '+cfrc) 109 cexp = cexp.split('-')[1] ; # removing air-sea algo name... 110 cext = cexp 111 if cexp == "LG15": 112 cext ="Lüpkes & Gryanik, 2015" 113 elif cexp == "LU12": 114 cext ="Lüpkes et al., 2012" 115 elif cexp == "AN05": 116 cext ="Andreas et al., 2005" 117 elif cexp == "CSTC": 118 cext ="Constant coefficients" 119 print(' ===> Experiment = '+cexp+' ('+cext+'), Forcing = '+cfrc) 103 120 list_exp.append(cexp) 121 list_ext.append(cext) 104 122 list_frc.append(cfrc) 105 123 cf_in.append(fpn) 106 124 nbf = len( set(list_frc) ) 125 126 107 127 108 128 if nbf == 0: … … 175 195 # 176 196 id_in = Dataset(cf_in[ja]) 177 xF[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain!197 xF[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1] ; # only the center point of the 3x3 spatial domain! 178 198 if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name 179 199 id_in.close() 200 # 201 id_toolarge, = nmp.where( xF[:,ja] > L_MAXT[jv] ) # 202 xF[id_toolarge,ja] = L_MAXT[jv] 203 id_toosmall, = nmp.where( xF[:,ja] < L_MINT[jv] ) ; print("id_toosmall =", id_toosmall) 204 xF[id_toosmall,ja] = L_MINT[jv] 180 205 181 206 idx_okay = nmp.where( nmp.abs(xF) < 1.e+10 ) … … 191 216 fplot = nmp.ma.masked_where( xF[:,ja]==0., xF[:,ja] ) 192 217 plt.plot(vtime, fplot, '-', color=l_color[ja], \ 193 linestyle=l_style[ja], linewidth=l_width[ja], label=list_ex p[ja],zorder=10+ja)218 linestyle=l_style[ja], linewidth=l_width[ja], label=list_ext[ja], alpha=0.6 ) #zorder=10+ja) 194 219 195 220 fmin, fmax = round_bounds( nmp.min(xF[idx_okay]) , nmp.max(xF[idx_okay]), base=L_BASE[jv], prec=L_PREC[jv])
Note: See TracChangeset
for help on using the changeset viewer.