-
Notifications
You must be signed in to change notification settings - Fork 390
Add tidal potential forcing for 8 major constituents #371
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
Conversation
|
Here are some results compared to our previous best solution without tides.
|
|
Will want to add simple SAL in before we merge this week in conversations with Brian Arbic and Nairita Pal. |
|
@vanroekel and @xylar, if you'd like to review this week could you please take a look over the next day or so? In conversations with @mark-petersen we need to get this in this week. @proteanplanet |
|
@pwolfram, I wasn't aware a review had been requested. I'll take a look at this tomorrow. |
|
I don't feel qualified to review these changes. I'll remove my name from the list |
|
If I have found the correct design doc via confluence, I see the following:
Is this the approach that is being taken here? If so, I'm concerned that just resetting the SSH will have adverse consequences such as lack of mass conservation in a fully 3D model. In other words, the SSH is an important dynamical variable beyond its influence on the pressure gradient. Instead, it seems to me that tides (and eventually changes in equilibrium sea level) would need to be incorporated as change the reference gravitational potential, which is currently assumed to correspond to z=0. See Ch. 7 and 8 of the MOM5 manual for details on how this would work: https://mom-ocean.github.io/assets/pdfs/MOM5_manual.pdf @sbrus89 and @pwolfram (and maybe @mark-petersen), could we discuss this over the phone sometime today? |
xylar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small comments on the code, but my main one is my concern about the overall approach above.
|
@xylar, the design doc is at https://www.overleaf.com/read/dxgprfyjnnnw Is this the one you were looking at for your review? |
|
@pwolfram, yes, that's the document I was looking at. However, I don't think it's a good idea to share an editable link to it on a public forum (though that ship has sailed). |
|
Thanks @xylar, please let me know if think isn't "view only" because that is what was selected in overleaf. Please email me if there is another editable link out there and we'll remove it. |
|
@xylar, can you please be more specific about your concern? We are effectively using 8.2 from the MOM link (with SAL needing to be added as noted above). But, we are just going to use the very simple scalar approximation for SAL for this time with a more advanced SAL added later. Are you concerned about using this form itself? Maybe this is the issue as implied in design doc that we replace ssh (we don't): ∇η→∇(η−η_EQ−η_SAL) (3.4) We are not modifying the free surface as this implies but rather adding on the gravitational potential terms to account for the tide (reflected in the momentum equation via the gradient of the potentials to represent the tidal forcing). This results in the free surface as an emergent property. Thus, η ≠ η−η_EQ−η_SAL, but we are adding the following forcing terms to the momentum equation RHS: -∇(η_EQ+η_SAL). These terms aren't there currently but need to be added as tendencies to have the tidal solution computed as an emergent property of the free surface. |
I'm definitely able to edit. Maybe you gave me special permission? |
|
@xylar, thanks so much for reviewing so carefully! I really appreciate it. In light of your comments, I made some changes which (I hope) help clarify what is being done and make things a bit cleaner. Thanks again. |
- Equilibrium tidal potential for K1, O1, P1, Q1, K2, N2, S2, M2 - Simple scalar approximation for self attraction and loading - Incorporation into Hurricane Sandy test cases
|
@sbrus89, had to update the design doc part to include the other tex files and remove the pdf. |
|
Just to confirm no damage was done: |
|
@mark-petersen, can you please approve so that I can merge? |
|
Oops. Sorry I forgot to include the other tex files |
|
@sbrus89, it is all good. Please enjoy your day off and many thanks for the help! |
mark-petersen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged locally into ocean/develop. Tested with gnu and intel debug on grizzly. Passes bfb against previous.
Adds tidal forcing from 8 major constituents and simple self-attraction and loading. Includes diurnal constituents: K1, O1, P1, Q1 and semi-diurnal constituents: K2, N2, S2, M2. A tanh ramp in time is used to gradually apply the forcing (similar to time-varying atmospheric forcing). It has been implemented for both split_explicit and RK4 time-stepping. It also includes a simple self attraction and loading (0.09*eta) parameterization. Also, there are several updates to the Hurricane Sandy test case to provide verification that tides is working propertly: * Increase maximum depth to 6000m (from 2000m) * Decrease minimum depth to 10m (from 30m) * Use 100layerE3SMv1 vertical grid (was 60layerPHC) * Decrease forcing ramps to 10 days and shorten simulation duration to 10/10-11/3 (was 10/1-11/8)
|
Thanks everyone! |
|
|
||
| do iCell = 1, nCells | ||
| do k = 1, maxLevelCell(iCell) | ||
| tidalPotentialZMid(k,iCell) = zMid(k,iCell) - tidalPotentialEta(iCell) & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| do iCell = 1, nCells | ||
| do k = 1, maxLevelCell(iCell) | ||
| tidalPotentialZMid(k,iCell) = zMid(k,iCell) - tidalPotentialEta(iCell) & | ||
| - config_self_attraction_and_loading_beta * zMid(k,iCell) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will test config_self_attraction_and_loading_beta=0 and report back because offset at zMid is likely cause of problem with offset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That fixed the issue, so having a water column shifted away from 0 for zMid will cause a pretty spurious artificial tidal flow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed means code was stable, but results are not correct with tides on (but are ok with tides off), which means we still have a bug here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are all for USDEQU120at30cr10rr2* meshes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the approach of adding back out the vertical shift produces:
The tidal signal is contained in the output now, but the result is not as good as say just the standard RK4 without wetting / drying, so something is still not completely right.
Del4 differed between the runs, am reruning with matching del4 values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, hard-coded code change was tidalPotentialZMid(k,iCell) = (zMid(k,iCell) + 977.502_RKIND) - tidalPotentialEta(iCell) &...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible correction
@sbrus89, if we allow for zMid offset from zero, this means that this
- config_self_attraction_and_loading_beta * zMid(k,iCell) may not be correct.
Shouldn't it be something more like this?
- config_self_attraction_and_loading_beta * (ssh(iCell)-ssh_dry(iCell))
Given it is a small correction I'm wondering if we shouldn't just turn it off.
Given the approximation really is only deep water as the text implies, maybe we should do something like this:
- config_self_attraction_and_loading_beta * (bottomDepth > 100)*ssh(iCell)
So, we wouldn't do any SAL for shallow waters with less than 100m depth.
Reference
https://www.sciencedirect.com/science/article/pii/S0967064504002048

| real (kind=RKIND), dimension(:,:), pointer :: latitudeFunction | ||
| integer, dimension(:), pointer :: constituentType | ||
| real (kind=RKIND), dimension(:), pointer :: eta | ||
| real (kind=RKIND), dimension(:,:), pointer :: zMid, tidalPotentialZMid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need these here, do we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @sbrus89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, the zMid and tidalPotentialZMid could be removed. At one point I was using them here, but moved those calculations elsewhere and forgot to get rid of the declarations. Thanks for catching this.
Adds tidal forcing from 8 major constituents and simple self-attraction and loading. Includes diurnal constituents: K1, O1, P1, Q1 and semi-diurnal constituents: K2, N2, S2, M2. A tanh ramp in time is used to gradually apply the forcing (similar to time-varying atmospheric forcing). It has been implemented for both split_explicit and RK4 time-stepping. It also includes a simple self attraction and loading (0.09*eta) parameterization. Also, there are several updates to the Hurricane Sandy test case to provide verification that tides is working propertly: * Increase maximum depth to 6000m (from 2000m) * Decrease minimum depth to 10m (from 30m) * Use 100layerE3SMv1 vertical grid (was 60layerPHC) * Decrease forcing ramps to 10 days and shorten simulation duration to 10/10-11/3 (was 10/1-11/8)
This PR is an accumulation of PRs into the ocean/coastal branch. We are bringing them in at once for efficiency: MPAS-Dev#285, MPAS-Dev#289, MPAS-Dev#284, MPAS-Dev#295, MPAS-Dev#310, MPAS-Dev#311, MPAS-Dev#312, MPAS-Dev#335, MPAS-Dev#354, MPAS-Dev#356, MPAS-Dev#358, MPAS-Dev#359, MPAS-Dev#365, MPAS-Dev#371
This PR is an accumulation of PRs into the ocean/coastal branch. We are bringing them in at once for efficiency: MPAS-Dev#285, MPAS-Dev#289, MPAS-Dev#284, MPAS-Dev#295, MPAS-Dev#310, MPAS-Dev#311, MPAS-Dev#312, MPAS-Dev#335, MPAS-Dev#354, MPAS-Dev#356, MPAS-Dev#358, MPAS-Dev#359, MPAS-Dev#365, MPAS-Dev#371
This PR is an accumulation of PRs into the ocean/coastal branch. We are bringing them in at once for efficiency: MPAS-Dev#285, MPAS-Dev#289, MPAS-Dev#284, MPAS-Dev#295, MPAS-Dev#310, MPAS-Dev#311, MPAS-Dev#312, MPAS-Dev#335, MPAS-Dev#354, MPAS-Dev#356, MPAS-Dev#358, MPAS-Dev#359, MPAS-Dev#365, MPAS-Dev#371















Includes diurnal constituents: K1, O1, P1, Q1 and semi-diurnal constituents: K2, N2, S2, M2. A tanh ramp in time is used to gradually apply the forcing (similar to time-varying atmospheric forcing). It has been implemented for both split_explicit and RK4 time-stepping.
Also, there are several updates to the Hurricane Sandy test case:
Any feedback on the implementation is welcome.