NetCDF4 C++ API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
netcdf::NcIndexedGridBase Class Referenceabstract

Class providing an interface to a NetCDF file containing a indexed (packed) latitude/longitude grid. More...

#include <NetCDF/cpp4/src/datasets/NcIndexedGridBase.h>

Detailed Description

Copyright:
Copyright 2013 Colorado State University. All rights reserved.
Organization:
Natural Resource Ecology Laboratory
Colorado State University, Fort Collins, CO 80523 USA
www.nrel.colostate.edu
Project:
IRC <www.nrel.colostate.edu/projects/irc/>

Produces a netCDF file that has the following structure:

    netcdf Test_NcIndexedGridBase {
    dimensions:
        record = UNLIMITED ; // (0 currently)
    variables:
        ushort xc(record) ;
                xc:axis = "X" ;
                xc:long_name = "x-coordinate in Cartesian system" ;
                xc:valid_min = 0US ;
                xc:valid_max = 2US ;
        ushort yc(record) ;
                yc:axis = "Y" ;
                yc:long_name = "y-coordinate in Cartesian system" ;
                yc:valid_min = 0US ;
                yc:valid_max = 2US ;
        uint index(record) ;
                index:long_name = "linear indices to x,y grid" ;
                index:valid_min = 0U ;
                index:valid_max = 8U ;
                index:formula = "index = y * (xc:valid_max + 1) + x" ;
        float lat(record) ;
                lat:long_name = "latitude of center of cell" ;
                lat:standard_name = "latitude" ;
                lat:units = "degrees_north" ;
                lat:valid_min = -90.f ;
                lat:valid_max = 90.f ;
        float lon(record) ;
                lon:long_name = "longitude of center of cell" ;
                lon:standard_name = "longitude" ;
                lon:units = "degrees_east" ;
                lon:valid_min = -180.f ;
                lon:valid_max = 180.f ;
    // global attributes:
                :zero_corner = "top-left" ;
    }
Author
Tom Hilinski tom.h.nosp@m.ilin.nosp@m.ski@c.nosp@m.olos.nosp@m.tate..nosp@m.edu
Date
2013Feb

Public Member Functions

void SetRecordDimName (std::string const useRecordDimName)
 
void SetLatLonLongNames (std::string const useLatLongName, std::string const useLonLongName)
 
std::string const & GetRecordDimName () const
 
void Create (NcFile &ncFile, unsigned short const latDimSize, unsigned short const lonDimSize, NcSpatial::TAnchor const anchor)
 
virtual ~NcIndexedGridBase ()=0
 

Static Public Attributes

static char const *const dimNames []
 names of dimensions More...
 
static char const *const varNames []
 names of variables More...
 
static char const *const longNames []
 long_names attributes of variables More...
 

Protected Member Functions

 NcIndexedGridBase (short const useCompressionLevel=5)
 

Protected Attributes

std::string recordDimName
 
std::string latLongName
 
std::string lonLongName
 
short const compressionLevel
 

Constructor & Destructor Documentation

netcdf::NcIndexedGridBase::NcIndexedGridBase ( short const  useCompressionLevel = 5)
inlineprotected
netcdf::NcIndexedGridBase::~NcIndexedGridBase ( )
inlinepure virtual

Member Function Documentation

void netcdf::NcIndexedGridBase::Create ( NcFile ncFile,
unsigned short const  latDimSize,
unsigned short const  lonDimSize,
NcSpatial::TAnchor const  anchor 
)
Todo:
global atts
std::string const& netcdf::NcIndexedGridBase::GetRecordDimName ( ) const
inline
void netcdf::NcIndexedGridBase::SetLatLonLongNames ( std::string const  useLatLongName,
std::string const  useLonLongName 
)
inline
void netcdf::NcIndexedGridBase::SetRecordDimName ( std::string const  useRecordDimName)
inline

Member Data Documentation

short const netcdf::NcIndexedGridBase::compressionLevel
protected
char const *const netcdf::NcIndexedGridBase::dimNames
static
Initial value:
=
{
"record"
}
std::string netcdf::NcIndexedGridBase::latLongName
protected
char const *const netcdf::NcIndexedGridBase::longNames
static
Initial value:
=
{
"latitude of center of cell",
"longitude of center of cell"
}
std::string netcdf::NcIndexedGridBase::lonLongName
protected
std::string netcdf::NcIndexedGridBase::recordDimName
protected
char const *const netcdf::NcIndexedGridBase::varNames
static
Initial value:
=
{
"xc", "yc", "index", "lat", "lon", 0
}

The documentation for this class was generated from the following files: