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. | |
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.
| int nccf_add_mosaic_att | ( | int | mosaicid, |
| const char * | name, | ||
| const char * | value | ||
| ) |
Add an attribute to a mosaic.
| mosaicid | mosaic ID |
| name | name of the attribute to add |
| value | value of the attribute |
Add an attribute to a mosaic.
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.
| ngrids | the number of grid files |
| gridids | grid IDs for each grid forming the mosaic |
| name | name of the mosaic |
| period | periodicity array, one element for each dimension. A value of 0 means no periodicity. |
| mosaicid | (output) ID |
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.
| filename | file name |
| name | name of the mosaic |
| mosaicid | (output) ID |
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).
| mosaicid | mosaic identifier |
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.
| mosaicid | Mosaic object ID |
| index | Contact map index |
| contact_map | Returned contact map string |
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.
| mosaicid | a mosaic ID (e.g. returned by nccf_def_mosaic) |
| coordnames | coordinate names used by grid (output) |
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.
| mosaicid | mosaic ID |
| index | index of grid |
| file | (output) filename |
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.
| mosaicid | mosaic object ID (returned by nccf_def_mosaic) |
| index | contact 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 |
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.
| mosaicid | a mosaic object handle (returned by nccf_def_mosaic) |
| gridids | (output) array of grid unique identifiers |
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.
| mosaicid | a mosaic ID (e.g. returned by nccf_def_mosaic) |
| ncontacts | number of contacts (output) |
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.
| mosaicid | a mosaic ID (e.g. returned by nccf_def_mosaic) |
| ndims | number of dims for the coordinates (output) |
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.
| mosaicid | a mosaic ID (e.g. returned by nccf_def_mosaic) |
| ngrids | number of grids (output) |
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.
| mosaicid | Mosaic object ID |
| index | Contact map index |
| tile_contact | Returned tile contact |
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.
| tile_separator | Returned string CF_TILE_SEPARATOR |
Get the separator for the contact_map and tile_contacts.
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.
| ncid | mosaic file ncid |
| contact_gridids | String of grid-to-grid contact ids |
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.
| ncid | mosaic file ncid |
| contact_index | String of Indices for the contact |
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.
| ncid | mosaic file ID |
| ncontacts | number of contacts |
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.
| mosaicid | mosaic ID |
| file_name | the .pt file name |
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.
| ncid | netcdf file ID |
| mosaicid | mosaic ID |
Definition at line 10 of file nccf_put_mosaic.c.