YetAnotherCoupler  2.4.2
Functions
read_icon_grid.h File Reference
#include "grid.h"
#include <mpi.h>
Include dependency graph for read_icon_grid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct basic_grid_data read_icon_grid (char *filename)
 
void read_icon_grid_information (const char *filename, int *num_vertices, int *num_cells, int **num_vertices_per_cell, int **cell_to_vertex, double **x_vertices, double **y_vertices, double **x_cells, double **y_cells, int **cell_mask)
 
void read_part_icon_grid_information (const char *filename, int *num_vertices, int *num_cells, int **num_vertices_per_cell, int **cell_to_vertex, double **x_vertices, double **y_vertices, double **x_cells, double **y_cells, int **global_cell_id, int **cell_mask, int **cell_core_mask, int **global_corner_id, int **corner_core_mask, int rank, int size)
 
void read_icon_grid_information_parallel (const char *filename, MPI_Comm comm, int *num_vertices, int *num_cells, int **num_vertices_per_cell, int **cell_to_vertex, int **global_cell_ids, int **cell_owner, int **global_vertex_ids, int **vertex_owner, double **x_vertices, double **y_vertices, double **x_cells, double **y_cells, int **cell_mask, unsigned io_proc_step)
 
struct basic_grid_data read_icon_grid_information_parallel2 (const char *filename, MPI_Comm comm, unsigned io_proc_step)
 
void delete_icon_grid_data (int **cell_mask, int **global_cell_id, int **cell_core_mask, int **num_vertices_per_cell, int **global_corner_id, int **corner_core_mask, int **cell_to_vertex, double **x_cells, double **y_cells, double **x_vertices, double **y_vertices)
 

Function Documentation

◆ delete_icon_grid_data()

void delete_icon_grid_data ( int **  cell_mask,
int **  global_cell_id,
int **  cell_core_mask,
int **  num_vertices_per_cell,
int **  global_corner_id,
int **  corner_core_mask,
int **  cell_to_vertex,
double **  x_cells,
double **  y_cells,
double **  x_vertices,
double **  y_vertices 
)

destroys remaining icon grid data

Parameters
[out]cell_maskmask for cells
[out]global_cell_idglobal cell IDs
[out]cell_core_maskcell core mask
[out]num_vertices_per_cellnumber of vertices per cell
[out]global_corner_idglobal corner IDs
[out]corner_core_maskcorner core mask
[out]cell_to_vertexvertex indices for each cell
[out]x_cellslongitudes of cell center
[out]y_cellslatitudes of cell center
[out]x_verticeslongitudes of vertices
[out]y_verticeslatitudes of vertices

Definition at line 1553 of file read_icon_grid.c.

◆ read_icon_grid()

struct basic_grid_data read_icon_grid ( char *  filename)

reads in an icon grid netcdf file and generates a struct grid from it

Parameters
[in]filenamename of the icon grid netcdf file
Returns
grid structure that contains the icon grid

Definition at line 888 of file read_icon_grid.c.

◆ read_icon_grid_information()

void read_icon_grid_information ( const char *  filename,
int *  num_vertices,
int *  num_cells,
int **  num_vertices_per_cell,
int **  cell_to_vertex,
double **  x_vertices,
double **  y_vertices,
double **  x_cells,
double **  y_cells,
int **  cell_mask 
)

reads in an icon grid netcdf file and return the grid information in a format that is supported by the YAC user interface.

Parameters
[in]filenamename of the icon grid netcdf file
[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]cell_to_vertexvertex indices for each cell
[out]x_verticeslongitudes of vertices
[out]y_verticeslatitudes of vertices
[out]x_cellslongitudes of cell center
[out]y_cellslatitudes of cell center
[out]cell_maskmask for cells

Definition at line 205 of file read_icon_grid.c.

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

◆ read_icon_grid_information_parallel()

void read_icon_grid_information_parallel ( const char *  filename,
MPI_Comm  comm,
int *  num_vertices,
int *  num_cells,
int **  num_vertices_per_cell,
int **  cell_to_vertex,
int **  global_cell_ids,
int **  cell_owner,
int **  global_vertex_ids,
int **  vertex_owner,
double **  x_vertices,
double **  y_vertices,
double **  x_cells,
double **  y_cells,
int **  cell_mask,
unsigned  io_proc_step 
)

reads in an icon grid netcdf file and return the grid information in a format that is supported by the YAC user interface. The reading is done in parallel and a basic domain decomposition is applied.

Parameters
[in]filenamename of the icon grid netcdf file
[in]commMPI communicator containing all proceses that will get a part of the grid
[out]num_verticesnumber of vertices in the local part of the grid
[out]num_cellsnumber of cells in the local part of the grid
[out]num_vertices_per_cellnumber of vertices per cell
[out]cell_to_vertexvertex indices for each cell
[out]global_cell_idsglobal ids of local cells (core and halo cells)
[out]cell_ownerowner of each cell (locally owned cells are marked with -1)
[out]global_vertex_idsglobal ids of local vertices (core and halo vertices)
[out]vertex_ownerowner of each vertex (locally owned vertices are marked with -1)
[out]x_verticeslongitudes of vertices
[out]y_verticeslatitudes of vertices
[out]x_cellslongitudes of cell center
[out]y_cellslatitudes of cell center
[out]cell_maskmask for cells
[in]io_proc_stepevery io_proc_step's process will read a part of the file
Remarks
in case (io_proc_step >= comm_size) => io_proc_step = sqrt(comm_size)

Definition at line 271 of file read_icon_grid.c.

Here is the call graph for this function:

◆ read_icon_grid_information_parallel2()

struct basic_grid_data read_icon_grid_information_parallel2 ( const char *  filename,
MPI_Comm  comm,
unsigned  io_proc_step 
)

Definition at line 888 of file read_icon_grid.c.

◆ read_part_icon_grid_information()

void read_part_icon_grid_information ( const char *  filename,
int *  num_vertices,
int *  num_cells,
int **  num_vertices_per_cell,
int **  cell_to_vertex,
double **  x_vertices,
double **  y_vertices,
double **  x_cells,
double **  y_cells,
int **  global_cell_id,
int **  cell_mask,
int **  cell_core_mask,
int **  global_corner_id,
int **  corner_core_mask,
int  rank,
int  size 
)

reads in an icon grid netcdf file and return the grid information in a format that is supported by the YAC user interface.

Parameters
[in]filenamename of the icon grid netcdf file
[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]cell_to_vertexvertex indices for each cell
[out]x_verticeslongitudes of vertices
[out]y_verticeslatitudes of vertices
[out]x_cellslongitudes of cell center
[out]y_cellslatitudes of cell center
[out]global_cell_idglobal cell IDs
[out]cell_maskmask for cells
[out]cell_core_maskcell core mask
[out]global_corner_idglobal corner IDs
[out]corner_core_maskcorner core mask
[out]ranklocal MPI rank
[out]sizenumber of MPI ranks

Definition at line 54 of file read_icon_grid.c.

Here is the call graph for this function: