Functions

Structured grids

GRIDSPEC

Curvilinear, structured grids are collections of coordinates, on for each spatial dimension. More...

Functions

int nccf_def_struct_grid (const int coordids[], const char *gridname, int *gridid)
 Define structured grid (acts as a constructor).
int nccf_def_struct_grid_from_file (const char *filename, int ndims, const char **coordnames, char *gridname, int *gridid)
 Define (construct) grid from a netcdf file.
int nccf_free_struct_grid (int gridid)
 Free structured grid object.
int nccf_put_struct_grid (int ncid, int gridid)
 Write structured grid, including its underlying coordinates.
int nccf_get_struct_grid_coord_ids (const int gridid, int coordids[])
 Fill in coordinate ids stored in a grid object.
int nccf_get_struct_grid_ndims (const int gridid, int *ndims)
 Get number of space dimensions.
int nccf_get_struct_grid_coord_names (const int gridid, char *coordnames)
 Fill in coordinate names.
int nccf_get_struct_grid_name (const int gridid, char *gridname)
 Fill in the grid name for a given grid ID.

Detailed Description

Curvilinear, structured grids are collections of coordinates, on for each spatial dimension.

Grids keep a reference to the underlying coordinate objects. Therefore, coordinate objects must exist prior to the construction of a grid and coordinate objects should not be freed before all operations on a structured grid have been completed.


Function Documentation

int nccf_def_struct_grid ( const int  coordids[],
const char *  gridname,
int *  gridid 
)

Define structured grid (acts as a constructor).

Parameters:
coordidscoordinates IDs of the grid.
gridnamename this grid will be given
gridid(output) grid ID
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 18 of file nccf_def_struct_grid.c.

int nccf_def_struct_grid_from_file ( const char *  filename,
int  ndims,
const char **  coordnames,
char *  gridname,
int *  gridid 
)

Define (construct) grid from a netcdf file.

Parameters:
filenamename of the netcdf file
ndimsnumber of space dimensions
coordnamesname of each coordinate (each string should be able to hold at least NC_MAX_NAME characters)
gridnamename this grid will be given
gridid(output) returned grid ID
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.
Id:
nccf_def_struct_grid_from_file.c 508 2011-02-14 21:29:48Z dkindig

Definition at line 13 of file nccf_def_struct_grid_from_file.c.

int nccf_free_struct_grid ( int  gridid)

Free structured grid object.

Parameters:
grididgrid ID
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 14 of file nccf_free_struct_grid.c.

int nccf_get_struct_grid_coord_ids ( const int  gridid,
int  coordids[] 
)

Fill in coordinate ids stored in a grid object.

Parameters:
grididgrid object Id
coordids(output) list of coordinate ids
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 16 of file nccf_get_struct_grid_coord_ids.c.

int nccf_get_struct_grid_coord_names ( const int  gridid,
char *  coordnames 
)

Fill in coordinate names.

Parameters:
grididgrid object Id
coordnames(output) list of coordinate object names, each name must be able to hold NC_MAX_NAME characters
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 15 of file nccf_get_struct_grid_coord_names.c.

int nccf_get_struct_grid_name ( const int  gridid,
char *  gridname 
)

Fill in the grid name for a given grid ID.

Parameters:
grididgrid object Id
gridname(output) name of grid, must be able to hold NC_MAX_NAME characters
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 15 of file nccf_get_struct_grid_name.c.

int nccf_get_struct_grid_ndims ( const int  gridid,
int *  ndims 
)

Get number of space dimensions.

Parameters:
grididgrid object Id
ndims(output) number of space dimensions
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 15 of file nccf_get_struct_grid_ndims.c.

int nccf_put_struct_grid ( int  ncid,
int  gridid 
)

Write structured grid, including its underlying coordinates.

Parameters:
ncidNetCDF file ID created by nc_create or nc_open
grididgrid ID
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 18 of file nccf_put_struct_grid.c.

 All Classes Files Functions Defines

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