Skip to content

Commit

Permalink
Update MOM_mixed_layer_restrat.F90
Browse files Browse the repository at this point in the history
Adding and calculating diagnostic front length scale (lf_bodner) to mixed layer restratification code
  • Loading branch information
amoebaliz authored Dec 12, 2023
1 parent 11759d6 commit a5c4b45
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/parameterizations/lateral/MOM_mixed_layer_restrat.F90
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ module MOM_mixed_layer_restrat
integer :: id_wpup = -1
integer :: id_ustar = -1
integer :: id_bflux = -1
integer :: id_lfbod = -1 !LD: diag ID for dynamic front length
!>@}

end type mixedlayer_restrat_CS
Expand Down Expand Up @@ -801,6 +802,7 @@ subroutine mixedlayer_restrat_Bodner(CS, G, GV, US, h, uhtr, vhtr, tv, forces, d
wpup ! Turbulent vertical momentum [L H T-2 ~> m2 s-2 or kg m-1 s-2]
real :: uDml_diag(SZIB_(G),SZJ_(G)) ! A 2D copy of uDml for diagnostics [H L2 T-1 ~> m3 s-1 or kg s-1]
real :: vDml_diag(SZI_(G),SZJB_(G)) ! A 2D copy of vDml for diagnostics [H L2 T-1 ~> m3 s-1 or kg s-1]
real :: lf_bodner_diag(SZI_(G),SZJ_(G)) ! LD: Front width as in Bodner et al., 2023 (B22), eq 24 [L ~> m]
real :: U_star_2d(SZI_(G),SZJ_(G)) ! The wind friction velocity, calculated using the Boussinesq
! reference density or the time-evolving surface density in non-Boussinesq
! mode [Z T-1 ~> m s-1]
Expand Down Expand Up @@ -930,6 +932,13 @@ subroutine mixedlayer_restrat_Bodner(CS, G, GV, US, h, uhtr, vhtr, tv, forces, d
wpup(i,j) = rmean2ts(wpup(i,j), CS%wpup_filtered(i,j), &
CS%BLD_growing_Tfilt, CS%BLD_decaying_Tfilt, dt)
CS%wpup_filtered(i,j) = wpup(i,j)

! LD: Calculating Frontlength lf_bodner, used in B22 formula (eq 24).
absf = 0.5*(abs(G%CoriolisBu(I-1,J)) + abs(G%CoriolisBu(I,J))) ! T-1 ~> s-1
lf_bodner_diag(i,j) = 0.25 * (( CS%mstar * u_star3 + CS%nstar * w_star3 )**two_thirds & ! (this line m2 s-2)
* ( US%m_to_L * GV%m_to_H * US%T_to_s**2 )) & ! [L H s2 m-2 T-2 ~> 1 or kg m-3]
/ (absf**2 * little_h(i,j))! [T-2 H ~> m s-2]

enddo ; enddo

if (CS%debug) then
Expand Down Expand Up @@ -1117,6 +1126,7 @@ subroutine mixedlayer_restrat_Bodner(CS, G, GV, US, h, uhtr, vhtr, tv, forces, d
if (CS%id_vhml > 0) call post_data(CS%id_vhml, vhml, CS%diag)
if (CS%id_uDml > 0) call post_data(CS%id_uDml, uDml_diag, CS%diag)
if (CS%id_vDml > 0) call post_data(CS%id_vDml, vDml_diag, CS%diag)
if (CS%id_lfbod > 0) call post_data(CS%id_lfbod, lf_bodner_diag, CS%diag) !LD: frontlength averaging

if (CS%id_uml > 0) then
do J=js,je ; do i=is-1,ie
Expand Down Expand Up @@ -1735,6 +1745,9 @@ logical function mixedlayer_restrat_init(Time, G, GV, US, param_file, diag, CS,
CS%id_bflux = register_diag_field('ocean_model', 'MLE_bflux', diag%axesT1, Time, &
'Surface buoyancy flux, B0, in Bodner mixed layer restratificiation parameterization', &
'm2 s-3', conversion=(US%Z_to_m**2*US%s_to_T**3))
CS%id_lfbod = register_diag_field('ocean_model', 'lf_bodner', diag%axesT1, Time, &
'Front length in Bodner mixed layer restratificiation parameterization', &
'm', conversion=(US%L_to_m)) !LD: register diag for dynamic front length
endif

! If MLD_filtered is being used, we need to update halo regions after a restart
Expand Down

0 comments on commit a5c4b45

Please sign in to comment.