Changeset 507
- Timestamp:
- Jan 25, 2012, 6:41:35 PM (13 years ago)
- Location:
- trunk/UTIL/PYTHON
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/myscript.py
r502 r507 3 3 ### I/O 4 4 parser.add_option('-f', '--file', action='append',dest='file', type="string", default=None, help='[NEEDED] filename. Append: different figures. Comma-separated: same figure (+ possible --operation). Regex OK: use -f "foo*" DONT FORGET QUOTES "" !!!!') 5 parser.add_option('--seevar', action='store_true',dest='seevar', default=False, help='display the list of variables in the file') 5 6 parser.add_option('-t', '--target', action='store',dest='tgt', type="string", default=None, help='destination folder') 6 7 parser.add_option('-S', '--save', action='store',dest='save', type="string", default="gui", help='save mode (gui,png,eps,svg,pdf,txt,html,avi) [gui]') -
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: -
trunk/UTIL/PYTHON/pp.py
r502 r507 157 157 blat=opt.blat,blon=opt.blon,tsat=opt.tsat,flagnolow=opt.nolow,\ 158 158 mrate=opt.rate,mquality=opt.quality,trans=opt.trans,zarea=opt.area,axtime=opt.axtime,\ 159 redope=opt.redope, xlab=opt.xlab,ylab=opt.ylab)159 redope=opt.redope,seevar=opt.seevar,xlab=opt.xlab,ylab=opt.ylab) 160 160 print 'DONE: '+name 161 161 system("rm -f to_be_erased")
Note: See TracChangeset
for help on using the changeset viewer.