Ignore:
Timestamp:
Nov 17, 2011, 2:41:07 AM (13 years ago)
Author:
aslmd
Message:

GRAPHICS: corrected a small error that broke simple cases for mesoscale files.

File:
1 edited

Legend:

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

    r392 r393  
    144144          vert = nc.variables["altitude"][:]
    145145      elif typefile in ['meso','mesoapi']:
    146           if mapmode == 0:
    147               if varname in ['PHTOT','W']:    vertdim='BOTTOM-TOP_PATCH_END_STAG'
    148               else:                           vertdim='BOTTOM-TOP_PATCH_END_UNSTAG'
    149               if varname in ['V']:  latdim='SOUTH-NORTH_PATCH_END_STAG'
    150               else:                 latdim='SOUTH-NORTH_PATCH_END_UNSTAG'
    151               if varname in ['U']:  londim='WEST-EAST_PATCH_END_STAG'
    152               else:                 londim='WEST-EAST_PATCH_END_UNSTAG'
    153               lon = np.arange(0,getattr(nc,londim),1)
    154               lat = np.arange(0,getattr(nc,latdim),1)
    155               if vertmode is None:  vertmode=0
    156               if vertmode == 0:     vert = np.arange(0,getattr(nc,vertdim),1)
    157               else:                 vert = nc.variables["vert"][:]
    158               time = np.arange(0,len(nc.variables["Times"]),1)
    159           else:
    160               lon=None ; lat=None ; vert=None ; time=None
     146          if varname in ['PHTOT','W']:    vertdim='BOTTOM-TOP_PATCH_END_STAG'
     147          else:                           vertdim='BOTTOM-TOP_PATCH_END_UNSTAG'
     148          if varname in ['V']:  latdim='SOUTH-NORTH_PATCH_END_STAG'
     149          else:                 latdim='SOUTH-NORTH_PATCH_END_UNSTAG'
     150          if varname in ['U']:  londim='WEST-EAST_PATCH_END_STAG'
     151          else:                 londim='WEST-EAST_PATCH_END_UNSTAG'
     152          lon = np.arange(0,getattr(nc,londim),1)
     153          lat = np.arange(0,getattr(nc,latdim),1)
     154          if vertmode is None:  vertmode=0
     155          if vertmode == 0:     vert = np.arange(0,getattr(nc,vertdim),1)
     156          else:                 vert = nc.variables["vert"][:]
     157          time = np.arange(0,len(nc.variables["Times"]),1)
    161158       #if firstfile:
    162159       #   lat0 = lat
Note: See TracChangeset for help on using the changeset viewer.