Changeset 186 for trunk/MESOSCALE/PLOT/PYTHON/mylib
- Timestamp:
- Jul 3, 2011, 4:27:24 AM (14 years ago)
- Location:
- trunk/MESOSCALE/PLOT/PYTHON/mylib
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/PLOT/PYTHON/mylib/myplot.py
r184 r186 35 35 return wlon,wlat 36 36 37 def api_onelevel ( path_to_input = None, \ 38 input_name = 'wrfout_d0?_????-??-??_??:00:00', \ 39 path_to_output = None, \ 40 output_name = 'output.nc', \ 41 process = 'list', \ 42 fields = 'tk,W,uvmet,HGT', \ 43 debug = False, \ 44 bit64 = False, \ 45 oldvar = True, \ 46 interp_method = 4, \ 47 extrapolate = 0, \ 48 unstagger_grid = False, \ 49 onelevel = 0.020 ): 50 import api 51 import numpy as np 52 if not path_to_input: path_to_input = './' 53 if not path_to_output: path_to_output = path_to_input 54 api.api_main ( path_to_input, input_name, path_to_output, output_name, \ 55 process, fields, debug, bit64, oldvar, np.arange (299), \ 56 interp_method, extrapolate, unstagger_grid, onelevel ) 57 return 58 37 59 def getproj (nc): 38 60 map_proj = getattr(nc, 'MAP_PROJ') … … 51 73 print "mercator projection" 52 74 proj="merc" 75 else: 76 proj="merc" 53 77 return proj 54 78 … … 70 94 import matplotlib.pyplot as plt 71 95 res = int(res) 72 if folder != '': name = folder+'/'+filename+str(res)+".png"73 else: name = filename+str(res)+".png"96 name = filename+"_"+str(res)+".png" 97 if folder != '': name = folder+'/'+name 74 98 plt.savefig(name,dpi=res,bbox_inches='tight',pad_inches=pad_inches_value) 75 99 if disp: display(name)
Note: See TracChangeset
for help on using the changeset viewer.