Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
ea57802
First working version of split Mstar in MOM_ePBL
May 24, 2019
8a2968b
Merge branch 'user/bgr/OSBL_Updates' into user/bgr/OSBL_Updates_more
May 24, 2019
8d896f2
Rearrangement of ePBL, prior to pulling out ePBL_inner loop
May 24, 2019
09a49a0
Unpacking Loops in ePBL for code clarity.
May 28, 2019
a84c0e0
+Obsoleted USE_VISBECK_SLOPE_BUG
Hallberg-NOAA Jun 4, 2019
9a3f3e2
Removed KDML and HMIX from MOM_set_diffusivity
Hallberg-NOAA Jun 5, 2019
c652668
Replaced x**2.0 with x**2
Hallberg-NOAA Jun 5, 2019
bf048da
Reformatting in MOM_energetic_PBL
Hallberg-NOAA Jun 6, 2019
45dc3f6
Formatting/comment updates in MOM_energetic_PBL.F90
Jun 6, 2019
7f9f75e
Merge branch 'dev/gfdl' into user/bgr/OSBL_Updates_more
Jun 6, 2019
4483c26
Updating comments in MOM_energetic_PBL.F90
Jun 6, 2019
14fc76e
Added parentheses to a sum in add_drag_diffusivity
Hallberg-NOAA Jun 6, 2019
3eeabe2
Merge branch 'Reichl_ePBL_update' into parameterizations_cleanup
Hallberg-NOAA Jun 7, 2019
f5c9aa0
Code clean-up in MOM_energetic_PBL
Hallberg-NOAA Jun 10, 2019
63b2061
+Deleted unused code & options in MOM_energetic_PBL
Hallberg-NOAA Jun 11, 2019
ab386bc
+Added EPBL_2018_ANSWERS
Hallberg-NOAA Jun 11, 2019
75d2fd3
Reduced ePBL array dimensions
Hallberg-NOAA Jun 12, 2019
853377e
+(*)Eliminated ML_Depth2 from energetic_PBL_CS
Hallberg-NOAA Jun 12, 2019
bcb6b88
+Removed 5 diagnostics from ePBL
Hallberg-NOAA Jun 12, 2019
ea6d355
Added an internal type in MOM_energetic_PBL
Hallberg-NOAA Jun 13, 2019
798dec8
+Added ePBL_column, but it is not yet called.
Hallberg-NOAA Jun 13, 2019
8f9d7e3
Call ePBL_column
Hallberg-NOAA Jun 14, 2019
ef55110
Add dimensional consistency testing to ePBL_column
Hallberg-NOAA Jun 17, 2019
e0d2671
+Change units of ustar in get_Langmuir_number
Hallberg-NOAA Jun 18, 2019
7c995db
+Added EPBL_MSTAR_SCHEME and EPBL_LANGMUIR_SCHEME
Hallberg-NOAA Jun 18, 2019
93a7d94
+Add EPBL_VEL_SCALE_SCHEME & EPBL_VEL_SCALE_FACTOR
Hallberg-NOAA Jun 18, 2019
2288502
+Added new runtime option SET_VISC_2018_ANSWERS
Hallberg-NOAA Jun 19, 2019
9f14b08
Merge branch 'dev/gfdl' into parameterizations_cleanup
Hallberg-NOAA Jun 19, 2019
6c9a442
+Added ML_RAD_BUG and SET_DIFF_2018_ANSWERS
Hallberg-NOAA Jun 19, 2019
eb5f06c
+Extended dimensional scaling of vertical params
Hallberg-NOAA Jun 21, 2019
5590d6b
+Added dimensional testing for diffusivities
Hallberg-NOAA Jun 21, 2019
e9cf2cd
+Added dimensional testing for more diffusivities
Hallberg-NOAA Jun 24, 2019
9184c36
+Yet more dimensional testing for diffusivities
Hallberg-NOAA Jun 24, 2019
badeb50
+Added dimensional testing for shared viscosities
Hallberg-NOAA Jun 24, 2019
b2c6bab
+Added dimensional testing for BBL viscosities
Hallberg-NOAA Jun 25, 2019
6f259d6
+Added dimensional testing in MOM_set_viscosity.F90
Hallberg-NOAA Jun 25, 2019
ae1795d
(*)Set I_2Omega with HENYEY_IGW_BACKGROUND_NEW
Hallberg-NOAA Jun 25, 2019
3834188
+Added dimensional testing in MOM_vert_friction.F90
Hallberg-NOAA Jun 25, 2019
7ee45c4
+Added dimensional rescaling of visc%Ray_u
Hallberg-NOAA Jun 25, 2019
949f622
Added dt_in_T to diabatic and legacy_diabatic
Hallberg-NOAA Jun 25, 2019
7d9651c
+Added dimensional testing for visc$ustar_BBL
Hallberg-NOAA Jun 25, 2019
a618823
Partial dimensional testing in MOM_kappa_shear
Hallberg-NOAA Jun 25, 2019
61f04d5
Pass time step to kappa_shear_column in units of T
Hallberg-NOAA Jun 26, 2019
fd4fb8b
Rescaled internal variables in find_kappa_tke
Hallberg-NOAA Jun 26, 2019
be7a61f
Rescaled frequencies in MOM_kappa_shear
Hallberg-NOAA Jun 26, 2019
4f224af
Rescaled TKE in MOM_kappa_shear
Hallberg-NOAA Jun 26, 2019
ea25c1b
+Altered arguments to Calculate_kappa_shear
Hallberg-NOAA Jun 26, 2019
707442f
(*)Removed hard-coded values in set_int_tide_input
Hallberg-NOAA Jun 26, 2019
1ca9998
(*)Properly rescale Tr_ea_BBL in legacy_diabatic
Hallberg-NOAA Jun 26, 2019
bc80b12
(*)Correct dimensional scaling with RESOLVE_EKMAN
Hallberg-NOAA Jun 26, 2019
7931e98
+Eliminated the legacy_diabatic public interface
Hallberg-NOAA Jun 27, 2019
cbe68e9
+Added the new subroutine diabatic_ALE_legacy
Hallberg-NOAA Jun 27, 2019
464b667
Split long comments in RGC_tracer.F90
Hallberg-NOAA Jun 28, 2019
84f02b7
Code rearrangement in MOM_diabatic_driver.F90
Hallberg-NOAA Jun 28, 2019
2b36676
+Offer ePBL LT diagnostics only when EPBL_LT=True
Hallberg-NOAA Jun 28, 2019
10d9f08
+Merged diabatic_ALE code into diabatic_ALE_legacy
Hallberg-NOAA Jun 28, 2019
a132309
+Moved internal tide testing code
Hallberg-NOAA Jun 28, 2019
79e6902
+Added new runtime option TIDAL_MIXING_2018_ANSWERS
Hallberg-NOAA Jun 29, 2019
f91b39c
+Added runtime parameters for the bulk mixed layer
Hallberg-NOAA Jul 1, 2019
4343b70
+Rescaled the units of Waves%KvS
Hallberg-NOAA Jul 2, 2019
2e70663
Dimensional consistency in MOM_bulk_mixed_layer
Hallberg-NOAA Jul 2, 2019
2cedf63
+Added runtime parameter FRACTIONAL_ROUGHNESS_MAX
Hallberg-NOAA Jul 2, 2019
be2da7b
Refactored find_coupling_coef
Hallberg-NOAA Jul 2, 2019
408f9cd
+Changed bulkmixedlayer timestep arg units to T
Hallberg-NOAA Jul 3, 2019
057dfde
Corrected units in various comments
Hallberg-NOAA Jul 3, 2019
48adabd
+Rescale timestep in shortwave heating routines
Hallberg-NOAA Jul 3, 2019
bd201fc
+Separate shortwave forcing to set_opacity
Hallberg-NOAA Jul 3, 2019
4937fe5
+Added the new subroutine set_pen_shortwave
Hallberg-NOAA Jul 3, 2019
2640b93
+Set chlorophyll for shortwave in set_pen_shortwave
Hallberg-NOAA Jul 5, 2019
69a0d8a
+Combined MOM_shortwave_abs and MOM_opacity
Hallberg-NOAA Jul 5, 2019
d4b476e
Explicitly declare the size of the pen_SW_bnd args
Hallberg-NOAA Jul 5, 2019
bf4c12c
+Added optics extractor routines
Hallberg-NOAA Jul 6, 2019
562e567
+Added nsw argument to applyBoundaryFluxesInOut
Hallberg-NOAA Jul 6, 2019
beaedaa
+Added FRACTIONAL_ROUGHNESS_MAX run-time parameter
Hallberg-NOAA Jul 6, 2019
a42140d
+Added 3 new runtime parameters to MOM_opacity.F90
Hallberg-NOAA Jul 6, 2019
908cff6
+(*)Corrected documentation of BBL_MIXING_MAX_DECAY
Hallberg-NOAA Jul 6, 2019
d36bdb8
Merge branch 'dev/gfdl' into parameterizations_cleanup
Hallberg-NOAA Jul 6, 2019
a0d669d
(*)Multiply fmax by US%s_to_T in MOM_hor_visc.F90
Hallberg-NOAA Jul 7, 2019
cbd6f99
Split excessively long lines in 2 files
Hallberg-NOAA Jul 7, 2019
ac8b84a
(*)Improved SW_trans correction for small fluxes
Hallberg-NOAA Jul 8, 2019
48fc7f2
Rescaled units of fluxes%ustar
Hallberg-NOAA Jul 8, 2019
cca8046
Add g_Earth to all versions of surface_forcing_CS
Hallberg-NOAA Jul 8, 2019
f258630
+Rescaled units of g_Earth in vertical params code
Hallberg-NOAA Jul 9, 2019
b470a27
Merge branch 'dev/gfdl' into parameterizations_cleanup
Hallberg-NOAA Jul 9, 2019
5cc85dc
+Added DEFAULT_2018_ANSWERS
Hallberg-NOAA Jul 9, 2019
2578211
+Added WIND_GYRES_2018_ANSWERS
Hallberg-NOAA Jul 9, 2019
1b31d9d
+Added SURFACE_FORCING_2018_ANSWERS
Hallberg-NOAA Jul 9, 2019
5645cc0
Fixed the doxyGen comment for Langmuir_number
Hallberg-NOAA Jul 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 75 additions & 53 deletions config_src/coupled_driver/MOM_surface_forcing.F90

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions config_src/ice_solo_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,11 @@ subroutine wind_forcing_zero(sfc_state, forces, day, G, US, CS)

if (CS%read_gust_2d) then
if (associated(forces%ustar)) then ; do j=js,je ; do i=is,ie
forces%ustar(i,j) = US%m_to_Z * sqrt(CS%gust(i,j)/CS%Rho0)
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(CS%gust(i,j)/CS%Rho0)
enddo ; enddo ; endif
else
if (associated(forces%ustar)) then ; do j=js,je ; do i=is,ie
forces%ustar(i,j) = US%m_to_Z * sqrt(CS%gust_const/CS%Rho0)
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(CS%gust_const/CS%Rho0)
enddo ; enddo ; endif
endif

Expand Down Expand Up @@ -479,7 +479,7 @@ subroutine wind_forcing_gyres(sfc_state, forces, day, G, US, CS)

! set the friction velocity
do j=js,je ; do i=is,ie
forces%ustar(i,j) = US%m_to_Z * sqrt(sqrt(0.5*(forces%tauy(i,j-1)*forces%tauy(i,j-1) + &
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(sqrt(0.5*(forces%tauy(i,j-1)*forces%tauy(i,j-1) + &
forces%tauy(i,j)*forces%tauy(i,j) + forces%taux(i-1,j)*forces%taux(i-1,j) + &
forces%taux(i,j)*forces%taux(i,j)))/CS%Rho0 + (CS%gust_const/CS%Rho0))
enddo ; enddo
Expand Down Expand Up @@ -540,12 +540,12 @@ subroutine wind_forcing_from_file(sfc_state, forces, day, G, US, CS)

if (CS%read_gust_2d) then
do j=js,je ; do i=is,ie
forces%ustar(i,j) = US%m_to_Z * sqrt((sqrt(temp_x(i,j)*temp_x(i,j) + &
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt((sqrt(temp_x(i,j)*temp_x(i,j) + &
temp_y(i,j)*temp_y(i,j)) + CS%gust(i,j)) / CS%Rho0)
enddo ; enddo
else
do j=js,je ; do i=is,ie
forces%ustar(i,j) = US%m_to_Z * sqrt(sqrt(temp_x(i,j)*temp_x(i,j) + &
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(sqrt(temp_x(i,j)*temp_x(i,j) + &
temp_y(i,j)*temp_y(i,j))/CS%Rho0 + (CS%gust_const/CS%Rho0))
enddo ; enddo
endif
Expand All @@ -565,13 +565,13 @@ subroutine wind_forcing_from_file(sfc_state, forces, day, G, US, CS)
call pass_vector(forces%taux, forces%tauy, G%Domain, To_All)
if (CS%read_gust_2d) then
do j=js, je ; do i=is, ie
forces%ustar(i,j) = US%m_to_Z * sqrt((sqrt(0.5*((forces%tauy(i,j-1)**2 + &
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt((sqrt(0.5*((forces%tauy(i,j-1)**2 + &
forces%tauy(i,j)**2) + (forces%taux(i-1,j)**2 + &
forces%taux(i,j)**2))) + CS%gust(i,j)) / CS%Rho0 )
enddo ; enddo
else
do j=js, je ; do i=is, ie
forces%ustar(i,j) = US%m_to_Z * sqrt(sqrt(0.5*((forces%tauy(i,j-1)**2 + &
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(sqrt(0.5*((forces%tauy(i,j-1)**2 + &
forces%tauy(i,j)**2) + (forces%taux(i-1,j)**2 + &
forces%taux(i,j)**2)))/CS%Rho0 + (CS%gust_const/CS%Rho0))
enddo ; enddo
Expand Down
4 changes: 2 additions & 2 deletions config_src/ice_solo_driver/user_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ subroutine USER_wind_forcing(sfc_state, forces, day, G, US, CS)

! This subroutine sets the surface wind stresses, forces%taux and forces%tauy [Pa].
! In addition, this subroutine can be used to set the surface friction velocity,
! forces%ustar [Z s-1 ~> m s-1], which is needed with a bulk mixed layer.
! forces%ustar [Z T-1 ~> m s-1], which is needed with a bulk mixed layer.

integer :: i, j, is, ie, js, je, Isq, Ieq, Jsq, Jeq
integer :: isd, ied, jsd, jed, IsdB, IedB, JsdB, JedB
Expand Down Expand Up @@ -139,7 +139,7 @@ subroutine USER_wind_forcing(sfc_state, forces, day, G, US, CS)
! Set the surface friction velocity [Z s-1 ~> m s-1]. ustar is always positive.
if (associated(forces%ustar)) then ; do j=js,je ; do i=is,ie
! This expression can be changed if desired, but need not be.
forces%ustar(i,j) = US%m_to_Z * G%mask2dT(i,j) * sqrt(CS%gust_const/CS%Rho0 + &
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * G%mask2dT(i,j) * sqrt(CS%gust_const/CS%Rho0 + &
sqrt(0.5*(forces%taux(I-1,j)**2 + forces%taux(I,j)**2) + &
0.5*(forces%tauy(i,J-1)**2 + forces%tauy(i,J)**2))/CS%Rho0)
enddo ; enddo ; endif
Expand Down
40 changes: 22 additions & 18 deletions config_src/mct_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,21 @@ module MOM_surface_forcing
real :: wind_stress_multiplier!< A multiplier applied to incoming wind stress (nondim).
! smg: remove when have A=B code reconciled
logical :: bulkmixedlayer !< If true, model based on bulk mixed layer code
real :: Rho0 !< Boussinesq reference density (kg/m^3)
real :: area_surf = -1.0 !< total ocean surface area (m^2)
real :: latent_heat_fusion ! latent heat of fusion (J/kg)
real :: latent_heat_vapor ! latent heat of vaporization (J/kg)
real :: Rho0 !< Boussinesq reference density [kg m-3]
real :: area_surf = -1.0 !< Total ocean surface area [m2]
real :: latent_heat_fusion !< Latent heat of fusion [J kg-1]
real :: latent_heat_vapor !< Latent heat of vaporization [J kg-1]
real :: max_p_surf !< maximum surface pressure that can be
!! exerted by the atmosphere and floating sea-ice,
!! in Pa. This is needed because the FMS coupling
!! [Pa]. This is needed because the FMS coupling
!! structure does not limit the water that can be
!! frozen out of the ocean and the ice-ocean heat
!! fluxes are treated explicitly.
logical :: use_limited_P_SSH !< If true, return the sea surface height with
!! the correction for the atmospheric (and sea-ice)
!! pressure limited by max_p_surf instead of the
!! full atmospheric pressure. The default is true.
real :: gust_const !< constant unresolved background gustiness for ustar (Pa)
real :: gust_const !< constant unresolved background gustiness for ustar [Pa]
logical :: read_gust_2d !< If true, use a 2-dimensional gustiness supplied
!! from an input file.
real, pointer, dimension(:,:) :: &
Expand All @@ -102,8 +102,9 @@ module MOM_surface_forcing
logical :: rigid_sea_ice !< If true, sea-ice exerts a rigidity that acts
!! to damp surface deflections (especially surface
!! gravity waves). The default is false.
real :: Kv_sea_ice !< viscosity in sea-ice that resists sheared vertical motions (m^2/s)
real :: density_sea_ice !< typical density of sea-ice (kg/m^3). The value is
real :: G_Earth !< Gravitational acceleration [m s-2]
real :: Kv_sea_ice !< viscosity in sea-ice that resists sheared vertical motions [m2 s-1]
real :: density_sea_ice !< typical density of sea-ice [kg m-3]. The value is
!! only used to convert the ice pressure into
!! appropriate units for use with Kv_sea_ice.
real :: rigid_sea_ice_mass !< A mass per unit area of sea-ice beyond which
Expand Down Expand Up @@ -305,7 +306,7 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, Time, G, US, CS, &

do j=js-2,je+2 ; do i=is-2,ie+2
fluxes%TKE_tidal(i,j) = CS%TKE_tidal(i,j)
fluxes%ustar_tidal(i,j) = CS%ustar_tidal(i,j)
fluxes%ustar_tidal(i,j) = US%m_to_Z*US%T_to_s*CS%ustar_tidal(i,j)
enddo; enddo

if (restore_temp) call safe_alloc_ptr(fluxes%heat_added,isd,ied,jsd,jed)
Expand Down Expand Up @@ -422,7 +423,7 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, Time, G, US, CS, &
! .or. (associated(IOB%mass_berg) .and. (.not. associated(fluxes%mass_berg)))) &
! call allocate_forcing_type(G, fluxes, iceberg=.true.)
!if (associated(IOB%ustar_berg)) &
! fluxes%ustar_berg(i,j) = US%m_to_Z * IOB%ustar_berg(i-i0,j-j0) * G%mask2dT(i,j)
! fluxes%ustar_berg(i,j) = US%m_to_Z*US%T_to_s * IOB%ustar_berg(i-i0,j-j0) * G%mask2dT(i,j)
!if (associated(IOB%area_berg)) &
! fluxes%area_berg(i,j) = IOB%area_berg(i-i0,j-j0) * G%mask2dT(i,j)
!if (associated(IOB%mass_berg)) &
Expand Down Expand Up @@ -576,7 +577,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
real :: Irho0 ! inverse of the mean density in (m^3/kg)
real :: taux2, tauy2 ! squared wind stresses (Pa^2)
real :: tau_mag ! magnitude of the wind stress (Pa)
real :: I_GEarth ! 1.0 / G%G_Earth (s^2/m)
real :: I_GEarth ! 1.0 / G_Earth [s2 m-1]
real :: Kv_rho_ice ! (CS%kv_sea_ice / CS%density_sea_ice) ( m^5/(s*kg) )
real :: mass_ice ! mass of sea ice at a face (kg/m^2)
real :: mass_eff ! effective mass of sea ice for rigidity (kg/m^2)
Expand Down Expand Up @@ -705,7 +706,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
((G%mask2dBu(I,J) + G%mask2dBu(I-1,J-1)) + (G%mask2dBu(I,J-1) + G%mask2dBu(I-1,J))) )
if (CS%read_gust_2d) gustiness = CS%gust(i,j)
endif
forces%ustar(i,j) = US%m_to_Z * sqrt(gustiness*Irho0 + Irho0*tau_mag)
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(gustiness*Irho0 + Irho0*tau_mag)
enddo; enddo

elseif (wind_stagger == AGRID) then
Expand All @@ -730,7 +731,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
do j=js,je ; do i=is,ie
gustiness = CS%gust_const
if (CS%read_gust_2d .and. (G%mask2dT(i,j) > 0)) gustiness = CS%gust(i,j)
forces%ustar(i,j) = US%m_to_Z * sqrt(gustiness*Irho0 + Irho0 * G%mask2dT(i,j) * &
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(gustiness*Irho0 + Irho0 * G%mask2dT(i,j) * &
sqrt(taux_at_h(i,j)**2 + tauy_at_h(i,j)**2))
enddo; enddo

Expand All @@ -751,9 +752,9 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
G%mask2dCv(i,J)*forces%tauy(i,J)**2) / (G%mask2dCv(i,J-1) + G%mask2dCv(i,J))

if (CS%read_gust_2d) then
forces%ustar(i,j) = US%m_to_Z * sqrt(CS%gust(i,j)*Irho0 + Irho0*sqrt(taux2 + tauy2))
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(CS%gust(i,j)*Irho0 + Irho0*sqrt(taux2 + tauy2))
else
forces%ustar(i,j) = US%m_to_Z * sqrt(CS%gust_const*Irho0 + Irho0*sqrt(taux2 + tauy2))
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(CS%gust_const*Irho0 + Irho0*sqrt(taux2 + tauy2))
endif
enddo; enddo

Expand All @@ -762,7 +763,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
! sea ice related dynamic fields
if (CS%rigid_sea_ice) then
call pass_var(forces%p_surf_full, G%Domain, halo=1)
I_GEarth = 1.0 / G%G_Earth
I_GEarth = 1.0 / CS%G_Earth
Kv_rho_ice = (CS%kv_sea_ice / CS%density_sea_ice)
do I=is-1,ie ; do j=js,je
mass_ice = min(forces%p_surf_full(i,j), forces%p_surf_full(i+1,j)) * I_GEarth
Expand Down Expand Up @@ -1222,13 +1223,13 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
do j=jsd, jed; do i=isd, ied
utide = CS%TKE_tidal(i,j)
CS%TKE_tidal(i,j) = G%mask2dT(i,j)*CS%Rho0*CS%cd_tides*(utide*utide*utide)
CS%ustar_tidal(i,j)=sqrt(CS%cd_tides)*utide
CS%ustar_tidal(i,j) = sqrt(CS%cd_tides)*utide
enddo ; enddo
else
do j=jsd,jed; do i=isd,ied
utide=CS%utide
CS%TKE_tidal(i,j) = CS%Rho0*CS%cd_tides*(utide*utide*utide)
CS%ustar_tidal(i,j)=sqrt(CS%cd_tides)*utide
CS%ustar_tidal(i,j) = sqrt(CS%cd_tides)*utide
enddo ; enddo
endif

Expand Down Expand Up @@ -1260,6 +1261,9 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
"nonhydrostatic pressure that resist vertical motion.", &
default=.false.)
if (CS%rigid_sea_ice) then
call get_param(param_file, mdl, "G_EARTH", CS%g_Earth, &
"The gravitational acceleration of the Earth.", &
units="m s-2", default = 9.80)
call get_param(param_file, mdl, "SEA_ICE_MEAN_DENSITY", CS%density_sea_ice, &
"A typical density of sea ice, used with the kinematic "//&
"viscosity, when USE_RIGID_SEA_ICE is true.", units="kg m-3", &
Expand Down
52 changes: 28 additions & 24 deletions config_src/nuopc_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module MOM_surface_forcing
gust => NULL(), & !< spatially varying unresolved background
!! gustiness that contributes to ustar [Pa].
!! gust is used when read_gust_2d is true.
ustar_tidal => NULL() !< tidal contribution to the bottom friction velocity [m/s]
ustar_tidal => NULL() !< tidal contribution to the bottom friction velocity [m s-1]
real :: cd_tides !< drag coefficient that applies to the tides (nondimensional)
real :: utide !< constant tidal velocity to use if read_tideamp
!! is false [m s-1]
Expand All @@ -101,8 +101,9 @@ module MOM_surface_forcing
logical :: rigid_sea_ice !< If true, sea-ice exerts a rigidity that acts
!! to damp surface deflections (especially surface
!! gravity waves). The default is false.
real :: Kv_sea_ice !! viscosity in sea-ice that resists sheared vertical motions [m^2/s]
real :: density_sea_ice !< typical density of sea-ice [kg/m^3]. The value is
real :: G_Earth !< Gravitational acceleration [m s-2]
real :: Kv_sea_ice !! viscosity in sea-ice that resists sheared vertical motions [m2 s-1]
real :: density_sea_ice !< typical density of sea-ice [kg m-3]. The value is
!! only used to convert the ice pressure into
!! appropriate units for use with Kv_sea_ice.
real :: rigid_sea_ice_mass !< A mass per unit area of sea-ice beyond which
Expand Down Expand Up @@ -309,7 +310,7 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, G, US, CS, &

do j=js-2,je+2 ; do i=is-2,ie+2
fluxes%TKE_tidal(i,j) = CS%TKE_tidal(i,j)
fluxes%ustar_tidal(i,j) = CS%ustar_tidal(i,j)
fluxes%ustar_tidal(i,j) = US%m_to_Z*US%T_to_s*CS%ustar_tidal(i,j)
enddo ; enddo

if (restore_temp) call safe_alloc_ptr(fluxes%heat_added,isd,ied,jsd,jed)
Expand Down Expand Up @@ -429,32 +430,32 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, G, US, CS, &

! liquid runoff flux
if (associated(IOB%rofl_flux)) then
fluxes%lrunoff(i,j) = IOB%rofl_flux(i-i0,j-j0) * G%mask2dT(i,j)
fluxes%lrunoff(i,j) = IOB%rofl_flux(i-i0,j-j0) * G%mask2dT(i,j)
else if (associated(IOB%runoff)) then
fluxes%lrunoff(i,j) = IOB%runoff(i-i0,j-j0) * G%mask2dT(i,j)
end if
fluxes%lrunoff(i,j) = IOB%runoff(i-i0,j-j0) * G%mask2dT(i,j)
endif

! ice runoff flux
if (associated(IOB%rofi_flux)) then
fluxes%frunoff(i,j) = IOB%rofi_flux(i-i0,j-j0) * G%mask2dT(i,j)
else if (associated(IOB%calving)) then
fluxes%frunoff(i,j) = IOB%calving(i-i0,j-j0) * G%mask2dT(i,j)
end if
fluxes%frunoff(i,j) = IOB%rofi_flux(i-i0,j-j0) * G%mask2dT(i,j)
elseif (associated(IOB%calving)) then
fluxes%frunoff(i,j) = IOB%calving(i-i0,j-j0) * G%mask2dT(i,j)
endif

if (associated(IOB%ustar_berg)) &
fluxes%ustar_berg(i,j) = US%m_to_Z * IOB%ustar_berg(i-i0,j-j0) * G%mask2dT(i,j)
fluxes%ustar_berg(i,j) = US%m_to_Z*US%T_to_s * IOB%ustar_berg(i-i0,j-j0) * G%mask2dT(i,j)

if (associated(IOB%area_berg)) &
fluxes%area_berg(i,j) = IOB%area_berg(i-i0,j-j0) * G%mask2dT(i,j)
fluxes%area_berg(i,j) = IOB%area_berg(i-i0,j-j0) * G%mask2dT(i,j)

if (associated(IOB%mass_berg)) &
fluxes%mass_berg(i,j) = IOB%mass_berg(i-i0,j-j0) * G%mask2dT(i,j)
fluxes%mass_berg(i,j) = IOB%mass_berg(i-i0,j-j0) * G%mask2dT(i,j)

if (associated(IOB%runoff_hflx)) &
fluxes%heat_content_lrunoff(i,j) = IOB%runoff_hflx(i-i0,j-j0) * G%mask2dT(i,j)
fluxes%heat_content_lrunoff(i,j) = IOB%runoff_hflx(i-i0,j-j0) * G%mask2dT(i,j)

if (associated(IOB%calving_hflx)) &
fluxes%heat_content_frunoff(i,j) = IOB%calving_hflx(i-i0,j-j0) * G%mask2dT(i,j)
fluxes%heat_content_frunoff(i,j) = IOB%calving_hflx(i-i0,j-j0) * G%mask2dT(i,j)

if (associated(IOB%lw_flux)) &
fluxes%LW(i,j) = IOB%lw_flux(i-i0,j-j0) * G%mask2dT(i,j)
Expand Down Expand Up @@ -618,7 +619,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
real :: Irho0 !< inverse of the mean density in (m^3/kg)
real :: taux2, tauy2 !< squared wind stresses (Pa^2)
real :: tau_mag !< magnitude of the wind stress [Pa]
real :: I_GEarth !< 1.0 / G%G_Earth (s^2/m)
real :: I_GEarth !< 1.0 / G_Earth [s2 m-1]
real :: Kv_rho_ice !< (CS%kv_sea_ice / CS%density_sea_ice) ( m^5/(s*kg) )
real :: mass_ice !< mass of sea ice at a face (kg/m^2)
real :: mass_eff !< effective mass of sea ice for rigidity (kg/m^2)
Expand Down Expand Up @@ -770,7 +771,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
((G%mask2dBu(I,J) + G%mask2dBu(I-1,J-1)) + (G%mask2dBu(I,J-1) + G%mask2dBu(I-1,J))) )
if (CS%read_gust_2d) gustiness = CS%gust(i,j)
endif
forces%ustar(i,j) = US%m_to_Z * sqrt(gustiness*Irho0 + Irho0*tau_mag)
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(gustiness*Irho0 + Irho0*tau_mag)
enddo ; enddo

elseif (wind_stagger == AGRID) then
Expand All @@ -796,7 +797,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
do j=js,je ; do i=is,ie
gustiness = CS%gust_const
if (CS%read_gust_2d .and. (G%mask2dT(i,j) > 0)) gustiness = CS%gust(i,j)
forces%ustar(i,j) = US%m_to_Z * sqrt(gustiness*Irho0 + Irho0 * G%mask2dT(i,j) * &
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(gustiness*Irho0 + Irho0 * G%mask2dT(i,j) * &
sqrt(taux_at_h(i,j)**2 + tauy_at_h(i,j)**2))
enddo ; enddo

Expand All @@ -817,9 +818,9 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)
G%mask2dCv(i,J)*forces%tauy(i,J)**2) / (G%mask2dCv(i,J-1) + G%mask2dCv(i,J))

if (CS%read_gust_2d) then
forces%ustar(i,j) = US%m_to_Z * sqrt(CS%gust(i,j)*Irho0 + Irho0*sqrt(taux2 + tauy2))
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(CS%gust(i,j)*Irho0 + Irho0*sqrt(taux2 + tauy2))
else
forces%ustar(i,j) = US%m_to_Z * sqrt(CS%gust_const*Irho0 + Irho0*sqrt(taux2 + tauy2))
forces%ustar(i,j) = US%m_to_Z*US%T_to_s * sqrt(CS%gust_const*Irho0 + Irho0*sqrt(taux2 + tauy2))
endif
enddo ; enddo

Expand All @@ -840,7 +841,7 @@ subroutine convert_IOB_to_forces(IOB, forces, index_bounds, Time, G, US, CS)

if (CS%rigid_sea_ice) then
call pass_var(forces%p_surf_full, G%Domain, halo=1)
I_GEarth = 1.0 / G%G_Earth
I_GEarth = 1.0 / CS%g_Earth
Kv_rho_ice = (CS%kv_sea_ice / CS%density_sea_ice)
do I=is-1,ie ; do j=js,je
mass_ice = min(forces%p_surf_full(i,j), forces%p_surf_full(i+1,j)) * I_GEarth
Expand Down Expand Up @@ -1221,13 +1222,13 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
do j=jsd, jed; do i=isd, ied
utide = CS%TKE_tidal(i,j)
CS%TKE_tidal(i,j) = G%mask2dT(i,j)*CS%Rho0*CS%cd_tides*(utide*utide*utide)
CS%ustar_tidal(i,j)=sqrt(CS%cd_tides)*utide
CS%ustar_tidal(i,j) = sqrt(CS%cd_tides)*utide
enddo ; enddo
else
do j=jsd,jed; do i=isd,ied
utide=CS%utide
CS%TKE_tidal(i,j) = CS%Rho0*CS%cd_tides*(utide*utide*utide)
CS%ustar_tidal(i,j)=sqrt(CS%cd_tides)*utide
CS%ustar_tidal(i,j) = sqrt(CS%cd_tides)*utide
enddo ; enddo
endif

Expand Down Expand Up @@ -1258,6 +1259,9 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
"nonhydrostatic pressure that resist vertical motion.", &
default=.false.)
if (CS%rigid_sea_ice) then
call get_param(param_file, mdl, "G_EARTH", CS%g_Earth, &
"The gravitational acceleration of the Earth.", &
units="m s-2", default = 9.80)
call get_param(param_file, mdl, "SEA_ICE_MEAN_DENSITY", CS%density_sea_ice, &
"A typical density of sea ice, used with the kinematic "//&
"viscosity, when USE_RIGID_SEA_ICE is true.", units="kg m-3", &
Expand Down
Loading