YAC 3.12.0
Yet Another Coupler
Loading...
Searching...
No Matches
read_mask.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "grids/basic_grid.h"
#include "io_utils.h"
#include "utils_common.h"
#include "yac_mpi_internal.h"
#include <netcdf.h>
Include dependency graph for read_mask.c:

Go to the source code of this file.

Macros

#define YAC_NETCDF_ENABLED
 

Functions

static int partition_idx_from_element_idx (yac_int element_idx, size_t num_elements, int num_partitions)
 
size_t yac_read_netcdf_1d_int_mask_parallel (char const *filename, char const *var_name, int valid_value, MPI_Comm comm, struct yac_basic_grid *basic_grid)
 

Macro Definition Documentation

◆ YAC_NETCDF_ENABLED

#define YAC_NETCDF_ENABLED

Definition at line 13 of file read_mask.c.

Function Documentation

◆ partition_idx_from_element_idx()

static int partition_idx_from_element_idx ( yac_int element_idx,
size_t num_elements,
int num_partitions )
inlinestatic

Definition at line 20 of file read_mask.c.

Here is the caller graph for this function:

◆ yac_read_netcdf_1d_int_mask_parallel()

size_t yac_read_netcdf_1d_int_mask_parallel ( char const * filename,
char const * var_name,
int valid_value,
MPI_Comm comm,
struct yac_basic_grid * basic_grid )

Reads in a integer variable from a netcdf file and interprets it as a cell mask

Parameters
[in]filenamename of the netCDF file
[in]var_namename of the variable
[in]valid_valuemask[:] = (valid_value == variable[:])
[in]commMPI communicator containing all process that require the mask
[in,out]basic_gridbasic grid in which the mask is to be registered
Returns
mask index of basic grid at which the mask is registered

Definition at line 28 of file read_mask.c.

Here is the call graph for this function: