forked from E3SM-Project/E3SM
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add user and developer documentation
- Loading branch information
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,29 @@ | ||
(omega-dev-horz-mesh)= | ||
|
||
## Horizontal Mesh | ||
|
||
The OMEGA horizontal mesh uses the [MPAS Mesh | ||
Specification](https://mpas-dev.github.io/files/documents/MPAS-MeshSpec.pdf). | ||
A mesh object is created by using the constructor, which requires a Decomp object: | ||
```c++ | ||
Err = OMEGA::Decomp::init(); | ||
OMEGA::Decomp *DefDecomp = OMEGA::Decomp::getDefault(); | ||
OMEGA::HorzMesh Mesh(DefDecomp); | ||
``` | ||
The constructor replicates the subdomain mesh cell/edge/vertex counts and | ||
connectivity information from Decomp so this information can be passed among the | ||
computational rountines. It then creates several parallel I/O decompositions | ||
and reads in the remaining subdomain mesh information. Finally, any mesh | ||
information needed on the device to a device YAKL array from the host. These | ||
tasks are orgainzed into several private methods. The variable names for host | ||
arrays hare appended with in `H`, array variable names not ending in `H` are | ||
device arrays. The copy from host to device array is performed via: | ||
```c++ | ||
AreaCell = AreaCellH.createDeviceCopy(); | ||
``` | ||
The device arrays are deallocated by the `HorzMesh::clear()` method, which is | ||
necessary before calling `yakl::finalize`. | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,44 @@ | ||
(omega-user-horz-mesh)= | ||
|
||
## Horizontal Mesh | ||
|
||
OMEGA uses the MPAS mesh specification found | ||
[here](https://mpas-dev.github.io/files/documents/MPAS-MeshSpec.pdf). The names | ||
of the mesh variables have been retained, with the caveat that they now begin | ||
with a capital letter. | ||
|
||
The Mesh class is meant to be a container for all mesh variables local to a | ||
decomposed sub-domain that can be easily passed among the dycore routines. It | ||
depends on a given [Decomp](#omega-user-decomp) and reproduces the | ||
cell/edge/vertex totals and connectivity information from that class. The Mesh | ||
class also creates parallel I/O decompositions that are used to read in the | ||
additional mesh variables, which are not required for Decomp. | ||
|
||
Currently, the Mesh class reads in all variables from the MPAS mesh | ||
specification except those read by [Decomp](#omega-dev-decomp). | ||
This includes the following variables: | ||
|
||
| Variable Name | Description | Units | | ||
| ------------- | ----------- | ----- | | ||
| XCell, YCell, ZCell | Cartesian coordinates of cell centers | m | | ||
| XEdge, YEdge, ZEdge | Cartesian coordinates of edge centers | m | | ||
| XVertex, YVertex, ZVertex | Cartesian coordinates of vertices | m | | ||
| BottomDepth | Depth of the bottom of the ocean at cell centers | m | | ||
| FCell, FEdge, FVertex | Coriolis parameter at cell centers/edges/vertices | radians/s | | ||
| LonCell, LatCell | Longitude/latitude coordinates of cell centers | radians | | ||
| LonEdge, LatEdge | Longitude/latitude coordinates of edge centers | radians | | ||
| LonVertex, LatVertex | Longitude/latitude coordinates of vertices | radians | | ||
| AreaCell | Area of each cell | m^2 | | ||
| AreaTriangle | Area of each triangle in the dual grid | m^2 | | ||
| KiteAreasOnVertex | Area of the portions of each dual cell that are part of each cellsOnVertex | m^2 | | ||
| DvEdge | Length of each edge, computed as the distance between verticesOnEdge | m | | ||
| DcEdge | Length of each edge, computed as the distance between CellsOnEdge | m | | ||
| AngleEdge | Angle the edge normal makes with local eastward direction | radians | | ||
| MeshDensity | Value of density function used to generate a particular mesh at cell centers | - | | ||
| WeightsOnEdge | Reconstruction weights associated with each of the edgesOnEdge | - | | ||
|
||
In the future, the Mesh class will optionally compute the mesh variables that | ||
are dependent on the Cartesian mesh coordinates internally. | ||
This includes the various areas, lengths, angles, and weights needed for the | ||
TRiSK discretization (e.g. rows 5-11 in the table above). | ||
|