Changeset 638 in lmdz_wrf
- Timestamp:
- Sep 19, 2015, 11:04:07 AM (9 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r636 r638 216 216 draw_2D_shad(ncfile, values, varn) 217 217 ncfile= file to use 218 values=[vnamefs] :[dimvals]:[dimxvn]:[dimyvn]:[colorbar]:[sminv],[smaxv]:[figt]:219 [kindfig] :[reverse]:[timevals]:[close]218 values=[vnamefs]~[dimvals]~[dimxvn]~[dimyvn]~[colorbar]~[sminv],[smaxv]~[figt]~ 219 [kindfig]~[reverse]~[timevals]~[close] 220 220 [vnamefs]: Name in the figure of the variable to be shaded 221 221 [dimvals]: ',' list of [dimname]|[value] telling at which dimension of the 222 variable a given value is required (-1, all the length )222 variable a given value is required (-1, all the length, [beg]@[end] for an interval) 223 223 [dimx/yvn]: name of the variables with the values of the final dimensions (x,y) 224 224 [colorbar]: name of the color bar … … 251 251 [label]; label at the graph ('!' for spaces) 252 252 [close]: should figure be closed (finished) 253 values='dtcon :Time|-1,bottom_top|-1:presmean:time:seismic:-3.e-6,3.e-6:monthly|'254 'dtcon :pdf:transpose:time|hours!since!1949-12-01|exct,2,d|%d|date!([DD])|x:True253 values='dtcon~Time|-1,bottom_top|-1~presmean~time~seismic~-3.e-6,3.e-6~monthly|' 254 'dtcon~pdf~transpose~time|hours!since!1949-12-01|exct,2,d|%d|date!([DD])~True 255 255 varn= [varsn] name of the variable to plot with shading 256 256 """ … … 264 264 farguments = ['[vnamefs]', '[dimvals]', '[dimxvn]', '[dimyvn]', '[colorbar]', \ 265 265 '[sminv],[smaxv]', '[figt]', '[kindfig]', '[reverse]', '[timevals]', '[close]'] 266 drw.check_arguments(fname,11,values,' :',farguments)267 268 vnamesfig = values.split(' :')[0]269 dimvals= values.split(' :')[1].replace('|',':')270 vdimxn = values.split(' :')[2]271 vdimyn = values.split(' :')[3]272 colbarn = values.split(' :')[4]273 shadminmax = values.split(' :')[5]274 figtitle = values.split(' :')[6].replace('|',' ')275 figkind = values.split(' :')[7]276 revals = values.split(' :')[8]277 timevals = values.split(' :')[9]278 close = values.split(' :')[10]266 drw.check_arguments(fname,11,values,'~',farguments) 267 268 vnamesfig = values.split('~')[0] 269 dimvals= values.split('~')[1].replace('|',':') 270 vdimxn = values.split('~')[2] 271 vdimyn = values.split('~')[3] 272 colbarn = values.split('~')[4] 273 shadminmax = values.split('~')[5] 274 figtitle = values.split('~')[6].replace('|',' ') 275 figkind = values.split('~')[7] 276 revals = values.split('~')[8] 277 timevals = values.split('~')[9] 278 close = values.split('~')[10] 279 279 280 280 ncfiles = ncfile -
trunk/tools/drawing_tools.py
r637 r638 3721 3721 #quit() 3722 3722 3723 def transform(vals, dxv, dyv, dxt, dyt, dxl, dyl, dxtit, dytit, trans): 3724 """ Function to transform the values and the axes 3725 vals= values to transform 3726 d[x/y]v= original values for the [x/y]-axis 3727 d[x/y]t= original ticks for the [x/y]-axis 3728 d[x/y]l= original tick-labels for the [x/y]-axis 3729 d[x/y]tit= original titels for the [x/y]-axis 3730 trans= '|' separated list of operations of transformation 3731 'transpose': Transpose matrix of values (x-->y, y-->x) 3732 'flip@[x/y]': Flip the given axis 3733 """ 3734 fname = 'transform' 3735 3736 return newvals, newdxv, newdyv 3737 3723 3738 def plot_2D_shadow_time(varsv,vnames,dimxv,dimyv,dimxu,dimyu,dimn,colorbar,vs,uts, \ 3724 3739 vtit,kfig,reva,taxis,tpos,tlabs,ifclose):
Note: See TracChangeset
for help on using the changeset viewer.