@@ -428,7 +428,8 @@ end subroutine ocean_model_init
428
428
! ! storing the new ocean properties in Ocean_state.
429
429
subroutine update_ocean_model (Ice_ocean_boundary , OS , Ocean_sfc , time_start_update , &
430
430
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 )
432
433
type (ice_ocean_boundary_type), &
433
434
intent (in ) :: Ice_ocean_boundary ! < A structure containing the various
434
435
! ! 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
456
457
! ! treated as the last call to step_MOM in a
457
458
! ! time-stepping cycle; missing is like true.
458
459
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.
460
462
! Local variables
461
463
type (time_type) :: Time_seg_start ! Stores the dynamic or thermodynamic ocean model time at the
462
464
! 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
480
482
logical :: do_dyn ! If true, step the ocean dynamics and transport.
481
483
logical :: do_thermo ! If true, step the ocean thermodynamics.
482
484
logical :: step_thermo ! If true, take a thermodynamic step.
485
+ integer :: stage ! The stage of do_stage
483
486
integer :: is, ie, js, je
484
487
485
488
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
507
510
if (do_dyn .and. do_thermo .and. (OS% Time /= OS% Time_dyn)) call MOM_error(FATAL, &
508
511
" update_ocean_model called to update both dynamics and thermodynamics with inconsistent clocks." )
509
512
513
+ stage = 0 ; if (present (do_stage)) stage = do_stage
514
+
510
515
! This is benign but not necessary if ocean_model_init_sfc was called or if
511
516
! OS%sfc_state%tr_fields was spawned in ocean_model_init. Consider removing it.
512
517
is = OS% grid% isc ; ie = OS% grid% iec ; js = OS% grid% jsc ; je = OS% grid% jec
0 commit comments