Skip to content

Commit 16ee28f

Browse files
authored
Merge pull request #233 from xylar/omega/docs/add-aurora-to-docs
Clean up the Docs and add Aurora This merge includes : * adding Aurora to list of parmetis paths * a fix and some clean-up to the EOS design doc * suppressing a warning about pages starting with H2 headers that we are fine with * make warnings in the docs now trigger errors in CI (since all warnings are now gone!)
2 parents 9e522f1 + e5f7446 commit 16ee28f

File tree

5 files changed

+25
-21
lines changed

5 files changed

+25
-21
lines changed

.github/workflows/omega-build-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ jobs:
9393
run: |
9494
conda activate omega_dev
9595
cd components/omega/doc
96-
make html
96+
make html-strict

.github/workflows/omega-docs-workflow.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
conda list
5050
5151
- name: Build Sphinx Docs
52+
# Use 'make html' (not html-strict) so docs always update, even if warnings exist.
5253
run: |
5354
conda activate omega_dev
5455
cd components/omega/doc

components/omega/doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
myst_footnote_transition = True
7373
myst_dmath_double_inline = True
7474
myst_enable_checkboxes = True
75+
suppress_warnings = ['myst.header']
7576

7677
# -- HTML output -------------------------------------------------
7778

components/omega/doc/design/EOS.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ The equation of state relates density to the prognostic state variables temperat
1010
Omega will use TEOS-10 as the primary equation of state. The reference implementation of TEOS-10 is contained in the Gibbs Sea Water (GSW) toolbox function. The Omega implementation will be equivalent to the computation in the GSW toolbox function: `gsw_specvol(sa,ct,p)`
1111

1212
### 2.2 Requirement: allow a choice of equations of state
13-
Omega-1 should include the option for two EOS options. The first is a linear eos, for benchmarking against MPAS-O and to use in simplified cases. The other option should be a well-established version of TEOS-10 (e.g. Roquet 75-term polynomial).
13+
Omega-1 should include the option for two EOS options. The first is a linear eos, for benchmarking against MPAS-O and to use in simplified cases. The other option should be a well-established version of TEOS-10 (e.g. Roquet 75-term polynomial).
1414

1515
### 2.3 Requirement: computational efficiency
16-
As one of the most expensive kernels, the EOS must be as efficient as possible. Developers should be discouraged from calling the EOS too frequently. The fraction of compute time used be the EOS within Omega1 will be compared to fraction used in MPAS-Ocean.
16+
As one of the most expensive kernels, the EOS must be as efficient as possible. Developers should be discouraged from calling the EOS too frequently. The fraction of compute time used be the EOS within Omega1 will be compared to fraction used in MPAS-Ocean.
1717

1818
### 2.4 Requirement: abide by license for the GSW Oceanographic Toolbox
1919
The GSW toolbox can only be used without modification, so a Omega-specific port of certain functions will be required to support Kokkos/GPU enabled computation. The toolbox without modifications can still be used for verification testing against the Omega implementation.
@@ -22,7 +22,7 @@ The GSW toolbox can only be used without modification, so a Omega-specific port
2222
The Omega implementation should be compared with the test value published in Roquet et al 2015, and the official GSW Oceanographic Toolbox (supported by TEOS-10) to verify correctness.
2323

2424
### 2.6 Requirement: check value range
25-
The EOS code should include a check on the range of ocean properties to assess use of TEOS-10 (equivalent to the ``ocean funnel'' check), and a truncation of state variables to use the polynomial only in the valid range (similar to the truncation in MPAS-Ocean).
25+
The EOS code should include a check on the range of ocean properties to assess use of TEOS-10 (equivalent to the ``ocean funnel'' check), and a truncation of state variables to use the polynomial only in the valid range (similar to the truncation in MPAS-Ocean).
2626

2727
### 2.7 Requirement: provide adiabatically-displaced density
2828
The EOS code should be able to be used to calculate density adiabatically displaced to i) the layer below, ii) the surface. This is needed to calculate the Brunt-Vaisala and for mixed-layer parameterizations. This operation should be done as efficiently as possible (e.g. we will explore reusing parts of the polynomial or leveraging Kernel Fusion).
@@ -31,31 +31,31 @@ The EOS code should be able to be used to calculate density adiabatically displa
3131
Later versions should include calculating the freezing temperature of seawater.
3232

3333
### 2.9 Desired: output in situ temperature
34-
Later versions should include calculating the in situ temperature needed for coupling (at surface including at non-zero pressure).
34+
Later versions should include calculating the in situ temperature needed for coupling (at surface including at non-zero pressure).
3535

3636
### 2.10 Desired: output first derivatives
3737
The EOS will need to be able to produce alpha and beta (drho/dT and drho/dS) for linear expansions in the higher-order pressure gradient and for some mixing parameterizations.
3838

3939
### 2.11 Desired: variable conversion
40-
Later versions should include functions to convert between conservative and potential temperatures, and absolute and practical salinity. These will be used to convert the initial conditions or compare to ocean states from other sources (MPAS-Ocean, reanalysis, other models etc.) These functions may be used offline in pre- or post-processing but need to be consistent with the EOS implementation.
40+
Later versions should include functions to convert between conservative and potential temperatures, and absolute and practical salinity. These will be used to convert the initial conditions or compare to ocean states from other sources (MPAS-Ocean, reanalysis, other models etc.) These functions may be used offline in pre- or post-processing but need to be consistent with the EOS implementation.
4141

4242
### 2.12 Desired: enthalpy conversion
43-
Later versions should include functions to calculate the layer potential enthalpy from enthalpy fluxes to convert coupling fluxes to changes in conservative temperature in a rigorous manner.
43+
Later versions should include functions to calculate the layer potential enthalpy from enthalpy fluxes to convert coupling fluxes to changes in conservative temperature in a rigorous manner.
4444

4545
## 3 Algorithmic Formulation
46-
The formulation of the specific volume calculation will be the 75-term polynomial as documented in [Roquet et al. 2015](https://www.sciencedirect.com/science/article/pii/S1463500315000566). The implementation of the displaced density calculation may be altered to improve performance by reusing some polynomial coefficients, but should produce the same results as the full 75-term polynomial.
46+
The formulation of the specific volume calculation will be the 75-term polynomial as documented in [Roquet et al. 2015](https://www.sciencedirect.com/science/article/pii/S1463500315000566). The implementation of the displaced density calculation may be altered to improve performance by reusing some polynomial coefficients, but should produce the same results as the full 75-term polynomial.
4747

4848
## 4 Design
49-
The GSW-C toolbox will be incorporated into Omega as a submodule. In order to abide by the license of the toolbox, the toolbox will only be used in testing to check our implementation. The coefficients for the Roquet et al. 2015 expansion will be based on the published values (Appendix). A Kokkos implementation of the function to compute specific volume will be ported to Omega. The GSW-C toolbox submodule will serve as a baseline reference for our ports in unit tests.
49+
The GSW-C toolbox will be incorporated into Omega as a submodule. In order to abide by the license of the toolbox, the toolbox will only be used in testing to check our implementation. The coefficients for the Roquet et al. 2015 expansion will be based on the published values (Appendix). A Kokkos implementation of the function to compute specific volume will be ported to Omega. The GSW-C toolbox submodule will serve as a baseline reference for our ports in unit tests.
5050

51-
To optimize performance, calls to the EOS function should be able to support whole array computation. The EOS class will include a public method that calculate specific volume given the state variables, and a public variable defining the chosen eos option (changeable by the user).
51+
To optimize performance, calls to the EOS function should be able to support whole array computation. The EOS class will include a public method that calculate specific volume given the state variables, and a public variable defining the chosen eos option (changeable by the user).
5252

5353
### 4.1 Data types and parameters
54-
The `Eos` class will be used to perform the necessary eos operations such as calculating specific volume:
54+
The `Eos` class will be used to perform the necessary eos operations such as calculating specific volume:
5555
```c++
5656
class Eos{
5757
public:
58-
Array SpecVol;
58+
Array SpecVol;
5959
Array SpecVolDisplaced;
6060
void computeSpecVol();
6161
static Eos *create();
@@ -64,8 +64,8 @@ class Eos{
6464
I4 NCellsAll;
6565
I4 NChunks = NVertLevels / VecLength;
6666
void computeSpecVolTEOS10Poly75t();
67-
void computeSpecVolLinear();
68-
void truncateTempSal();
67+
void computeSpecVolLinear();
68+
void truncateTempSal();
6969
static Eos *DefaultEos;
7070
static std::map<std::string, std::unique_ptr<Eos>> AllEos;
7171

@@ -88,13 +88,13 @@ We assume that the call to the eos is in a timestepping routine where input trac
8888
```c++
8989
Array2DReal ConservativeTemperature;
9090
Array2DReal AbsoluteSalinity;
91-
Tracers->getByName(ConservativeTemperature, VelTimeLevel, 'temperature');
92-
Tracers->getByName(AbsoluteSalinity, VelTimeLevel, 'salinity');
91+
Tracers->getByName(ConservativeTemperature, VelTimeLevel, "temperature");
92+
Tracers->getByName(AbsoluteSalinity, VelTimeLevel, "salinity");
9393
```
9494

9595

9696
### 4.2 Methods
97-
There will be a constructor and destructor for the class, as well as several public and private
97+
There will be a constructor and destructor for the class, as well as several public and private
9898
methods. Modeled on the `Tendencies` class, the constructor will be private. A static `create` method is used to ensure every eos instance is properly stored in the static map of eos instances. This is to help ensure that the eos initialized in the `init` step of the model set-up is then retrievable during the `forward` step.
9999

100100

@@ -134,7 +134,7 @@ Eos *Eos::get(const std::string &Name);
134134
135135
The public `computeSpecVol` method will rely on private methods for each specific EOS option (linear and TEOS-10).
136136
```c++
137-
void Eos::computeSpecVol(const Array2DReal &SpecVol,
137+
void Eos::computeSpecVol(const Array2DReal &SpecVol,
138138
const Array2DReal &ConservativeTemperature,
139139
const Array2DReal &AbsoluteSalinity,
140140
const Array2DReal &Pressure) {
@@ -144,7 +144,7 @@ OMEGA_SCOPE(...)
144144
KOKKOS_LAMBDA(int ICell, int KChunk) {
145145
LocComputeSpecVolLinear(...);
146146
});
147-
}
147+
}
148148
else if (eosChoice == EOSType::TEOS10Poly75t){
149149
parallelFor("eos-teos10", {NCellsAll, NChunks},
150150
KOKKOS_LAMBDA(int ICell, int KChunk) {
@@ -167,10 +167,10 @@ void Eos::clear();
167167
## 5 Verification and Testing
168168
169169
### 5.1 Test: Verification of GSW-C submodule
170-
A unit test will verify that the result of the GSW-C toolbox (used as a submodule, without modifications) matches the expected value of specific volume published in Roquet et al. 2015 within machine precision. The publication only includes one data point (Sa, Ct, P) to check.
170+
A unit test will verify that the result of the GSW-C toolbox (used as a submodule, without modifications) matches the expected value of specific volume published in Roquet et al. 2015 within machine precision. The publication only includes one data point (Sa, Ct, P) to check.
171171
172172
### 5.2 Test: Verification of our TEOS-10 75-term polynomial implementation
173-
A unit test will verify that the result of the Omega implementation of the Roquet et al. 2015 75-term polynomial calculation of the specific volume matches the expected value of specific volume published in Roquet et al. 2015 within machine precision. The publication only includes one data point (Sa, Ct, P) to check.
173+
A unit test will verify that the result of the Omega implementation of the Roquet et al. 2015 75-term polynomial calculation of the specific volume matches the expected value of specific volume published in Roquet et al. 2015 within machine precision. The publication only includes one data point (Sa, Ct, P) to check.
174174
175175
### 5.3 Test: Verification of TEOS-10 with GSW-C toolbox
176176
A unit test will verify that the result of the Omega and GSW-C toolbox implementations for the Roquet et al. 2015 expansion are within machine precision over a range of conservative temperature, absolute salinity, and pressure ranges.

components/omega/doc/devGuide/QuickStart.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ supported E3SM machines. The pattern is:
206206
+--------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
207207
| Machine | Compiler | Parmetis path |
208208
+==============+==================+===========================================================================================================================================================================+
209+
| aurora | oneapi-ifx | /lus/flare/projects/E3SM_Dec/soft/polaris/aurora/spack/dev_polaris_0_8_0_oneapi-ifx_mpich/var/spack/environments/dev_polaris_0_8_0_oneapi-ifx_mpich/.spack-env/view |
210+
+--------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
209211
| chicoma-cpu | gnu | /usr/projects/e3sm/polaris/chicoma-cpu/spack/dev_polaris_0_8_0_gnu_mpich/var/spack/environments/dev_polaris_0_8_0_gnu_mpich/.spack-env/view |
210212
+--------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
211213
| chrysalis | intel | /lcrc/soft/climate/polaris/chrysalis/spack/dev_polaris_0_8_0_intel_openmpi/var/spack/environments/dev_polaris_0_8_0_intel_openmpi/.spack-env/view |

0 commit comments

Comments
 (0)