Skip to content

Commit

Permalink
Merge pull request mom-ocean#905 from Hallberg-NOAA/rescale_Coriolis
Browse files Browse the repository at this point in the history
+Added dimensional rescaling of Coriolis parameter
  • Loading branch information
adcroft authored Apr 11, 2019
2 parents aceda8f + 833d9ae commit dd7607d
Show file tree
Hide file tree
Showing 32 changed files with 196 additions and 160 deletions.
10 changes: 6 additions & 4 deletions src/core/MOM_CoriolisAdv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module MOM_CoriolisAdv
use MOM_open_boundary, only : ocean_OBC_type, OBC_DIRECTION_E, OBC_DIRECTION_W
use MOM_open_boundary, only : OBC_DIRECTION_N, OBC_DIRECTION_S
use MOM_string_functions, only : uppercase
use MOM_unit_scaling, only : unit_scale_type
use MOM_variables, only : accel_diag_ptrs
use MOM_verticalGrid, only : verticalGrid_type

Expand Down Expand Up @@ -107,7 +108,7 @@ module MOM_CoriolisAdv
contains

!> Calculates the Coriolis and momentum advection contributions to the acceleration.
subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, CS)
subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, US, CS)
type(ocean_grid_type), intent(in) :: G !< Ocen grid structure
type(verticalGrid_type), intent(in) :: GV !< Vertical grid structure
real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(in) :: u !< Zonal velocity [m s-1]
Expand All @@ -122,8 +123,9 @@ subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, CS)
real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(out) :: CAv !< Meridional acceleration due to Coriolis
!! and momentum advection [m s-2].
type(ocean_OBC_type), pointer :: OBC !< Open boundary control structure
type(accel_diag_ptrs), intent(inout) :: AD !< Storage for acceleration diagnostics
type(CoriolisAdv_CS), pointer :: CS !< Control structure for MOM_CoriolisAdv
type(accel_diag_ptrs), intent(inout) :: AD !< Storage for acceleration diagnostics
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
type(CoriolisAdv_CS), pointer :: CS !< Control structure for MOM_CoriolisAdv

! Local variables
real, dimension(SZIB_(G),SZJB_(G)) :: &
Expand Down Expand Up @@ -410,7 +412,7 @@ subroutine CorAdCalc(u, v, h, uh, vh, CAu, CAv, OBC, AD, G, GV, CS)
relative_vorticity = G%mask2dBu(I,J) * (dvdx(I,J) - dudy(I,J)) * &
G%IareaBu(I,J)
endif
absolute_vorticity = G%CoriolisBu(I,J) + relative_vorticity
absolute_vorticity = US%s_to_T*G%CoriolisBu(I,J) + relative_vorticity
Ih = 0.0
if (Area_q(i,j) > 0.0) then
hArea_q = (hArea_u(I,j) + hArea_u(I,j+1)) + (hArea_v(i,J) + hArea_v(i+1,J))
Expand Down
12 changes: 6 additions & 6 deletions src/core/MOM_barotropic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
enddo ; enddo
!$OMP parallel do default(shared)
do J=js-1,je ; do I=is-1,ie
q(I,J) = 0.25 * G%CoriolisBu(I,J) * &
q(I,J) = 0.25 * US%s_to_T*G%CoriolisBu(I,J) * &
((G%areaT(i,j) + G%areaT(i+1,j+1)) + (G%areaT(i+1,j) + G%areaT(i,j+1))) / &
((G%areaT(i,j) * G%bathyT(i,j) + G%areaT(i+1,j+1) * G%bathyT(i+1,j+1)) + &
(G%areaT(i+1,j) * G%bathyT(i+1,j) + G%areaT(i,j+1) * G%bathyT(i,j+1)) )
Expand Down Expand Up @@ -1396,8 +1396,8 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
gtot_W(i,j) * (Datu(I-1,j)*G%IdxCu(I-1,j))) + &
(gtot_N(i,j) * (Datv(i,J)*G%IdyCv(i,J)) + &
gtot_S(i,j) * (Datv(i,J-1)*G%IdyCv(i,J-1)))) + &
((G%CoriolisBu(I,J)**2 + G%CoriolisBu(I-1,J-1)**2) + &
(G%CoriolisBu(I-1,J)**2 + G%CoriolisBu(I,J-1)**2)))
US%s_to_T**2*((G%CoriolisBu(I,J)**2 + G%CoriolisBu(I-1,J-1)**2) + &
(G%CoriolisBu(I-1,J)**2 + G%CoriolisBu(I,J-1)**2)))
H_eff_dx2 = max(H_min_dyn * (G%IdxT(i,j)**2 + G%IdyT(i,j)**2), &
G%IareaT(i,j) * &
((Datu(I,j)*G%IdxCu(I,j) + Datu(I-1,j)*G%IdxCu(I-1,j)) + &
Expand Down Expand Up @@ -2364,8 +2364,8 @@ subroutine set_dtbt(G, GV, US, CS, eta, pbce, BT_cont, gtot_est, SSH_add)
Idt_max2 = 0.5 * (1.0 + 2.0*CS%bebt) * (G%IareaT(i,j) * &
((gtot_E(i,j)*Datu(I,j)*G%IdxCu(I,j) + gtot_W(i,j)*Datu(I-1,j)*G%IdxCu(I-1,j)) + &
(gtot_N(i,j)*Datv(i,J)*G%IdyCv(i,J) + gtot_S(i,j)*Datv(i,J-1)*G%IdyCv(i,J-1))) + &
((G%CoriolisBu(I,J)**2 + G%CoriolisBu(I-1,J-1)**2) + &
(G%CoriolisBu(I-1,J)**2 + G%CoriolisBu(I,J-1)**2)))
US%s_to_T**2*((G%CoriolisBu(I,J)**2 + G%CoriolisBu(I-1,J-1)**2) + &
(G%CoriolisBu(I-1,J)**2 + G%CoriolisBu(I,J-1)**2)))
if (Idt_max2 * min_max_dt2 > 1.0) min_max_dt2 = 1.0 / Idt_max2
enddo ; enddo
dtbt_max = sqrt(min_max_dt2 / dgeo_de)
Expand Down Expand Up @@ -4105,7 +4105,7 @@ subroutine barotropic_init(u, v, h, eta, Time, G, GV, US, param_file, diag, CS,
enddo ; enddo
do J=js-1,je ; do I=is-1,ie
if (G%mask2dT(i,j)+G%mask2dT(i,j+1)+G%mask2dT(i+1,j)+G%mask2dT(i+1,j+1)>0.) then
CS%q_D(I,J) = 0.25 * G%CoriolisBu(I,J) * &
CS%q_D(I,J) = 0.25 * US%s_to_T*G%CoriolisBu(I,J) * &
((G%areaT(i,j) + G%areaT(i+1,j+1)) + (G%areaT(i+1,j) + G%areaT(i,j+1))) / &
((G%areaT(i,j) * G%bathyT(i,j) + G%areaT(i+1,j+1) * G%bathyT(i+1,j+1)) + &
(G%areaT(i+1,j) * G%bathyT(i+1,j) + G%areaT(i,j+1) * G%bathyT(i,j+1)) )
Expand Down
10 changes: 5 additions & 5 deletions src/core/MOM_dynamics_split_RK2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ subroutine step_MOM_dyn_split_RK2(u, v, h, tv, visc, &
! CAu = -(f+zeta_av)/h_av vh + d/dx KE_av
call cpu_clock_begin(id_clock_Cor)
call CorAdCalc(u_av, v_av, h_av, uh, vh, CS%CAu, CS%CAv, CS%OBC, CS%ADp, &
G, Gv, CS%CoriolisAdv_CSp)
G, Gv, US, CS%CoriolisAdv_CSp)
call cpu_clock_end(id_clock_Cor)
if (showCallTree) call callTree_wayPoint("done with CorAdCalc (step_MOM_dyn_split_RK2)")

Expand Down Expand Up @@ -682,14 +682,14 @@ subroutine step_MOM_dyn_split_RK2(u, v, h, tv, visc, &
! diffu = horizontal viscosity terms (u_av)
call cpu_clock_begin(id_clock_horvisc)
call horizontal_viscosity(u_av, v_av, h_av, CS%diffu, CS%diffv, &
MEKE, Varmix, G, GV, CS%hor_visc_CSp, OBC=CS%OBC)
MEKE, Varmix, G, GV, US, CS%hor_visc_CSp, OBC=CS%OBC)
call cpu_clock_end(id_clock_horvisc)
if (showCallTree) call callTree_wayPoint("done with horizontal_viscosity (step_MOM_dyn_split_RK2)")

! CAu = -(f+zeta_av)/h_av vh + d/dx KE_av
call cpu_clock_begin(id_clock_Cor)
call CorAdCalc(u_av, v_av, h_av, uh, vh, CS%CAu, CS%CAv, CS%OBC, CS%ADp, &
G, GV, CS%CoriolisAdv_CSp)
G, GV, US, CS%CoriolisAdv_CSp)
call cpu_clock_end(id_clock_Cor)
if (showCallTree) call callTree_wayPoint("done with CorAdCalc (step_MOM_dyn_split_RK2)")

Expand Down Expand Up @@ -1096,7 +1096,7 @@ subroutine initialize_dyn_split_RK2(u, v, h, uh, vh, eta, Time, G, GV, US, param
if (use_tides) call tidal_forcing_init(Time, G, param_file, CS%tides_CSp)
call PressureForce_init(Time, G, GV, US, param_file, diag, CS%PressureForce_CSp, &
CS%tides_CSp)
call hor_visc_init(Time, G, param_file, diag, CS%hor_visc_CSp)
call hor_visc_init(Time, G, US, param_file, diag, CS%hor_visc_CSp)
call vertvisc_init(MIS, Time, G, GV, US, param_file, diag, CS%ADp, dirs, &
ntrunc, CS%vertvisc_CSp)
if (.not.associated(setVisc_CSp)) call MOM_error(FATAL, &
Expand Down Expand Up @@ -1136,7 +1136,7 @@ subroutine initialize_dyn_split_RK2(u, v, h, uh, vh, eta, Time, G, GV, US, param
if (.not. query_initialized(CS%diffu,"diffu",restart_CS) .or. &
.not. query_initialized(CS%diffv,"diffv",restart_CS)) &
call horizontal_viscosity(u, v, h, CS%diffu, CS%diffv, MEKE, VarMix, &
G, GV, CS%hor_visc_CSp, OBC=CS%OBC)
G, GV, US, CS%hor_visc_CSp, OBC=CS%OBC)
if (.not. query_initialized(CS%u_av,"u2", restart_CS) .or. &
.not. query_initialized(CS%u_av,"v2", restart_CS)) then
CS%u_av(:,:,:) = u(:,:,:)
Expand Down
10 changes: 5 additions & 5 deletions src/core/MOM_dynamics_unsplit.F90
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
call enable_averaging(dt,Time_local, CS%diag)
call cpu_clock_begin(id_clock_horvisc)
call horizontal_viscosity(u, v, h, CS%diffu, CS%diffv, MEKE, Varmix, &
G, GV, CS%hor_visc_CSp)
G, GV, US, CS%hor_visc_CSp)
call cpu_clock_end(id_clock_horvisc)
call disable_averaging(CS%diag)

Expand Down Expand Up @@ -300,7 +300,7 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
! CAu = -(f+zeta)/h_av vh + d/dx KE
call cpu_clock_begin(id_clock_Cor)
call CorAdCalc(u, v, h_av, uh, vh, CS%CAu, CS%CAv, CS%OBC, CS%ADp, &
G, GV, CS%CoriolisAdv_CSp)
G, GV, US, CS%CoriolisAdv_CSp)
call cpu_clock_end(id_clock_Cor)

! PFu = d/dx M(h_av,T,S)
Expand Down Expand Up @@ -368,7 +368,7 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
! CAu = -(f+zeta(up))/h_av vh + d/dx KE(up)
call cpu_clock_begin(id_clock_Cor)
call CorAdCalc(up, vp, h_av, uh, vh, CS%CAu, CS%CAv, CS%OBC, CS%ADp, &
G, GV, CS%CoriolisAdv_CSp)
G, GV, US, CS%CoriolisAdv_CSp)
call cpu_clock_end(id_clock_Cor)

! PFu = d/dx M(h_av,T,S)
Expand Down Expand Up @@ -450,7 +450,7 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
! CAu = -(f+zeta(upp))/h_av vh + d/dx KE(upp)
call cpu_clock_begin(id_clock_Cor)
call CorAdCalc(upp, vpp, h_av, uh, vh, CS%CAu, CS%CAv, CS%OBC, CS%ADp, &
G, GV, CS%CoriolisAdv_CSp)
G, GV, US, CS%CoriolisAdv_CSp)
call cpu_clock_end(id_clock_Cor)

! PFu = d/dx M(h_av,T,S)
Expand Down Expand Up @@ -653,7 +653,7 @@ subroutine initialize_dyn_unsplit(u, v, h, Time, G, GV, US, param_file, diag, CS
if (use_tides) call tidal_forcing_init(Time, G, param_file, CS%tides_CSp)
call PressureForce_init(Time, G, GV, US, param_file, diag, CS%PressureForce_CSp, &
CS%tides_CSp)
call hor_visc_init(Time, G, param_file, diag, CS%hor_visc_CSp)
call hor_visc_init(Time, G, US, param_file, diag, CS%hor_visc_CSp)
call vertvisc_init(MIS, Time, G, GV, US, param_file, diag, CS%ADp, dirs, &
ntrunc, CS%vertvisc_CSp)
if (.not.associated(setVisc_CSp)) call MOM_error(FATAL, &
Expand Down
8 changes: 4 additions & 4 deletions src/core/MOM_dynamics_unsplit_RK2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ subroutine step_MOM_dyn_unsplit_RK2(u_in, v_in, h_in, tv, visc, Time_local, dt,
call enable_averaging(dt,Time_local, CS%diag)
call cpu_clock_begin(id_clock_horvisc)
call horizontal_viscosity(u_in, v_in, h_in, CS%diffu, CS%diffv, MEKE, VarMix, &
G, GV, CS%hor_visc_CSp)
G, GV, US, CS%hor_visc_CSp)
call cpu_clock_end(id_clock_horvisc)
call disable_averaging(CS%diag)
call pass_vector(CS%diffu, CS%diffv, G%Domain, clock=id_clock_pass)
Expand Down Expand Up @@ -295,7 +295,7 @@ subroutine step_MOM_dyn_unsplit_RK2(u_in, v_in, h_in, tv, visc, Time_local, dt,
! CAu = -(f+zeta)/h_av vh + d/dx KE (function of u[n-1] and uh[n-1])
call cpu_clock_begin(id_clock_Cor)
call CorAdCalc(u_in, v_in, h_av, uh, vh, CS%CAu, CS%CAv, CS%OBC, CS%ADp, &
G, GV, CS%CoriolisAdv_CSp)
G, GV, US, CS%CoriolisAdv_CSp)
call cpu_clock_end(id_clock_Cor)

! PFu = d/dx M(h_av,T,S) (function of h[n-1/2])
Expand Down Expand Up @@ -367,7 +367,7 @@ subroutine step_MOM_dyn_unsplit_RK2(u_in, v_in, h_in, tv, visc, Time_local, dt,
! CAu = -(f+zeta(up))/h_av vh + d/dx KE(up) (function of up[n-1/2], h[n-1/2])
call cpu_clock_begin(id_clock_Cor)
call CorAdCalc(up, vp, h_av, uh, vh, CS%CAu, CS%CAv, CS%OBC, CS%ADp, &
G, GV, CS%CoriolisAdv_CSp)
G, GV, US, CS%CoriolisAdv_CSp)
call cpu_clock_end(id_clock_Cor)
if (associated(CS%OBC)) then
call open_boundary_zero_normal_flow(CS%OBC, G, CS%CAu, CS%CAv)
Expand Down Expand Up @@ -613,7 +613,7 @@ subroutine initialize_dyn_unsplit_RK2(u, v, h, Time, G, GV, US, param_file, diag
if (use_tides) call tidal_forcing_init(Time, G, param_file, CS%tides_CSp)
call PressureForce_init(Time, G, GV, US, param_file, diag, CS%PressureForce_CSp, &
CS%tides_CSp)
call hor_visc_init(Time, G, param_file, diag, CS%hor_visc_CSp)
call hor_visc_init(Time, G, US, param_file, diag, CS%hor_visc_CSp)
call vertvisc_init(MIS, Time, G, GV, US, param_file, diag, CS%ADp, dirs, &
ntrunc, CS%vertvisc_CSp)
if (.not.associated(setVisc_CSp)) call MOM_error(FATAL, &
Expand Down
8 changes: 4 additions & 4 deletions src/core/MOM_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ module MOM_grid
Dblock_v, & !< Topographic depths at v-points at which the flow is blocked [Z ~> m].
Dopen_v !< Topographic depths at v-points at which the flow is open at width dx_Cv [Z ~> m].
real ALLOCABLE_, dimension(NIMEMB_PTR_,NJMEMB_PTR_) :: &
CoriolisBu !< The Coriolis parameter at corner points [s-1].
CoriolisBu !< The Coriolis parameter at corner points [T-1 ~> s-1].
real ALLOCABLE_, dimension(NIMEM_,NJMEM_) :: &
df_dx, & !< Derivative d/dx f (Coriolis parameter) at h-points [s-1 m-1].
df_dy !< Derivative d/dy f (Coriolis parameter) at h-points [s-1 m-1].
real :: g_Earth !< The gravitational acceleration [m s-2].
df_dx, & !< Derivative d/dx f (Coriolis parameter) at h-points [T-1 m-1 ~> s-1 m-1].
df_dy !< Derivative d/dy f (Coriolis parameter) at h-points [T-1 m-1 ~> s-1 m-1].
real :: g_Earth !< The gravitational acceleration [m2 Z-1 s-2 ~> m s-2].

! These variables are global sums that are useful for 1-d diagnostics
real :: areaT_global !< Global sum of h-cell area [m2]
Expand Down
10 changes: 5 additions & 5 deletions src/diagnostics/MOM_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -627,10 +627,10 @@ subroutine calculate_diagnostic_fields(u, v, h, uh, vh, tv, ADp, CDp, p_surf, &
!$OMP private(f2_h,mag_beta)
do j=js,je ; do i=is,ie
! Blend the equatorial deformation radius with the standard one.
f2_h = absurdly_small_freq2 + 0.25 * &
f2_h = absurdly_small_freq2 + 0.25 * US%s_to_T**2 * &
((G%CoriolisBu(I,J)**2 + G%CoriolisBu(I-1,J-1)**2) + &
(G%CoriolisBu(I-1,J)**2 + G%CoriolisBu(I,J-1)**2))
mag_beta = sqrt(0.5 * ( &
mag_beta = sqrt(0.5 * US%s_to_T**2 * ( &
(((G%CoriolisBu(I,J)-G%CoriolisBu(I-1,J)) * G%IdxCv(i,J))**2 + &
((G%CoriolisBu(I,J-1)-G%CoriolisBu(I-1,J-1)) * G%IdxCv(i,J-1))**2) + &
(((G%CoriolisBu(I,J)-G%CoriolisBu(I,J-1)) * G%IdyCu(I,j))**2 + &
Expand Down Expand Up @@ -676,10 +676,10 @@ subroutine calculate_diagnostic_fields(u, v, h, uh, vh, tv, ADp, CDp, p_surf, &
!$OMP private(f2_h,mag_beta)
do j=js,je ; do i=is,ie
! Blend the equatorial deformation radius with the standard one.
f2_h = absurdly_small_freq2 + 0.25 * &
f2_h = absurdly_small_freq2 + 0.25 * US%s_to_T**2 * &
((G%CoriolisBu(I,J)**2 + G%CoriolisBu(I-1,J-1)**2) + &
(G%CoriolisBu(I-1,J)**2 + G%CoriolisBu(I,J-1)**2))
mag_beta = sqrt(0.5 * ( &
mag_beta = sqrt(0.5 * US%s_to_T**2 * ( &
(((G%CoriolisBu(I,J)-G%CoriolisBu(I-1,J)) * G%IdxCv(i,J))**2 + &
((G%CoriolisBu(I,J-1)-G%CoriolisBu(I-1,J-1)) * G%IdxCv(i,J-1))**2) + &
(((G%CoriolisBu(I,J)-G%CoriolisBu(I,J-1)) * G%IdyCu(I,j))**2 + &
Expand Down Expand Up @@ -1916,7 +1916,7 @@ subroutine write_static_fields(G, GV, US, tv, diag)
if (id > 0) call post_data(id, G%mask2dCv, diag, .true.)

id = register_static_field('ocean_model', 'Coriolis', diag%axesB1, &
'Coriolis parameter at corner (Bu) points', 's-1', interp_method='none')
'Coriolis parameter at corner (Bu) points', 's-1', interp_method='none', conversion=US%s_to_T)
if (id > 0) call post_data(id, G%CoriolisBu, diag, .true.)

id = register_static_field('ocean_model', 'dxt', diag%axesT1, &
Expand Down
4 changes: 2 additions & 2 deletions src/diagnostics/MOM_wave_structure.F90
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@ subroutine wave_structure(h, tv, G, GV, US, cn, ModeNum, freq, CS, En, full_halo
u_strct(nzm) = (w_strct(nzm-1)- w_strct(nzm))/dz(nzm-1)

! Calculate wavenumber magnitude
f2 = G%CoriolisBu(I,J)**2
!f2 = 0.25*((G%CoriolisBu(I,J)**2 + G%CoriolisBu(I-1,J-1)**2) + &
f2 = US%s_to_T**2 * G%CoriolisBu(I,J)**2
!f2 = 0.25*US%s_to_T**2 *((G%CoriolisBu(I,J)**2 + G%CoriolisBu(I-1,J-1)**2) + &
! (G%CoriolisBu(I,J-1)**2 + G%CoriolisBu(I-1,J)**2))
Kmag2 = (freq**2 - f2) / (cn(i,j)**2 + cg_subRO**2)

Expand Down
6 changes: 3 additions & 3 deletions src/framework/MOM_dyn_horgrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ module MOM_dyn_horgrid
Dblock_v, & !< Topographic depths at v-points at which the flow is blocked [Z ~> m].
Dopen_v !< Topographic depths at v-points at which the flow is open at width dx_Cv [Z ~> m].
real, allocatable, dimension(:,:) :: &
CoriolisBu !< The Coriolis parameter at corner points [s-1].
CoriolisBu !< The Coriolis parameter at corner points [T-1 ~> s-1].
real, allocatable, dimension(:,:) :: &
df_dx, & !< Derivative d/dx f (Coriolis parameter) at h-points [s-1 m-1].
df_dy !< Derivative d/dy f (Coriolis parameter) at h-points [s-1 m-1].
df_dx, & !< Derivative d/dx f (Coriolis parameter) at h-points [T-1 m-1 ~> s-1 m-1].
df_dy !< Derivative d/dy f (Coriolis parameter) at h-points [T-1 m-1 ~> s-1 m-1].

! These variables are global sums that are useful for 1-d diagnostics
real :: areaT_global !< Global sum of h-cell area [m2]
Expand Down
8 changes: 4 additions & 4 deletions src/ice_shelf/MOM_ice_shelf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ subroutine shelf_calc_flux(state, fluxes, Time, time_step, CS, forces)

! Estimate the neutral ocean boundary layer thickness as the minimum of the
! reported ocean mixed layer thickness and the neutral Ekman depth.
absf = 0.25*((abs(G%CoriolisBu(I,J)) + abs(G%CoriolisBu(I-1,J-1))) + &
(abs(G%CoriolisBu(I,J-1)) + abs(G%CoriolisBu(I-1,J))))
absf = 0.25*US%s_to_T*((abs(US%s_to_T*G%CoriolisBu(I,J)) + abs(US%s_to_T*G%CoriolisBu(I-1,J-1))) + &
(abs(US%s_to_T*G%CoriolisBu(I,J-1)) + abs(US%s_to_T*G%CoriolisBu(I-1,J))))
if (absf*state%Hml(i,j) <= VK*ustar_h) then ; hBL_neut = state%Hml(i,j)
else ; hBL_neut = (VK*ustar_h) / absf ; endif
hBL_neut_h_molec = ZETA_N * ((hBL_neut * ustar_h) / (5.0 * CS%Kv_molec))
Expand Down Expand Up @@ -1394,8 +1394,8 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, forces, fl
call rescale_dyn_horgrid_bathymetry(dG, US%Z_to_m)

! Set up the Coriolis parameter, G%f, usually analytically.
call MOM_initialize_rotation(dG%CoriolisBu, dG, param_file)
! This copies grid elements, inglucy bathyT and CoriolisBu from dG to CS%grid.
call MOM_initialize_rotation(dG%CoriolisBu, dG, param_file, US)
! This copies grid elements, including bathyT and CoriolisBu from dG to CS%grid.
call copy_dyngrid_to_MOM_grid(dG, CS%grid)

call destroy_dyn_horgrid(dG)
Expand Down
10 changes: 5 additions & 5 deletions src/initialization/MOM_fixed_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ subroutine MOM_initialize_fixed(G, US, OBC, PF, write_geom, output_dir)

! Calculate the value of the Coriolis parameter at the latitude !
! of the q grid points [s-1].
call MOM_initialize_rotation(G%CoriolisBu, G, PF)
call MOM_initialize_rotation(G%CoriolisBu, G, PF, US=US)
! Calculate the components of grad f (beta)
call MOM_calculate_grad_Coriolis(G%dF_dx, G%dF_dy, G)
call MOM_calculate_grad_Coriolis(G%dF_dx, G%dF_dy, G, US=US)
if (debug) then
call qchksum(G%CoriolisBu, "MOM_initialize_fixed: f ", G%HI)
call hchksum(G%dF_dx, "MOM_initialize_fixed: dF_dx ", G%HI)
call hchksum(G%dF_dy, "MOM_initialize_fixed: dF_dy ", G%HI)
call qchksum(G%CoriolisBu, "MOM_initialize_fixed: f ", G%HI, scale=US%s_to_T)
call hchksum(G%dF_dx, "MOM_initialize_fixed: dF_dx ", G%HI, scale=US%s_to_T)
call hchksum(G%dF_dy, "MOM_initialize_fixed: dF_dy ", G%HI, scale=US%s_to_T)
endif

call initialize_grid_rotation_angle(G, PF)
Expand Down
Loading

0 comments on commit dd7607d

Please sign in to comment.