Description Usage Arguments Value Expected File Structure Warnings and Notes on File Structure
get.ncdf
loads the data stored in NetCDF files, as determined by
the information in process.inputs.tmp
, output from
get.process.chunks
. Data is loaded by region, latitude
band, run, and time range, and is concatenated across files if necessary.
Data is returned as a list by pixel, with every list member containing
the lat
and lon
of the pixel, and the raw data
("Raw
").
1 |
defaults |
the output from |
process.inputs.tmp |
the output from |
year.range |
which year range should be output, in a vector
|
A list; each element reperesenting a pixel, containing named
subelements lat
, lon
, and the raw data Raw
.
In general, most common forms of climate file structures are supported,
especially the CMIP5 structure. Variables can either be on a lon x lat
grid or stored by linear location. Files can either contain all runs of a model
or can be saved by run. Files can either contain the whole timeframe of a model
run or be split up in consecutive temporal chunks. Furthermore:
the code searches for NetCDF files using the search
string "[defaults$filevar]_day_.*nc
" (by default; this can be
changed by setting defaults$search.str
). Make sure no other NetCDF
files with that pattern are present in the search directory (by default
defaults$mod.data.dir
).
Currently, the code expects the primary variable to
have either a location dimension (giving the linear index of a location),
or a lon x lat grid. These are all identified by name - the search terms
used can be set in defaults$varnames
- out-of-the-box, the package
for example supports "lat", "latitude", "Latitude", and "latitude_1" as
possible names for the "lat" dimension.
The code expects there to be two location variables,
lat
and lon
(CMIP5 syntax), giving the lat/lon location of
every pixel in the file. The names of those variables can be any of the
alternatives given by defaults$varnames
.
If there are multiple runs in the file, there should
be a run
variable/dimension in the file giving the run id as an
integer
Files have to begin on 01/01 and end on 12/31 of a year.
Loading speeds up a lot if as much of the data as possible is stored in a single file - an example is storing files by region, but with all runs and years in the same file for the pixels in that region.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.