@@ -85,14 +85,14 @@ module MOM_surface_forcing_gfdl
85
85
! ! type without any further adjustments to drive the ocean dynamics.
86
86
! ! The actual net mass source may differ due to corrections.
87
87
88
- real :: gust_const ! < Constant unresolved background gustiness for ustar [R L Z T-2 ~> Pa]
88
+ real :: gust_const ! < Constant unresolved background gustiness for ustar [R Z2 T-2 ~> Pa]
89
89
logical :: read_gust_2d ! < If true, use a 2-dimensional gustiness supplied from an input file.
90
90
real , pointer , dimension (:,:) :: &
91
91
BBL_tidal_dis = > NULL () ! < Tidal energy dissipation in the bottom boundary layer that can act as a
92
92
! ! source of energy for bottom boundary layer mixing [R Z L2 T-3 ~> W m-2]
93
93
real , pointer , dimension (:,:) :: &
94
94
gust = > NULL () ! < A spatially varying unresolved background gustiness that
95
- ! ! contributes to ustar [R L Z T-2 ~> Pa]. gust is used when read_gust_2d is true.
95
+ ! ! contributes to ustar [R Z2 T-2 ~> Pa]. gust is used when read_gust_2d is true.
96
96
real , pointer , dimension (:,:) :: &
97
97
ustar_tidal = > NULL () ! < Tidal contribution to the bottom friction velocity [Z T-1 ~> m s-1]
98
98
real :: cd_tides ! < Drag coefficient that applies to the tides [nondim]
@@ -693,7 +693,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS, dt_
693
693
rigidity_at_h, & ! Ice rigidity at tracer points [L4 Z-1 T-1 ~> m3 s-1]
694
694
net_mass_src, & ! A temporary of net mass sources [R Z T-1 ~> kg m-2 s-1].
695
695
ustar_tmp, & ! A temporary array of ustar values [Z T-1 ~> m s-1].
696
- tau_mag_tmp ! A temporary array of surface stress magnitudes [R Z L T-2 ~> Pa]
696
+ tau_mag_tmp ! A temporary array of surface stress magnitudes [R Z2 T-2 ~> Pa]
697
697
698
698
real :: I_GEarth ! The inverse of the gravitational acceleration [T2 Z L-2 ~> s2 m-1]
699
699
real :: Kv_rho_ice ! (CS%Kv_sea_ice / CS%density_sea_ice) [L4 Z-2 T-1 R-1 ~> m5 s-1 kg-1]
@@ -934,10 +934,10 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
934
934
! ! any contributions from gustiness [Z T-1 ~> m s-1].
935
935
real , dimension (SZI_(G),SZJ_(G)), &
936
936
optional , intent (inout ) :: mag_tau ! < The magintude of the wind stress at tracer points
937
- ! ! including subgridscale variability and gustiness [R Z L T-2 ~> Pa]
937
+ ! ! including subgridscale variability and gustiness [R Z2 T-2 ~> Pa]
938
938
real , dimension (SZI_(G),SZJ_(G)), &
939
939
optional , intent (out ) :: gustless_mag_tau ! < The magintude of the wind stress at tracer points
940
- ! ! without any contributions from gustiness [R Z L T-2 ~> Pa]
940
+ ! ! without any contributions from gustiness [R Z2 T-2 ~> Pa]
941
941
integer , optional , intent (in ) :: tau_halo ! < The halo size of wind stresses to set, 0 by default.
942
942
943
943
! Local variables
@@ -948,11 +948,12 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
948
948
real , dimension (SZIB_(G),SZJB_(G)) :: taux_in_B ! Zonal wind stresses [R Z L T-2 ~> Pa] at q points
949
949
real , dimension (SZIB_(G),SZJB_(G)) :: tauy_in_B ! Meridional wind stresses [R Z L T-2 ~> Pa] at q points
950
950
951
- real :: gustiness ! unresolved gustiness that contributes to ustar [R Z L T-2 ~> Pa]
952
- real :: Irho0 ! Inverse of the mean density rescaled to [Z L-1 R-1 ~> m3 kg-1]
951
+ real :: gustiness ! unresolved gustiness that contributes to ustar [R Z2 T-2 ~> Pa]
952
+ real :: Irho0 ! Inverse of the Boussinesq mean density [ R-1 ~> m3 kg-1]
953
953
real :: taux2, tauy2 ! squared wind stresses [R2 Z2 L2 T-4 ~> Pa2]
954
- real :: tau_mag ! magnitude of the wind stress [R Z L T-2 ~> Pa]
954
+ real :: tau_mag ! magnitude of the wind stress [R Z2 T-2 ~> Pa]
955
955
real :: stress_conversion ! A unit conversion factor from Pa times any stress multiplier [R Z L T-2 Pa-1 ~> 1]
956
+ real :: Pa_to_RZ2_T2 ! The combination of unit conversion factors used for mag_tau [R Z2 T-2 Pa-1 ~> 1]
956
957
957
958
logical :: do_ustar, do_gustless, do_tau_mag, do_gustless_tau_mag
958
959
integer :: wind_stagger ! AGRID, BGRID_NE, or CGRID_NE (integers from MOM_domains)
@@ -964,7 +965,7 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
964
965
Isqh = G% IscB- halo ; Ieqh = G% IecB+ halo ; Jsqh = G% JscB- halo ; Jeqh = G% JecB+ halo
965
966
i0 = is - index_bounds(1 ) ; j0 = js - index_bounds(3 )
966
967
967
- IRho0 = US % L_to_Z / CS% Rho0
968
+ IRho0 = 1.0 / CS% Rho0
968
969
stress_conversion = US% Pa_to_RLZ_T2 * CS% wind_stress_multiplier
969
970
970
971
do_ustar = present (ustar) ; do_gustless = present (gustless_ustar)
@@ -1068,6 +1069,8 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
1068
1069
! parametizations. The background gustiness (for example with a relatively small value
1069
1070
! of 0.02 Pa) is intended to give reasonable behavior in regions of very weak winds.
1070
1071
if (associated (IOB% stress_mag)) then
1072
+ Pa_to_RZ2_T2 = US% Pa_to_RLZ_T2 * US% L_to_Z
1073
+
1071
1074
if (do_ustar .or. do_tau_mag) then ; do j= js,je ; do i= is,ie
1072
1075
gustiness = CS% gust_const
1073
1076
if (CS% read_gust_2d) then
@@ -1079,27 +1082,27 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
1079
1082
gustiness = CS% gust(i,j)
1080
1083
endif
1081
1084
if (do_tau_mag) &
1082
- mag_tau(i,j) = gustiness + US % Pa_to_RLZ_T2 * IOB% stress_mag(i- i0,j- j0)
1085
+ mag_tau(i,j) = gustiness + Pa_to_RZ2_T2 * IOB% stress_mag(i- i0,j- j0)
1083
1086
if (do_gustless_tau_mag) &
1084
- gustless_mag_tau(i,j) = US % Pa_to_RLZ_T2 * IOB% stress_mag(i- i0,j- j0)
1087
+ gustless_mag_tau(i,j) = Pa_to_RZ2_T2 * IOB% stress_mag(i- i0,j- j0)
1085
1088
if (do_ustar) &
1086
- ustar(i,j) = sqrt (gustiness* IRho0 + IRho0* US % Pa_to_RLZ_T2 * IOB% stress_mag(i- i0,j- j0))
1089
+ ustar(i,j) = sqrt (gustiness* IRho0 + IRho0* Pa_to_RZ2_T2 * IOB% stress_mag(i- i0,j- j0))
1087
1090
enddo ; enddo ; endif
1088
1091
if (CS% answer_date < 20190101 ) then
1089
1092
if (do_gustless) then ; do j= js,je ; do i= is,ie
1090
- gustless_ustar(i,j) = sqrt (US % Pa_to_RLZ_T2 * US % L_to_Z * IOB% stress_mag(i- i0,j- j0) / CS% Rho0)
1093
+ gustless_ustar(i,j) = sqrt (Pa_to_RZ2_T2 * IOB% stress_mag(i- i0,j- j0) / CS% Rho0)
1091
1094
enddo ; enddo ; endif
1092
1095
else
1093
1096
if (do_gustless) then ; do j= js,je ; do i= is,ie
1094
- gustless_ustar(i,j) = sqrt (IRho0 * US % Pa_to_RLZ_T2 * IOB% stress_mag(i- i0,j- j0))
1097
+ gustless_ustar(i,j) = sqrt (IRho0 * Pa_to_RZ2_T2 * IOB% stress_mag(i- i0,j- j0))
1095
1098
enddo ; enddo ; endif
1096
1099
endif
1097
1100
elseif (wind_stagger == BGRID_NE) then
1098
1101
do j= js,je ; do i= is,ie
1099
1102
tau_mag = 0.0 ; gustiness = CS% gust_const
1100
1103
if (((G% mask2dBu(I,J) + G% mask2dBu(I-1 ,J-1 )) + &
1101
1104
(G% mask2dBu(I,J-1 ) + G% mask2dBu(I-1 ,J))) > 0.0 ) then
1102
- tau_mag = sqrt (((G% mask2dBu(I,J)* ((taux_in_B(I,J)** 2 ) + (tauy_in_B(I,J)** 2 )) + &
1105
+ tau_mag = US % L_to_Z * sqrt (((G% mask2dBu(I,J)* ((taux_in_B(I,J)** 2 ) + (tauy_in_B(I,J)** 2 )) + &
1103
1106
G% mask2dBu(I-1 ,J-1 )* ((taux_in_B(I-1 ,J-1 )** 2 ) + (tauy_in_B(I-1 ,J-1 )** 2 ))) + &
1104
1107
(G% mask2dBu(I,J-1 )* ((taux_in_B(I,J-1 )** 2 ) + (tauy_in_B(I,J-1 )** 2 )) + &
1105
1108
G% mask2dBu(I-1 ,J)* ((taux_in_B(I-1 ,J)** 2 ) + (tauy_in_B(I-1 ,J)** 2 ))) ) / &
@@ -1110,21 +1113,21 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
1110
1113
if (do_tau_mag) mag_tau(i,j) = gustiness + tau_mag
1111
1114
if (do_gustless_tau_mag) gustless_mag_tau(i,j) = tau_mag
1112
1115
if (CS% answer_date < 20190101 ) then
1113
- if (do_gustless) gustless_ustar(i,j) = sqrt (US % L_to_Z * tau_mag / CS% Rho0)
1116
+ if (do_gustless) gustless_ustar(i,j) = sqrt (tau_mag / CS% Rho0)
1114
1117
else
1115
1118
if (do_gustless) gustless_ustar(i,j) = sqrt (IRho0 * tau_mag)
1116
1119
endif
1117
1120
enddo ; enddo
1118
1121
elseif (wind_stagger == AGRID) then
1119
1122
do j= js,je ; do i= is,ie
1120
- tau_mag = G% mask2dT(i,j) * sqrt ((taux_in_A(i,j)** 2 ) + (tauy_in_A(i,j)** 2 ))
1123
+ tau_mag = G% mask2dT(i,j) * US % L_to_Z * sqrt ((taux_in_A(i,j)** 2 ) + (tauy_in_A(i,j)** 2 ))
1121
1124
gustiness = CS% gust_const
1122
1125
if (CS% read_gust_2d .and. (G% mask2dT(i,j) > 0.0 )) gustiness = CS% gust(i,j)
1123
1126
if (do_ustar) ustar(i,j) = sqrt (gustiness* IRho0 + IRho0 * tau_mag)
1124
1127
if (do_tau_mag) mag_tau(i,j) = gustiness + tau_mag
1125
1128
if (do_gustless_tau_mag) gustless_mag_tau(i,j) = tau_mag
1126
1129
if (CS% answer_date < 20190101 ) then
1127
- if (do_gustless) gustless_ustar(i,j) = sqrt (US % L_to_Z * tau_mag / CS% Rho0)
1130
+ if (do_gustless) gustless_ustar(i,j) = sqrt (tau_mag / CS% Rho0)
1128
1131
else
1129
1132
if (do_gustless) gustless_ustar(i,j) = sqrt (IRho0 * tau_mag)
1130
1133
endif
@@ -1138,7 +1141,7 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
1138
1141
if ((G% mask2dCv(i,J-1 ) + G% mask2dCv(i,J)) > 0.0 ) &
1139
1142
tauy2 = (G% mask2dCv(i,J-1 )* (tauy_in_C(i,J-1 )** 2 ) + G% mask2dCv(i,J)* (tauy_in_C(i,J)** 2 )) / &
1140
1143
(G% mask2dCv(i,J-1 ) + G% mask2dCv(i,J))
1141
- tau_mag = sqrt (taux2 + tauy2)
1144
+ tau_mag = US % L_to_Z * sqrt (taux2 + tauy2)
1142
1145
1143
1146
gustiness = CS% gust_const
1144
1147
if (CS% read_gust_2d) gustiness = CS% gust(i,j)
@@ -1147,7 +1150,7 @@ subroutine extract_IOB_stresses(IOB, index_bounds, Time, G, US, CS, taux, tauy,
1147
1150
if (do_tau_mag) mag_tau(i,j) = gustiness + tau_mag
1148
1151
if (do_gustless_tau_mag) gustless_mag_tau(i,j) = tau_mag
1149
1152
if (CS% answer_date < 20190101 ) then
1150
- if (do_gustless) gustless_ustar(i,j) = sqrt (US % L_to_Z * tau_mag / CS% Rho0)
1153
+ if (do_gustless) gustless_ustar(i,j) = sqrt (tau_mag / CS% Rho0)
1151
1154
else
1152
1155
if (do_gustless) gustless_ustar(i,j) = sqrt (IRho0 * tau_mag)
1153
1156
endif
@@ -1611,7 +1614,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, wind_stagger)
1611
1614
" an input file" , default= .false. )
1612
1615
call get_param(param_file, mdl, " GUST_CONST" , CS% gust_const, &
1613
1616
" The background gustiness in the winds." , &
1614
- units= " Pa" , default= 0.0 , scale= US% Pa_to_RLZ_T2)
1617
+ units= " Pa" , default= 0.0 , scale= US% Pa_to_RLZ_T2* US % L_to_Z )
1615
1618
if (CS% read_gust_2d) then
1616
1619
call get_param(param_file, mdl, " GUST_2D_FILE" , gust_file, &
1617
1620
" The file in which the wind gustiness is found in " // &
@@ -1622,7 +1625,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, wind_stagger)
1622
1625
! NOTE: There are certain cases where FMS is unable to read this file, so
1623
1626
! we use read_netCDF_data in place of MOM_read_data.
1624
1627
call read_netCDF_data(gust_file, ' gustiness' , CS% gust, G% Domain, &
1625
- rescale= US% Pa_to_RLZ_T2) ! units in file should be [Pa]
1628
+ rescale= US% Pa_to_RLZ_T2* US % L_to_Z ) ! units in file should be [Pa]
1626
1629
endif
1627
1630
call get_param(param_file, mdl, " DEFAULT_ANSWER_DATE" , default_answer_date, &
1628
1631
" This sets the default value for the various _ANSWER_DATE parameters." , &
0 commit comments