Closed herrwang0 closed 1 year ago
A sign related to the scalar approximation the self-attraction and loading (SAL) term is incorrect in the barotropic solver.
https://github.com/NOAA-GFDL/MOM6/blob/b560b2ccb65280a5f78b47ef1f01123d434e529e/src/core/MOM_barotropic.F90#L1047-L1052
The third line in the block above should be
dgeo_de = 1.0 - det_de + CS%G_extra
The bug only impacts cases
TIDES
USE_SAL_SCALAR
USE_PREV_TIDES
The proposed correction will be answer changing for these cases.
eta{tidal} = eta{eq} + eta_{sal} https://github.com/NOAA-GFDL/MOM6/blob/b560b2ccb65280a5f78b47ef1f01123d434e529e/src/parameterizations/lateral/MOM_tidal_forcing.F90#L620 https://github.com/NOAA-GFDL/MOM6/blob/b560b2ccb65280a5f78b47ef1f01123d434e529e/src/parameterizations/lateral/MOM_tidal_forcing.F90#L630 https://github.com/NOAA-GFDL/MOM6/blob/b560b2ccb65280a5f78b47ef1f01123d434e529e/src/parameterizations/lateral/MOM_tidal_forcing.F90#L641-L642
In the scalar approximation, eta{sal} = beta * eta, where eta is the sea surface height. Therefore, d(eta{tidal})/d(eta) = + SAL_SCALAR, which is the output of subroutine tidal_forcing_sensitivity: https://github.com/NOAA-GFDL/MOM6/blob/b560b2ccb65280a5f78b47ef1f01123d434e529e/src/parameterizations/lateral/MOM_tidal_forcing.F90#L567-L573
tidal_forcing_sensitivity
As du/dt ~ -grad(eta - eta{tidal}), eta{tidal} is subtracted from eta. For example: https://github.com/NOAA-GFDL/MOM6/blob/b560b2ccb65280a5f78b47ef1f01123d434e529e/src/core/MOM_PressureForce_FV.F90#L581
d(geo)/d(eta) = d(eta - eta_{tidal})/deta = 1 - d(eta_tidal)/d(eta) = 1 - SAL_SCALAR
The bug results in an incorrect sensitivity of the tidal error to the baroclinic time step size (see figure). This sensitivity is not seen with the fixed code and non-split mode.
The fix to this bug was made the default option on the main branch of MOM6 as a part of PR #1586, so it can now be closed.
A sign related to the scalar approximation the self-attraction and loading (SAL) term is incorrect in the barotropic solver.
https://github.com/NOAA-GFDL/MOM6/blob/b560b2ccb65280a5f78b47ef1f01123d434e529e/src/core/MOM_barotropic.F90#L1047-L1052
The third line in the block above should be
The bug only impacts cases
TIDES
is turned on.USE_SAL_SCALAR
and/orUSE_PREV_TIDES
is true.The proposed correction will be answer changing for these cases.
Justification:
Derivation
eta{tidal} = eta{eq} + eta_{sal} https://github.com/NOAA-GFDL/MOM6/blob/b560b2ccb65280a5f78b47ef1f01123d434e529e/src/parameterizations/lateral/MOM_tidal_forcing.F90#L620 https://github.com/NOAA-GFDL/MOM6/blob/b560b2ccb65280a5f78b47ef1f01123d434e529e/src/parameterizations/lateral/MOM_tidal_forcing.F90#L630 https://github.com/NOAA-GFDL/MOM6/blob/b560b2ccb65280a5f78b47ef1f01123d434e529e/src/parameterizations/lateral/MOM_tidal_forcing.F90#L641-L642
In the scalar approximation, eta{sal} = beta * eta, where eta is the sea surface height. Therefore, d(eta{tidal})/d(eta) = + SAL_SCALAR, which is the output of subroutine
tidal_forcing_sensitivity
: https://github.com/NOAA-GFDL/MOM6/blob/b560b2ccb65280a5f78b47ef1f01123d434e529e/src/parameterizations/lateral/MOM_tidal_forcing.F90#L567-L573As du/dt ~ -grad(eta - eta{tidal}), eta{tidal} is subtracted from eta. For example: https://github.com/NOAA-GFDL/MOM6/blob/b560b2ccb65280a5f78b47ef1f01123d434e529e/src/core/MOM_PressureForce_FV.F90#L581
d(geo)/d(eta) = d(eta - eta_{tidal})/deta = 1 - d(eta_tidal)/d(eta) = 1 - SAL_SCALAR
Example
The bug results in an incorrect sensitivity of the tidal error to the baroclinic time step size (see figure). This sensitivity is not seen with the fixed code and non-split mode.