raiseValueError("No savestate.nc found in the possible paths:"+str(tried)+". Likely the timeframe is no multiple of the cycle length: "+str(cyclelength)+". startdate: "+str(startdate)+" enddate: "+str(enddate))
def_saveInto(ncf,standardvar,data,dims,
count=None,name=None,long_name=None,
units=None,comment=None,nsets=None,
standard_name=None):
"""save the given data into the netcdf file using one of the StandardVars in tools/io4.py as template.
:param standardvar: The name of the standard definition to use.
:param count: offset for writing the data (==previous data which should not be replaced)."""
savedict=ncf.StandardVar(varname=standardvar)
savedict["values"]=data
savedict["dims"]=dims
forkey,valin[("count",count),
("name",name),
("long_name",long_name),
("units",units),
("standard_name",standard_name),
("comment",comment)]:
ifval:savedict[key]=val
ifnsets:
ncf.AddData(savedict,nsets=nsets)
returnncf.AddData(savedict)
defSaveWeeklyAvg1x1Data(DaCycle,StateVector):
"""
Function creates a NetCDF file with output on 1x1 degree grid. It uses the flux data written by the