YetAnotherCoupler 3.5.2
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
debug_grid2vtk.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include <netcdf.h>
#include "yac_utils.h"
Include dependency graph for debug_grid2vtk.c:

Go to the source code of this file.

Macros

#define YAC_RAD   (0.01745329251994329576923690768489)
 
#define STR_USAGE   "Usage: %s -n grid_name -f grid_filename -o vtk_filename\n"
 
#define YAC_ASSERT(exp, msg)
 
#define YAC_ASSERT_F(exp, format, ...)
 

Functions

static void parse_arguments (int argc, char **argv, char const **grid_filename, char const **grid_name, char const **vtk_filename)
 
static void read_grid_file (char const *grid_filename, char const *grid_name, size_t *nv, size_t *nc, double **clon, double **clat, double **vlon, double **vlat, int **gid, int **cmk, int **rnk)
 
static void write_vtk_file (char const *vtk_filename, char const *grid_name, size_t nv, size_t nc, double *clon, double *clat, double *vlon, double *vlat, int *gid, int *cmk, int *rnk)
 
int main (int argc, char **argv)
 
static double * read_coords (int ncid, int varid, size_t varlen)
 
static int * read_int (int ncid, int varid, size_t varlen)
 
static void LLtoXYZ (double lon, double lat, double p_out[])
 

Variables

static char const * cmd
 

Macro Definition Documentation

◆ STR_USAGE

#define STR_USAGE   "Usage: %s -n grid_name -f grid_filename -o vtk_filename\n"

Definition at line 22 of file debug_grid2vtk.c.

◆ YAC_ASSERT

#define YAC_ASSERT ( exp,
msg )
Value:
{ \
if(!((exp))) { \
fprintf(stderr, "ERROR: %s\n" STR_USAGE, msg, cmd); \
exit(EXIT_FAILURE); \
} \
}
static char const * cmd
#define STR_USAGE

Definition at line 24 of file debug_grid2vtk.c.

◆ YAC_ASSERT_F

#define YAC_ASSERT_F ( exp,
format,
... )
Value:
{ \
if(!((exp))) { \
fprintf(stderr, "ERROR: " format "\n" STR_USAGE, __VA_ARGS__, cmd); \
exit(EXIT_FAILURE); \
} \
}

Definition at line 32 of file debug_grid2vtk.c.

◆ YAC_RAD

#define YAC_RAD   (0.01745329251994329576923690768489)

Definition at line 19 of file debug_grid2vtk.c.

Function Documentation

◆ LLtoXYZ()

static void LLtoXYZ ( double lon,
double lat,
double p_out[] )
static

Definition at line 189 of file debug_grid2vtk.c.

Here is the caller graph for this function:

◆ main()

int main ( int argc,
char ** argv )
Examples
test_abort_c.c, test_angle.c, test_area.c, test_basic_grid.c, test_basic_grid_data.c, test_bnd_sphere_part.c, test_cell_bnd_circle.c, test_circle.c, test_clipping.c, test_component_config.c, test_compute_overlap_area.c, test_couple_config.c, test_dist_grid_pair_parallel.c, test_dummy_coupling2_c.c, test_dummy_coupling3_c.c, test_dummy_coupling4_c.c, test_dummy_coupling5_c.c, test_dummy_coupling6_c.c, test_dummy_coupling7_c.c, test_dummy_coupling8_c.c, test_dummy_coupling9_c.c, test_dummy_coupling_c.c, test_duplicate_stencils_parallel.c, test_events.c, test_gcxgc.c, test_gcxlatc.c, test_generate_cubed_sphere.c, test_geometry.c, test_grid2vtk.c, test_group_comm.c, test_instance_parallel1.c, test_instance_parallel2.c, test_instance_parallel3.c, test_instance_parallel4.c, test_interp_grid_parallel.c, test_interp_method_avg_parallel.c, test_interp_method_callback_parallel.c, test_interp_method_conserv_parallel.c, test_interp_method_creep_parallel.c, test_interp_method_file_parallel.c, test_interp_method_hcsbb_parallel.c, test_interp_method_ncc_parallel.c, test_interp_method_nnn_parallel.c, test_interp_method_rbf_parallel.c, test_interp_method_spmap_parallel.c, test_interp_stack_config.c, test_interp_weights_parallel.c, test_interpolation_exchange.c, test_interpolation_parallel1_c.c, test_interpolation_parallel2.c, test_interpolation_parallel3.c, test_interpolation_parallel4.c, test_interpolation_parallel5.c, test_interpolation_parallel6.c, test_interval_tree.c, test_lat_clipping.c, test_latcxlatc.c, test_loncxlatc.c, test_loncxlonc.c, test_mergesort.c, test_mpi_error.c, test_mpi_handshake_c.c, test_multithreading.c, test_partial_areas.c, test_point_in_cell.c, test_point_sphere_part.c, test_proc_sphere_part_parallel.c, test_pxgc.c, test_query_routines_c.c, test_quicksort.c, test_read_cube_csv.c, test_read_fesom.c, test_read_icon.c, test_read_icon_parallel.c, test_read_mpiom.c, test_read_scrip.c, test_read_woa_data.c, test_restart2.c, test_restart_c.c, test_vtk_output.c, and test_weights2vtk.c.

Definition at line 55 of file debug_grid2vtk.c.

Here is the call graph for this function:

◆ parse_arguments()

static void parse_arguments ( int argc,
char ** argv,
char const ** grid_filename,
char const ** grid_name,
char const ** vtk_filename )
static

Definition at line 242 of file debug_grid2vtk.c.

Here is the caller graph for this function:

◆ read_coords()

static double * read_coords ( int ncid,
int varid,
size_t varlen )
static

Definition at line 83 of file debug_grid2vtk.c.

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

◆ read_grid_file()

static void read_grid_file ( char const * grid_filename,
char const * grid_name,
size_t * nv,
size_t * nc,
double ** clon,
double ** clat,
double ** vlon,
double ** vlat,
int ** gid,
int ** cmk,
int ** rnk )
static

Definition at line 103 of file debug_grid2vtk.c.

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

◆ read_int()

static int * read_int ( int ncid,
int varid,
size_t varlen )
static

Definition at line 96 of file debug_grid2vtk.c.

Here is the caller graph for this function:

◆ write_vtk_file()

static void write_vtk_file ( char const * vtk_filename,
char const * grid_name,
size_t nv,
size_t nc,
double * clon,
double * clat,
double * vlon,
double * vlat,
int * gid,
int * cmk,
int * rnk )
static

Definition at line 207 of file debug_grid2vtk.c.

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

Variable Documentation

◆ cmd

char const* cmd
static
Examples
test_weights2vtk.c.

Definition at line 21 of file debug_grid2vtk.c.