#include <string.h>
#include <math.h>
#include <netcdf.h>
#include "tests.h"
#include "grid_file_common.h"
#include "io_utils.h"
#include "utils_common.h"
#include "geometry.h"
Go to the source code of this file.
|
| static int | compare_cell_coords (double *a, double *b, int count) |
| |
| static int | compare_ints (int *a, int *b, int count) |
| |
| void | check_grid_file (char const *filename, char const *grid_name, size_t ref_num_cells, size_t ref_num_corners_per_cell, double *ref_cla, double *ref_clo, double *ref_lat, double *ref_lon, int *ref_cell_global_ids, int *ref_core_cell_mask, int *ref_vertex_global_ids, int *ref_core_vertex_mask, int *ref_edge_global_ids, int *ref_core_edge_mask) |
| |
| void | write_dummy_exodus_grid_file (char const *grid_filename, size_t num_lon, size_t num_lat, double lon_range[2], double lat_range[2]) |
| |
| void | write_dummy_scrip_grid_file (char *grid_name, char *grid_filename, char *mask_filename, int with_corners, size_t num_lon, size_t num_lat, double lon_range[2], double lat_range[2]) |
| |
◆ check_grid_file()
| void check_grid_file |
( |
char const * | filename, |
|
|
char const * | grid_name, |
|
|
size_t | ref_num_cells, |
|
|
size_t | ref_num_corners_per_cell, |
|
|
double * | ref_cla, |
|
|
double * | ref_clo, |
|
|
double * | ref_lat, |
|
|
double * | ref_lon, |
|
|
int * | ref_cell_global_ids, |
|
|
int * | ref_core_cell_mask, |
|
|
int * | ref_vertex_global_ids, |
|
|
int * | ref_core_vertex_mask, |
|
|
int * | ref_edge_global_ids, |
|
|
int * | ref_core_edge_mask ) |
checks whether data in a scrip formated grid file is identical to a reference data provided
- Parameters
-
| [in] | filename | name of the grid file to be checked |
| [in] | grid_name | name of the grid |
| [in] | ref_num_cells | reference number of cells |
| [in] | ref_num_corners_per_cell | reference number of corners per cell |
| [in] | ref_cla | reference latitude coordinates in degree |
| [in] | ref_clo | reference longitude coordinates in degree |
| [in] | ref_lat | reference latitude cell center coordinates in degree |
| [in] | ref_lon | reference longitude cell center coordinates in degree |
| [in] | ref_cell_global_ids | reference global cell ids |
| [in] | ref_core_cell_mask | reference core cell mask |
| [in] | ref_vertex_global_ids | reference global vertex ids |
| [in] | ref_core_vertex_mask | reference core vertex mask |
| [in] | ref_edge_global_ids | reference global edge ids |
| [in] | ref_core_edge_mask | reference core edge mask |
Definition at line 55 of file grid_file_common.c.
◆ compare_cell_coords()
| static int compare_cell_coords |
( |
double * | a, |
|
|
double * | b, |
|
|
int | count ) |
|
static |
◆ compare_ints()
| static int compare_ints |
( |
int * | a, |
|
|
int * | b, |
|
|
int | count ) |
|
static |
◆ write_dummy_exodus_grid_file()
| void write_dummy_exodus_grid_file |
( |
char const * | grid_filename, |
|
|
size_t | num_lon, |
|
|
size_t | num_lat, |
|
|
double | lon_range[2], |
|
|
double | lat_range[2] ) |
◆ write_dummy_scrip_grid_file()
| void write_dummy_scrip_grid_file |
( |
char * | grid_name, |
|
|
char * | grid_filename, |
|
|
char * | mask_filename, |
|
|
int | with_corners, |
|
|
size_t | num_lon, |
|
|
size_t | num_lat, |
|
|
double | lon_range[2], |
|
|
double | lat_range[2] ) |