Skip to content

Commit f2d5dab

Browse files
Theresa MorrisonTheresa Morrison
authored andcommitted
Update Names of routines
1 parent f28e863 commit f2d5dab

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

src/core/MOM.F90

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -861,8 +861,8 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
861861
call step_MOM_thermo(CS, G, GV, US, u, v, h, CS%tv, fluxes, dtdia, &
862862
end_time_thermo, .true., Waves=Waves)
863863
if ( CS%use_ALE_algorithm ) &
864-
call ALE_gridgen_and_remapping(CS, G, GV, US, u, v, h, CS%tv, dtdia, Time_local)
865-
call update_tracers_after_ALE(CS, G, GV, US, u, v, h, CS%tv)
864+
call ALE_regridding_and_remapping(CS, G, GV, US, u, v, h, CS%tv, dtdia, Time_local)
865+
call post_diabatic_halo_updates(CS, G, GV, US, u, v, h, CS%tv)
866866
CS%time_in_thermo_cycle = CS%time_in_thermo_cycle + dtdia
867867

868868
! The diabatic processes are now ahead of the dynamics by dtdia.
@@ -967,8 +967,8 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
967967
call step_MOM_thermo(CS, G, GV, US, u, v, h, CS%tv, fluxes, dtdia, &
968968
Time_local, .false., Waves=Waves)
969969
if ( CS%use_ALE_algorithm ) &
970-
call ALE_gridgen_and_remapping(CS, G, GV, US, u, v, h, CS%tv, dtdia, Time_local)
971-
call update_tracers_after_ALE(CS, G, GV, US, u, v, h, CS%tv)
970+
call ALE_regridding_and_remapping(CS, G, GV, US, u, v, h, CS%tv, dtdia, Time_local)
971+
call post_diabatic_halo_updates(CS, G, GV, US, u, v, h, CS%tv)
972972
CS%time_in_thermo_cycle = CS%time_in_thermo_cycle + dtdia
973973

974974
if ((CS%t_dyn_rel_thermo==0.0) .and. .not.do_dyn) then
@@ -1519,7 +1519,7 @@ subroutine step_MOM_tracer_dyn(CS, G, GV, US, h, Time_local)
15191519
end subroutine step_MOM_tracer_dyn
15201520

15211521
!> MOM_step_thermo orchestrates the thermodynamic time stepping and vertical
1522-
!! remapping, via calls to diabatic (or adiabatic) and ALE_regrid.
1522+
!! remapping, via calls to diabatic (or adiabatic).
15231523
subroutine step_MOM_thermo(CS, G, GV, US, u, v, h, tv, fluxes, dtdia, &
15241524
Time_end_thermo, update_BBL, Waves)
15251525
type(MOM_control_struct), intent(inout) :: CS !< Master MOM control structure
@@ -1667,7 +1667,9 @@ subroutine step_MOM_thermo(CS, G, GV, US, u, v, h, tv, fluxes, dtdia, &
16671667

16681668
end subroutine step_MOM_thermo
16691669

1670-
subroutine ALE_gridgen_and_remapping(CS, G, GV, US, u, v, h, tv, dtdia, Time_end_thermo)
1670+
!> ALE_regridding_and_remapping does regridding (the generation of a new grid) and remapping
1671+
! (from the old grid to the new grid). This is done after the themrodynamic step.
1672+
subroutine ALE_regridding_and_remapping(CS, G, GV, US, u, v, h, tv, dtdia, Time_end_thermo)
16711673
type(MOM_control_struct), intent(inout) :: CS !< Master MOM control structure
16721674
type(ocean_grid_type), intent(inout) :: G !< ocean grid structure
16731675
type(verticalGrid_type), intent(inout) :: GV !< ocean vertical grid structure
@@ -1704,7 +1706,7 @@ subroutine ALE_gridgen_and_remapping(CS, G, GV, US, u, v, h, tv, dtdia, Time_end
17041706

17051707
is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec ; nz = GV%ke
17061708
showCallTree = callTree_showQuery()
1707-
if (showCallTree) call callTree_enter("ALE_gridgen_and_remapping(), MOM.F90")
1709+
if (showCallTree) call callTree_enter("ALE_regridding_and_remapping(), MOM.F90")
17081710
if (CS%debug) call query_debugging_checks(do_redundant=debug_redundant)
17091711

17101712
call cpu_clock_begin(id_clock_remap)
@@ -1793,12 +1795,16 @@ subroutine ALE_gridgen_and_remapping(CS, G, GV, US, u, v, h, tv, dtdia, Time_end
17931795
h(i,j,k) = h_new(i,j,k)
17941796
enddo ; enddo ; enddo
17951797

1798+
if (showCallTree) call callTree_waypoint("finished ALE_regrid (ALE_regridding_and_remapping)")
1799+
call cpu_clock_end(id_clock_ALE)
1800+
1801+
! Whenever thickness changes let the diag manager know, target grids
1802+
! for vertical remapping may need to be regenerated. This needs to
1803+
! happen after the H update and before the next post_data.
17961804
call diag_update_remap_grids(CS%diag)
1805+
17971806
call postALE_tracer_diagnostics(CS%tracer_Reg, G, GV, CS%diag, dtdia)
17981807

1799-
if (showCallTree) call callTree_waypoint("finished ALE_regrid (step_MOM_thermo)")
1800-
call cpu_clock_end(id_clock_ALE)
1801-
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18021808
if (CS%debug .and. CS%use_ALE_algorithm) then
18031809
call MOM_state_chksum("Post-ALE ", u, v, h, CS%uh, CS%vh, G, GV, US)
18041810
call hchksum(tv%T, "Post-ALE T", G%HI, haloshift=1, unscale=US%C_to_degC)
@@ -1827,11 +1833,14 @@ subroutine ALE_gridgen_and_remapping(CS, G, GV, US, u, v, h, tv, dtdia, Time_end
18271833

18281834
call cpu_clock_end(id_clock_remap)
18291835

1830-
if (showCallTree) call callTree_leave("ALE_gridgen_and_remapping(), MOM.F90")
1836+
if (showCallTree) call callTree_leave("ALE_regridding_and_remapping(), MOM.F90")
18311837

1832-
end subroutine ALE_gridgen_and_remapping
1838+
end subroutine ALE_regridding_and_remapping
18331839

1834-
subroutine update_tracers_after_ALE(CS, G, GV, US, u, v, h, tv)
1840+
!> post_diabatic_halo_updates does halo updates and calculates derived thermodynamic quantities
1841+
! (e.g. specific volume). This must be done after the diabatic step regardless of is ALE
1842+
! cooridinates are used or not.
1843+
subroutine post_diabatic_halo_updates(CS, G, GV, US, u, v, h, tv)
18351844
type(MOM_control_struct), intent(inout) :: CS !< Master MOM control structure
18361845
type(ocean_grid_type), intent(inout) :: G !< ocean grid structure
18371846
type(verticalGrid_type), intent(inout) :: GV !< ocean vertical grid structure
@@ -1873,7 +1882,7 @@ subroutine update_tracers_after_ALE(CS, G, GV, US, u, v, h, tv)
18731882
if (allocated(tv%SpV_avg)) then
18741883
call calc_derived_thermo(tv, h, G, GV, US, halo=dynamics_stencil, debug=CS%debug)
18751884
endif
1876-
end subroutine update_tracers_after_ALE
1885+
end subroutine post_diabatic_halo_updates
18771886

18781887
!> step_offline is the main driver for running tracers offline in MOM6. This has been primarily
18791888
!! developed with ALE configurations in mind. Some work has been done in isopycnal configuration, but

0 commit comments

Comments
 (0)