-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aquaplanet external gravity wave #187
Open
jeremy-lilly
wants to merge
21
commits into
E3SM-Project:main
Choose a base branch
from
jeremy-lilly:aquaplanet-external-gravity-wave
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
4c54bb0
First commit for external gravity wave case with fblts, still need to…
jeremy-lilly cadab38
Fix lts regions step, and complete region labeling routine
jeremy-lilly cee0158
graph_info is read from right folder now
gcapodag 2637cb4
Added missing file
gcapodag b64c87c
Changed number of time levels in fblts namelist
gcapodag 2367cad
Fixed input read of lts regions
gcapodag c8fab6a
Fix path for graph.info if using FB_LTS
jeremy-lilly 6425017
Added extra forward runs for all the necessary dts
gcapodag 9438371
Trying to get the analysis step to work
gcapodag acc02c6
Fixed issue thanks to Xylar
gcapodag 52b9e7e
Intermediate commit
gcapodag d282587
Stuff works
gcapodag 4714bb9
Modified forward.yaml for RK4 and dt for conv test
gcapodag 5a95f96
Made a lot of changes
gcapodag 6dfa0bd
Added files
gcapodag f4e7e8d
Fixed issues
gcapodag e3a061a
Small change to plot
gcapodag 4396252
Modified convergence threshold
gcapodag f999cb2
Fix step names for runs with different dts
jeremy-lilly 03c72f0
Set nVertLevels during paraview extraction of lts mesh
jeremy-lilly 6dd12aa
Add documentation for ext gravity wave case
jeremy-lilly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
(ocean-external-gravity-wave)= | ||
|
||
# external gravity wave | ||
|
||
The external gravity wave task implements a test of an external gravity wave | ||
on a non-rotating aquaplanet. | ||
The test is meant as a simple case on which the temporal convergence of | ||
time-stepping schemes can be tested. | ||
There is no exact solution, rather, for a given time-stepping scheme, the | ||
task calculates errors against a run with a time-step that is small | ||
relative to the time-steps used in subsequent runs. | ||
|
||
Note that this is *not* a shallow water test case. | ||
While the standard, non-linear shallow water thickness equation | ||
has been left alone, the normal velocity equation has had terms deleted so as | ||
to only consider gravity wave effects. the resulting equations are given by | ||
$$ | ||
\begin{align} | ||
&\partial_t \mathbf{u} = -g \nabla h \\ | ||
&\partial_t h + \nabla \cdot (h\mathbf{u}) = 0. | ||
\end{align} | ||
$$ | ||
|
||
This is done to provide the simplest case on which to test the | ||
convergence of a time-stepping scheme. | ||
In particular, we use this task to test the convergence of local time-stepping | ||
schemes (`LTS` and `FB_LTS`) that employ a operator splitting in which tendency | ||
terms other than those above are advanced with Forward Euler. | ||
As a result, this task helps to show that these local time-stepping schemes | ||
are achieving the correct theoretical order of convergence is said splitting | ||
was not used. | ||
|
||
## description | ||
|
||
The `external_gravity_wave` task runs the external gravity wave simulation for | ||
a number of user-defined time-steps in order to determine the order of temporal | ||
convergence of the selected time-stepping scheme over those time-steps. | ||
The first listed time-step should be very small relative to the proceeding | ||
time-steps as the this will be used to produce a reference solution that the | ||
other runs will be compared to. | ||
|
||
This task implements separate cases for local and global time-stepping schemes. | ||
Local time-stepping schemes require extra work during the init step that | ||
identifies each cell in the mesh with an appropriate label used during the | ||
local time-stepping scheme. | ||
These separate cases are identified by the appendices `_local_time_step` | ||
and `_global_time_step` respectively. | ||
|
||
The forward step runs the model for a given time-step. | ||
|
||
The analysis step calculates the L2-norm of the difference between the | ||
reference solution and model solution with the given time-steps | ||
for both normal velocity and layer thickness. | ||
This step then produces plots of the resulting temporal convergence. | ||
|
||
## mesh | ||
|
||
The init step generates both icosehedral and quasi-uniform meshes of the desired | ||
resolutions. | ||
|
||
## vertical grid | ||
|
||
This task is a single layer test case, so the vertical grid is set to a single | ||
layer configuration. | ||
|
||
```cfg | ||
[vertical_grid] | ||
|
||
# The type of vertical grid | ||
grid_type = uniform | ||
|
||
# Number of vertical levels | ||
vert_levels = 1 | ||
|
||
# Depth of the bottom of the ocean | ||
bottom_depth = 1000.0 | ||
|
||
# The type of vertical coordinate (e.g. z-level, z-star) | ||
coord_type = z-star | ||
|
||
# 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 | ||
``` | ||
|
||
## initial conditions | ||
|
||
The normal velocity is initialized to zero, while the layer thickness is set | ||
to be a Gaussian bell centered at `lat_center = 0.0`, `lon_center = pi/2`, | ||
with units in radians. | ||
The exact form of the Gaussian bells is given by | ||
$$ | ||
h = e^{ -100 \left( (x - \text{lat_center})^2 | ||
+ (y - \text{lon_center})^2 \right) } | ||
$$ | ||
|
||
## forcing | ||
|
||
N/A | ||
|
||
## config options | ||
|
||
The following config options are available for this case: | ||
|
||
```cfg | ||
|
||
# config options for convergence forward steps | ||
[convergence_forward] | ||
|
||
# time integrator: {split_explicit, RK4, unsplit_explicit, split_implicit, split_explicit_ab2} | ||
time_integrator = RK4 | ||
|
||
# time steps for temporal convergence test | ||
# the first one is used for the reference solution | ||
dt = 10.0, 120.0, 240.0, 480.0 | ||
|
||
# Run duration in hours | ||
run_duration = 48. | ||
|
||
# Output interval in hours | ||
output_interval = 4. | ||
|
||
|
||
# options for external gravity wave convergence test case | ||
[gaussian_bump] | ||
|
||
# the constant temperature of the domain | ||
temperature = 15.0 | ||
|
||
# the constant salinity of the domain | ||
salinity = 35.0 | ||
|
||
# the central latitude (rad) of the gaussian bump | ||
lat_center = 0.0 | ||
|
||
# the central longitude (rad) of the gaussian bump | ||
lon_center = 1.57079633 | ||
|
||
# convergence threshold below which the test fails | ||
convergence_thresh = 1.8 | ||
``` | ||
|
||
## cores | ||
|
||
The number of cores is determined according to the config options | ||
`max_cells_per_core` and `goal_cells_per_core`. |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks for adding this!