Changeset 507 for trunk/UTIL/PYTHON/planetoplot.py
- Timestamp:
- Jan 25, 2012, 6:41:35 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/planetoplot.py
r502 r507 60 60 axtime=None,\ 61 61 redope=None,\ 62 seevar=False,\ 62 63 xlab=None,\ 63 64 ylab=None): 64 65 65 66 66 #################################################################################################################### … … 119 119 namefile = namefiles[nnn] 120 120 nc = Dataset(namefile) 121 varinfile = nc.variables.keys() 122 if seevar: print varinfile ; exit() 121 123 122 124 ################################## 123 125 ### Initial checks and definitions 124 126 ### ... TYPEFILE 125 typefile = whatkindfile(nc) 127 typefile = whatkindfile(nc) 126 128 if typefile in ['mesoideal']: mapmode=0;winds=False 127 129 elif typefile in ['gcm'] and len(nc.variables["longitude"][:]) is 1 and len(nc.variables["latitude"][:]) is 1: mapmode=0;winds=False … … 137 139 elif typefile != typefile0: errormess("Not the same kind of files !", [typefile0, typefile]) 138 140 ### ... VAR 139 varname=var[vvv] 140 if varname not in nc.variables: varname = False 141 varname=var[vvv] 142 if varname not in nc.variables: 143 if len(varinfile) == 1: varname = varinfile[0] 144 else: varname = False 141 145 ### ... WINDS 142 146 if winds:
Note: See TracChangeset
for help on using the changeset viewer.