-
Notifications
You must be signed in to change notification settings - Fork 76
Baroclinic sea level calculation #984
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
base: dev/gfdl
Are you sure you want to change the base?
Conversation
|
|
On line 270 of src/diagnostics/MOM_harmonic_analysis.F90 "sea serface height." should be "sea surface height.". |
|
Baroclinic sea level is a useful new diagnostic, but the current code has unacceptable limitations: a) This field is valid, and potentially useful, with or without tides, but it is currently only calculated if harmonic analysis is active which in turn requires tides and RK2 splitting. It needs to be reconfigured so that registering baroclinic_sea_level is all that is required to get this diagnostic. b) bsl is only calculated if (present(Time) .and. GV%Boussinesq) - and Time implies HA_CSp. The requirement for an active harmonic analysis needs to be removed, but in addition bsl needs to be calculated in the nonBoussinesq case. |
src/diagnostics/MOM_diagnostics.F90
Outdated
| !! with the mass-weight of these tracers, the total column mass, and the | ||
| !! carefully calculated column height. | ||
| subroutine calculate_vertical_integrals(h, tv, p_surf, G, GV, US, CS) | ||
| subroutine calculate_vertical_integrals(h, tv, p_surf, G, GV, US, CS, Time, HA_CSp) |
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 agree with Alan that BSL is a field we would like both as a diagnostic for output and an internal field for runtime harmonic analysis.
Therefore, I am not sure subroutine calculate_vertical_integrals is the right place for this particular calculation. I think MOM_diagnostics is best reserved for "end products". If there is other usage of BSL other than as a diagnostic, e.g. harmonic analysis, it should be somewhere else (in this case, MOM.F90 would be my choice). It would also save a bit of overhead for calling a function from a different module (for the scenario that you only want to calculate the harmonics while don't need the diagnostic BSL itself).
src/diagnostics/MOM_diagnostics.F90
Outdated
| pres_int(i,j) = pres_int(i,j) - pres(i,j) * z_top(i,j) | ||
| enddo ; enddo ; enddo | ||
| do j=js,je ; do i=is,ie | ||
| bsl(i,j) = pres_int(i,j) / (GV%g_Earth * ((eta(i,j) + G%bathyT(i,j)) + & |
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.
Could you add the equation for BSL in the comment? I trust you must have tested both EoS and layer-mode versions. But it would help me understand the code better with a little bit of context (is the equation
|
This is a nice contribution. And I agree with Alan's comments that it BSL shouldn't depend on harmonic analysis and a non-Boussinesq version would be nice. In addition, I think the calculation of BSL should be moved out of Also, I am having trouble understanding the calculation, especially how the implementation here is connected to Zaron & Ray (2023). Related, I did a little bit of derivation on this particular calculation and I think it could be more economic to use the PBCE term (in split mode). It could also help with non-Boussinesq case. I understand that this is probably beyond the scope of this PR, so I am happy to have a sidebar conversation or share some notes if there is interest. |
|
d4fc253 to
62a16b3
Compare
Baroclinic sea level calculation following Equation (4) of Zaron & Ray (2023), JPO, 53, 2591-2596. DOI: 10.1175/JPO-D-23-0073.1
|
Thanks @awallcraft and @herrwang0. I revised this PR so that the BSL calculation is done in its own subroutine in MOM_interface_heights.F90, and the activation of BSL calculation no longer relies on the harmonic analysis. I also made a minor change to the harmonic analysis of SSH in PR #999, so that the time used for the harmonic analyses of SSH and BSL is consistent. I also left a few comments on the derivation of the algorithm, but the full derivation can be found in this notes. I'm not sure about the algorithm in non-Boussinesq case, but I'll implement it in a separate PR in the future once I figure it out. |
Reference: Zaron, E. D., and Ray, R. D. (2023). Clarifying the distinction between steric and baroclinic sea surface height. Journal of Physical Oceanography, 53, 2591-2596.
DOI: 10.1175/JPO-D-23-0073.1