Ignore:
Timestamp:
Nov 18, 2011, 1:51:41 PM (13 years ago)
Author:
acolaitis
Message:

PYTHON:

  • Improved handling of missing values NaN by min() and max() functions
  • Added the possibility to change the viewing angle of "ortho" projections by using --blat. Default is meanlat. (remember than in spstere and npstere projections, blat already controls the boundling latitude)
  • Changed colorbar of "operation" plots to RdBu_r, whatever the colorbar of other plots are. The thinking behind this is that this is a symmetrical colorbar, which is very usefull for difference plots. (could be changed for other operations.)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/planetoplot.py

    r395 r398  
    178178
    179179      ##### SPECIFIC
    180       if varname in ["temp","t","T_nadir_nit","T_nadir_day"] and tsat:
     180      if varname in ["temp","t","T_nadir_nit","T_nadir_day","temp_day","temp_night"] and tsat:
    181181          tt=getfield(nc,varname) ; print "computing Tsat-T, I ASSUME Z-AXIS IS PRESSURE"
    182182          if type(tt).__name__=='MaskedArray':  tt.set_fill_value([np.NaN]) ; tinput=tt.filled()
     
    329329                  zevmin, zevmax = calculate_bounds(what_I_plot,vmin=vmin,vmax=vmax)
    330330               if colorb in ["def","nobar"]:   palette = get_cmap(name=defcolorb(fvar.upper()))
     331               elif (fileref is not None) and (index_f is numplot-1): palette = get_cmap(name="RdBu_r")
    331332               else:                           palette = get_cmap(name=colorb)
    332333               ##### 2D field
     
    357358                 if colorb != 'nobar' and varname != 'HGT' :       
    358359                     if (fileref is not None) and (index_f is numplot-1):
    359                         colorbar(fraction=0.05,pad=0.03,format="%.2f",\
     360                        colorbar(fraction=0.05,pad=0.03,format="%.3f",\
    360361                                           ticks=np.linspace(zevmin,zevmax,num=min([ticks/2+1,20])),\
    361362                                           extend='neither',spacing='proportional')
Note: See TracChangeset for help on using the changeset viewer.