Functions

Structured data

GRIDSPEC

Each structured grid can have data attached. More...

Functions

int nccf_def_struct_data (int gridid, const char *name, const char *standard_name, const char *units, const char *time_dimname, int *dataid)
 Define data object (constructor).
int nccf_def_struct_data_from_file (const char *filename, int gridid, const char *varname, int read_data, int *dataid)
 Define data object from netcdf file (constructor).
int nccf_free_struct_data (int dataid)
 Free object (destructor).
int nccf_get_struct_data_gridid (int dataid, int *gridid)
 Get the undelying grid Id.
int nccf_set_struct_data_double (int dataid, const double *data, int save)
 Set the data to a double array, this will add a new record if the data are time dependent.
int nccf_set_struct_data_float (int dataid, const float *data, int save)
 Set the data to a float array, this will add a new record if the data are time dependent.
int nccf_set_struct_data_int (int dataid, const int *data, int save)
 Set the data to a int array, this will add a new record if the data are time dependent.
int nccf_put_struct_data (int ncid, int dataid)
 Write object to netcdf file.
int nccf_add_struct_data_att (int dataid, const char *name, const char *value)
 Add attribute to object.
int nccf_get_struct_data_type (int dataid, nc_type *dataType)
 Get data type.
int nccf_get_struct_data_pointer (int dataid, void **dataPtr)
 Get pointer to the data.
int nccf_get_struct_data_ndims (int dataid, int *nDataDims)
 Get the number of dimensions of the data.
int nccf_get_struct_data_dims (int dataid, int *dataDims)
 Get the dimensions of the data.

Detailed Description

Each structured grid can have data attached.

Data objects refer to grid objects and are defined on a per tile basis.


Function Documentation

int nccf_add_struct_data_att ( int  dataid,
const char *  name,
const char *  value 
)

Add attribute to object.

Parameters:
dataiddata ID
nameattribute name
valueattribute value
Returns:
NC_NOERR on success
Author:
Alexander Pletzer and David Kindig, Tech-X Corp.
Id:
nccf_add_struct_data_att.c 522 2011-02-17 23:41:29Z pletzer

Definition at line 7 of file nccf_add_struct_data_att.c.

int nccf_def_struct_data ( int  gridid,
const char *  name,
const char *  standard_name,
const char *  units,
const char *  time_dimname,
int *  dataid 
)

Define data object (constructor).

Parameters:
grididstructured grid object Id
namename of coordinate (e.g. "lon")
standard_nameCF standard name attribute of the data
unitsCF units attribute of the data
time_dimnamename of time dimension (or "", or NULL if time independent)
dataid(output) ID
Returns:
NC_NOERR on success
Author:
Alexander Pletzer, Andrey Sobol, and David Kindig, Tech-X Corp.

Definition at line 13 of file nccf_def_struct_data.c.

int nccf_def_struct_data_from_file ( const char *  filename,
int  gridid,
const char *  varname,
int  read_data,
int *  dataid 
)

Define data object from netcdf file (constructor).

Parameters:
filenamename of the netcdf file
grididId of the grid object assicated with the data
varnamevariable name of the data object stored in file
read_dataset to 1 if data should be read, 0 otherwise
dataid(output) ID
Returns:
NC_NOERR on success
Author:
Alexander Pletzer and David Kindig, Tech-X Corp.
Id:
nccf_def_struct_data_from_file.c 522 2011-02-17 23:41:29Z pletzer

Definition at line 11 of file nccf_def_struct_data_from_file.c.

int nccf_free_struct_data ( int  dataid)

Free object (destructor).

Parameters:
dataidID
Returns:
NC_NOERR on success
Author:
Alexander Pletzer, Andrey Sobol, and David Kindig, Tech-X Corp.
Id:
nccf_free_struct_data.c 522 2011-02-17 23:41:29Z pletzer

Definition at line 7 of file nccf_free_struct_data.c.

int nccf_get_struct_data_dims ( int  dataid,
int *  dataDims 
)

Get the dimensions of the data.

Parameters:
dataiddata ID
dataDimsdimensions (sizes) along each axis
Returns:
NC_NOERR on success
Author:
Alexander Pletzer and David Kindig, Tech-X Corp.
int nccf_get_struct_data_gridid ( int  dataid,
int *  gridid 
)

Get the undelying grid Id.

Parameters:
dataidID
grididId of the grid
Returns:
NC_NOERR on success
Author:
Alexander Pletzer, Andrey Sobol, and David Kindig, Tech-X Corp.
Id:
nccf_get_struct_data_gridid.c 522 2011-02-17 23:41:29Z pletzer

Definition at line 7 of file nccf_get_struct_data_gridid.c.

int nccf_get_struct_data_ndims ( int  dataid,
int *  nDataDims 
)

Get the number of dimensions of the data.

Parameters:
dataiddata ID
nDataDimsnumber of dimensions
Returns:
NC_NOERR on success
Author:
Alexander Pletzer and David Kindig, Tech-X Corp.

Get the number of dimensions of the data.

"$Id: nccf_get_struct_data_ndims.c 522 2011-02-17 23:41:29Z pletzer $"

Definition at line 10 of file nccf_get_struct_data_ndims.c.

int nccf_get_struct_data_pointer ( int  dataid,
void **  dataPtr 
)

Get pointer to the data.

Parameters:
dataiddata ID
dataPtr(output) pointer to the data
Returns:
NC_NOERR on success
Author:
Alexander Pletzer and David Kindig, Tech-X Corp.
Id:
nccf_get_struct_data_pointer.c 522 2011-02-17 23:41:29Z pletzer

Definition at line 7 of file nccf_get_struct_data_pointer.c.

int nccf_get_struct_data_type ( int  dataid,
nc_type *  dataType 
)

Get data type.

Parameters:
dataiddata ID
dataType(output) netcdf data type
Returns:
NC_NOERR on success
Author:
Alexander Pletzer and David Kindig, Tech-X Corp.
Id:
nccf_get_struct_data_type.c 522 2011-02-17 23:41:29Z pletzer

Definition at line 7 of file nccf_get_struct_data_type.c.

int nccf_put_struct_data ( int  ncid,
int  dataid 
)

Write object to netcdf file.

Parameters:
ncidnetcdf file ID
dataiddata ID
Returns:
NC_NOERR on success
Author:
Alexander Pletzer, Andrey Sobol, and David Kindig, Tech-X Corp.

Write object to netcdf file.

Id:
nccf_put_struct_data.c 522 2011-02-17 23:41:29Z pletzer

Definition at line 14 of file nccf_put_struct_data.c.

int nccf_set_struct_data_double ( int  dataid,
const double *  data,
int  save 
)

Set the data to a double array, this will add a new record if the data are time dependent.

Parameters:
dataiddata ID
dataflat data array
save!= 0 in order to copy-save the data
Returns:
NC_NOERR on success
Author:
Alexander Pletzer and David Kindig, Tech-X Corp.
int nccf_set_struct_data_float ( int  dataid,
const float *  data,
int  save 
)

Set the data to a float array, this will add a new record if the data are time dependent.

Parameters:
dataiddata ID
dataflat data array
save!= 0 in order to copy-save the data
Returns:
NC_NOERR on success
Author:
Alexander Pletzer and David Kindig, Tech-X Corp.
int nccf_set_struct_data_int ( int  dataid,
const int *  data,
int  save 
)

Set the data to a int array, this will add a new record if the data are time dependent.

Parameters:
dataiddata ID
dataflat data array
save!= 0 in order to copy-save the data
Returns:
NC_NOERR on success
Author:
Alexander Pletzer and David Kindig, Tech-X Corp.
 All Classes Files Functions Defines

Generated on Tue Mar 1 2011 06:36:59 for libCF. LibCF is a Unidata library.