#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "generate_cubed_sphere.h"
#include "generate_reg2d.h"
#include "geometry.h"
#include "ppm/ppm_xfuncs.h"
#include "io_utils.h"
#include <netcdf.h>
Go to the source code of this file.
|
| void | yac_generate_cubed_sphere_grid_information (unsigned n, unsigned *num_cells, unsigned *num_vertices, double **x_vertices, double **y_vertices, double **z_vertices, unsigned **cell_to_vertex, unsigned **face_id) |
| |
| struct yac_basic_grid_data | yac_generate_cubed_sphere_grid (unsigned n) |
| |
| struct yac_basic_grid * | yac_generate_cubed_sphere_basic_grid (char const *name, size_t n) |
| |
| static void | decompose_domain_simple (unsigned n, int size, int *cell_owner) |
| |
| static void | decompose_domain_2d (unsigned n, int size, int *cell_owner) |
| |
| static void | decompose_domain (unsigned n, int size, int *cell_owner) |
| |
| void | yac_generate_part_cube_grid_information (unsigned n, unsigned *nbr_vertices, unsigned *nbr_cells, unsigned **num_vertices_per_cell, unsigned **cell_to_vertex, double **x_vertices, double **y_vertices, double **x_cells, double **y_cells, int **global_cell_id, int **cell_core_mask, int **global_corner_id, int **corner_core_mask, int rank, int size) |
| |
| void | yac_write_cubed_sphere_grid (unsigned n, char const *filename) |
| |
◆ decompose_domain()
| static void decompose_domain |
( |
unsigned | n, |
|
|
int | size, |
|
|
int * | cell_owner ) |
|
static |
◆ decompose_domain_2d()
| static void decompose_domain_2d |
( |
unsigned | n, |
|
|
int | size, |
|
|
int * | cell_owner ) |
|
static |
◆ decompose_domain_simple()
| static void decompose_domain_simple |
( |
unsigned | n, |
|
|
int | size, |
|
|
int * | cell_owner ) |
|
static |
◆ yac_generate_cubed_sphere_basic_grid()
| struct yac_basic_grid * yac_generate_cubed_sphere_basic_grid |
( |
char const * | name, |
|
|
size_t | n ) |
◆ yac_generate_cubed_sphere_grid()
◆ yac_generate_cubed_sphere_grid_information()
| void yac_generate_cubed_sphere_grid_information |
( |
unsigned | n, |
|
|
unsigned * | num_cells, |
|
|
unsigned * | num_vertices, |
|
|
double ** | x_vertices, |
|
|
double ** | y_vertices, |
|
|
double ** | z_vertices, |
|
|
unsigned ** | vertices_of_cell, |
|
|
unsigned ** | face_id ) |
Creates a cubed sphere grid with n subdivisions
This routine is based on Matlab code provided by Mike Hobson and written by Mike Rezny (both from MetOffice)
- Parameters
-
| [in] | n | number of subdivisions of the cubed sphere grid |
| [out] | num_cells | number of cells in the grid |
| [out] | num_vertices | number of vertices in the grid |
| [out] | x_vertices | x coordinate of vertices |
| [out] | y_vertices | y coordinate of vertices |
| [out] | z_vertices | z coordinate of vertices |
| [out] | vertices_of_cell | vertex indices for each cell |
| [out] | face_id | id for orientation of face w.r.t cube faces (unused) |
Definition at line 19 of file generate_cubed_sphere.c.
◆ yac_generate_part_cube_grid_information()
| void yac_generate_part_cube_grid_information |
( |
unsigned | n, |
|
|
unsigned * | nbr_vertices, |
|
|
unsigned * | nbr_cells, |
|
|
unsigned ** | num_vertices_per_cell, |
|
|
unsigned ** | cell_to_vertex, |
|
|
double ** | x_vertices, |
|
|
double ** | y_vertices, |
|
|
double ** | x_cells, |
|
|
double ** | y_cells, |
|
|
int ** | global_cell_id, |
|
|
int ** | cell_core_mask, |
|
|
int ** | global_corner_id, |
|
|
int ** | corner_core_mask, |
|
|
int | rank, |
|
|
int | size ) |
Creates a cubed sphere grid with n subdivisions decomposed for a given number of ranks
- Parameters
-
| [in] | n | number of subdivisions of the cubed sphere grid |
| [out] | nbr_vertices | number of vertices in the grid |
| [out] | nbr_cells | number of cells in the grid |
| [out] | num_vertices_per_cell | number of vertices per cell |
| [out] | cell_to_vertex | vertex indices for each cell |
| [out] | x_vertices | longitudes of vertices in radians |
| [out] | y_vertices | latitudes of vertices in radians |
| [out] | x_cells | longitudes of cell center in radians |
| [out] | y_cells | latitudes of cell center in radians |
| [out] | global_cell_id | global cell IDs |
| [out] | cell_core_mask | cell core mask |
| [out] | global_corner_id | global corner IDs |
| [out] | corner_core_mask | corner core mask |
| [in] | rank | id of this rank |
| [in] | size | total number of ranks |
- See also
- yac_generate_cubed_sphere_grid_information for details
Definition at line 565 of file generate_cubed_sphere.c.
◆ yac_write_cubed_sphere_grid()
| void yac_write_cubed_sphere_grid |
( |
unsigned | n, |
|
|
char const * | filename ) |