Skip to content

Commit 0b018d1

Browse files
authored
Merge pull request #342 from cbegeman/ocn/enhance-single-column-tests
This PR provides the following enhancements to single column tests: - More configuration options for the cvmix test, particularly related to surface forcing - A new test case that simulates the development of a wind-forced Ekman layer - A new test case that simulates inertial oscillations All tests were added to the pr and nightly suites and together run in 30s on 1 node.
2 parents c6175b9 + cdc72d5 commit 0b018d1

File tree

27 files changed

+1157
-118
lines changed

27 files changed

+1157
-118
lines changed

docs/developers_guide/ocean/api.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,17 +301,26 @@
301301
302302
add_single_column_tasks
303303
304+
cvmix.CVMix
305+
306+
ekman.Ekman
307+
ekman.analysis.Analysis
308+
ekman.analysis.Analysis.run
309+
304310
forward.Forward
311+
forward.Forward.dynamic_model_config
312+
313+
ideal_age.IdealAge
314+
315+
inertial.Inertial
316+
inertial.analysis.Analysis
317+
inertial.analysis.Analysis.run
305318
306319
init.Init
307320
init.Init.run
308321
309322
viz.Viz
310323
viz.Viz.run
311-
312-
cvmix.CVMix
313-
314-
ideal_age.IdealAge
315324
```
316325

317326
### sphere_transport

docs/developers_guide/ocean/tasks/single_column.md

Lines changed: 69 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
# single_column
44

55
The single column tests in `polaris.tasks.ocean.single_column` exercise
6-
the vertical dynamics of the ocean model only. There are currently
7-
two test cases: one that exercises CVMix, the other that exercises ideal age
8-
tracers with CVMix. Here, we describe the tests and their shared framework.
6+
the vertical dynamics of the ocean model only. The test cases are:
7+
8+
- Testing the vertical mixing library, CVMix, under surface forcing
9+
- Testing the Ideal Age tracer under surface forcing
10+
- Testing the Coriolis term by quantifying the inertial frequency
11+
- Testing the Ekman solution under wind forcing
12+
13+
Here, we describe the tests and their shared framework.
914

1015
(dev-ocean-single-column-framework)=
1116

@@ -15,31 +20,54 @@ The shared config options for the `single_column` tests
1520
are described in {ref}`ocean-single-column` in the User's Guide.
1621

1722
Additionally, the tests share a `forward.yaml` file with
18-
a few common model config options related to run duration and horizontal
19-
diffusion and cvmix, as well as defining `mesh`, `input`, `restart`, `output`,
20-
`KPP_testing` and `mixedLayerDepthsOutput` streams.
21-
22-
An additional `forward.yaml` file is included in the ideal age tracer test case
23-
for enabling on the ideal age tracers and ideal age surface forcing, as well as
24-
for defining `idealAgeTracers` streams
23+
a few common model config options related to the initial state, coriolis
24+
forcing, run duration and surface forcing, as well as defining `mesh`,
25+
`input`, `restart`, and `output`, streams.
2526

2627
### init
2728

2829
The class {py:class}`polaris.tasks.ocean.single_column.init.Init`
2930
defines a step for setting up the initial state for each test case.
3031

31-
First, a mesh appropriate for the resolution is generated using
32-
{py:func}`mpas_tools.planar_hex.make_planar_hex_mesh()`. A vertical grid is
33-
generated, with 100 layers of 4 m thickness each by default. Finally, the
32+
4×4 planar hex mesh is generated for this task using
33+
{py:func}`mpas_tools.planar_hex.make_planar_hex_mesh()`. The number of cells in
34+
each dimension can be modified with config options `single_column:nx`,
35+
`single_column:ny`.
36+
By default, the mesh is 960 m in horizontal resolution and is not intended to
37+
resolve any lateral gradients. The horizontal resolution can be modified with
38+
config option `single_column:resolution`
39+
40+
A vertical grid is
41+
generated, with 100 layers of 4 m thickness each by default.
42+
43+
The
3444
initial temperature and salinity field are computed with variability in the
35-
vertical dimension only.
45+
vertical dimension only. The config options that determine these profiles are
46+
located in section `single_column` and include:
3647

37-
A forcing netCDF file is also created based on the config options given in the
38-
`single_column_forcing` section.
48+
| Option | Description |
49+
|-----------------------------------------|-------------|
50+
| `surface_temperature`, `surface_salinity` | Initial surface values |
51+
| `temperature_gradient_mixed_layer`, `salinity_gradient_mixed_layer` | Gradients within the mixed layer |
52+
| `temperature_difference_across_mixed_layer`, `salinity_difference_across_mixed_layer` | Profile discontinuity across the mixed layer |
53+
| `temperature_gradient_interior`, `salinity_gradient_interior` | Interior (below mixed layer) gradients |
54+
| `mixed_layer_depth_temperature`, `mixed_layer_depth_salinity` | Mixed layer depths (typically ~40 m) |
3955

4056
For cases with ideal age tracers, an initial profile for the ideal age tracer is
4157
also constructed and is equal to zero seconds throughout the column.
4258

59+
A forcing netCDF file is also created based on the config options given in the
60+
`single_column_forcing` section. A subset of those options are:
61+
62+
| Option | Description |
63+
|--------|-------------|
64+
| `temperature_piston_velocity`, `salinity_piston_velocity` | Surface restoring rates |
65+
| `temperature_surface_restoring_value`, `salinity_surface_restoring_value` | Target surface values |
66+
| `temperature_interior_restoring_rate`, `salinity_interior_restoring_rate` | Interior restoring rates |
67+
| `latent_heat_flux`, `sensible_heat_flux`, `shortwave_heat_flux` | Surface heat flux components |
68+
| `evaporation_flux`, `rain_flux` | Surface freshwater fluxes |
69+
| `wind_stress_zonal`, `wind_stress_meridional` | Wind stress values |
70+
4371
### forward
4472

4573
The class {py:class}`polaris.tasks.ocean.single_column.forward.Forward`
@@ -57,18 +85,41 @@ salinity.
5785
## cvmix
5886

5987
The {py:class}`polaris.tasks.ocean.single_column.cvmix.CVMix`
60-
test performs a 1-day run on 1 cores. Then, validation of `temperature`,
88+
test performs a 10-day run on 1 cores. Then, validation of `temperature`,
89+
`salinity`, `layerThickness` and `normalVelocity` are performed against a
90+
baseline if one is provided when calling {ref}`dev-polaris-setup`.
91+
92+
## ekman
93+
94+
The {py:class}`polaris.tasks.ocean.single_column.cvmix.CVMix`
95+
test performs a 5-day run on 1 cores. Then, validation of `temperature`,
6196
`salinity`, `layerThickness` and `normalVelocity` are performed against a
6297
baseline if one is provided when calling {ref}`dev-polaris-setup`.
6398

6499
## ideal age
65100

66101
The {py:class}`polaris.tasks.ocean.single_column.cvmix.IdealAge` test
67-
performs the same 1-day run on 1 cores as the
102+
performs the same 10-day run on 1 cores as the
68103
{py:class}`polaris.tasks.ocean.single_column.cvmix.CVMix` test, but with a
69104
single ideal age tracer included. An additional `forward.yaml` file is
70105
included in the ideal age tracer test case for enabeling on the ideal age
71106
tracers and ideal age surface forcing, as well as for defining
72107
`idealAgeTracers` streams. Validation of `temperature`, `salinity`,
73108
and `idealAgeTracers` are performed against a baseline if one is provided
74109
when calling {ref}`dev-polaris-setup`.
110+
111+
## inertial
112+
113+
The {py:class}`polaris.tasks.ocean.single_column.inertial.Inertial`
114+
test performs a 10-day run on 1 cores. Then, validation of `temperature`,
115+
`salinity`, `layerThickness` and `normalVelocity` are performed against a
116+
baseline if one is provided when calling {ref}`dev-polaris-setup`. Then, the
117+
analysis step is run, and the viz step is optionally run.
118+
119+
### analysis
120+
121+
The {py:class}`polaris.tasks.ocean.single_column.inertial.analysis.Analysis`
122+
compares the inertial frequency with its theoretical value and induces a
123+
failure if the frequency is more than a given fractional difference from
124+
theory, as determined by the config option
125+
`single_column_inertial:period_tolerance_fraction`.
23.9 KB
Loading
35.3 KB
Loading

0 commit comments

Comments
 (0)