RAnEn::writeNetCDF writes a formatted object into a NetCDF file. The output NetCDF file can be used by C++ utilities.
writeNetCDF(
file.type,
obj,
file.out,
global.attrs = list(author = paste("RAnEn", packageVersion("RAnEn"),
"from GEOlab, Penn State"), Time = format(Sys.time())),
nchars.max = 50
)
The type of the object to be written to a file. It only supports Observations and Forecasts for now.
A list object to write into the file.
The output file path.
The maximum length of string.
A list with names and values for global attributes. The values will be written as strings. Please make sure list members have names.
A boolean for whether the writing is complete.
The parameter obj
is an R list object with the
following members:
ParameterNames
ParameterCirculars (optional)
StationNames (optional)
Xs
Ys
Times
Data
FLTs (required for type Forecasts)
Please note that ParameterWeights
member is not written to files.