USML
netcdf_coards< DATA_TYPE, NUM_DIMS > Class Template Reference
Collaboration diagram for netcdf_coards< DATA_TYPE, NUM_DIMS >:

Detailed Description

template<class DATA_TYPE, int NUM_DIMS>
class usml::netcdf::netcdf_coards< DATA_TYPE, NUM_DIMS >

Reads a single COARDS data grid from a netCDF file.

Assumes that the entire file should be read into memory.

The Cooperative Ocean/Atmosphere Research Data Service (COARDS) is a NOAA/university cooperative for the sharing and distribution of global atmospheric and oceanographic research data sets. COARDS is also a NAVOCEANO recommended practice for netCDF files.

References:
Cooperative Ocean/Atmosphere Research Data Service, "Conventions for the standardization of NetCDF files," May 1995. See http://ferret.wrc.noaa.gov/noaa_coop/coop_cdf_profile.html for more information.

Constructor & Destructor Documentation

netcdf_coards ( NcFile &  file,
NcToken  name,
bool  read_fill = false 
)
inline

Extract a named data grid from an open NetCDF file.

Creates new memory area for field data. Replaces missing data with fill value.

Parameters
fileReference to an open NetCDF file.
nameName of the data grid to extract (case sensitive).
read_fillRead _FillValue from NetCDF file if true. Use NAN as fill value if false.

Member Function Documentation

seq_vector* make_axis ( NcFile &  file,
NcDim *  dimension 
)
inlineprivate

Construct a seq_vector from NetCDF dimension object.

Inspects the data to see if seq_linear or seq_log can be used to optimize the performance of this dimension->

Parameters
fileNetCDF file to process.
dimensionNetCDF dimension. The COARDS spec assumes that there is a NetCDF variable of the same name.
Returns
Sequence vector equivalent.