Changeset 225 for trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib
- Timestamp:
- Jul 15, 2011, 2:47:21 PM (14 years ago)
- Location:
- trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib/api_g95.sh
r195 r225 8 8 \rm logc 9 9 \rm loge 10 f2py -c -m api ../../../LMD_MM_MARS/SRC/POSTPROC/api.F90 --fcompiler=g95 -L$NETCDF/lib -lnetcdf -lm -I$NETCDF/include --f90flags="-Wall -Wno=112,141,137,155 -fno-second-underscore -ffree-form" > logc 2> loge10 f2py -c -m api api.F90 --fcompiler=g95 -L$NETCDF/lib -lnetcdf -lm -I$NETCDF/include --f90flags="-Wall -Wno=112,141,137,155 -fno-second-underscore -ffree-form" > logc 2> loge 11 11 f2py -c -m timestuff time.F --fcompiler=g95 >> logc 2>> loge -
trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib/api_pgf90.sh
r195 r225 5 5 #NETCDF=/distrib/local/netcdf-4.0.1/pgi_7.1-6_64/ 6 6 #NETCDF=/distrib/local/netcdf-3.6.0-p1/pgi_64bits/ 7 NETCDF=/donnees/aslmd/MODELES/MESOSCALE/NETCDF/pgf90_64_fpic/netcdf-3.6.1/ 7 NETCDF=/donnees/aslmd/MODELES/MESOSCALE_DEV/NETCDF/pgf90_64_netcdf_fpic-3.6.1/ 8 8 9 echo $NETCDF 9 10 … … 12 13 \rm logc 13 14 \rm loge 14 f2py -c -m api ../../../LMD_MM_MARS/SRC/POSTPROC/api.F90 --fcompiler=pg -L$NETCDF/lib -lnetcdf -lm -I$NETCDF/include --f90flags="-Mfree" > logc 2> loge15 f2py -c -m api api.F90 --fcompiler=pg -L$NETCDF/lib -lnetcdf -lm -I$NETCDF/include --f90flags="-Mfree" > logc 2> loge 15 16 f2py -c -m timestuff time.F --fcompiler=pg >> logc 2>> loge -
trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib/api_wrapper.py
r207 r225 26 26 if interp_method == 4: output_name = input_name+'_zabg' 27 27 28 print input_name, output_name28 #print input_name, output_name 29 29 30 30 if nocall: pass -
trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib/myplot.py
r207 r225 44 44 from timestuff import sol2ls 45 45 nc = Dataset(namefile) 46 if 'Times' in nc.variables and 'vert' not in nc.variables: 46 if namefile[0]+namefile[1]+namefile[2] != "geo" \ 47 and 'Times' in nc.variables \ 48 and 'vert' not in nc.variables: 47 49 zetime = nc.variables['Times'][0] 48 50 zetimestart = getattr(nc, 'START_DATE') … … 100 102 nx = len(lon2d[0,:])-1 101 103 ny = len(lon2d[:,0])-1 102 return [[lon2d[0,0],lon2d[nx,ny]],[lat2d[0,0],lat2d[nx,ny]]] 104 lon1 = lon2d[0,0] 105 lon2 = lon2d[nx,ny] 106 lat1 = lat2d[0,0] 107 lat2 = lat2d[nx,ny] 108 wider = 0.5 * (abs(lon1)+abs(lon2)) * 0.1 109 if lon1 < lon2: wlon = [lon1, lon2 + wider] ## a tester en normal 110 else: wlon = [lon2, lon1 + wider] 111 if lat1 < lat2: wlat = [lat1, lat2] 112 else: wlat = [lat2, lat1] 113 return [wlon,wlat] 103 114 104 115 def makeplotpngres (filename,res,pad_inches_value=0.25,folder='',disp=True): … … 237 248 if char in ["cyl","lcc","merc","nsper","laea"]: step = findstep(wlon) 238 249 else: step = 10. 250 print step 239 251 m.drawmeridians(np.r_[-180.:180.:step*2.], labels=[0,0,0,1], color='grey', fontsize=fontsizemer) 240 252 m.drawparallels(np.r_[-90.:90.:step], labels=[1,0,0,0], color='grey', fontsize=fontsizemer) … … 252 264 "HGT": "%.1e",\ 253 265 "USTM": "%.2f",\ 266 "HFX": "%.0f",\ 254 267 } 255 268 if whichvar not in fmtvar: … … 264 277 "QH2O": "PuBu",\ 265 278 "USTM": "YlOrRd",\ 266 #"RdPu",\279 "HFX": "RdYlBu",\ 267 280 } 268 281 if whichone not in whichcolorb:
Note: See TracChangeset
for help on using the changeset viewer.