@@ -82,6 +82,8 @@ module MOM_PressureForce_FV
82
82
! ! equation of state is 0 to account for the displacement of the sea
83
83
! ! surface including adjustments for atmospheric or sea-ice pressure.
84
84
logical :: use_stanley_pgf ! < If true, turn on Stanley parameterization in the PGF
85
+ logical :: bq_sal_tides = .false. ! < If true, use an alternative method for SAL and tides
86
+ ! ! in Boussinesq mode
85
87
integer :: tides_answer_date = 99991231 ! < Recover old answers with tides
86
88
integer :: id_e_tide = - 1 ! < Diagnostic identifier
87
89
integer :: id_e_tidal_eq = - 1 ! < Diagnostic identifier
@@ -1189,43 +1191,39 @@ subroutine PressureForce_FV_Bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm
1189
1191
enddo ; enddo
1190
1192
enddo
1191
1193
1192
- ! Self-attraction and loading (SAL) and tides (new answers)
1193
- if (CS% tides_answer_date> 20230630 ) then
1194
- ! SAL
1195
- if (CS% calculate_SAL) then
1196
- if (CS% sal_use_bpa) then
1197
- ! $OMP parallel do default(shared)
1198
- do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1199
- pbot_anom(i,j) = pa(i,j,nz+1 ) * I_g_rho - e(i,j,nz+1 )
1200
- enddo ; enddo
1201
- else
1202
- ! $OMP parallel do default(shared)
1203
- do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1204
- pbot_anom(i,j) = e(i,j,1 ) - max (- G% bathyT(i,j) - G% Z_ref, 0.0 ) ! Remove topogrpahy above sea level
1205
- enddo ; enddo
1206
- endif
1207
- call calc_SAL(pbot_anom, e_sal, G, CS% SAL_CSp, tmp_scale= US% Z_to_m)
1208
- do K= 1 ,nz+1
1209
- ! $OMP parallel do default(shared)
1210
- do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1211
- e(i,j,K) = e(i,j,K) - e_sal(i,j)
1212
- pa(i,j,K) = pa(i,j,K) - GxRho * e_sal(i,j)
1213
- enddo ; enddo
1214
- enddo
1194
+ ! Self-attraction and loading (SAL) (new answers)
1195
+ if (CS% calculate_SAL .and. CS% tides_answer_date> 20230630 ) then
1196
+ if (CS% sal_use_bpa) then
1197
+ ! $OMP parallel do default(shared)
1198
+ do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1199
+ pbot_anom(i,j) = pa(i,j,nz+1 ) * I_g_rho - e(i,j,nz+1 )
1200
+ enddo ; enddo
1201
+ else
1202
+ ! $OMP parallel do default(shared)
1203
+ do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1204
+ pbot_anom(i,j) = e(i,j,1 ) - max (- G% bathyT(i,j) - G% Z_ref, 0.0 ) ! Remove topogrpahy above sea level
1205
+ enddo ; enddo
1215
1206
endif
1207
+ call calc_SAL(pbot_anom, e_sal, G, CS% SAL_CSp, tmp_scale= US% Z_to_m)
1208
+ if (.not. CS% bq_sal_tides) then ; do K= 1 ,nz+1
1209
+ ! $OMP parallel do default(shared)
1210
+ do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1211
+ e(i,j,K) = e(i,j,K) - e_sal(i,j)
1212
+ pa(i,j,K) = pa(i,j,K) - GxRho * e_sal(i,j)
1213
+ enddo ; enddo
1214
+ enddo ; endif
1215
+ endif
1216
1216
1217
- ! Tides
1218
- if (CS% tides) then
1219
- call calc_tidal_forcing(CS% Time, e_tidal_eq, e_tidal_sal, G, US, CS% tides_CSp)
1217
+ ! Tides (new answers)
1218
+ if (CS% tides .and. CS% tides_answer_date> 20230630 ) then
1219
+ call calc_tidal_forcing(CS% Time, e_tidal_eq, e_tidal_sal, G, US, CS% tides_CSp)
1220
+ if (.not. CS% bq_sal_tides) then ; do K= 1 ,nz+1
1220
1221
! $OMP parallel do default(shared)
1221
- do K= 1 ,nz+1
1222
- ! $OMP parallel do default(shared)
1223
- do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1224
- e(i,j,K) = e(i,j,K) - (e_tidal_eq(i,j) + e_tidal_sal(i,j))
1225
- pa(i,j,K) = pa(i,j,K) - GxRho * (e_tidal_eq(i,j) + e_tidal_sal(i,j))
1226
- enddo ; enddo
1227
- enddo
1228
- endif
1222
+ do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1223
+ e(i,j,K) = e(i,j,K) - (e_tidal_eq(i,j) + e_tidal_sal(i,j))
1224
+ pa(i,j,K) = pa(i,j,K) - GxRho * (e_tidal_eq(i,j) + e_tidal_sal(i,j))
1225
+ enddo ; enddo
1226
+ enddo ; endif
1229
1227
endif
1230
1228
1231
1229
if (CS% correction_intxpa .or. CS% reset_intxpa_integral) then
@@ -1604,6 +1602,34 @@ subroutine PressureForce_FV_Bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm
1604
1602
((h(i,j,k) + h(i,j+1 ,k)) + h_neglect))
1605
1603
enddo ; enddo ; enddo
1606
1604
1605
+ ! Calculate SAL geopotential anomaly and add its gradient to pressure gradient force
1606
+ if (CS% calculate_SAL .and. CS% tides_answer_date> 20230630 .and. CS% bq_sal_tides) then
1607
+ ! $OMP parallel do default(shared)
1608
+ do k= 1 ,nz
1609
+ do j= js,je ; do I= Isq,Ieq
1610
+ PFu(I,j,k) = PFu(I,j,k) + (e_sal(i+1 ,j) - e_sal(i,j)) * GV% g_Earth * G% IdxCu(I,j)
1611
+ enddo ; enddo
1612
+ do J= Jsq,Jeq ; do i= is,ie
1613
+ PFv(i,J,k) = PFv(i,J,k) + (e_sal(i,j+1 ) - e_sal(i,j)) * GV% g_Earth * G% IdyCv(i,J)
1614
+ enddo ; enddo
1615
+ enddo
1616
+ endif
1617
+
1618
+ ! Calculate tidal geopotential anomaly and add its gradient to pressure gradient force
1619
+ if (CS% tides .and. CS% tides_answer_date> 20230630 .and. CS% bq_sal_tides) then
1620
+ ! $OMP parallel do default(shared)
1621
+ do k= 1 ,nz
1622
+ do j= js,je ; do I= Isq,Ieq
1623
+ PFu(I,j,k) = PFu(I,j,k) + ((e_tidal_eq(i+1 ,j) + e_tidal_sal(i+1 ,j)) &
1624
+ - (e_tidal_eq(i,j) + e_tidal_sal(i,j))) * GV% g_Earth * G% IdxCu(I,j)
1625
+ enddo ; enddo
1626
+ do J= Jsq,Jeq ; do i= is,ie
1627
+ PFv(i,J,k) = PFv(i,J,k) + ((e_tidal_eq(i,j+1 ) + e_tidal_sal(i,j+1 )) &
1628
+ - (e_tidal_eq(i,j) + e_tidal_sal(i,j))) * GV% g_Earth * G% IdyCv(i,J)
1629
+ enddo ; enddo
1630
+ enddo
1631
+ endif
1632
+
1607
1633
if (CS% GFS_scale < 1.0 ) then
1608
1634
! Adjust the Montgomery potential to make this a reduced gravity model.
1609
1635
if (use_EOS) then
@@ -1649,7 +1675,7 @@ subroutine PressureForce_FV_Bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm
1649
1675
do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1650
1676
eta(i,j) = e(i,j,1 )* GV% Z_to_H
1651
1677
enddo ; enddo
1652
- if (CS% tides) then
1678
+ if (CS% tides .and. ( .not. CS % bq_sal_tides) ) then
1653
1679
if (CS% tides_answer_date> 20230630 ) then
1654
1680
! $OMP parallel do default(shared)
1655
1681
do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
@@ -1662,7 +1688,7 @@ subroutine PressureForce_FV_Bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm
1662
1688
enddo ; enddo
1663
1689
endif
1664
1690
endif
1665
- if (CS% calculate_SAL .and. (CS% tides_answer_date> 20230630 )) then
1691
+ if (CS% calculate_SAL .and. (CS% tides_answer_date> 20230630 ) .and. ( .not. CS % bq_sal_tides) ) then
1666
1692
! $OMP parallel do default(shared)
1667
1693
do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1668
1694
eta(i,j) = eta(i,j) + e_sal(i,j)* GV% Z_to_H
@@ -1780,6 +1806,14 @@ subroutine PressureForce_FV_init(Time, G, GV, US, param_file, diag, CS, SAL_CSp,
1780
1806
if (CS% calculate_SAL) &
1781
1807
call get_param(param_file, ' ' , " SAL_USE_BPA" , CS% sal_use_bpa, default= .false. , &
1782
1808
do_not_log= .true. )
1809
+ if ((CS% tides .or. CS% calculate_SAL) .and. GV% Boussinesq) &
1810
+ call get_param(param_file, mdl, " BOUSSINESQ_SAL_TIDES" , CS% bq_sal_tides, " If true, " // &
1811
+ " in Boussinesq mode, use an alternative method to include self-attraction " // &
1812
+ " and loading (SAL) and tidal forcings in pressure gradient, in which their " // &
1813
+ " gradients are calculated separately, instead of adding geopotential " // &
1814
+ " anomalies as corrections to the interface height. This alternative method " // &
1815
+ " elimates a baroclinic component of the SAL and tidal forcings." , &
1816
+ default= .false. )
1783
1817
call get_param(param_file, " MOM" , " ENABLE_THERMODYNAMICS" , use_temperature, &
1784
1818
" If true, Temperature and salinity are used as state variables." , &
1785
1819
default= .true. , do_not_log= .true. )
0 commit comments