Add advection operator convergence test #8
Conversation
bc0caf5 to
7553b9e
Compare
|
We will want to take out the COMPASS changes from MPAS-Dev/MPAS-Model#583. Then, that PR and this one will be our first test of making changes to both MPAS-Ocean init mode and COMPASS at the same time. Let's see how it goes... |
vanroekel
left a comment
There was a problem hiding this comment.
approved by visual inspection and verifying test set up correctly on grizzly
|
Well, I tricked myself the very first time. I tried to run this with the head of Once I pointed the compass config to the executable and namelists from MPAS-Dev/MPAS-Model#583, it works fine. This is a good chance to switch a test case from init mode to a python script. I have a working example with xarray here: |
|
@mark-petersen, in your example, you use things like: This is fine for a one-off but I don't think this is acceptable as a general practice for python coding. anytime you find yourself using That being said, I'm working on initializing a test case in python right now as well, and I really appreciate this example for comparison, since I'm running into a bit of trouble. Given the work @vanroekel has already put into MPAS-Dev/MPAS-Model#583, I think the right thing to do would be to rebase that branch, removing changes in |
|
@mark-petersen, Regarding the confusing error, can you track down why this isn't giving a more useful error message and fix it somehow? Or at least create an issue on MPAS-Model? |
7553b9e to
b01187c
Compare
|
I reran with the rebased code and executable from MPAS-Dev/MPAS-Model#583. Everything works great. Here is that wonderful convergence plot: |
|
I used these lines: because otherwise for xarray you need one line per variable at the top, and another one at the bottom, and you have to ensure that the dimensions match. That seemed like a lot of bookkeeping, so I switched it to a few lists instead. |
|
See MPAS-Dev/MPAS-Model#758 for issue. |
|
Ran convergence test with rebased PR here: MPAS-Dev/MPAS-Model#583 with gnu debug an optimized, produces same plot as above. Takes 12 minutes on grizzly with 4 nodes. |
Add cosine bell advection test case This PR brings in a new mpas-source submodule with changes only to the ocean core. It adds initial condition for cosine bell test case, used for converge test of tracer advection. See MPAS-Dev/MPAS-Model#583 and MPAS-Dev/compass#8. [BFB]
Add cosine bell advection test case This PR brings in a new mpas-source submodule with changes only to the ocean core. It adds initial condition for cosine bell test case, used for converge test of tracer advection. See MPAS-Dev/MPAS-Model#583 and MPAS-Dev/compass#8. [BFB]
Adds the Skamarock and Gassmann cosine bell test case and a regression suite across resolutions to test operator convergence
COMPASS now runs a local script, `build_base_mesh.py` that defines the resolution but also calls `build_spherical_mesh`.
Make it executable and call it directly to be consistent with other cosine_bell tests.
The cosine-bell test was added.
e301b71 to
51368dc
Compare
|
I rebased and update the submodule for But I wanted to note that the order of convergence is noticeably lower and the error in each test is noticeably higher than in September when @mark-petersen last posted a plot: MPAS-Dev/MPAS-Model#583 (review) Did parameters change that would account for this? Longer integration time? |
|
@vanroekel and @mark-petersen, thank you for your reviews earlier. I'm going to go ahead and merge because the order of convergence isn't related to this PR. But it would have been good if this had been noticed and discussed before MPAS-Dev/MPAS-Model#583 went in. It also would have been good if we had had this regression suite since September as a tool to find out when things changed. Part of our slow |



This merge contains the COMPASS changes from: MPAS-Dev/MPAS-Model#583
Adds the Skamarock and Gassmann cosine bell test case and a regression
suite across resolutions to test operator convergence
This PR requires the addition of the cosine bell test case in MPAS-Model init mode, which is in MPAS-Dev/MPAS-Model#583, or changing the
initial_statestep to a python script.Reference: Section 2a in Skamarock, W.C. and A. Gassmann, 2011: Conservative Transport Schemes for Spherical Geodesic Grids: High-Order Flux Operators for ODE-Based Time Integration. Mon. Wea. Rev., 139, 2962–2975, https://doi.org/10.1175/MWR-D-10-05056.1