Ignore:
Timestamp:
Jun 2, 2012, 1:16:31 AM (13 years ago)
Author:
aslmd
Message:

UTIL PYTHON 1. make planetoplot work for API-generated files directly 2. if there is a problem with areas the program keeps on moving and print a warning while setting mesharea and totalarea to 1 so that it is harmless

File:
1 edited

Legend:

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

    r673 r687  
    271271          else:
    272272              if vertmode is None:  vertmode=0
    273               if vertmode == 0:     vert = np.arange(0,getattr(nc,vertdim),1)
     273              if vertmode == 0:     
     274                  if "vert" in nc.variables: vert = nc.variables["vert"][:]/1000. ; vertmode = 1
     275                  else:                      vert = np.arange(0,getattr(nc,vertdim),1)
    274276              elif vertmode == -1:  vert = nc.variables["PHTOT"][0,:,0,0]/3.72 ; vert = np.array(vert[0:len(vert)-1]) #; print vert
    275277              elif vertmode == 1 or vertmode == 2:  vert = nc.variables["vert"][:]        ## pressure in Pa
Note: See TracChangeset for help on using the changeset viewer.