-
Notifications
You must be signed in to change notification settings - Fork 60
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
Nodal modulation #725
base: dev/gfdl
Are you sure you want to change the base?
Nodal modulation #725
Conversation
This commit fixes a few (potential) inconsistencies between open boundary tidal forcing and astronomical tidal forcing. 1. There was an inconsistency in the code that the nodal modulation can be calculated in OBC tidal forcing but not in the astronomical tidal forcing. This commit fixes this bug so that nodal modulation is applied to both forcings. 2. In the previous version of MOM_open_boundary.F90, a different set of tidal parameters can be set for open boundary tidal forcing, leading to potential inconsistency with astronomical tidal forcing. This commit obsoletes those for open boundary tidal forcing. 3. Another important bug fix is that the equilibrium phase is added to the SAL term, which was missing in the original code.
241f7b7
to
405213a
Compare
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.
This looks correct to me; thanks for improving how the tidal forcing works.
I also ran two short simulations with the Northwest Atlantic regional model. This PR exactly reproduced results from the existing code (after turning off the nodal modulation, which is improved in this PR but will unavoidably change answers).
Because the OBC tide parameters are removed by this PR, existing regional models with OBC tides will get a fatal but informative error. This makes sense, though, because the parameters are being merged and can't be kept separate for backwards compatibility. Mainly, I just want to tag @yichengt900 so he knows that when we merge this into the CEFI fork we will have to update all of the regional configuration MOM_inputs.
Thank you for this contribution, @c2xu, and for your careful review, @andrew-c-ross. Because this PR will require substantial changes to some runtime parameters, I am going to suggest that we hold this PR up until after our next PR from dev/gfdl to main (which I expect to be in a few weeks, after a pending PR from dev/ncar to main has cleared). The PR after that is going to have a number of changes to parameter default values and names (as were agreed to in the consortium-wide MOM6 dev call in July), and I think that it would be less disruptive if we were to add this PR along with those other changes. |
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.
I took a more detailed look at this PR (sorry for being two months late), and have a couple of minor comments.
Besides, I also wonder if we could use the initial time of the model as the default for the tidal reference date(s). This is echoing Ed's suggestion in May 2023. It can be easily implemented by passing Time_init
from initialize_MOM
via initialize_dyn_
variances to tidal_forcing_init
.
call get_param(param_file, mdl, "TIDE_ADD_NODAL", add_nodal_terms, & | ||
"If true, include 18.6 year nodal modulation in the astronomical tidal forcing.", & | ||
default=.false.) | ||
call get_param(param_file, mdl, "TIDE_NODAL_REF_DATE", nodal_ref_date, & |
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.
Is there a reasonable scenario that nodal correction should use a date other than TIDE_REF_DATE
?
I appreciate the flexibility for introducing a different reference date for nodal correction, but it would also seem rather confusing.
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.
This is what has been done in MOM_open_boundary.F90
. I think the reason is that these two dates could be different when tides are forced at the open boundaries by some external data. @andrew-c-ross probably has a better answer.
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.
When I wrote the original OBC tide code I wasn't aware of an easy way for MOM6 to know the current date/time when the OBC and tidal forcing were being initialized. If Time_init
is available though I think it would make sense to use that for both the tide and nodal correction ref dates. The only exception would be if, when restarting the model, the init time was something other than the time of the restart, since we would want to update the date used for the nodal correction ~yearly.
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.
Thanks for the answers!
@@ -60,13 +62,15 @@ module MOM_harmonic_analysis | |||
|
|||
!> This subroutine sets static variables used by this module and initializes CS%list. | |||
!! THIS MUST BE CALLED AT THE END OF tidal_forcing_init. | |||
subroutine HA_init(Time, US, param_file, time_ref, nc, freq, phase0, const_name, CS) | |||
subroutine HA_init(Time, US, param_file, time_ref, nc, freq, phase0, const_name, tide_fn, tide_un, CS) |
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.
Would it be more concise if tidal_forcing_CS
is used as a single input, rather than its members?
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.
This is because tidal_forcing_CS
is not transparent and MOM_harmonic_analysis
cannot see what's inside. @Hallberg-NOAA commented on this in his review of the initial PR for inline harmonic analysis.
This commit fixes a few (potential) inconsistencies between open boundary tidal forcing and astronomical tidal forcing.
There was an inconsistency in the code that the nodal modulation can be calculated in OBC tidal forcing but not in the astronomical tidal forcing. This commit fixes this bug so that nodal modulation is applied to both forcings.
In the previous version of MOM_open_boundary.F90, a different set of tidal parameters can be set for open boundary tidal forcing, leading to potential inconsistency with astronomical tidal forcing. This commit obsoletes those for open boundary tidal forcing.
Another important bug fix is that the equilibrium phase is added to the SAL term, which was missing in the original code.