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. | |
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.
| int nccf_def_struct_grid | ( | const int | coordids[], |
| const char * | gridname, | ||
| int * | gridid | ||
| ) |
Define structured grid (acts as a constructor).
| coordids | coordinates IDs of the grid. |
| gridname | name this grid will be given |
| gridid | (output) grid ID |
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.
| filename | name of the netcdf file |
| ndims | number of space dimensions |
| coordnames | name of each coordinate (each string should be able to hold at least NC_MAX_NAME characters) |
| gridname | name this grid will be given |
| gridid | (output) returned grid ID |
Definition at line 13 of file nccf_def_struct_grid_from_file.c.
| int nccf_free_struct_grid | ( | int | gridid | ) |
Free structured grid object.
| gridid | grid ID |
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.
| gridid | grid object Id |
| coordids | (output) list of coordinate ids |
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.
| gridid | grid object Id |
| coordnames | (output) list of coordinate object names, each name must be able to hold NC_MAX_NAME characters |
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.
| gridid | grid object Id |
| gridname | (output) name of grid, must be able to hold NC_MAX_NAME characters |
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.
| gridid | grid object Id |
| ndims | (output) number of space dimensions |
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.
| ncid | NetCDF file ID created by nc_create or nc_open |
| gridid | grid ID |
Definition at line 18 of file nccf_put_struct_grid.c.