YetAnotherCoupler 3.2.0_a
Loading...
Searching...
No Matches
Data Structures | Functions
read_fesom_grid.c File Reference
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <netcdf.h>
#include "read_fesom_grid.h"
#include "geometry.h"
#include "utils_common.h"
#include "io_utils.h"
Include dependency graph for read_fesom_grid.c:

Go to the source code of this file.

Data Structures

struct  point_with_index
 

Functions

static void get_fesom_vertices (int ncid, double **vertex_lon, double **vertex_lat, int *nbr_cells, int *nbr_vertices_per_cell)
 
static void get_fesom_cell_center (int ncid, double **cell_lon, double **cell_lat, size_t *nbr_cells)
 
static void remove_duplicated_vertices (double *temp_vertex_lon, double *temp_vertex_lat, int *temp_nbr_vertices, int *old_to_new_id)
 
void yac_read_fesom_grid_information (const char *filename, int *nbr_vertices, int *nbr_cells, int **num_vertices_per_cell, int **cell_to_vertex, double **x_vertices, double **y_vertices, double **x_cells, double **y_cells)
 
struct yac_basic_grid_data yac_read_fesom_basic_grid_data (char const *filename)
 
struct yac_basic_gridyac_read_fesom_basic_grid (char const *filename, char const *gridname)
 
static int compare_point_with_index (const void *a, const void *b)
 

Function Documentation

◆ compare_point_with_index()

static int compare_point_with_index ( const void *  a,
const void *  b 
)
static

Definition at line 327 of file read_fesom_grid.c.

Here is the caller graph for this function:

◆ get_fesom_cell_center()

static void get_fesom_cell_center ( int  ncid,
double **  cell_lon,
double **  cell_lat,
size_t *  nbr_cells 
)
static

Definition at line 254 of file read_fesom_grid.c.

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

◆ get_fesom_vertices()

static void get_fesom_vertices ( int  ncid,
double **  vertex_lon,
double **  vertex_lat,
int *  nbr_cells,
int *  nbr_vertices_per_cell 
)
static

Definition at line 181 of file read_fesom_grid.c.

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

◆ remove_duplicated_vertices()

static void remove_duplicated_vertices ( double *  temp_vertex_lon,
double *  temp_vertex_lat,
int *  temp_nbr_vertices,
int *  old_to_new_id 
)
static

Definition at line 348 of file read_fesom_grid.c.

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

◆ yac_read_fesom_basic_grid()

struct yac_basic_grid * yac_read_fesom_basic_grid ( char const *  filename,
char const *  gridname 
)

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

Parameters
[in]filenamename of the fesom grid netcdf file
[in]gridnamename of the grid
Returns
yac_basic_grid structure that contains the fesom grid

Definition at line 169 of file read_fesom_grid.c.

Here is the call graph for this function:

◆ yac_read_fesom_basic_grid_data()

struct yac_basic_grid_data yac_read_fesom_basic_grid_data ( char const *  filename)

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

Parameters
[in]filenamename of the fesom grid netcdf file
Returns
yac_basic_grid_data structure that contains the fesom grid
Examples
test_read_fesom.c.

Definition at line 136 of file read_fesom_grid.c.

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

◆ yac_read_fesom_grid_information()

void yac_read_fesom_grid_information ( const char *  filename,
int *  nbr_vertices,
int *  nbr_cells,
int **  num_vertices_per_cell,
int **  cell_to_vertex,
double **  x_vertices,
double **  y_vertices,
double **  x_cells,
double **  y_cells 
)

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

Parameters
[in]filenamename of the fesom grid netcdf file
[out]nbr_verticesnumber of vertices in the grid
[out]nbr_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

Definition at line 37 of file read_fesom_grid.c.

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