ncread_cmip | R Documentation |
getCMIP5date
make sure that if dates geenrated according to
time
and dates in files consistent. If not, error will occur.
ncread_cmip(
file,
varnames = 1L,
range = NULL,
delta = 0,
ntime = -1,
DatePeriod,
grid_type = NULL,
scale = 1,
offset = 0,
value_range = NULL,
adjust_lon = FALSE,
check_date = FALSE
)
file |
Character, nc file name. |
varnames |
String or integer vector which specify which variable to read.
if integer vector, for example:
|
range |
A numeric vector, |
delta |
suggest 3deg. Extend range into |
ntime |
How many time to read? |
DatePeriod |
Date character vector, starting and ending date.
|
grid_type |
'vec', 'mat' or NULL. If not null, 3d array will be converted
to 2d matrix, with the dimension of
|
scale, offset |
If the variable in the netCDF file has a scale and/or offset attribute defined, the returned data are automatically and silently scaled and/or offset as requested. Then you should just leave scale = 1, and offset = 0. |
value_range |
If not null, values out of |
adjust_lon |
If true, lon = lon + cellsize_y/2 |
check_date |
If true, check whether date in nc file is consistent with
|
list(dim, date, value)
In some CMIP5 file, time
band is incorrect. So we decide to generate
date by the date information containing in the file name.
This function is initially designed for CMIP5 nc files.
spdata_array
## Not run:
file <- "H:/CMIP5/historical_tasmax/tasmax_day_ACCESS1-0_historical_r1i1p1_20000101-20051231.nc"
range <- c(0, 360, -90, 90)
range <- c(70,140, 15, 55)
l <- ncread_cmip(file, varnames = "tasmax", range = range, delta = 2, ntime = 1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.