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.