Ignore:
Timestamp:
Jul 29, 2011, 3:47:26 PM (13 years ago)
Author:
aslmd
Message:

MESOSCALE: minor bug fixes in execution script and graphical python routines.

Location:
trunk/MESOSCALE_DEV/PLOT/PYTHON
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib/myplot.py

    r241 r247  
    362362    meanlat = 0.5*(wlat[0]+wlat[1])
    363363    if   wlat[0] >= 80.:   blat =  40.
    364     elif wlat[1] <= -80.:  blat = -40.
    365     else:                  blat = max([wlat[0],wlat[1]])
     364    elif wlat[1] <= -80.:  blat = -40.
     365    elif wlat[1] >= 0.:    blat = wlat[0]
     366    elif wlat[0] <= 0.:    blat = wlat[1]
    366367    print blat
    367368    h = 50.  ## en km
     
    441442
    442443def bounds(what_I_plot,zevmin,zevmax):
     444    from mymath import max,min,mean
    443445    ### might be convenient to add the missing value in arguments
    444446    what_I_plot[ what_I_plot < zevmin ] = zevmin*(1. + 1.e-7)
     447    print "new min ", min(what_I_plot)
    445448    what_I_plot[ what_I_plot > 9e+35  ] = -9e+35
    446449    what_I_plot[ what_I_plot > zevmax ] = zevmax*(1. - 1.e-7)
     450    print "new max ", max(what_I_plot)
    447451    return what_I_plot
    448452
  • trunk/MESOSCALE_DEV/PLOT/PYTHON/scripts/winds.py

    r244 r247  
    150150               if not tile:
    151151                   if not hole: what_I_plot = bounds(what_I_plot,zevmin,zevmax)
    152                    zelevels = np.linspace(zevmin,zevmax) #,num=20)
     152                   zelevels = np.linspace(zevmin*(1. + 1.e-7),zevmax*(1. - 1.e-7)) #,num=20)
    153153                   contourf( x, y, what_I_plot, zelevels, cmap = palette )
    154154               else:
     
    177177               vectorfield(vecx, vecy,\
    178178                          x, y, stride=stride, csmooth=2,\
    179                           scale=15., factor=300., color=colorvec, key=key)
     179                          #scale=15., factor=300., color=colorvec, key=key)
     180                          scale=20., factor=250., color=colorvec, key=key)
    180181                                            #200.         ## or csmooth=stride
    181182               
Note: See TracChangeset for help on using the changeset viewer.