Description Usage Arguments Details Value Note References Examples
Returns time axis data as PCICt for a file.
1 2 3 4 5 6 7 | nc.get.time.series(
f,
v,
time.dim.name,
correct.for.gregorian.julian = FALSE,
return.bounds = FALSE
)
|
f |
The file (an object of class |
v |
Optionally, the variable to look for a time dimension on. |
time.dim.name |
Optionally, the time dimension name. |
correct.for.gregorian.julian |
Specific workaround for Gregorian-Julian calendar transitions in non-proleptic Gregorian calendars |
return.bounds |
Whether to return the time bounds as an additional attribute |
Retrieving time data from a NetCDF file in an intelligible format is a non-trivial problem. The PCICt
package solves part of this problem by allowing for 365- and 360-day calendars. This function complements it by returns time data for a file as PCICt
, doing all necessary conversions.
A vector of PCICt objects, optionally with bounds
If the file was opened with readunlim=FALSE
, it will read in the time values from the file; otherwise, it will retrieve the time values from the ncdf4
class' data structures.
http://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#time-coordinate
1 2 3 4 5 6 7 | ## Get time series from file
## Not run:
f <- nc_open("pr.nc")
ts <- nc.get.time.series(f)
nc_close(f)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.