New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13893 for NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/plot_station_asf_OCE.py – NEMO

Ignore:
Timestamp:
2020-11-26T19:03:34+01:00 (3 years ago)
Author:
laurent
Message:

Improvements and better README for tests/STATION_ASF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/plot_station_asf_OCE.py

    r13723 r13893  
    2828rDPI=100. 
    2929 
    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#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 
     33 
     34#ffed00: yellow ON 
     35#E8A727: ornage 
     36 
     37l_color = [ '0.3' , '#E8A727', '0.1'  , '#008ab8'  ] ; # colors to differentiate algos on the plot 
     38l_width = [   2   ,    2     ,  1.5   ,    2       ] ; # line-width to differentiate algos on the plot 
     39l_style = [  '-'  ,    '-'   , '--'   ,   '-'      ] ; # line-style 
    3340 
    3441 
     
    4350L_PREC = [      3      ,      3      ,      0      ,      0        ,       0      ,      0      ,     2       ,        3             ] 
    4451L_ANOM = [   False     ,   False     ,   True      ,    True       ,    True      ,    True     ,   True      ,      False           ] 
     52L_MAXT = [  10000.   ,     10000.,  10000.   ,  10000.      ,  10000.    ,  10000.      , 10000.     ,      1.5    ] 
     53L_MINT = [    0.001  ,     0.001 , -10000.   , -10000.      , -10000.    , -10000.      ,-10000.     ,   -10000.   ] 
    4554 
    4655# About STATION_ASF output files to read: 
     
    220229        # 
    221230        id_in = Dataset(cf_in[ja]) 
    222         xF[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain! 
     231        xF[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1]  ; # only the center point of the 3x3 spatial domain! 
    223232        if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name 
    224233        id_in.close() 
     234        # 
     235        id_toolarge, = nmp.where( xF[:,ja] > L_MAXT[jv] ) #  
     236        xF[id_toolarge,ja] = L_MAXT[jv] 
     237        id_toosmall, = nmp.where( xF[:,ja] < L_MINT[jv] ) ; print("id_toosmall =", id_toosmall) 
     238        xF[id_toosmall,ja] = L_MINT[jv] 
    225239 
    226240    idx_okay = nmp.where( nmp.abs(xF) < 1.e+10 ) 
     
    236250        fplot = nmp.ma.masked_where( xF[:,ja]==0., xF[:,ja] ) 
    237251        plt.plot(vtime, fplot, '-', color=l_color[ja], \ 
    238                  linestyle=l_style[ja], linewidth=l_width[ja], label=list_exp[ja], zorder=10+ja) 
     252                 linestyle=l_style[ja], linewidth=l_width[ja], label=list_exp[ja], alpha=0.6 ) #zorder=10+ja) 
    239253 
    240254    fmin, fmax = round_bounds( nmp.min(xF[idx_okay]) , nmp.max(xF[idx_okay]), base=L_BASE[jv], prec=L_PREC[jv]) 
     
    286300                fplot = nmp.ma.masked_where( xF[:,ja]==0., xF[:,ja] ) 
    287301                plt.plot(vtime, fplot, '-', color=l_color[ja], \ 
    288                          linewidth=l_width[ja], label=list_exp[ja], zorder=10+ja) 
     302                         linewidth=l_width[ja], label=list_exp[ja], alpha=0.6) #, zorder=10+ja) 
    289303 
    290304            ax1.set_ylim(-yrng,yrng) ; ax1.set_xlim(vtime[0],vtime[Nt-1]) 
Note: See TracChangeset for help on using the changeset viewer.