Changeset 2775 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Nov 27, 2019, 3:01:18 PM (5 years ago)
Author:
lfita
Message:

Adding when values have only 1 value in `draw_2Dshad_map'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing.py

    r2762 r2775  
    1084110841    # Variables' values
    1084210842    objvars = objsf.variables[varn]
     10843    notmasked = False
    1084310844    if type(objvars[:]) != type(gen.mamat):
    10844         print errormsg
     10845        print infmsg
    1084510846        print '  ' + fname + ": drawing variable is not masked !!"
    10846         quit(-1)
     10847        notmasked = True
    1084710848
    1084810849    valshad, dimsshad = drw.slice_variable(objvars, dimvals.replace(',','|'))
     10850
     10851    valshad = ma.masked_greater(valshad, gen.fillValueF)
    1084910852
    1085010853    dimnamesv = [vdimxn, vdimyn]
     
    1090610909    nbarv = np.min(valshad)
    1090710910    xbarv = np.max(valshad)
     10911    if nbarv == xbarv:
     10912        print infmsg
     10913        print '  ' + fname + ': range of selected variable is zero !!'
     10914        print '    minimum value:', nbarv, 'maximum', xbarv
     10915        nbarv = xbarv - 1.
     10916        xbarv = xbarv + 1.           
     10917        print '    imposing range as:', nbarv, xbarv
    1090810918    rbarv = xbarv - nbarv
    1090910919    dbarv = rbarv/5.
Note: See TracChangeset for help on using the changeset viewer.