YAC 3.7.1
Yet Another Coupler
Loading...
Searching...
No Matches
read_scrip_grid.h File Reference
#include "basic_grid.h"
Include dependency graph for read_scrip_grid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct yac_basic_grid_data yac_read_scrip_basic_grid_data (char const *grid_filename, char const *mask_filename, char const *grid_name, int valid_mask_value, int use_ll_edges)
 
struct yac_basic_gridyac_read_scrip_basic_grid (char const *grid_filename, char const *mask_filename, char const *grid_name, int valid_mask_value, char const *name, int use_ll_edges, size_t *cell_coord_idx, size_t **duplicated_cell_idx, yac_int **orig_cell_global_ids, size_t *nbr_duplicated_cells)
 
struct yac_basic_gridyac_read_scrip_basic_grid_parallel (char const *grid_filename, char const *mask_filename, MPI_Comm comm, char const *grid_name, int valid_mask_value, char const *name, int use_ll_edges, size_t *cell_coord_idx, size_t **duplicated_cell_idx, yac_int **orig_cell_global_ids, size_t *nbr_duplicated_cells)
 
void yac_read_scrip_grid_information (char const *grid_filename, char const *mask_filename, char const *grid_name, int valid_mask_value, size_t *num_vertices, size_t *num_cells, int **num_vertices_per_cell, double **x_vertices, double **y_vertices, double **x_cells, double **y_cells, int **cell_to_vertex, int **cell_core_mask, size_t **duplicated_cell_idx, size_t **orig_cell_idx, size_t *nbr_duplicated_cells)
 
struct yac_basic_grid_data yac_read_scrip_cloud_basic_grid_data (char const *grid_filename, char const *mask_filename, char const *grid_name, int valid_mask_value)
 
struct yac_basic_gridyac_read_scrip_cloud_basic_grid (char const *grid_filename, char const *mask_filename, char const *grid_name, int valid_mask_value, char const *name, size_t *vertex_coord_idx, size_t **duplicated_vertex_idx, yac_int **orig_vertex_global_ids, size_t *nbr_duplicated_vertices)
 
struct yac_basic_gridyac_read_scrip_cloud_basic_grid_parallel (char const *grid_filename, char const *mask_filename, MPI_Comm comm, char const *grid_name, int valid_mask_value, char const *name, size_t *vertex_coord_idx, size_t **duplicated_vertex_idx, yac_int **orig_vertex_global_ids, size_t *nbr_duplicated_vertices)
 
struct yac_basic_gridyac_read_scrip_generic_basic_grid_parallel (char const *grid_filename, char const *mask_filename, MPI_Comm comm, char const *grid_name, int valid_mask_value, char const *name, int use_ll_edges, size_t *point_coord_idx, size_t **duplicated_point_idx, yac_int **orig_point_global_ids, size_t *nbr_duplicated_points, int *point_location)
 

Function Documentation

◆ yac_read_scrip_basic_grid()

struct yac_basic_grid * yac_read_scrip_basic_grid ( char const * grid_filename,
char const * mask_filename,
char const * grid_name,
int valid_mask_value,
char const * name,
int use_ll_edges,
size_t * cell_coord_idx,
size_t ** duplicated_cell_idx,
yac_int ** orig_cell_global_ids,
size_t * nbr_duplicated_cells )

reads in grid data from a SCRIP formated file

Parameters
[in]grid_filenamename of the SCRIP grid netcdf file
[in]mask_filenamename of the SCRIP mask netcdf file
[in]grid_namename of the grid in the file
[in]valid_mask_valuevalue that marks cells as valid
[in]namename of the grid
[in]use_ll_edgesif possible represent all edges using lon/lat circles
[out]cell_coord_idxindex at which cell centers are registerd in the basic grid
[out]duplicated_cell_idxindices of all duplicated cells
[out]orig_cell_global_idsglobal ids of the original cells
[out]nbr_duplicated_cellsnumber of duplicated cells
Returns
basic grid
Remarks
This routine will allocate the arrays duplicated_cell_idx and orig_cell_global_ids. The user is responsible for freeing them.
NULL is a valid argument for cell_coord_idx, duplicated_cell_idx, orig_cell_global_ids, and nbr_duplicated_cells

Definition at line 1098 of file read_scrip_grid.c.

Here is the call graph for this function:

◆ yac_read_scrip_basic_grid_data()

struct yac_basic_grid_data yac_read_scrip_basic_grid_data ( char const * grid_filename,
char const * mask_filename,
char const * grid_name,
int valid_mask_value,
int use_ll_edges )

reads in an grid in SCRIP format

Parameters
[in]grid_filenamename of the SCRIP grid netcdf file
[in]mask_filenamename of the SCRIP mask netcdf file
[in]grid_namename of the grid in the file
[in]valid_mask_valuevalue that marks cells as valid
[in]use_ll_edgesif possible represent all edges using lon/lat circles
Returns
yac_basic_grid_data structure that contains the grid

Definition at line 1034 of file read_scrip_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_read_scrip_basic_grid_parallel()

struct yac_basic_grid * yac_read_scrip_basic_grid_parallel ( char const * grid_filename,
char const * mask_filename,
MPI_Comm comm,
char const * grid_name,
int valid_mask_value,
char const * name,
int use_ll_edges,
size_t * cell_coord_idx,
size_t ** duplicated_cell_idx,
yac_int ** orig_cell_global_ids,
size_t * nbr_duplicated_cells )

reads in grid data from a SCRIP formated file in parallel and applies a IO decomposition to it

Parameters
[in]grid_filenamename of the SCRIP grid netcdf file
[in]mask_filenamename of the SCRIP mask netcdf file
[in]commMPI communicator containing all proceses that will get a part of the grid
[in]grid_namename of the grid in the file
[in]valid_mask_valuevalue that marks cells as valid
[in]namename of the grid
[in]use_ll_edgesif possible represent all edges using lon/lat circles
[out]cell_coord_idxindex at which cell centers are registerd in the basic grid
[out]duplicated_cell_idxindices of all duplicated cells
[out]orig_cell_global_idsglobal ids of the original cells
[out]nbr_duplicated_cellsnumber of duplicated cells
Returns
basic grid
Remarks
This routine will allocate the arrays duplicated_cell_idx and orig_cell_global_ids. The user is responsible for freeing them.
NULL is a valid argument for cell_coord_idx, duplicated_cell_idx, orig_cell_global_ids, and nbr_duplicated_cells

Definition at line 1045 of file read_scrip_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_read_scrip_cloud_basic_grid()

struct yac_basic_grid * yac_read_scrip_cloud_basic_grid ( char const * grid_filename,
char const * mask_filename,
char const * grid_name,
int valid_mask_value,
char const * name,
size_t * vertex_coord_idx,
size_t ** duplicated_vertex_idx,
yac_int ** orig_vertex_global_ids,
size_t * nbr_duplicated_vertices )

reads in grid data from a SCRIP formated file Only the cell centers are read in and are set as the vertices of the grid. The grid will contain no cells.

Parameters
[in]grid_filenamename of the SCRIP grid netcdf file
[in]mask_filenamename of the SCRIP mask netcdf file
[in]grid_namename of the grid in the file
[in]valid_mask_valuevalue that marks cells as valid
[in]namename of the grid
[out]vertex_coord_idxindex at which cell centers from the file/ vertices of the basic grid grid are registerd
[out]duplicated_vertex_idxindices of all duplicated vertices
[out]orig_vertex_global_idsglobal ids of the original vertices
[out]nbr_duplicated_verticesnumber of duplicated vertices
Returns
basic grid
Remarks
This routine will allocate the arrays duplicated_vertex_idx and orig_vertex_global_ids. The user is responsible for freeing them.
NULL is a valid argument for cell_coord_idx, duplicated_vertex_idx, orig_vertex_global_ids, and nbr_duplicated_vertices

Definition at line 1202 of file read_scrip_grid.c.

Here is the call graph for this function:

◆ yac_read_scrip_cloud_basic_grid_data()

struct yac_basic_grid_data yac_read_scrip_cloud_basic_grid_data ( char const * grid_filename,
char const * mask_filename,
char const * grid_name,
int valid_mask_value )

reads in an grid in SCRIP format Only the cell centers are read in and are set as the vertices of the grid. The grid will contain no cells.

Parameters
[in]grid_filenamename of the SCRIP grid netcdf file
[in]mask_filenamename of the SCRIP mask netcdf file
[in]grid_namename of the grid in the file
[in]valid_mask_valuevalue that marks cells as valid
Returns
yac_basic_grid_data structure that contains the grid

Definition at line 1147 of file read_scrip_grid.c.

Here is the call graph for this function:

◆ yac_read_scrip_cloud_basic_grid_parallel()

struct yac_basic_grid * yac_read_scrip_cloud_basic_grid_parallel ( char const * grid_filename,
char const * mask_filename,
MPI_Comm comm,
char const * grid_name,
int valid_mask_value,
char const * name,
size_t * vertex_coord_idx,
size_t ** duplicated_vertex_idx,
yac_int ** orig_vertex_global_ids,
size_t * nbr_duplicated_vertices )

reads in grid data from a SCRIP formated file in parallel and applies a IO decomposition to it
Only the cell centers are read in and are set as the vertices of the grid. The grid will contain no cells.

Parameters
[in]grid_filenamename of the SCRIP grid netcdf file
[in]mask_filenamename of the SCRIP mask netcdf file
[in]commMPI communicator containing all proceses that will get a part of the grid
[in]grid_namename of the grid in the file
[in]valid_mask_valuevalue that marks cells in the file as valid
[in]namename of the grid
[out]vertex_coord_idxindex at which cell centers from the file/ vertices of the basic grid grid are registerd
[out]duplicated_vertex_idxindices of all duplicated vertices
[out]orig_vertex_global_idsglobal ids of the original vertices
[out]nbr_duplicated_verticesnumber of duplicated vertices
Returns
basic grid
Remarks
This routine will allocate the arrays duplicated_vertex_idx and orig_vertex_global_ids. The user is responsible for freeing them.
NULL is a valid argument for vertex_coord_idx, duplicated_vertex_idx, orig_vertex_global_ids, and nbr_duplicated_vertices

Definition at line 1157 of file read_scrip_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_read_scrip_generic_basic_grid_parallel()

struct yac_basic_grid * yac_read_scrip_generic_basic_grid_parallel ( char const * grid_filename,
char const * mask_filename,
MPI_Comm comm,
char const * grid_name,
int valid_mask_value,
char const * name,
int use_ll_edges,
size_t * point_coord_idx,
size_t ** duplicated_point_idx,
yac_int ** orig_point_global_ids,
size_t * nbr_duplicated_points,
int * point_location )

reads in grid data from a SCRIP formated file in parallel and applies a IO decomposition to it In case the grid files contains corner information for the specified grid, this reader will behave as yac_read_scrip_basic_grid_parallel otherwise it will return a cloud grid, as if yac_read_scrip_cloud_basic_grid_parallel was called.

Parameters
[in]grid_filenamename of the SCRIP grid netcdf file
[in]mask_filenamename of the SCRIP mask netcdf file
[in]commMPI communicator containing all proceses that will get a part of the grid
[in]grid_namename of the grid in the file
[in]valid_mask_valuevalue that marks cells as valid
[in]namename of the grid
[in]use_ll_edgesif possible represent all edges using lon/lat circles
[out]point_coord_idxindex at which cell centers/vertices are registerd in the basic grid
[out]duplicated_point_idxindices of all duplicated cells
[out]orig_point_global_idsglobal ids of the original cells
[out]nbr_duplicated_pointsnumber of duplicated cells
[out]point_locationYAC_LOC_CELL or YAC_LOC_CORNER, depending on whether corner information was available or not
Returns
basic grid
Remarks
This routine will allocate the arrays duplicated_point_idx and orig_point_global_ids. The user is responsible for freeing them.
NULL is a valid argument for cell_coord_idx, duplicated_point_idx, orig_point_global_ids, and nbr_duplicated_points

Definition at line 1256 of file read_scrip_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_read_scrip_grid_information()

void yac_read_scrip_grid_information ( char const * grid_filename,
char const * mask_filename,
char const * grid_name,
int valid_mask_value,
size_t * num_vertices,
size_t * num_cells,
int ** num_vertices_per_cell,
double ** x_vertices,
double ** y_vertices,
double ** x_cells,
double ** y_cells,
int ** cell_to_vertex,
int ** cell_core_mask,
size_t ** duplicated_cell_idx,
size_t ** orig_cell_idx,
size_t * nbr_duplicated_cells )

reads in an grid in SCRIP format

Parameters
[in]grid_filenamename of the SCRIP grid netcdf file
[in]mask_filenamename of the SCRIP mask netcdf file
[in]grid_namename of the grid in the file
[in]valid_mask_valuevalue that marks cells as valid
[out]num_verticesnumber of vertices in the grid
[out]num_cellsnumber of cells in the grid
[out]num_vertices_per_cellnumber of vertices per cell
[out]x_verticeslongitude coordinates of the vertices
[out]y_verticeslatitude coordinates of the vertices
[out]x_cellslongitude coordinates of cell points
[out]y_cellslatitude coordinates of cell points
[out]cell_to_vertexvertices indices per cell
[out]cell_core_maskcell core mask
[out]duplicated_cell_idxindices of all duplicated cells
[out]orig_cell_idxindices of the original cells
[out]nbr_duplicated_cellsnumber of duplicated cells
Remarks
NULL is a valid argument for duplicated_cell_idx, orig_cell_idx, and nbr_duplicated_cells

Definition at line 833 of file read_scrip_grid.c.

Here is the call graph for this function: