|
YAC 3.14.0
Yet Another Coupler
|
Structs and interfaces for area calculations. More...


Go to the source code of this file.
Macros | |
| #define | YAC_AREA_TOL ((0.02 * 0.02) / (6371.2290 * 6371.2290)) |
Functions | |
| double | yac_grid_cell_area (struct yac_grid_cell cell) |
| Area calculation of a spherical cell. | |
| double | yac_grid_cell_area_info (struct yac_grid_cell cell, double *barycenter, double sign) |
Structs and interfaces for area calculations.
Definition in file area.h.
| #define YAC_AREA_TOL ((0.02 * 0.02) / (6371.2290 * 6371.2290)) |
| double yac_grid_cell_area | ( | struct yac_grid_cell | cell | ) |
Area calculation of a spherical cell.
The cell in split up into triangles that all have one corner in common, then the area for each of the triangles is computed and summed up to build the area of the cell.
Compute the area of a grid cell on the unit sphere
This function computes the area of a spherical polygon that may contain both great circle edges and latitude circle edges. The polygon is triangulated using a fan triangulation from the first vertex. By summation of the signed areas of the triangles this routine is able to handle convex and concave cells. For latitude circle edges, a signed correction term is added to account for the difference between the great circle path and the latitude circle path.
| [in] | cell | Grid cell structure |
Definition at line 271 of file area.c.


| double yac_grid_cell_area_info | ( | struct yac_grid_cell | cell, |
| double * | barycenter, | ||
| double | sign ) |
Compute the signed area of a grid cell and update barycenter
This function computes the signed area of a spherical polygon that may contain both great circle edges and latitude circle edges. It simultaneously updates a barycenter accumulator that can be used to compute the cell's center of mass. The polygon is triangulated using a fan triangulation from the first vertex, and the signed areas of the triangles are summed to correctly handle concave cells. For latitude circle edges, correction terms are added to account for the difference between the great circle path and the latitude circle path.
| [in] | cell | Grid cell structure |
| [in,out] | barycenter | Barycenter accumulator to be updated (3D vector) |
| [in] | sign | Sign multiplier for both area and barycenter contributions |
Definition at line 403 of file area.c.

