Functions

Mosaic file

GRIDSPEC

The mosaic file, or equivalently its representation in memory, contains all the connectivity information between tile grids. More...

Functions

int nccf_def_mosaic (int ngrids, const int gridids[], const char *name, const double period[], int *mosaicid)
 Define a mosaic, acts as a constructor.
int nccf_def_mosaic_from_file (const char *filename, const char *name, int *mosaicid)
 Define (construct) a mosaic from a netcdf file.
int nccf_free_mosaic (int mosaicid)
 Free (destroy) a mosaic object (this will reclaim memory).
int nccf_put_mosaic (int ncid, int mosaicid)
 Write mosaic to netcdf file.
int nccf_get_mosaic_ngrids (int mosaicid, int *ngrids)
 Get the number of grids.
int nccf_get_mosaic_ndims (int mosaicid, int *ndims)
 Get the number of dims.
int nccf_get_mosaic_ncontacts (int mosaicid, int *ncontacts)
 Get the number of contacts.
int nccf_get_mosaic_coord_names (int mosaicid, char **coordnames)
 Get the number of contacts.
int nccf_get_mosaic_grid_ranges (int mosaicid, int index, int *gridid0, int *gridid1, int grid0_beg_ind[], int grid0_end_ind[], int grid1_beg_ind[], int grid1_end_ind[])
 Get contact indices from a given contact.
int nccf_get_mosaic_gridids (int mosaicid, int gridids[])
 Get the grid ids.
int nccf_get_mosaic_grid_file (int mosaicid, int index, char *file)
 Get the i-th grid filename.
int nccf_add_mosaic_att (int mosaicid, const char *name, const char *value)
 Add an attribute to a mosaic.
int nccf_inq_mosaic_grids (int ncid, char *contact_gridids)
 Get the contact grid ids from the mosaic file.
int nccf_inq_mosaic_index (int ncid, char *contact_index)
 Inquire the contact indices from the mosaic file.
int nccf_inq_mosaic_ncontacts (int ncid, int *ncontacts)
 Inquire the number of contacts from the mosaic.
int nccf_get_mosaic_contact_map (int mosaicid, int index, char *contact_map)
 Read a contact map for a given index from a mosaic object.
int nccf_get_mosaic_tile_contact (int mosaicid, int index, char *contact_map)
 Get a tile contact from a mosaic based on an index.
int nccf_get_mosaic_tile_separator (char *tile_separator)
 Get the separator for the contact_map and tile_contacts.
int nccf_print_mosaic_as_polytopes (int mosaicid, const char *file_name)
 Create a polytope file for plotting tile connectivity.

Detailed Description

The mosaic file, or equivalently its representation in memory, contains all the connectivity information between tile grids.

Thus, a mosaic must know about its underlying grids and these must exist prior to the construction of a mosaic. Grid objects should not be freed before all operations on the mosaic have been completed.


Function Documentation

int nccf_add_mosaic_att ( int  mosaicid,
const char *  name,
const char *  value 
)

Add an attribute to a mosaic.

Parameters:
mosaicidmosaic ID
namename of the attribute to add
valuevalue of the attribute
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Add an attribute to a mosaic.

Id:
nccf_add_mosaic_att.c 507 2011-02-14 21:27:52Z dkindig

Definition at line 9 of file nccf_add_mosaic_att.c.

int nccf_def_mosaic ( int  ngrids,
const int  gridids[],
const char *  name,
const double  period[],
int *  mosaicid 
)

Define a mosaic, acts as a constructor.

Parameters:
ngridsthe number of grid files
grididsgrid IDs for each grid forming the mosaic
namename of the mosaic
periodperiodicity array, one element for each dimension. A value of 0 means no periodicity.
mosaicid(output) ID
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 98 of file nccf_def_mosaic.c.

int nccf_def_mosaic_from_file ( const char *  filename,
const char *  name,
int *  mosaicid 
)

Define (construct) a mosaic from a netcdf file.

Parameters:
filenamefile name
namename of the mosaic
mosaicid(output) ID
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 60 of file nccf_def_mosaic_from_file.c.

int nccf_free_mosaic ( int  mosaicid)

Free (destroy) a mosaic object (this will reclaim memory).

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

Definition at line 9 of file nccf_free_mosaic.c.

int nccf_get_mosaic_contact_map ( int  mosaicid,
int  index,
char *  contact_map 
)

Read a contact map for a given index from a mosaic object.

Parameters:
mosaicidMosaic object ID
indexContact map index
contact_mapReturned contact map string
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.
Id:
nccf_get_mosaic_contact_map.c 520 2011-02-17 23:19:26Z dkindig

Definition at line 13 of file nccf_get_mosaic_contact_map.c.

int nccf_get_mosaic_coord_names ( int  mosaicid,
char **  coordnames 
)

Get the number of contacts.

Parameters:
mosaicida mosaic ID (e.g. returned by nccf_def_mosaic)
coordnamescoordinate names used by grid (output)
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 9 of file nccf_get_mosaic_coord_names.c.

int nccf_get_mosaic_grid_file ( int  mosaicid,
int  index,
char *  file 
)

Get the i-th grid filename.

Parameters:
mosaicidmosaic ID
indexindex of grid
file(output) filename
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 9 of file nccf_get_mosaic_grid_file.c.

int nccf_get_mosaic_grid_ranges ( int  mosaicid,
int  index,
int *  gridid0,
int *  gridid1,
int  grid0_beg_ind[],
int  grid0_end_ind[],
int  grid1_beg_ind[],
int  grid1_end_ind[] 
)

Get contact indices from a given contact.

Parameters:
mosaicidmosaic object ID (returned by nccf_def_mosaic)
indexcontact index
gridid0(output) first grid in contact
gridid1(output) second grid in contact
grid0_beg_ind(output) begin set of indices for the coordinates on the first grid
grid0_end_ind(output) end set of indices index for the coordinates on the first grid
grid1_beg_ind(output) begin set of indices for the coordinates on the second grid
grid1_end_ind(output) end set of indices index for the coordinates on the second grid
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 53 of file nccf_get_mosaic_grid_ranges.c.

int nccf_get_mosaic_gridids ( int  mosaicid,
int  gridids[] 
)

Get the grid ids.

Parameters:
mosaicida mosaic object handle (returned by nccf_def_mosaic)
gridids(output) array of grid unique identifiers
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 8 of file nccf_get_mosaic_gridids.c.

int nccf_get_mosaic_ncontacts ( int  mosaicid,
int *  ncontacts 
)

Get the number of contacts.

Parameters:
mosaicida mosaic ID (e.g. returned by nccf_def_mosaic)
ncontactsnumber of contacts (output)
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 8 of file nccf_get_mosaic_ncontacts.c.

int nccf_get_mosaic_ndims ( int  mosaicid,
int *  ndims 
)

Get the number of dims.

Parameters:
mosaicida mosaic ID (e.g. returned by nccf_def_mosaic)
ndimsnumber of dims for the coordinates (output)
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 8 of file nccf_get_mosaic_ndims.c.

int nccf_get_mosaic_ngrids ( int  mosaicid,
int *  ngrids 
)

Get the number of grids.

Parameters:
mosaicida mosaic ID (e.g. returned by nccf_def_mosaic)
ngridsnumber of grids (output)
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 8 of file nccf_get_mosaic_ngrids.c.

int nccf_get_mosaic_tile_contact ( int  mosaicid,
int  index,
char *  tile_contact 
)

Get a tile contact from a mosaic based on an index.

Parameters:
mosaicidMosaic object ID
indexContact map index
tile_contactReturned tile contact
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.
Id:
nccf_get_mosaic_tile_contact.c 520 2011-02-17 23:19:26Z dkindig

Definition at line 13 of file nccf_get_mosaic_tile_contact.c.

int nccf_get_mosaic_tile_separator ( char *  tile_separator)

Get the separator for the contact_map and tile_contacts.

Parameters:
tile_separatorReturned string CF_TILE_SEPARATOR
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Get the separator for the contact_map and tile_contacts.

Id:
nccf_get_mosaic_tile_separator.c 520 2011-02-17 23:19:26Z dkindig

Definition at line 14 of file nccf_get_mosaic_tile_separator.c.

int nccf_inq_mosaic_grids ( int  ncid,
char *  contact_gridids 
)

Get the contact grid ids from the mosaic file.

Parameters:
ncidmosaic file ncid
contact_grididsString of grid-to-grid contact ids
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 10 of file nccf_inq_mosaic_grids.c.

int nccf_inq_mosaic_index ( int  ncid,
char *  contact_index 
)

Inquire the contact indices from the mosaic file.

Parameters:
ncidmosaic file ncid
contact_indexString of Indices for the contact
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 10 of file nccf_inq_mosaic_index.c.

int nccf_inq_mosaic_ncontacts ( int  ncid,
int *  ncontacts 
)

Inquire the number of contacts from the mosaic.

Parameters:
ncidmosaic file ID
ncontactsnumber of contacts
Returns:
NC_NOERR on success
Author:
David Kindig and Alexander Pletzer, Tech-X Corp.

Definition at line 8 of file nccf_inq_mosaic_ncontacts.c.

int nccf_print_mosaic_as_polytopes ( int  mosaicid,
const char *  file_name 
)

Create a polytope file for plotting tile connectivity.

Parameters:
mosaicidmosaic ID
file_namethe .pt file name
Returns:
NC_NOERR on success
Author:
Andrey Sobol and David Kindig, Tech-X Corp.

Definition at line 31 of file nccf_print_mosaic_as_polytopes.c.

int nccf_put_mosaic ( int  ncid,
int  mosaicid 
)

Write mosaic to netcdf file.

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

Definition at line 10 of file nccf_put_mosaic.c.

 All Classes Files Functions Defines

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