Skip to content

Updating COMPASS ocean test cases based on mpas_tools reorg#577

Merged
mark-petersen merged 23 commits intoMPAS-Dev:ocean/developfrom
xylar:ocean/mesh_creation_reorg
Sep 3, 2020
Merged

Updating COMPASS ocean test cases based on mpas_tools reorg#577
mark-petersen merged 23 commits intoMPAS-Dev:ocean/developfrom
xylar:ocean/mesh_creation_reorg

Conversation

@xylar
Copy link
Collaborator

@xylar xylar commented May 29, 2020

This merge updates COMPASS ocean test cases to make them compatible with MPAS-Dev/MPAS-Tools#314. This includes:

  • Changing define_base_mesh.py to build_base_mesh.py, which calls build_spherical_mesh() explicitly (whereas the old build_mesh called the cellWidthVsLatLon() from define_base_mesh, which created a problematic import of a local module within build_mesh).
  • Update imports to handle move of coastal_tools (other than signed_distance functions), inject_bathymetry, inject_meshDensity and inject_preserve_floodplain to mpas_tools.ocean

Affected test cases are (check mark indicates they have been updated):

  • Gaussian_hump/USDEQU120cr10rr2/build_mesh/
  • coastal/Maine/init
  • coastal/USDEQU120cr10rr2/build_mesh
  • global_ocean/ARM60to10/init
  • global_ocean/CA120to3/build_mesh
  • global_ocean/EC60to30/init
  • global_ocean/EC60to30wISC/init
  • global_ocean/HI120to12/build_mesh
  • global_ocean/QU240/init
  • global_ocean/QU240wISC/init
  • global_ocean/SO60to10wISC/init
  • global_ocean/WC12/init
  • global_ocean/WC14/init
  • hurricane/USDEQU120at30cr10rr2/build_mesh
  • hurricane/USDEQU120at30cr10rr2WD/build_mesh
  • hurricane/USDEQU120at30cr10rr2WD_veg/build_mesh
  • hurricane/USDEQU240at60cr20rr4/build_mesh
  • hurricane/USDEQU240at60cr20rr4WD/build_mesh
  • hurricane/USDEQU240at60cr20rr4WD_veg/build_mesh
  • hurricane/USDEQU60at15cr5rr1/build_mesh
  • hurricane/USDEQU60at15cr5rr100WD/build_mesh
  • hurricane/USDEQU60at15cr5rr1WD/build_mesh
  • hurricane/USDEQU60at15cr5rr1WD_veg/build_mesh
  • hurricane/USDEQU60at15cr5rr250WD/build_mesh
  • hurricane/USDEQU60at15cr5rr500WD/build_mesh
  • tides/USDEQU120at30cr10/build_mesh

@xylar
Copy link
Collaborator Author

xylar commented May 29, 2020

Testing

My testing for now is only to run the base_mesh part of each test case on my laptop. I am not checking if they are bit-for-bit (in fact, with the change in Earth radius that this PR introduces, I don't expect them to be bit-for-bit).

A check mark in the list above indicates that base_mesh ran successfully.

@xylar xylar force-pushed the ocean/mesh_creation_reorg branch from c2605a5 to ab4a6f9 Compare May 29, 2020 18:11
@xylar xylar force-pushed the ocean/mesh_creation_reorg branch from ab4a6f9 to cec9409 Compare July 6, 2020 13:43
@xylar xylar force-pushed the ocean/mesh_creation_reorg branch from cec9409 to 5f8842f Compare August 25, 2020 12:25
@xylar
Copy link
Collaborator Author

xylar commented Aug 25, 2020

Testing on Grizzly

Verification that results are bit-for-bit in base_mesh, culled_mesh and initial_state steps (Note: some tests only have 1 or 2 of these):

  • Gaussian_hump/USDEQU120cr10rr2/build_mesh/
  • coastal/Maine/init
  • coastal/USDEQU120cr10rr2/build_mesh
  • global_ocean/ARM60to10/init
  • global_ocean/CA120to3/build_mesh
  • global_ocean/EC60to30/init
  • global_ocean/EC60to30wISC/init
  • global_ocean/HI120to12/build_mesh
  • global_ocean/QU240/init
  • global_ocean/QU240wISC/init
  • global_ocean/SO60to10wISC/init
  • global_ocean/WC12/init
  • global_ocean/WC14/init
  • hurricane/USDEQU120at30cr10rr2/build_mesh
  • hurricane/USDEQU120at30cr10rr2WD/build_mesh
  • hurricane/USDEQU120at30cr10rr2WD_veg/build_mesh
  • hurricane/USDEQU240at60cr20rr4/build_mesh
  • hurricane/USDEQU240at60cr20rr4WD/build_mesh
  • hurricane/USDEQU240at60cr20rr4WD_veg/build_mesh
  • hurricane/USDEQU60at15cr5rr1/build_mesh
  • hurricane/USDEQU60at15cr5rr1WD/build_mesh
  • hurricane/USDEQU60at15cr5rr1WD_veg/build_mesh
  • hurricane/USDEQU60at15cr5rr500WD/build_mesh
  • tides/USDEQU120at30cr10/build_mesh

@xylar
Copy link
Collaborator Author

xylar commented Aug 27, 2020

@mark-petersen and @sbrus89, I have a test compass environment, test_compass_0.1.10 on Grizzly for testing this branch and MPAS-Dev/MPAS-Tools#314. The procedure would be very similar to what we have done for #563 and the same tests are likely appropriate.

This new environment includes some new geometric features so you will not be able to sue your old tests as a baseline. (These new features are included in the release version of compass_0.1.9, though they were not in the test version test_compass_0.1.9 that we used yesterday.)

@xylar xylar marked this pull request as ready for review August 27, 2020 13:13
@xylar xylar removed the in progress label Aug 27, 2020
@xylar xylar force-pushed the ocean/mesh_creation_reorg branch from 98b0a5e to a467503 Compare August 27, 2020 17:35
@xylar
Copy link
Collaborator Author

xylar commented Aug 27, 2020

@mark-petersen and @sbrus89, I'm starting to test this now. Just a heads up.

@xylar
Copy link
Collaborator Author

xylar commented Aug 28, 2020

@mark-petersen and @sbrus89, I realized that my tests for this PR are non-bit-for-bit because I changed the Earth radius in MPAS-Dev/MPAS-Tools#314. I'm going to pull that change out of MPAS-Dev/MPAS-Tools#314 for now and make a new test environment without that change. Then, we can have a separate PR to MPAS-Tools just for that non-bit-for-bit change before we do the next mpas_tools/compass release. Again, just a heads up.

@xylar
Copy link
Collaborator Author

xylar commented Aug 28, 2020

I would like to keep ocean/coastal off limits to adding new test cases that use mpas_tools.mesh.creation until this goes in. @sbrus89 and @proteanplanet, what are the plans for the remaining development on ocean/coastal before you stop using it entirely? If they don't relate to this PR, you can hard-reset ocean/coastal to ocean/develop and proceed as far as I'm concerned.

@xylar xylar force-pushed the ocean/mesh_creation_reorg branch from 177a0a5 to 83d114c Compare August 31, 2020 17:19
@xylar
Copy link
Collaborator Author

xylar commented Sep 1, 2020

@sbrus89 and @mark-petersen, all my testing has now passed bit-for-bit. I tested all the cases listed above through initial_state (or the last step they have if there isn't an initial_state step).

I also tested forward mode on the QU240 and QU240wISC runs, comparing the current ocean/develop against a test merge of this branch into ocean/develop and those were also bit-for-bit.

Getting this tested and merged is somewhat of a priority because it is holding up #668, #669 and #671. Also, I will do a second PR related to changing the Earth radius. That one is not bit-for-bit so testing will be trickier, and we should discuss how to do it.

Please let me know what the schedule would be for testing and merging this. I understand that there are also other high priority items at the moment, but the EC30to60km meshes are needed as soon as possible so they can be tested and approved for the v2 release at the end of this month.

Copy link
Contributor

@mark-petersen mark-petersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged #577 and #680 locally. Ran nightly regression suite with test_compass_0.1.10, was bfb with ocean/develop on all tests. Then ran with test2_compass_0.1.10 and init for QU240 was not bfb with previous, as expected.

I then ran EC60to30 and EC60to30wISC. All ran fine. EC60to30 prep-spinup1 was within 1% global kinetic energy after 6 days as previous ocean/develop. EC60to30wISC ran through ssh iterations and test. I cherry-picked #676 on the before and after on all spin-ups.

@mark-petersen
Copy link
Contributor

For EC60to30, here is the initial state just before the coastal merge and after #577 and #680. There are minor differences, but it looks reasonable.
initial_state
initial_state

Copy link

@sbrus89 sbrus89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, based on inspection of hurricane/USDEQU240at60cr20rr4WD case.

@mark-petersen mark-petersen merged commit 9ced6cf into MPAS-Dev:ocean/develop Sep 3, 2020
@mark-petersen
Copy link
Contributor

Thanks for your work on this @xylar!

@xylar xylar deleted the ocean/mesh_creation_reorg branch September 4, 2020 09:23
@xylar
Copy link
Collaborator Author

xylar commented Sep 4, 2020

Thanks very much @sbrus89 and @mark-petersen for the review and for your testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants