Aquaplanet external gravity wave#187
Conversation
… point the forward step to the correct graph.info file
and a few other small edits
|
@jeremy-lilly thanks for your work on this, it looks beautiful! Could you add a documentation page to the user's guide, similar to this? |
|
Trying it out: This worked similarly on chicoma, perlmutter, and chrysalis. I am using a compiled executable from E3SM-Project/E3SM#6224. Output is as follows:
with plots identical to those above. Beautiful! |
xylar
left a comment
There was a problem hiding this comment.
@jeremy-lilly, this looks great! The main thing I noticed is that documentation is missing. Please ping me to review again once that gets added.
In the meantime, a few other small comments.
| dt_btr_scaling = section.getfloat('dt_btr_scaling') | ||
| dt_btr = self.dt / dt_btr_scaling | ||
| btr_dt_str = get_time_interval_string(seconds=dt_btr * | ||
| self.resolution) |
There was a problem hiding this comment.
I don't think we can make this change without also updating any test cases that already use the split time stepping to use this approach. Maybe none are so far in which case maybe this will be fine.
There was a problem hiding this comment.
I didn't originally add this, and I'll admit I'm a little lost as to where it is used/needed. Maybe best to address this part when we merge/rebase to account for any cases that were added in the last year?
There was a problem hiding this comment.
Okay, let's see what a rebase turns up. Hopefully, you don't need to make any framework-level changes like this one. If you do, the issue remains that we'll have to make sure other test cases aren't affected.
cbegeman
left a comment
There was a problem hiding this comment.
Fantastic work here! I made a few comments and suggestions. Don't feel like you have to do all the things I suggested if you don't have the time. Also, I made most of the comments before Xylar posted his, so pardon any conflicting messaging there!
I ran the non-LTS case successfully with E3SM master.
Many of the suggestions have to do with making the convergence framework changes a bit more intuitive since we originally wrote the code for space and time convergence together. It will be great to have the option to evaluate time convergence separately with your changes.
| error.append(error_res) | ||
| else: | ||
| for i in range(1, len(dts)): | ||
| mesh_name = resolution_to_subdir(resolutions[0]) |
There was a problem hiding this comment.
Is this implying that when dts is specified, we are evaluating convergence in time only (and all steps must use the mesh at resolutions[0])? If so, I think we should put in some safeguards so that this function cannot be used incorrectly.
There was a problem hiding this comment.
You are correct -- I added a note about this to the definition of dts to the docstring. Off of the top of my head, I'm not sure how to further safeguard against this being misused, but I'm happy to add something if anyone has ideas.
| @@ -0,0 +1,81 @@ | |||
| omega: | |||
There was a problem hiding this comment.
It can be nice to have one file forward.yaml that has the config options common to both global and local time stepping and then either/both of forward_global_time_step.yaml and forward_local_time_step.yaml that contain the options that are specific to each.
There was a problem hiding this comment.
Agreed! Would you be able to point me to an example of where this is done for another test case? Thanks!
There was a problem hiding this comment.
This example from a draft PR of mine is close to what I have in mind:
polaris/polaris/ocean/tasks/drying_slope/forward.py
Lines 111 to 116 in fed3cbe
|
@xylar, @cbegeman, @mark-petersen -- thank you all for your comments and suggestions! Just wanted to let you know that I saw these and that they are on my to-do list, but I might not get to them right away. I will ping everyone when ready for a second look : ) Thanks! |
7ce4884 to
03c72f0
Compare
|
@jeremy-lilly, I know you're a busy guy but I'm wondering if this is something we should revive after more than a year or if it should go into draft mode to indicate that it needs more time. |
|
Hey @xylar, thanks for the reminder about this! I took some time to address most of the remaining comments. I'll close the ones I think are handled and leave comments on others. Before getting too much further, do you prefer that we rebase this PR on to the current head of main, or or do you prefer that we merge the two branches? |
|
@jeremy-lilly, I would much prefer a rebase. Thanks for checking on that. A lot has changed in a year so let me know if you run into problems you can't quite figure out. I would imagine @cbegeman may also be up for helping out, and she would be a good resource since she wrote most of the convergence infrastructure. |
Co-authored-by: Carolyn Begeman <cbegeman@lanl.gov>
|
@jeremy-lilly Yes, happy to help. Let me know if there are questions that come up that I can help answer during/after the rebase. |
|
@xylar, @cbegeman, I did a local rebase, but since so much has changed in the underlying Polaris infrastructure and this PR makes a lot of changes to the infrastructure, I think the easiest thing will be to close this PR and rebuild the test case on top of modern Polaris. I've started that process here, and I'll open a new PR when it is ready. |
|
Yes, I could imagine that being easier. |
This PR creates a new ocean task for testing the temporal convergence rate of time-stepping schemes in MPAS-O. The case is that of a simple external gravity wave on an aquaplant. The normal velocity is initialized to zero and the layer thickness is initialized as a Gaussian bump.
The user selects a time-stepping scheme and a series of time-steps to run the test. The first listed time-step will be used to produce a reference solution that other runs will be compared to.
The PR also implements a version of the task for LTS schemes, in particular for the new FB-LTS scheme from this PR: E3SM-Project/E3SM#6224. Convergence plots produced by this task for FB-LTS are given below.
Note that the external gravity wave case was chosen so as to have as few terms in the tendencies as possible -- because of this, both the LTS and FB-LTS schemes show their "true" order of convergence, rather than the first order convergence caused by the operator splitting that both the LTS and FB-LTS codes implement.
Checklist
api.md) has any new or modified class, method and/or functions listedTestingcomment in the PR documents testing used to verify the changes