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

Adds wetting and drying capabilities to RK4 with dam break #54

Merged

Conversation

pwolfram
Copy link
Contributor

@pwolfram pwolfram commented Jun 5, 2018

Adds simple RK4-based wetting and drying with testing via a dam break case against laboratory and ROMS data. This is a work in progress.

@pwolfram
Copy link
Contributor Author

@mark-petersen, a good place to start is run_wetting_drying_test.sh.

Some helpful notebooks are at

Wetting and Drying, e.g., RK4: https://gist.github.com/bb25228c13a8034f0e882246c5040e2e
Barotropic split explicit component: https://gist.github.com/791d27c629ad85cc5e01d90d72a25fc2
Overflow: https://gist.github.com/9c57e8de11a70abf9bf9a38d929c42ca

@pwolfram
Copy link
Contributor Author

pwolfram commented Apr 4, 2019

Wetting and drying for RK4 is needed for #171. We should merge that commit here instead for the first PR of wetting and drying for simplicity.

@pwolfram
Copy link
Contributor Author

pwolfram commented Apr 4, 2019

Note, RK4 has a bug that appears resolved by #137.

@pwolfram
Copy link
Contributor Author

pwolfram commented Apr 4, 2019

Old archived branch is pwolfram:wettingdrying_test_case before extensive clean-up.

@pwolfram pwolfram changed the title Work In Progress: Adds wetting and drying capabilities Work In Progress: Adds wetting and drying capabilities to RK4 with dam break Apr 4, 2019
@pwolfram
Copy link
Contributor Author

pwolfram commented Apr 4, 2019

@xylar and @mark-petersen, the plan here is to bring in RK4 for the dam break problem as a first cut to keep the analysis and review cleaner and then progressively add more wetting and drying cases and features via new PRs. If there is a most time-efficient and clearer approach please recommend it!

@xylar
Copy link
Collaborator

xylar commented Apr 4, 2019

@pwolfram, this seems like a reasonable way to proceed to me. But it looks like this PR needs to be rebased and a lot of commits should be squashed or otherwise cleaned up before this is ready to review. Let me know when this needs further testing or attention. I'm away both this week and next so won't be able to review until the week of the 15th.

@xylar xylar mentioned this pull request Apr 4, 2019
@pwolfram
Copy link
Contributor Author

pwolfram commented Apr 5, 2019

Pushed previous work to pwolfram:wettingdrying_test_case_backup and cleaned this up to be specific to the dam break and RK4 wetting and drying.

@pwolfram pwolfram force-pushed the wettingdrying_test_case branch from e20db20 to 09f806c Compare April 5, 2019 22:16
@pwolfram pwolfram changed the title Work In Progress: Adds wetting and drying capabilities to RK4 with dam break Adds wetting and drying capabilities to RK4 with dam break Apr 5, 2019
@pwolfram
Copy link
Contributor Author

pwolfram commented Apr 5, 2019

@xylar and @mark-petersen, this demonstrates a simple element of wetting and drying and is a good starting point for a review and test of its minimal capabilities. The key thing here is that this test fails without wetting and drying and is compared against laboratory data and ROMS thanks to @caozd999

@pwolfram
Copy link
Contributor Author

pwolfram commented Apr 5, 2019

@caozd999 did a review and should be added to the reviewers' list so that he can confirm his review and post his results. @mark-petersen, can you please add him so that he can do a review?

@pwolfram
Copy link
Contributor Author

pwolfram commented Apr 5, 2019

004m case:

image

012m case:

image

@pwolfram
Copy link
Contributor Author

pwolfram commented Apr 5, 2019

Note, at present the station 8A deviation is due to implementation of the boundary condition. Warner et al (2013) allow the flow to fall out of the domain so there is no pressure gradient on the boundary of the box whereas we use a large domain so water "bunches" up more at 8A outside the dam break region.

@xylar
Copy link
Collaborator

xylar commented Apr 6, 2019

@pwolfram, I believe we discussed that the oscillations in MPAS-O might be due to pressure-gradient errors, and we speculated that these might be reduced with a higher-order treatment. Is that still your best guess? They don't worry me at all, but it may suggest that we can't push the layers too thin with the current method for computing the pressure gradient.

@pwolfram
Copy link
Contributor Author

pwolfram commented Apr 8, 2019

@xylar, you are correct. I'm thinking it is worth documenting this in this PR to note the following things:

  • Oscillations potentially due to pressure-gradient error making this test case a good test for new pressure-gradient code
  • The minimal thickness does set the vertical offset of the MPAS-O results against the ROMS and observational results
  • The ROMS and observational results use a "fall-off" boundary condition whereas for MPAS-O we just use an extended domain, which means the domain-averaged pressure gradient should be larger for ROMS and the observations and our results at 8A will likely be higher than ROMS and the observational results
  • Wetting and drying is needed because otherwise the thin layers cause instability and the test case blows up, making this a great test case to verify that wetting and drying is working correctly.

@xylar, @mark-petersen, @caozd999 please comment on this page with any other comments and I'll incorporate this into the readme for the test case. I'm thinking it should go in the root level underneath dam_break.

@pwolfram
Copy link
Contributor Author

pwolfram commented Apr 8, 2019

@xylar and @mark-petersen, just want to be clear here that I would view this PR as sufficiently complete to be merged. Note, it does depend on #137 for long run times but that PR is almost complete as far as I can tell. Thanks!

@pwolfram pwolfram force-pushed the wettingdrying_test_case branch 2 times, most recently from 76c1339 to 8bb4f03 Compare April 16, 2019 15:17
@pwolfram
Copy link
Contributor Author

@xylar and @mark-petersen, I know you need this work for ProSPECT (cc @stephenprice) and it has been sitting way too long on account of me. I've pushed up clean changes (and verify it works) and it should be ready for you now.

@pwolfram pwolfram force-pushed the wettingdrying_test_case branch from 8bb4f03 to 6b3fc03 Compare April 16, 2019 16:31
pwolfram and others added 2 commits April 16, 2019 10:41
Digitized and script written by Zhendong Cao from

Warner, J. C., Defne, Z., Haas, K., & Arango, H. G. (2013). A wetting
and drying scheme for ROMS. Computers & geosciences, 58, 54-61.

Comparisons are made against laboratory observations and ROMS output
detailed in Warner et al (2013).
@pwolfram pwolfram force-pushed the wettingdrying_test_case branch from 6b3fc03 to 4ac7cec Compare April 16, 2019 16:50
@pwolfram
Copy link
Contributor Author

Please let me know if you would like any changes before a merge.

@pwolfram pwolfram requested a review from sbrus89 April 16, 2019 17:28
@xylar
Copy link
Collaborator

xylar commented Apr 16, 2019

@pwolfram, I would like to review this but I don't have time right now. Are you feeling an urgent need to merge this? Also, I think @mark-petersen is coordinating all merges into ocean/develop up to the v2 code freeze so I don't think you should plan to merge this yourself.

@pwolfram pwolfram changed the base branch from ocean/develop to ocean/coastal April 17, 2019 16:10
@mark-petersen
Copy link
Contributor

Passes nightly regression, bfb with ocean/develop. Of course, that does not exercise the new code. @pwolfram or @caozd999, please compile with DEBUG=true and exercise the new code additions. If you've already done that, please comment.

@pwolfram
Copy link
Contributor Author

@mark-petersen, thank you. I've compiled and run the case with DEBUG=true and it produces the output as expected.

@pwolfram pwolfram removed the request for review from sbrus89 April 17, 2019 22:49
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.

Looks good thanks!

@mark-petersen mark-petersen self-assigned this Apr 17, 2019
@mark-petersen mark-petersen merged commit 4ac7cec into MPAS-Dev:ocean/coastal Apr 17, 2019
mark-petersen added a commit that referenced this pull request Apr 17, 2019
Adds simple RK4-based wetting and drying with testing via a dam break
case against laboratory and ROMS data.

The old stub description is below:

Adds wetting and drying capabilities to MPAS-Ocean (work in progress).

This is a work in progress.
mark-petersen added a commit to E3SM-Project/E3SM that referenced this pull request May 22, 2019
Includes:

1. LIGHT update (MPAS-Ocean Lagrangian particles): MPAS-Dev/MPAS-Model#56
2. clean up ice shelf melt flag: MPAS-Dev/MPAS-Model#164
3. merge coastal branch: MPAS-Dev/MPAS-Model#54
4. CONUS mesh update: MPAS-Dev/MPAS-Model#201
5. Major COMPASS upgrade to python 3: MPAS-Dev/MPAS-Model#229
6. Eliminate outdated -DUNDERSCORE flag: MPAS-Dev/MPAS-Model#156
7. PIO Version Compatibility Check - PGI Compiler Bug Fix: MPAS-Dev/MPAS-Model#212

These changes do not alter E3SM standard cases or testing on next. COMPASS is
the MPAS testing infrastructure. LIGHT and coastal changes are protected by
flags and not used in normal E3SM tests.
jonbob added a commit to E3SM-Project/E3SM that referenced this pull request May 22, 2019
Update mpas source

This PR update the mpas-source git submodule but only includes changes that
will not impact E3SM. These changes include:
* LIGHT update (MPAS-Ocean Lagrangian particles): MPAS-Dev/MPAS-Model#56
* clean up ice shelf melt flag: MPAS-Dev/MPAS-Model#164
* merge coastal branch: MPAS-Dev/MPAS-Model#54
* CONUS mesh update: MPAS-Dev/MPAS-Model#201
* Major COMPASS upgrade to python 3: MPAS-Dev/MPAS-Model#229
* Eliminate outdated -DUNDERSCORE flag: MPAS-Dev/MPAS-Model#156
* PIO Version Compatibility Check - PGI Compiler Bug Fix: MPAS-Dev/MPAS-Model#212

These changes do not alter E3SM standard cases or tested configurations.
COMPASS is the MPAS testing infrastructure. LIGHT and coastal changes
are protected by flags and not used in normal E3SM tests.

[NML]
[BFB]
jonbob added a commit to E3SM-Project/E3SM that referenced this pull request May 23, 2019
Update mpas source

This PR update the mpas-source git submodule but only includes changes that
will not impact E3SM. These changes include:
* LIGHT update (MPAS-Ocean Lagrangian particles): MPAS-Dev/MPAS-Model#56
* clean up ice shelf melt flag: MPAS-Dev/MPAS-Model#164
* merge coastal branch: MPAS-Dev/MPAS-Model#54
* CONUS mesh update: MPAS-Dev/MPAS-Model#201
* Major COMPASS upgrade to python 3: MPAS-Dev/MPAS-Model#229
* Eliminate outdated -DUNDERSCORE flag: MPAS-Dev/MPAS-Model#156
* PIO Version Compatibility Check - PGI Compiler Bug Fix: MPAS-Dev/MPAS-Model#212

These changes do not alter E3SM standard cases or tested configurations.
COMPASS is the MPAS testing infrastructure. LIGHT and coastal changes
are protected by flags and not used in normal E3SM tests.

[NML]
[BFB]
@pwolfram pwolfram deleted the wettingdrying_test_case branch August 13, 2019 16:23
ashwathsv pushed a commit to ashwathsv/MPAS-Model that referenced this pull request Jul 21, 2020
…astal

Adds simple RK4-based wetting and drying with testing via a dam break
case against laboratory and ROMS data.

The old stub description is below:

Adds wetting and drying capabilities to MPAS-Ocean (work in progress).

This is a work in progress.
mark-petersen added a commit to mark-petersen/MPAS-Model that referenced this pull request Jan 11, 2021
…astal

Adds simple RK4-based wetting and drying with testing via a dam break
case against laboratory and ROMS data.

The old stub description is below:

Adds wetting and drying capabilities to MPAS-Ocean (work in progress).

This is a work in progress.
caozd999 pushed a commit to caozd999/MPAS-Model that referenced this pull request Jan 14, 2021
…astal

Adds simple RK4-based wetting and drying with testing via a dam break
case against laboratory and ROMS data.

The old stub description is below:

Adds wetting and drying capabilities to MPAS-Ocean (work in progress).

This is a work in progress.
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