-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update documentation for compass.landice.mesh
Add compass.landice.mesh to framework documentation, and update some doc-strings.
- Loading branch information
Showing
6 changed files
with
244 additions
and
9 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
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
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
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 |
---|---|---|
@@ -0,0 +1,105 @@ | ||
.. _dev_landice_framework: | ||
|
||
Land-ice Framework | ||
================== | ||
|
||
|
||
extrapolate | ||
~~~~~~~~~~~ | ||
|
||
The landice framework module ``compass/landice/extrapolate.py`` provides a | ||
function for extrapolating variables into undefined regions. It is copied | ||
from a similar script in MPAS-Tools. | ||
|
||
mesh | ||
~~~ | ||
|
||
The landice framework module :py:mod:`compass.landice.mesh` provides functions | ||
used by all ``mesh_gen`` tests cases, which currently exist within the | ||
``antarctica``, ``greenland``, ``humboldt``, ``kangerlussuaq``, ``koge_bugt_s``, | ||
and ``thwaites`` test groups. These functions include: | ||
|
||
py:func:`compass.landice.mesh.gridded_flood_fill()` applies a flood-fill algorithm | ||
to the gridded dataset in order to separate the ice sheet from peripheral ice. | ||
|
||
py:func:`compass.landice.mesh.set_rectangular_geom_points_and_edges()` sets node | ||
and edge coordinates to pass to py:func:`mpas_tools.mesh.creation.build_mesh.build_planar_mesh()`. | ||
|
||
py:func:`compass.landice.mesh.set_cell_width()` sets cell widths based on settings | ||
in config file to pass to :py:func:`mpas_tools.mesh.creation.build_mesh.build_planar_mesh()`. | ||
Requires the following options to be set in the given config section: ``min_spac``, | ||
``max_spac``, ``high_log_speed``, ``low_log_speed``, ``high_dist``, ``low_dist``, | ||
``high_dist_bed``, ``low_dist_bed``, ``high_bed``, ``low_bed``, ``cull_distance``, | ||
``use_speed``, ``use_dist_to_edge``, ``use_dist_to_grounding_line``, and ``use_bed``. | ||
|
||
py:func:`compass.landice.mesh.get_dist_to_edge_and_GL()` calculates distance from | ||
each point to ice edge and grounding line, to be used in mesh density functions in | ||
:py:func:`compass.landice.mesh.set_cell_width()`. In future development, | ||
this should be updated to use a faster package such as `scikit-fmm`. | ||
|
||
py:func:`compass.landice.mesh.build_cell_width()` determine final MPAS mesh cell sizes | ||
using desired cell widths calculated by py:func:`compass.landice.mesh.set_cell_width()`, | ||
based on user-defined density functions and config options. | ||
|
||
py:func:`compass.landice.mesh.build_MALI_mesh()` creates the MALI mesh based on final | ||
cell widths determined by py:func:`compass.landice.mesh.build_cell_width()`, using Jigsaw | ||
and MPAS-Tools functions. Culls the mesh based on config options, interpolates | ||
all available fields from the gridded dataset to the MALI mesh using the bilinear | ||
method, and marks domain boundaries as Dirichlet cells. | ||
|
||
py:func:`compass.landice.mesh.make_region_masks()` creates region masks using regions | ||
defined in Geometric Features repository. It is only used by the ``antarctica`` | ||
and ``greenland`` test cases. | ||
|
||
The following config options should be define for all ``mesh_gen`` test cases (although | ||
not necessarily with the same values shown here, which are the defaults for the 1–10km | ||
Humboldt mesh): | ||
|
||
.. code-block:: cfg | ||
# config options for humboldt test cases | ||
[mesh] | ||
# number of levels in the mesh | ||
levels = 10 | ||
# Bounds of Humboldt domain | ||
x_min = -630000. | ||
x_max = 84000. | ||
y_min = -1560000. | ||
y_max = -860000. | ||
# distance from ice margin to cull (km). | ||
# Set to a value <= 0 if you do not want | ||
# to cull based on distance from margin. | ||
cull_distance = 5.0 | ||
# mesh density parameters | ||
# minimum cell spacing (meters) | ||
min_spac = 1.e3 | ||
# maximum cell spacing (meters) | ||
max_spac = 1.e4 | ||
# log10 of max speed (m/yr) for cell spacing | ||
high_log_speed = 2.5 | ||
# log10 of min speed (m/yr) for cell spacing | ||
low_log_speed = 0.75 | ||
# distance at which cell spacing = max_spac (meters) | ||
high_dist = 1.e5 | ||
# distance within which cell spacing = min_spac (meters) | ||
low_dist = 1.e4 | ||
# These *_bed settings are only applied when use_bed = True. | ||
# distance at which bed topography has no effect | ||
high_dist_bed = 1.e5 | ||
# distance within which bed topography has maximum effect | ||
low_dist_bed = 5.e4 | ||
# Bed elev beneath which cell spacing is minimized | ||
low_bed = 50.0 | ||
# Bed elev above which cell spacing is maximized | ||
high_bed = 100.0 | ||
# mesh density functions | ||
use_speed = True | ||
use_dist_to_grounding_line = False | ||
use_dist_to_edge = True | ||
use_bed = True |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -30,4 +30,4 @@ Some helpful external links: | |
|
||
test_groups/index | ||
suites | ||
framework/index | ||
framework |