Skip to content

Commit 1b76e35

Browse files
Theresa MorrisonHallberg-NOAA
authored andcommitted
Update Names of routines
1 parent 9294420 commit 1b76e35

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
@@ -882,8 +882,8 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
882882
call step_MOM_thermo(CS, G, GV, US, u, v, h, CS%tv, fluxes, dtdia, &
883883
end_time_thermo, .true., Waves=Waves)
884884
if ( CS%use_ALE_algorithm ) &
885-
call ALE_gridgen_and_remapping(CS, G, GV, US, u, v, h, CS%tv, dtdia, Time_local)
886-
call update_tracers_after_ALE(CS, G, GV, US, u, v, h, CS%tv)
885+
call ALE_regridding_and_remapping(CS, G, GV, US, u, v, h, CS%tv, dtdia, Time_local)
886+
call post_diabatic_halo_updates(CS, G, GV, US, u, v, h, CS%tv)
887887
CS%time_in_thermo_cycle = CS%time_in_thermo_cycle + dtdia
888888

889889
! The diabatic processes are now ahead of the dynamics by dtdia.
@@ -997,8 +997,8 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
997997
call step_MOM_thermo(CS, G, GV, US, u, v, h, CS%tv, fluxes, dtdia, &
998998
Time_local, .false., Waves=Waves)
999999
if ( CS%use_ALE_algorithm ) &
1000-
call ALE_gridgen_and_remapping(CS, G, GV, US, u, v, h, CS%tv, dtdia, Time_local)
1001-
call update_tracers_after_ALE(CS, G, GV, US, u, v, h, CS%tv)
1000+
call ALE_regridding_and_remapping(CS, G, GV, US, u, v, h, CS%tv, dtdia, Time_local)
1001+
call post_diabatic_halo_updates(CS, G, GV, US, u, v, h, CS%tv)
10021002
CS%time_in_thermo_cycle = CS%time_in_thermo_cycle + dtdia
10031003

10041004
if ((CS%t_dyn_rel_thermo==0.0) .and. .not.do_dyn) then
@@ -1563,7 +1563,7 @@ subroutine step_MOM_tracer_dyn(CS, G, GV, US, h, Time_local)
15631563
end subroutine step_MOM_tracer_dyn
15641564

15651565
!> MOM_step_thermo orchestrates the thermodynamic time stepping and vertical
1566-
!! remapping, via calls to diabatic (or adiabatic) and ALE_regrid.
1566+
!! remapping, via calls to diabatic (or adiabatic).
15671567
subroutine step_MOM_thermo(CS, G, GV, US, u, v, h, tv, fluxes, dtdia, &
15681568
Time_end_thermo, update_BBL, Waves)
15691569
type(MOM_control_struct), intent(inout) :: CS !< Master MOM control structure
@@ -1711,7 +1711,9 @@ subroutine step_MOM_thermo(CS, G, GV, US, u, v, h, tv, fluxes, dtdia, &
17111711

17121712
end subroutine step_MOM_thermo
17131713

1714-
subroutine ALE_gridgen_and_remapping(CS, G, GV, US, u, v, h, tv, dtdia, Time_end_thermo)
1714+
!> ALE_regridding_and_remapping does regridding (the generation of a new grid) and remapping
1715+
! (from the old grid to the new grid). This is done after the themrodynamic step.
1716+
subroutine ALE_regridding_and_remapping(CS, G, GV, US, u, v, h, tv, dtdia, Time_end_thermo)
17151717
type(MOM_control_struct), intent(inout) :: CS !< Master MOM control structure
17161718
type(ocean_grid_type), intent(inout) :: G !< ocean grid structure
17171719
type(verticalGrid_type), intent(inout) :: GV !< ocean vertical grid structure
@@ -1748,7 +1750,7 @@ subroutine ALE_gridgen_and_remapping(CS, G, GV, US, u, v, h, tv, dtdia, Time_end
17481750

17491751
is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec ; nz = GV%ke
17501752
showCallTree = callTree_showQuery()
1751-
if (showCallTree) call callTree_enter("ALE_gridgen_and_remapping(), MOM.F90")
1753+
if (showCallTree) call callTree_enter("ALE_regridding_and_remapping(), MOM.F90")
17521754
if (CS%debug) call query_debugging_checks(do_redundant=debug_redundant)
17531755

17541756
call cpu_clock_begin(id_clock_remap)
@@ -1837,12 +1839,16 @@ subroutine ALE_gridgen_and_remapping(CS, G, GV, US, u, v, h, tv, dtdia, Time_end
18371839
h(i,j,k) = h_new(i,j,k)
18381840
enddo ; enddo ; enddo
18391841

1842+
if (showCallTree) call callTree_waypoint("finished ALE_regrid (ALE_regridding_and_remapping)")
1843+
call cpu_clock_end(id_clock_ALE)
1844+
1845+
! Whenever thickness changes let the diag manager know, target grids
1846+
! for vertical remapping may need to be regenerated. This needs to
1847+
! happen after the H update and before the next post_data.
18401848
call diag_update_remap_grids(CS%diag)
1849+
18411850
call postALE_tracer_diagnostics(CS%tracer_Reg, G, GV, CS%diag, dtdia)
18421851

1843-
if (showCallTree) call callTree_waypoint("finished ALE_regrid (step_MOM_thermo)")
1844-
call cpu_clock_end(id_clock_ALE)
1845-
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18461852
if (CS%debug .and. CS%use_ALE_algorithm) then
18471853
call MOM_state_chksum("Post-ALE ", u, v, h, CS%uh, CS%vh, G, GV, US)
18481854
call hchksum(tv%T, "Post-ALE T", G%HI, haloshift=1, unscale=US%C_to_degC)
@@ -1871,11 +1877,14 @@ subroutine ALE_gridgen_and_remapping(CS, G, GV, US, u, v, h, tv, dtdia, Time_end
18711877

18721878
call cpu_clock_end(id_clock_remap)
18731879

1874-
if (showCallTree) call callTree_leave("ALE_gridgen_and_remapping(), MOM.F90")
1880+
if (showCallTree) call callTree_leave("ALE_regridding_and_remapping(), MOM.F90")
18751881

1876-
end subroutine ALE_gridgen_and_remapping
1882+
end subroutine ALE_regridding_and_remapping
18771883

1878-
subroutine update_tracers_after_ALE(CS, G, GV, US, u, v, h, tv)
1884+
!> post_diabatic_halo_updates does halo updates and calculates derived thermodynamic quantities
1885+
! (e.g. specific volume). This must be done after the diabatic step regardless of is ALE
1886+
! cooridinates are used or not.
1887+
subroutine post_diabatic_halo_updates(CS, G, GV, US, u, v, h, tv)
18791888
type(MOM_control_struct), intent(inout) :: CS !< Master MOM control structure
18801889
type(ocean_grid_type), intent(inout) :: G !< ocean grid structure
18811890
type(verticalGrid_type), intent(inout) :: GV !< ocean vertical grid structure
@@ -1917,7 +1926,7 @@ subroutine update_tracers_after_ALE(CS, G, GV, US, u, v, h, tv)
19171926
if (allocated(tv%SpV_avg)) then
19181927
call calc_derived_thermo(tv, h, G, GV, US, halo=dynamics_stencil, debug=CS%debug)
19191928
endif
1920-
end subroutine update_tracers_after_ALE
1929+
end subroutine post_diabatic_halo_updates
19211930

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

0 commit comments

Comments
 (0)