- Timestamp:
- Jun 16, 2016, 1:26:17 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r826 r833 31 31 ## e.g. # drawing.py -o draw_river_desc -f diver_desc.nc -S 'Y|lat|lat|-1,X|lon|lon|-1:red,green:Blues:cyl,l:ORCDHIEE rivers:pdf:0:or_rivers -v Amazon 32 32 ## e.g. # drawing.py -o draw_vertical_levels -f wrfout_d01_2001-11-11_00:00:00 -S 'true:false:wrfout!vertical!levels!(standard!40):png:4' -v WRFz 33 ## e.g. $ drawing.py -o draw_subbasin -f Caceres_subbasin.nc -S 'Caceres:None:cyl,l: True:Caceres:pdf:0:Caceres_subbasin'33 ## e.g. $ drawing.py -o draw_subbasin -f Caceres_subbasin.nc -S 'Caceres:None:cyl,l:2,True:Caceres:pdf:0:Caceres_subbasin' 34 34 35 35 main = 'drawing.py' … … 3988 3988 """ Function to plot subbasin from 'routnig.nc' ORCDHIEE 3989 3989 ncfile= file to use produced with nc_var.py#subbasin function 3990 values= [subasiname]:[rangecolors]:[mapv]:[ drawsubid]:[gtit]:[figkind]:[legloc]:[figurename]3990 values= [subasiname]:[rangecolors]:[mapv]:[basinlinewidth]:[drawsubid]:[gtit]:[figkind]:[legloc]:[figurename] 3991 3991 [subasiname]= name of the subbasin ('!' for spaces) 3992 3992 [rcolor]= '@', list of 'r|g|b' 1-based colors (as much as first level sub-flow). 'None' for automatic … … 4002 4002 * 'h', high 4003 4003 * 'f', full 4004 [basinlinewidth]= with of the line to draw the basin 4004 4005 [drawsubid]= wehther sub-flow ids should be plot or not 4005 4006 [graphtit]= title of the graph ('|', for spaces) … … 4017 4018 quit() 4018 4019 4019 expectargs = '[subasiname]:[rangecolors]:[mapv]:[ drawsubid]:[gtit]:[figkind]:' + \4020 '[ legloc]:[figurename]'4020 expectargs = '[subasiname]:[rangecolors]:[mapv]:[basinlinewidth]:[drawsubid]:' + \ 4021 '[gtit]:[figkind]:[legloc]:[figurename]' 4021 4022 4022 4023 drw.check_arguments(fname,values,expectargs,':') … … 4025 4026 rangecolors = values.split(':')[1] 4026 4027 mapv = values.split(':')[2] 4027 drawsubid = gen.Str_Bool(values.split(':')[3]) 4028 gtit = values.split(':')[4].replace('!',' ') 4029 figkind = values.split(':')[5] 4030 legloc = int(values.split(':')[6]) 4031 figurename = values.split(':')[7] 4028 basinlinewidth = np.float(values.split(':')[3]) 4029 drawsubid = gen.Str_Bool(values.split(':')[4]) 4030 gtit = values.split(':')[5].replace('!',' ') 4031 figkind = values.split(':')[6] 4032 legloc = int(values.split(':')[7]) 4033 figurename = values.split(':')[8] 4032 4034 4033 4035 if not os.path.isfile(ncfile): … … 4087 4089 4088 4090 drw.plot_subbasin(subbasiname, lon, lat, subnames, latlonsub, outflowsub, \ 4089 rangecols, mapv, drawsubid, gtit, figkind, legloc, figurename)4091 rangecols, mapv, basinlinewidth, drawsubid, gtit, figkind, legloc, figurename) 4090 4092 4091 4093 objf.close()
Note: See TracChangeset
for help on using the changeset viewer.