writeNetCDF | R Documentation |
This function writes netCDF output files
writeNetCDF(ghgName, datect, proj, res, flux)
ghgName |
Greenhouse gas: one of "ch4", "co2", "n2o", "c2h6" or "voc". Defaults to "ch4". |
datect |
A vector of timestamps in POSIXct format. |
proj |
Geographic projection for the gridded data, either "OSGB" or "LonLat". |
res |
Resolution for the gridded data, either 1, 20 or 100 km or 0.01 degrees for LonLat. Defaults to "1km". |
flux |
a ukghg flux object |
## Not run: startDate <- as.POSIXct(strptime("01/06/2006", "%d/%m/%Y"), tz = "UTC") endDate <- as.POSIXct(strptime("02/06/2006", "%d/%m/%Y"), tz = "UTC") # create a sequence of dates nTimes <- 2 datect <- seq(startDate, endDate, length = nTimes) # calculate fluxes for these times myFlux <- calcFlux("ch4", datect, proj = "OSGB", res = "100", "mol", "nano") rf <- writeNetCDF("ch4", datect, proj = "OSGB", res = "100", myFlux) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.