Skip to content

Commit

Permalink
Add cosine_bell VizMap to the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Apr 16, 2023
1 parent da39075 commit c06dc2e
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 14 deletions.
3 changes: 3 additions & 0 deletions docs/developers_guide/ocean/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@
analysis.Analysis.run
analysis.Analysis.rmse
viz.VizMap
viz.VizMap.run
```

## Ocean Framework
Expand Down
19 changes: 19 additions & 0 deletions docs/developers_guide/ocean/test_groups/global_convergence.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,22 @@ from the test case's `namelist.forward`.
The class {py:class}`polaris.ocean.tests.global_convergence.cosine_bell.analysis.Analysis`
defines a step for computing the RMSE (root-mean-squared error) for the results
at each resolution and plotting them in `convergence.png`.

### viz

The class {py:class}`polaris.ocean.tests.global_convergence.cosine_bell.viz.VizMap`
defines a step for creating a mapping file from the MPAS mesh at a given
resolution to a lon-lat grid at a resolution and interpolation method
determined by config options.

```cfg
# options for visualization for the cosine bell convergence test case
[cosine_bell_viz]
# visualization latitude and longitude resolution
dlon = 0.5
dlat = 0.5
# remapping method ('bilinear', 'neareststod', 'conserve')
remap_method = conserve
```
76 changes: 62 additions & 14 deletions docs/users_guide/ocean/test_groups/global_convergence.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,29 @@ following showing convergence as a function of the number of cells:
The `cosine_bell` config options include:

```cfg
# options for cosine bell convergence test case
[cosine_bell]
# Options related to the vertical grid
[vertical_grid]
# the number of cells per core to aim for
goal_cells_per_core = 300
# the type of vertical grid
grid_type = uniform
# the approximate maximum number of cells per core (the test will fail if too
# few cores are available)
max_cells_per_core = 3000
# Number of vertical levels
vert_levels = 3
# Depth of the bottom of the ocean
bottom_depth = 300.0
# The type of vertical coordinate (e.g. z-level, z-star)
coord_type = z-level
# Whether to use "partial" or "full", or "None" to not alter the topography
partial_cell_type = None
# The minimum fraction of a layer for partial cells
min_pc_fraction = 0.1
# options for cosine bell convergence test case
[cosine_bell]
# time step per resolution (s/km), since dt is proportional to resolution
dt_per_km = 30
Expand Down Expand Up @@ -90,10 +104,31 @@ icos_conv_thresh = 1.8
# Convergence rate above which a warning is issued for icosahedral meshes
icos_conv_max = 2.2
# options for visualization for the cosine bell convergence test case
[cosine_bell_viz]
# visualization latitude and longitude resolution
dlon = 0.5
dlat = 0.5
# remapping method ('bilinear', 'neareststod', 'conserve')
remap_method = conserve
```

The last 7 options are used to control properties of the cosine bell and the
background properties. The first 4 options are discussed below.
The config options in `[vertical_grid]` define the vertical grid, as described
in {ref}`ocean-vertical`.

The `dt_per_km` option `[cosine_bell]` is used to control the time step, as
discussed below in more detail.

The 7 options from `temperature` to `vel_pd` are used to control properties of
the cosine bell and the rest of the sphere, as well as the advection. The
options `qu_conv_thresh` to `icos_conv_max` are thresholds for determining
when the convergence rates are not within the expected range. The options
in the `cosine_bell_viz` section are used in visualizing the initial and
final states on a lon-lat grid.

### resolutions

Expand Down Expand Up @@ -131,8 +166,21 @@ test case (in the config file in the work directory).

The number of cores (and the minimum) is proportional to the number of cells,
so that the number of cells per core is roughly constant. You can alter how
many cells are allocated to each core with `goal_cells_per_core`. You can
control the maximum number of cells that are allowed to be placed on a single
core (before the test case will fail) with `max_cells_per_core`. If there
aren't enough processors to handle the finest resolution, you will see that
the step (and therefore the test case) has failed.
many cells are allocated to each core with `goal_cells_per_core` in the
`[ocean]` config section. You can control the maximum number of cells that
are allowed to be placed on a single core (before the test case will fail)
with `max_cells_per_core` also in `[ocean]`. If there aren't enough
processors to handle the finest resolution, you will see that the step (and
therefore the test case) has failed.

```cfg
# Options related the ocean component
[ocean]
# the number of cells per core to aim for
goal_cells_per_core = 200
# the approximate maximum number of cells per core (the test will fail if too
# few cores are available)
max_cells_per_core = 2000
```

0 comments on commit c06dc2e

Please sign in to comment.