Changeset 833 in lmdz_wrf for trunk


Ignore:
Timestamp:
Jun 16, 2016, 1:26:17 PM (8 years ago)
Author:
lfita
Message:

Adding `basinlinewidth': with of the line to draw the basin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing.py

    r826 r833  
    3131## 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
    3232## 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'
    3434
    3535main = 'drawing.py'
     
    39883988    """ Function to plot subbasin from 'routnig.nc' ORCDHIEE
    39893989      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]
    39913991        [subasiname]= name of the subbasin ('!' for spaces)
    39923992        [rcolor]= '@', list of 'r|g|b' 1-based colors (as much as first level sub-flow). 'None' for automatic
     
    40024002            * 'h', high
    40034003            * 'f', full
     4004        [basinlinewidth]= with of the line to draw the basin
    40044005        [drawsubid]= wehther sub-flow ids should be plot or not
    40054006        [graphtit]= title of the graph ('|', for spaces)
     
    40174018        quit()
    40184019
    4019     expectargs = '[subasiname]:[rangecolors]:[mapv]:[drawsubid]:[gtit]:[figkind]:' + \
    4020       '[legloc]:[figurename]'
     4020    expectargs = '[subasiname]:[rangecolors]:[mapv]:[basinlinewidth]:[drawsubid]:' + \
     4021      '[gtit]:[figkind]:[legloc]:[figurename]'
    40214022 
    40224023    drw.check_arguments(fname,values,expectargs,':')
     
    40254026    rangecolors = values.split(':')[1]
    40264027    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]
    40324034
    40334035    if not os.path.isfile(ncfile):
     
    40874089
    40884090    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)
    40904092
    40914093    objf.close()
Note: See TracChangeset for help on using the changeset viewer.