Ignore:
Timestamp:
Jul 15, 2011, 2:47:21 PM (14 years ago)
Author:
aslmd
Message:

MESOSCALE: python graphics. now possible for multi-files and multi-var. very easy to make an atlas.

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  
    88\rm logc
    99\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> loge
     10f2py -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
    1111f2py -c -m timestuff time.F --fcompiler=g95 >> logc 2>> loge
  • trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib/api_pgf90.sh

    r195 r225  
    55#NETCDF=/distrib/local/netcdf-4.0.1/pgi_7.1-6_64/
    66#NETCDF=/distrib/local/netcdf-3.6.0-p1/pgi_64bits/
    7 NETCDF=/donnees/aslmd/MODELES/MESOSCALE/NETCDF/pgf90_64_fpic/netcdf-3.6.1/
     7NETCDF=/donnees/aslmd/MODELES/MESOSCALE_DEV/NETCDF/pgf90_64_netcdf_fpic-3.6.1/
     8
    89echo $NETCDF
    910
     
    1213\rm logc
    1314\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> loge
     15f2py -c -m api api.F90 --fcompiler=pg -L$NETCDF/lib -lnetcdf -lm -I$NETCDF/include --f90flags="-Mfree" > logc 2> loge
    1516f2py -c -m timestuff time.F --fcompiler=pg >> logc 2>> loge
  • trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib/api_wrapper.py

    r207 r225  
    2626        if interp_method == 4:    output_name = input_name+'_zabg'
    2727
    28     print input_name, output_name
     28    #print input_name, output_name
    2929
    3030    if nocall:     pass
  • trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib/myplot.py

    r207 r225  
    4444    from timestuff import sol2ls
    4545    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:
    4749        zetime = nc.variables['Times'][0]
    4850        zetimestart = getattr(nc, 'START_DATE')
     
    100102    nx = len(lon2d[0,:])-1
    101103    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]
    103114
    104115def makeplotpngres (filename,res,pad_inches_value=0.25,folder='',disp=True):
     
    237248    if char in ["cyl","lcc","merc","nsper","laea"]:   step = findstep(wlon)
    238249    else:                                             step = 10.
     250    print step
    239251    m.drawmeridians(np.r_[-180.:180.:step*2.], labels=[0,0,0,1], color='grey', fontsize=fontsizemer)
    240252    m.drawparallels(np.r_[-90.:90.:step], labels=[1,0,0,0], color='grey', fontsize=fontsizemer)
     
    252264             "HGT":          "%.1e",\
    253265             "USTM":         "%.2f",\
     266             "HFX":          "%.0f",\
    254267                    }
    255268    if whichvar not in fmtvar:
     
    264277             "QH2O":         "PuBu",\
    265278             "USTM":         "YlOrRd",\
    266 #"RdPu",\
     279             "HFX":          "RdYlBu",\
    267280                     }
    268281    if whichone not in whichcolorb:
Note: See TracChangeset for help on using the changeset viewer.