Skip to content

Commit 8a66adc

Browse files
MJHarrison-GFDLmarshallward
authored andcommitted
New TIDAL_SAL_FLATHER option
- This option is defaulted to False to retain previous answers, but should be set to True for new experiments in order to make the Flather OBC routine consistent with the barotropic solver - This option only applies for regional OBC cases with Tides and scalar self-attraction and loading + Try at fixing issue mom-ocean#476 - Will change answers for problems with OBCs. - Get Matt's patch to compile again Co-authored by: Kate Hedstrom <kshedstrom@alaska.edu>
1 parent d342b29 commit 8a66adc

3 files changed

Lines changed: 41 additions & 6 deletions

File tree

docs/zotero.bib

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2747,3 +2747,16 @@ @article{Nguyen2009
27472747
title = {Improved modeling of the Arctic halocline with a subgrid-scale brine rejection parameterization},
27482748
pages = {C11014}
27492749
}
2750+
2751+
@article{Adcroft2019,
2752+
doi = {10.1029/2019ms001726},
2753+
year = 2019,
2754+
publisher = {American Geophysical Union ({AGU})},
2755+
volume = {11},
2756+
number = {10},
2757+
pages = {3167--3211},
2758+
author = {A. Adcroft and W. Anderson and V. Balaji and C. Blanton and M. Bushuk and C. O. Dufour and J. P. Dunne and S. M. Griffies and R. Hallberg and M. J. Harrison and I. M. Held and M. F. Jansen and J. G. John and J. P. Krasting and A. R. Langenhorst and S. Legg and Z. Liang and C. McHugh and A. Radhakrishnan and B. G. Reichl and T. Rosati and B. L. Samuels and A. Shao and R. Stouffer and M. Winton and A. T. Wittenberg and B. Xiang and N. Zadeh and R. Zhang},
2759+
title = {The {GFDL} Global Ocean and Sea Ice Model {OM}4.0: Model Description and Simulation Features},
2760+
journal = {J. Adv. Mod. Earth Sys.}
2761+
}
2762+

src/core/MOM.F90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,6 +1619,7 @@ subroutine step_MOM_thermo(CS, G, GV, US, u, v, h, tv, fluxes, dtdia, &
16191619
call remap_dyn_split_RK2_aux_vars(G, GV, CS%dyn_split_RK2_CSp, h, h_new, CS%ALE_CSp, CS%OBC, dzRegrid)
16201620

16211621
if (associated(CS%OBC)) &
1622+
call pass_var(h_new, G%Domain)
16221623
call remap_OBC_fields(G, GV, h, h_new, CS%OBC, PCM_cell=PCM_cell)
16231624

16241625
call remap_vertvisc_aux_vars(G, GV, CS%visc, h, h_new, CS%ALE_CSp, CS%OBC)

src/core/MOM_barotropic.F90

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ module MOM_barotropic
279279
logical :: use_old_coriolis_bracket_bug !< If True, use an order of operations
280280
!! that is not bitwise rotationally symmetric in the
281281
!! meridional Coriolis term of the barotropic solver.
282+
logical :: tidal_sal_flather !< Apply adjustment to external gravity wave speed
283+
!! consistent with tidal self-attraction and loading
284+
!! used within the barotropic solver
282285
type(time_type), pointer :: Time => NULL() !< A pointer to the ocean models clock.
283286
type(diag_ctrl), pointer :: diag => NULL() !< A structure that is used to regulate
284287
!! the timing of diagnostic output.
@@ -1122,8 +1125,13 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
11221125

11231126
! Set up fields related to the open boundary conditions.
11241127
if (apply_OBCs) then
1125-
call set_up_BT_OBC(OBC, eta, CS%BT_OBC, CS%BT_Domain, G, GV, US, MS, ievf-ie, use_BT_cont, &
1126-
integral_BT_cont, dt, Datu, Datv, BTCL_u, BTCL_v)
1128+
if (CS%TIDAL_SAL_FLATHER) then
1129+
call set_up_BT_OBC(OBC, eta, CS%BT_OBC, CS%BT_Domain, G, GV, US, MS, ievf-ie, use_BT_cont, &
1130+
integral_BT_cont, dt, Datu, Datv, BTCL_u, BTCL_v, dgeo_de)
1131+
else
1132+
call set_up_BT_OBC(OBC, eta, CS%BT_OBC, CS%BT_Domain, G, GV, US, MS, ievf-ie, use_BT_cont, &
1133+
integral_BT_cont, dt, Datu, Datv, BTCL_u, BTCL_v)
1134+
endif
11271135
endif
11281136

11291137
! Determine the difference between the sum of the layer fluxes and the
@@ -3101,7 +3109,7 @@ end subroutine apply_velocity_OBCs
31013109
!> This subroutine sets up the private structure used to apply the open
31023110
!! boundary conditions, as developed by Mehmet Ilicak.
31033111
subroutine set_up_BT_OBC(OBC, eta, BT_OBC, BT_Domain, G, GV, US, MS, halo, use_BT_cont, &
3104-
integral_BT_cont, dt_baroclinic, Datu, Datv, BTCL_u, BTCL_v)
3112+
integral_BT_cont, dt_baroclinic, Datu, Datv, BTCL_u, BTCL_v, dgeo_de)
31053113
type(ocean_OBC_type), target, intent(inout) :: OBC !< An associated pointer to an OBC type.
31063114
type(memory_size_type), intent(in) :: MS !< A type that describes the memory sizes of the
31073115
!! argument arrays.
@@ -3132,9 +3140,11 @@ subroutine set_up_BT_OBC(OBC, eta, BT_OBC, BT_Domain, G, GV, US, MS, halo, use_B
31323140
type(local_BT_cont_v_type), dimension(SZIW_(MS),SZJBW_(MS)), intent(in) :: BTCL_v !< Structure of information used
31333141
!! for a dynamic estimate of the face areas at
31343142
!! v-points.
3135-
3143+
real, intent(in), optional :: dgeo_de !< The constant of proportionality between
3144+
!! geopotential and sea surface height [nondim].
31363145
! Local variables
31373146
real :: I_dt ! The inverse of the time interval of this call [T-1 ~> s-1].
3147+
real :: dgeo_de_in !< The constant of proportionality between geopotential and sea surface height [nondim].
31383148
integer :: i, j, k, is, ie, js, je, n, nz
31393149
integer :: isd, ied, jsd, jed, IsdB, IedB, JsdB, JedB
31403150
integer :: isdw, iedw, jsdw, jedw
@@ -3152,6 +3162,9 @@ subroutine set_up_BT_OBC(OBC, eta, BT_OBC, BT_Domain, G, GV, US, MS, halo, use_B
31523162
"yet fully implemented with wide barotropic halos.")
31533163
endif
31543164

3165+
dgeo_de_in = 1.0
3166+
if (PRESENT(dgeo_de)) dgeo_de_in = dgeo_de
3167+
31553168
if (.not. BT_OBC%is_alloced) then
31563169
allocate(BT_OBC%Cg_u(isdw-1:iedw,jsdw:jedw), source=0.0)
31573170
allocate(BT_OBC%H_u(isdw-1:iedw,jsdw:jedw), source=0.0)
@@ -3210,7 +3223,7 @@ subroutine set_up_BT_OBC(OBC, eta, BT_OBC, BT_Domain, G, GV, US, MS, halo, use_B
32103223
BT_OBC%H_u(I,j) = eta(i+1,j)
32113224
endif
32123225
endif
3213-
BT_OBC%Cg_u(I,j) = SQRT(GV%g_prime(1) * GV%H_to_Z*BT_OBC%H_u(i,j))
3226+
BT_OBC%Cg_u(I,j) = SQRT(dgeo_de_in * GV%g_prime(1) * GV%H_to_Z*BT_OBC%H_u(i,j))
32143227
endif
32153228
endif ; enddo ; enddo
32163229
if (OBC%Flather_u_BCs_exist_globally) then
@@ -3264,7 +3277,7 @@ subroutine set_up_BT_OBC(OBC, eta, BT_OBC, BT_Domain, G, GV, US, MS, halo, use_B
32643277
BT_OBC%H_v(i,J) = eta(i,j+1)
32653278
endif
32663279
endif
3267-
BT_OBC%Cg_v(i,J) = SQRT(GV%g_prime(1) * GV%H_to_Z*BT_OBC%H_v(i,J))
3280+
BT_OBC%Cg_v(i,J) = SQRT(dgeo_de_in * GV%g_prime(1) * GV%H_to_Z*BT_OBC%H_v(i,J))
32683281
endif
32693282
endif ; enddo ; enddo
32703283
if (OBC%Flather_v_BCs_exist_globally) then
@@ -4520,6 +4533,14 @@ subroutine barotropic_init(u, v, h, eta, Time, G, GV, US, param_file, diag, CS,
45204533
"solver has the wrong sign, replicating a long-standing bug with a scalar "//&
45214534
"self-attraction and loading term or the SAL term from a previous simulation.", &
45224535
default=.false., do_not_log=(det_de==0.0))
4536+
call get_param(param_file, mdl, "TIDAL_SAL_FLATHER", CS%tidal_sal_flather, &
4537+
"If true, then apply adjustments to the external gravity "//&
4538+
"wave speed used with the Flather OBC routine consistent "//&
4539+
"with the barotropic solver. This applies to cases with "//&
4540+
"tidal forcing using the scalar self-attraction approximation. "//&
4541+
"The default is currently False in order to retain previous answers "//&
4542+
"but should be set to True for new experiments", default=.false.)
4543+
45234544
call get_param(param_file, mdl, "SADOURNY", CS%Sadourny, &
45244545
"If true, the Coriolis terms are discretized with the "//&
45254546
"Sadourny (1975) energy conserving scheme, otherwise "//&

0 commit comments

Comments
 (0)