Ignore:
Timestamp:
Nov 11, 2011, 6:25:46 PM (13 years ago)
Author:
acolaitis
Message:

Added new routine to our python subroutines pool: make_netcdf.py

This routine is an easy way to create a netcdf file conform to the gcm .nc format.
Here is an exemple of a call to the routine:

#####################

from make_netcdf import make_gcm_netcdf

make_gcm_netcdf (zfilename="diagfi_TES.nc", \

zdescription="TES day and night temperature fields", \
zlon=lon, \
zlat=lat, \
zalt=alt, \
ztime=time, \
zvariables=[ps_day,ps_night,aps,bps,temp_day,temp_night], \
znames=["ps_day","ps_night","aps","bps","temp_day","temp_night"])

####################

This will create a file diagfi_TES.nc with variables specified in "zvariables", with names specified in "znames", along the dimensions given in "zlon,zlat,zalt,ztime". One can use less dimensions if the variables to be written are not 4D.

Note: by "gcm .nc format" is implied that dimension names are conform to what is expected when using zrecast/hrecast tools, or gcm.py. One could write a similar routine with variables conform to API and meso.py for mesoscale .nc files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/myplot.py

    r363 r376  
    559559             "tk":           "%.0f",\
    560560             "T_NADIR_DAY":  "%.0f",\
    561              "T_nadir_nit":  "%.0f",\
    562              "T_nadir_day":  "%.0f",\
     561             "T_NADIR_NIT":  "%.0f",\
    563562             "tpot":         "%.0f",\
    564563             "TSURF":        "%.0f",\
Note: See TracChangeset for help on using the changeset viewer.