Description Usage Arguments Examples
Read NetCDF File
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
file |
A character string specifying the NetCDF file location |
field |
A character string specifying the field to be read |
... |
An arbitrary number of character strings specifying additional fields to be read |
navals |
A float specifying NA values |
lonmin |
A float specifying longitude to start reading (optional) |
lonmax |
A float specifying longitude to stop reading (optional) |
latmin |
A float specifying latitude to start reading (optional) |
latmax |
A float specifying latitude to stop reading (optional) |
zstart |
An integer specifying first level to read (default: 1) |
zcount |
An integer specifying number of levels to read (default: -1) |
tstart |
An integer specifying first time-steps to read (default: 1) |
tcount |
An integer specifying number of time-steps to read (default: -1) |
1 2 3 4 5 6 7 | library(zeallot) # Need this to unpack data from rfile
# Read an entire field
c(lons, lats, APVTURBT)%<-%rfile("/net/thermo/atmosdyn2/atroman/stingjet/20140211_12/tra/APV12_20140212_07.nc","APVTURBT")
# Only read a specific subset of field
c(lons,lats,PV)%<-%rfile("/net/thermo/atmosdyn/atroman/phd/MAR18/cdf/S20180302_21","PV",lonmin=-60,lonmax=-20,latmin=46,latmax=86,zstart=2,zcount=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.