Skip to content
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

Add a tides test case for the VR45to5 mesh #802

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

sbrus89
Copy link
Collaborator

@sbrus89 sbrus89 commented Mar 27, 2024

This PR adds the workflow to generate the mesh and initial conditions for the VR45to5 barotropic tides mesh, run the simulation, and perform the global tidal constituent error analysis. It relies on the developments from E3SM-Project/E3SM#6310. This case reproduces the MPAS-Ocean configuration that gives the best deep water M2 RMSE accuracy (3.3 cm compared to TPXO9) to date.

Checklist

  • User's Guide has been updated
  • Developer's Guide has been updated
  • API documentation in the Developer's Guide (api.rst) has any new or modified class, method and/or functions listed
  • Documentation has been built locally and changes look as expected
  • The E3SM-Project submodule has been updated with relevant E3SM changes
  • Document (in a comment titled Testing in this PR) any testing that was used to verify the changes

@sbrus89
Copy link
Collaborator Author

sbrus89 commented Mar 27, 2024

Testing

The mesh generated looks like:
mesh_EC

Land ice draft is included in the init step
ice_draft

Bathymetric slopes and buoyancy frequency climatology are calculated/interpolated in the init step for topographic wave drag parameterizations:
bathy_slope
Nb

The harmonic constituents are compared against TPXO9 in the analysis step:
M2_plot
N2_plot
S2_plot
O1_plot
K1_plot

# from skimage.filters.rank import median, percentile


class VRTidesMesh(SphericalBaseStep):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This should probably inherit from QuasiUniformSphericalMeshStep then I can reuse the setup and run methods (if I refactor the return variables from build_cell_width_lat_lon and the input variables to make_jigsaw_mesh

Copy link
Collaborator

Choose a reason for hiding this comment

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

If possible, that does seem better. But we would want to avoid updating QuasiUniformSphericalMeshStep if it can be avoided.

super().__init__(test_case=test_case, name='pixel',
ntasks=1, min_tasks=1, openmp_threads=1)

self.add_input_file(
Copy link
Contributor

Choose a reason for hiding this comment

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

Building these DEM datasets could be done once and cached somewhere, as it's pretty expensive and is typically only redone when GEBCO release a new bathymetry (once per year).

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll keep these tools updated in https://github.com/dengwirda/dem for the latest GEBCO etc.

@@ -4,10 +4,14 @@ config_calendar_type = 'noleap'
config_pio_num_iotasks = 0
config_pio_stride = 1
config_time_integrator = 'RK4'
config_use_mom_del2 = .true.
config_mom_del2 = 3.333
config_use_mom_del4 = .true.
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't do a lot of tuning on the del^k dissipation, so this could be looked at in the future if there's interest.

Copy link
Contributor

Choose a reason for hiding this comment

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

Since the model is BTR-only, the following is a simple non-iterative adjustment of the SSH due to ISC pressure.

Copy link
Contributor

@dengwirda dengwirda left a comment

Choose a reason for hiding this comment

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

Thanks @sbrus89 this runs for me successfully on pm-cpu using E3SM-Project/E3SM#6310. A few things I noticed:

  • It looks like the plots show TPXO8 rather than TPXO9?
  • It looks like the wave-drag step may be printing quite a bit of output to the logs which could be suppressed? Also some long python loops which may be expensive.
  • You may see improved performance if jigsaw is upgraded to a more recent version that runs with multi-threading + accelerated steepest descent.

@dengwirda
Copy link
Contributor

Not relevant to this PR specifically, but since the errors in M2 are quite competitive here, I wonder if tuning for other constituents too (RMSE_total: https://gmd.copernicus.org/articles/14/1125/2021/) may make sense in the future, so as not to over fit on M2.

Copy link
Collaborator

@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.

Approving based on @sbrus89's testing above. Thank you! It is great to have this published test case in the repository!

@xylar
Copy link
Collaborator

xylar commented May 29, 2024

@sbrus89, thanks for the reminder. I'm testing an update to the submodule now.

@xylar
Copy link
Collaborator

xylar commented May 29, 2024

@sbrus89, as I just mentioned on slack, my attempt to update the submodule was not very successful. E3SM-Project/E3SM#6310 seems to be causing segfaults on Chrysalis with Intel and OpenMPI.

@sbrus89
Copy link
Collaborator Author

sbrus89 commented May 29, 2024

@xylar, the segfault issues should be fixed via #825, which turns off topographic wave drag for the global ocean test cases. We should only test config_use_topographic_wave_drag=.true. for tides cases like the one in this PR.

@xylar
Copy link
Collaborator

xylar commented Jun 4, 2024

Almost there, just waiting on #827

@xylar
Copy link
Collaborator

xylar commented Jun 4, 2024

@sbrus89, now that #827 is in, can you rebase and test one last time? Then, I'll merge.

@sbrus89
Copy link
Collaborator Author

sbrus89 commented Jun 4, 2024

@xylar, yes I will do that. Thanks for helping with the submodule update!

@xylar
Copy link
Collaborator

xylar commented Jul 7, 2024

Following up from a month ago, a reminder to rebase and retest.

@sbrus89
Copy link
Collaborator Author

sbrus89 commented Dec 3, 2024

@xylar, sorry for the big delay on this. Everything is working for me after the rebase now that I sorted out the issues with the ice shelf cavity culling step. I'm retesting the Icos7 test to make sure it is still working as expected. I'll let you know once I've verified that it is.

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