Skip to content

Commit 8449071

Browse files
Theresa MorrisonTheresa Morrison
Theresa Morrison
authored and
Theresa Morrison
committed
Committer: Theresa Morrison <Theresa.Morrison@gaea10.ncrc.gov>
On branch refactor_BTS Changes to be committed: modified: config_src/drivers/FMS_cap/ocean_model_MOM.F90 modified: src/core/MOM_barotropic.F90 modified: src/parameterizations/vertical/MOM_diabatic_driver.F90
1 parent b6444ee commit 8449071

File tree

3 files changed

+173
-112
lines changed

3 files changed

+173
-112
lines changed

config_src/drivers/FMS_cap/ocean_model_MOM.F90

+7-2
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,8 @@ end subroutine ocean_model_init
428428
!! storing the new ocean properties in Ocean_state.
429429
subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, time_start_update, &
430430
Ocean_coupling_time_step, update_dyn, update_thermo, &
431-
Ocn_fluxes_used, start_cycle, end_cycle, cycle_length)
431+
Ocn_fluxes_used, start_cycle, end_cycle, cycle_length, &
432+
do_stage)
432433
type(ice_ocean_boundary_type), &
433434
intent(in) :: Ice_ocean_boundary !< A structure containing the various
434435
!! forcing fields coming from the ice and atmosphere.
@@ -456,7 +457,8 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, time_start_upda
456457
!! treated as the last call to step_MOM in a
457458
!! time-stepping cycle; missing is like true.
458459
real, optional, intent(in) :: cycle_length !< The duration of a coupled time stepping cycle [s].
459-
460+
integer, optional, intent(in) :: do_stage !! integer for which part of the ocean model update
461+
!! to do. If 0 (zero) then do all the parts of the update.
460462
! Local variables
461463
type(time_type) :: Time_seg_start ! Stores the dynamic or thermodynamic ocean model time at the
462464
! start of this call to allow step_MOM to temporarily change the time
@@ -480,6 +482,7 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, time_start_upda
480482
logical :: do_dyn ! If true, step the ocean dynamics and transport.
481483
logical :: do_thermo ! If true, step the ocean thermodynamics.
482484
logical :: step_thermo ! If true, take a thermodynamic step.
485+
integer :: stage ! The stage of do_stage
483486
integer :: is, ie, js, je
484487

485488
call callTree_enter("update_ocean_model(), ocean_model_MOM.F90")
@@ -507,6 +510,8 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, time_start_upda
507510
if (do_dyn .and. do_thermo .and. (OS%Time /= OS%Time_dyn)) call MOM_error(FATAL, &
508511
"update_ocean_model called to update both dynamics and thermodynamics with inconsistent clocks.")
509512

513+
stage = 0 ; if (present(do_stage)) stage = do_stage
514+
510515
! This is benign but not necessary if ocean_model_init_sfc was called or if
511516
! OS%sfc_state%tr_fields was spawned in ocean_model_init. Consider removing it.
512517
is = OS%grid%isc ; ie = OS%grid%iec ; js = OS%grid%jsc ; je = OS%grid%jec

0 commit comments

Comments
 (0)