#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include <netcdf.h>
#include "yac_utils.h"
Go to the source code of this file.
|
| #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, ...) |
| |
|
| 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) |
| |
| 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[]) |
| |
◆ STR_USAGE
| #define STR_USAGE "Usage: %s -n grid_name -f grid_filename -o vtk_filename\n" |
◆ YAC_ASSERT
| #define YAC_ASSERT |
( |
| exp, |
|
|
| msg ) |
Value: { \
if(!((exp))) { \
exit(EXIT_FAILURE); \
} \
}
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) |
◆ LLtoXYZ()
| static void LLtoXYZ |
( |
double | lon, |
|
|
double | lat, |
|
|
double | p_out[] ) |
|
static |
◆ parse_arguments()
| static void parse_arguments |
( |
int | argc, |
|
|
char ** | argv, |
|
|
char const ** | grid_filename, |
|
|
char const ** | grid_name, |
|
|
char const ** | vtk_filename ) |
|
static |
◆ read_coords()
| static double * read_coords |
( |
int | ncid, |
|
|
int | varid, |
|
|
size_t | varlen ) |
|
static |
◆ 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 |
◆ read_int()
| static int * read_int |
( |
int | ncid, |
|
|
int | varid, |
|
|
size_t | varlen ) |
|
static |
◆ 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 |
◆ cmd