Skip to content

Conversation

@sbrus89
Copy link

@sbrus89 sbrus89 commented Sep 18, 2019

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:

  • 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)

Any feedback on the implementation is welcome.

@sbrus89
Copy link
Author

sbrus89 commented Sep 18, 2019

Here are some results compared to our previous best solution without tides.

  • These runs use a mesh with 2km resolution in Delaware Bay and 5km in the Chesapeake Bay and Long Island regions.
  • Finer resolution is going to be required to improve these results, especially inside the bays.
  • Also, these runs do not use wetting and drying, which should also help improve the comparison to observed data.

8516945

8534720

8557380

8632200

@sbrus89
Copy link
Author

sbrus89 commented Sep 30, 2019

Results of the finer mesh USDEQU60at15cr5rr1 compared with USDEQU120at30cr10rr2. The pre-storm tidal amplitudes are too high, but the phase errors are better and the surge is also improved.

8516945
8534720
8557380
8632200

@pwolfram
Copy link
Contributor

Will want to add simple SAL in before we merge this week in conversations with Brian Arbic and Nairita Pal.

@pwolfram
Copy link
Contributor

@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
has offered to take a look in a G case with this merged branch. Thanks!

@xylar
Copy link
Collaborator

xylar commented Oct 15, 2019

@pwolfram, I wasn't aware a review had been requested. I'll take a look at this tomorrow.

@vanroekel
Copy link
Contributor

I don't feel qualified to review these changes. I'll remove my name from the list

@vanroekel vanroekel removed their request for review October 15, 2019 21:20
@xylar
Copy link
Collaborator

xylar commented Oct 16, 2019

@sbrus89 or @pwolfram, could you point to the design doc here if it's publicly available?

@xylar
Copy link
Collaborator

xylar commented Oct 16, 2019

If I have found the correct design doc via confluence, I see the following:

For instance, in a shallow water model, we replace the term $\nabla \eta$ in the momentum equation with a gradient of $\eta$ referenced to the equilibrium tide and self-attraction and loading terms...In essence, the equilibrium tide and self-attraction and loading terms reset the reference against which pressure gradients are computed.

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?

Copy link
Collaborator

@xylar xylar left a 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.

@pwolfram
Copy link
Contributor

@xylar, the design doc is at https://www.overleaf.com/read/dxgprfyjnnnw Is this the one you were looking at for your review?

@xylar
Copy link
Collaborator

xylar commented Oct 16, 2019

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

@pwolfram
Copy link
Contributor

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.

@pwolfram
Copy link
Contributor

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

@xylar
Copy link
Collaborator

xylar commented Oct 16, 2019

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.

I'm definitely able to edit. Maybe you gave me special permission?

@sbrus89
Copy link
Author

sbrus89 commented Oct 17, 2019

@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
@pwolfram
Copy link
Contributor

@sbrus89, had to update the design doc part to include the other tex files and remove the pdf.

@pwolfram
Copy link
Contributor

Just to confirm no damage was done:

design_docs pwolfram$ git diff 2aae280 34698ba --stat
 docs/ocean/design_docs/tides.pdf             |  Bin 204589 -> 0 bytes
 docs/ocean/design_docs/tides/ametsoc.bst     | 1741 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 docs/ocean/design_docs/tides/tides.bib       |   35 +++++
 docs/ocean/design_docs/{ => tides}/tides.tex |    0
 4 files changed, 1776 insertions(+)

@pwolfram
Copy link
Contributor

@mark-petersen, can you please approve so that I can merge?

@sbrus89
Copy link
Author

sbrus89 commented Oct 18, 2019

Oops. Sorry I forgot to include the other tex files

@pwolfram
Copy link
Contributor

@sbrus89, it is all good. Please enjoy your day off and many thanks for the help!

@mark-petersen mark-petersen self-requested a review October 18, 2019 17:47
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 locally into ocean/develop. Tested with gnu and intel debug on grizzly. Passes bfb against previous.

pwolfram added a commit that referenced this pull request Oct 18, 2019
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)
@pwolfram pwolfram merged commit 2aae280 into MPAS-Dev:ocean/coastal Oct 18, 2019
@pwolfram pwolfram deleted the tides branch October 18, 2019 18:15
@pwolfram
Copy link
Contributor

Thanks everyone!

mark-petersen added a commit that referenced this pull request Oct 19, 2019
This PR is an accumulation of PRs into the ocean/coastal branch. We are
bringing them in at once for efficiency:
 #285, #289, #284, #295, #310, #311, #312, #335, #354, #356, #358, #359,
 #365, #371
mark-petersen added a commit that referenced this pull request Oct 19, 2019
This PR is an accumulation of PRs into the ocean/coastal branch. We are
bringing them in at once for efficiency.
 #285, #289, #284, #295, #310, #311, #312, #335, #354, #356, #358, #359,
 #365, #371

do iCell = 1, nCells
do k = 1, maxLevelCell(iCell)
tidalPotentialZMid(k,iCell) = zMid(k,iCell) - tidalPotentialEta(iCell) &
Copy link
Contributor

Choose a reason for hiding this comment

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

@sbrus89, potential issue may be here with #366 including tidal forcing. zMid is a strong negative with the spurious datum shift we are employing in #366 until the vertical datum issue is resolved.

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)
Copy link
Contributor

@pwolfram pwolfram Jan 17, 2020

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

SE no wetting / drying

8519483

RK4 no wetting / drying

8519483

no tides with wetting / drying

8519483

tides with wetting / drying but no SAL

8519483

Copy link
Contributor

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.

Copy link
Contributor

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:

8537121

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.

8537121

Del4 differed between the runs, am reruning with matching del4 values.

Copy link
Contributor

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) &...

Copy link
Contributor

Choose a reason for hiding this comment

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

Station 8519483 looks better though, especially compared with the previous results.

8519483

Copy link
Contributor

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
image

real (kind=RKIND), dimension(:,:), pointer :: latitudeFunction
integer, dimension(:), pointer :: constituentType
real (kind=RKIND), dimension(:), pointer :: eta
real (kind=RKIND), dimension(:,:), pointer :: zMid, tidalPotentialZMid
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

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.

ashwathsv pushed a commit to ashwathsv/MPAS-Model that referenced this pull request Jul 21, 2020
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)
ashwathsv pushed a commit to ashwathsv/MPAS-Model that referenced this pull request Jul 21, 2020
mark-petersen added a commit to mark-petersen/MPAS-Model that referenced this pull request Jan 11, 2021
caozd999 pushed a commit to caozd999/MPAS-Model that referenced this pull request Jan 14, 2021
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.

6 participants