Skip to content

Commit e892185

Browse files
authored
Merge pull request #341 from xylar/fixes_to_docs
More updates and corrections to the documentation
2 parents 8ded76a + 6fb7f20 commit e892185

File tree

11 files changed

+195
-88
lines changed

11 files changed

+195
-88
lines changed

docs/developers_guide/ocean/api.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -578,9 +578,9 @@ ziso
578578
Ziso
579579
configure
580580

581-
default.Default
582-
default.Default.configure
583-
default.Default.run
581+
ZisoTestCase
582+
ZisoTestCase.configure
583+
ZisoTestCase.run
584584

585585
with_frazil.WithFrazil
586586
with_frazil.WithFrazil.configure

docs/developers_guide/ocean/test_groups/soma.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ updating PIO namelist options):
6868
buoySurf=np.linspace(min_den, max_den, nsurf))
6969
run_model(self, partition_graph=False)
7070
71-
.. _dev_ocean_soma_default:
71+
.. _dev_ocean_soma_analysis:
7272

7373
analysis
7474
~~~~~~~~
@@ -82,11 +82,13 @@ profiles.
8282
:width: 500 px
8383
:align: center
8484

85+
.. _dev_ocean_soma_test_case:
86+
8587
soma_test_case
8688
--------------
8789

8890
The :py:class:`compass.ocean.tests.soma.soma_test_case.SomaTestCase` class
89-
defined all the SOMA test cases. If a baseline is provided when calling
91+
defines all the SOMA test cases. If a baseline is provided when calling
9092
:ref:`dev_compass_setup`, the test case ensures that the final values of
9193
``temperature`` and ``layerThickness`` are identical to the baseline values.
9294
If particles are included, a number of particle-related variables and timers

docs/developers_guide/ocean/test_groups/ziso.rst

+63-35
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ ziso
66
The ``ziso`` test group
77
(:py:class:`compass.ocean.tests.ziso.Ziso`)
88
implements variants of the Zonally Idealized Southern Ocean (ZISO) test case
9-
(see :ref:`ocean_ziso`) at 20-km resolutions. Here, we describe the shared
10-
framework for this test group and the 2 test cases.
9+
(see :ref:`ocean_ziso` in the User's Guide) at 2.5, 5, 10 and 20-km
10+
resolutions. Here, we describe the shared framework for this test group and the
11+
4 types of test cases currently supported: ``default``, ``long``,
12+
``particles``, and ``with_frazil``.
1113

1214
.. _dev_ocean_ziso_framework:
1315

@@ -45,50 +47,76 @@ forward
4547

4648
The class :py:class:`compass.ocean.tests.ziso.forward.Forward` defines a step
4749
for running MPAS-Ocean from the initial condition produced in the
48-
``initial_state`` step. If ``with_frazil = True``, frazil ice production is
49-
enabled; if ``with_analysis = True``, analysis members are enabled:
50+
``initial_state`` step. Namelist and streams files are generated when the test
51+
case is set up (combining the ``*.forward`` and ``*.analysis`` files from the
52+
test group) and updated at runtime based on the config options in the
53+
``[ziso]`` section of the config file.
5054

51-
.. code-block:: python
52-
53-
if with_analysis:
54-
add_namelist_file(step, 'compass.ocean.tests.ziso',
55-
'namelist.analysis')
56-
add_streams_file(step, 'compass.ocean.tests.ziso', 'streams.analysis')
57-
58-
if with_frazil:
59-
add_namelist_options(step,
60-
{'config_use_frazil_ice_formation': '.true.'})
61-
add_streams_file(step, 'compass.ocean.streams', 'streams.frazil')
55+
A dictionary ``res_params`` is used to set parameters like the number of cores
56+
and the time steps for each resolution:
6257

63-
Namelist and streams files are generate during ``setup()``.
58+
.. code-block:: python
6459
65-
:ref:`dev_ocean_framework_particles` are included in all simulations. In order
66-
to partition the particles, we need to first generate the required graph
67-
partition, then partition the particles, and finally run MPAS-Ocean (including
68-
updating PIO namelist options):
60+
res_params = {'20km': {'cores': 20,
61+
'min_cores': 2,
62+
'cores_with_particles': 32,
63+
'min_cores_with_particles': 12,
64+
'dt': "'00:12:00'",
65+
'btr_dt': "'00:00:36'",
66+
'mom_del4': "5.0e10",
67+
'run_duration': "'0000_00:36:00'"},
68+
'10km': {'cores': 80,
69+
'min_cores': 8,
70+
'cores_with_particles': 130,
71+
'min_cores_with_particles': 50,
72+
'dt': "'00:06:00'",
73+
'btr_dt': "'00:00:18'",
74+
'mom_del4': "6.25e9",
75+
'run_duration': "'0000_00:18:00'"},
76+
'5km': {'cores': 300,
77+
'min_cores': 30,
78+
'cores_with_particles': 500,
79+
'min_cores_with_particles': 200,
80+
'dt': "'00:03:00'",
81+
'btr_dt': "'00:00:09'",
82+
'mom_del4': "7.8e8",
83+
'run_duration': "'0000_00:09:00'"},
84+
'2.5km': {'cores': 1200,
85+
'min_cores': 120,
86+
'cores_with_particles': 2100,
87+
'min_cores_with_particles': 900,
88+
'dt': "'00:01:30'",
89+
'btr_dt': "'00:00:04'",
90+
'mom_del4': "9.8e7",
91+
'run_duration': "'0000_00:04:30'"}}
92+
93+
If :ref:`dev_ocean_framework_particles` are includes (in the ``particles``
94+
test cases), we first generate the required graph partition, then partition
95+
the particles, and finally run MPAS-Ocean (including updating PIO namelist
96+
options):
6997

7098
.. code-block:: python
7199
72-
cores = step['cores']
73-
74-
partition(cores, config, logger)
75-
particles.write(init_filename='init.nc', particle_filename='particles.nc',
76-
graph_filename='graph.info.part.{}'.format(cores),
77-
types='buoyancy')
78-
run_model(step, config, logger, partition_graph=False)
100+
if self.with_particles:
101+
cores = self.cores
102+
partition(cores, self.config, self.logger)
103+
particles.write(init_filename='init.nc',
104+
particle_filename='particles.nc',
105+
graph_filename='graph.info.part.{}'.format(cores),
106+
types='buoyancy')
107+
run_model(self, partition_graph=False)
79108
80109
.. _dev_ocean_ziso_default:
81110

82-
default
83-
-------
111+
ziso_test_case
112+
--------------
84113

85-
The :py:class:`compass.ocean.tests.ziso.default.Default` test performs a
86-
90-second (3-time-step) run on 4 cores, including analysis but without
87-
frazil-ice formation. If a baseline is provided when calling
114+
The :py:class:`compass.ocean.tests.ziso.ZisoTestCase` class defines most of the
115+
ZISO test cases. If a baseline is provided when calling
88116
:ref:`dev_compass_setup`, the test case ensures that the final values of
89-
``temperature`` and ``layerThickness`` as well as a number of particle-related
90-
variables are identical to the baseline values, and also compares timers
91-
related to particles with the baseline.
117+
``temperature`` and ``layerThickness`` are identical to the baseline values.
118+
If particles are included, a number of particle-related variables and timers
119+
are also validated against the baseline.
92120

93121
.. _dev_ocean_ziso_with_frazil:
94122

docs/users_guide/machines/anvil.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ variables:
8484

8585
.. code-block:: bash
8686
87-
source /lcrc/soft/climate/compass/anvil/load_compass1.0.0_intel_impi.sh
87+
source /lcrc/soft/climate/compass/anvil/load_latest_compass_intel_impi.sh
8888
8989
To build the MPAS model with
9090

@@ -100,7 +100,7 @@ variables:
100100

101101
.. code-block:: bash
102102
103-
source /lcrc/soft/climate/compass/anvil/load_compass1.0.0_gnu_mvapich.sh
103+
source /lcrc/soft/climate/compass/anvil/load_latest_compass_gnu_mvapich.sh
104104
105105
To build the MPAS model with
106106

docs/users_guide/machines/badger.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ variables:
8181

8282
.. code-block:: bash
8383
84-
source /usr/projects/climate/SHARED_CLIMATE/compass/badger/load_compass1.0.0_intel_impi.sh
84+
source /usr/projects/climate/SHARED_CLIMATE/compass/badger/load_latest_compass_intel_impi.sh
8585
8686
8787
To build the MPAS model with
@@ -98,7 +98,7 @@ variables:
9898

9999
.. code-block:: bash
100100
101-
source /usr/projects/climate/SHARED_CLIMATE/compass/badger/load_compass1.0.0_gnu_mvapich.sh
101+
source /usr/projects/climate/SHARED_CLIMATE/compass/badger/load_latest_compass_gnu_mvapich.sh
102102
103103
104104
To build the MPAS model with

docs/users_guide/machines/chrysalis.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ variables:
7575

7676
.. code-block:: bash
7777
78-
source /lcrc/soft/climate/compass/chrysalis/load_compass1.0.0_intel_impi.sh
78+
source /lcrc/soft/climate/compass/chrysalis/load_latest_compass_intel_impi.sh
7979
8080
To build the MPAS model with
8181

@@ -92,7 +92,7 @@ variables:
9292

9393
.. code-block:: bash
9494
95-
source /lcrc/soft/climate/compass/chrysalis/load_compass1.0.0_gnu_openmpi.sh
95+
source /lcrc/soft/climate/compass/chrysalis/load_latest_compass_gnu_openmpi.sh
9696
9797
To build the MPAS model with
9898

docs/users_guide/machines/compy.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ variables:
8080

8181
.. code-block:: bash
8282
83-
source source /share/apps/E3SM/conda_envs/compass/load_compass1.0.0_intel_impi.sh
83+
source source /share/apps/E3SM/conda_envs/compass/load_latest_compass_intel_impi.sh
8484
8585
To build the MPAS model with
8686

docs/users_guide/machines/cori.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ variables:
134134

135135
.. code-block:: bash
136136
137-
source /global/cfs/cdirs/e3sm/software/compass/cori-haswell/load_compass1.0.0_intel_mpt.sh
137+
source /global/cfs/cdirs/e3sm/software/compass/cori-haswell/load_latest_compass_intel_mpt.sh
138138
139139
To build the MPAS model with
140140

@@ -151,7 +151,7 @@ variables:
151151

152152
.. code-block:: bash
153153
154-
source /global/cfs/cdirs/e3sm/software/compass/cori-haswell/load_compass1.0.0_gnu_mpt.sh
154+
source /global/cfs/cdirs/e3sm/software/compass/cori-haswell/load_latest_compass_gnu_mpt.sh
155155
156156
To build the MPAS model with
157157

@@ -240,7 +240,7 @@ variables:
240240

241241
.. code-block:: bash
242242
243-
source /global/cfs/cdirs/e3sm/software/compass/cori-knl/load_compass1.0.0_intel_impi.sh
243+
source /global/cfs/cdirs/e3sm/software/compass/cori-knl/load_latest_compass_intel_impi.sh
244244
245245
To build the MPAS model with
246246

docs/users_guide/machines/grizzly.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ variables:
141141

142142
.. code-block:: bash
143143
144-
source /usr/projects/climate/SHARED_CLIMATE/compass/badger/load_compass1.0.0_gnu_mvapich.sh
144+
source /usr/projects/climate/SHARED_CLIMATE/compass/badger/load_latest_compass_gnu_mvapich.sh
145145
146146
To build the MPAS model with
147147

@@ -168,7 +168,7 @@ variables:
168168

169169
.. code-block:: bash
170170
171-
source /usr/projects/climate/SHARED_CLIMATE/compass/badger/load_compass1.0.0_intel_impi.sh
171+
source /usr/projects/climate/SHARED_CLIMATE/compass/badger/load_latest_compass_intel_impi.sh
172172
173173
To build the MPAS model with
174174

docs/users_guide/ocean/test_groups/ziso.rst

+20-15
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ Both ``ziso`` test cases share the following config options:
4848
# the type of vertical grid
4949
grid_type = 100layerE3SMv1
5050
51-
# Number of vertical levels
52-
vert_levels = 100
53-
5451
# Depth of the bottom of the ocean
5552
bottom_depth = 2500.0
5653
@@ -64,7 +61,7 @@ Both ``ziso`` test cases share the following config options:
6461
min_pc_fraction = 0.1
6562
6663
67-
# namelist options for Zonally periodic Idealized Southern Ocean (ZISO)
64+
# config options for Zonally periodic Idealized Southern Ocean (ZISO)
6865
# testcases
6966
[ziso]
7067
@@ -135,16 +132,6 @@ Both ``ziso`` test cases share the following config options:
135132
# Temperature anomaly to produce frazil
136133
frazil_temperature_anomaly = -3.0
137134
138-
## the following are set manually within the test case
139-
# number of mesh cells in x
140-
nx = 50
141-
142-
# number of mesh cells in y
143-
ny = 112
144-
145-
# size of grid cells in meters
146-
dc = 20e3
147-
148135
149136
They use a vertical coordinate that has 100, non-uniform layers distributed
150137
in the functional form given by the ``100layerE3SMv1`` grid type (with much
@@ -170,9 +157,27 @@ at the surface and cooler at depth:
170157
:width: 500 px
171158
:align: center
172159

173-
The test case includes a very short (1 min 30 sec) test run and validation of
160+
The test case includes a very short (3 time step) test run and validation of
174161
prognostic and particle-relate variables for regression testing.
175162

163+
long
164+
----
165+
166+
Results in Ringler et al. (2016) are shown from longer simulations. The
167+
``ocean/ziso/<resolution>/long`` test cases provide a variant on these original
168+
simulations. As in the ``default`` test, this test not include particle
169+
dynamics. Unlike ``default``, this test case is configured for a longer
170+
simulation (10 day) that demonstrates how to use the configuration might be
171+
used for for scientific work.
172+
173+
particles
174+
---------
175+
176+
These ZISO test cases include particles from the Lagrangian, In situ, Global,
177+
High-Performance Particle Tracking (LIGHT) framework for regression testing.
178+
Otherwise, the ``particles`` tests are identical to ``default``.
179+
Particle-relate variables are also included in the test-case validation.
180+
176181
with_frazil
177182
-----------
178183

0 commit comments

Comments
 (0)