11 size_t nbr_vertices[2], int cyclic[2],
12 double *lon_vertices,
double *lat_vertices,
13 void (*LLtoXYZ_ptr)(double, double,
double[])) {
17 "ERROR(yac_generate_basic_grid_data_reg_2d): "
18 "cyclic[1] != 0 not yet supported")
20 size_t num_cells_2d[2] =
21 {nbr_vertices[0] - (cyclic[0]?0:1), nbr_vertices[1] - (cyclic[1]?0:1)};
22 size_t num_vertices_2d[2] = {num_cells_2d[0] + (cyclic[0]?0:1), num_cells_2d[1] + 1};
23 size_t num_vertices = num_vertices_2d[0] * num_vertices_2d[1];
25 (num_cells_2d[0] + (cyclic[0]?0:1)) * num_cells_2d[1] +
26 num_cells_2d[0] * (num_cells_2d[1] + 1);
30 for (
size_t i = 0, k = 0; i < num_vertices_2d[1]; ++i) {
31 for (
size_t j = 0; j < num_vertices_2d[0]; ++j, ++k) {
32 LLtoXYZ_ptr(lon_vertices[j], lat_vertices[i],
39 for (
size_t i = 0, k = 0; i < num_cells_2d[1]; ++i) {
40 for (
size_t j = 0; j < num_vertices_2d[0]; ++j, k += 2) {
50 for (
size_t i = 0; i < num_cells_2d[1]; ++i) {
static struct yac_basic_grid_data yac_generate_basic_grid_data_reg_2d_(size_t nbr_vertices[2], int cyclic[2], double *lon_vertices, double *lat_vertices, void(*LLtoXYZ_ptr)(double, double, double[]))