Skip to content

Commit 237a510

Browse files
committed
add comments
1 parent 1b4273d commit 237a510

4 files changed

Lines changed: 14 additions & 25 deletions

File tree

config_src/external/OCEAN_stochastic_phyiscs/MOM_stochastics.F90

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@ module MOM_stochastics
44
! This file is part of MOM6. See LICENSE.md for the license.
55

66
! This is the top level module for the MOM6 ocean model. It contains routines
7-
! for initialization, termination and update of ocean model state. This
7+
! for initialization, update, and writing restart of stochastic physics. This
88
! particular version wraps all of the calls for MOM6 in the calls that had
99
! been used for MOM4.
1010
!
11-
! This code is a stop-gap wrapper of the MOM6 code to enable it to be called
12-
! in the same way as MOM4.
13-
1411
use MOM_diag_mediator, only : register_diag_field, diag_ctrl, time_type
1512
use MOM_grid, only : ocean_grid_type
1613
use MOM_verticalGrid, only : verticalGrid_type
@@ -45,17 +42,9 @@ module MOM_stochastics
4542
type(time_type), pointer :: Time !< Pointer to model time (needed for sponges)
4643
end type stochastic_CS
4744

48-
!> This type is used for communication with other components via the FMS coupler.
49-
!! The element names and types can be changed only with great deliberation, hence
50-
!! the persistnce of things like the cutsy element name "avg_kount".
5145
contains
5246

53-
!> ocean_model_init initializes the ocean model, including registering fields
54-
!! for restarts and reading restart files if appropriate.
55-
!!
56-
!! This subroutine initializes both the ocean state and the ocean surface type.
57-
!! Because of the way that indicies and domains are handled, Ocean_sfc must have
58-
!! been used in a previous call to cean_type.
47+
!! This subroutine initializes the stochastics physics control structure.
5948
subroutine stochastics_init(dt, grid, GV, CS, param_file, diag, Time)
6049
real, intent(in) :: dt !< time step [T ~> s]
6150
type(ocean_grid_type), intent(in) :: grid ! horizontal grid information
@@ -135,6 +124,7 @@ subroutine stochastics_init(dt, grid, GV, CS, param_file, diag, Time)
135124
write(*,'(/12x,a/)') '=== COMPLETED MOM STOCHASTIC INITIALIZATION ====='
136125

137126
call callTree_leave("ocean_model_init(")
127+
return
138128
end subroutine stochastics_init
139129

140130
!> update_ocean_model uses the forcing in Ice_ocean_boundary to advance the

config_src/external/OCEAN_stochastic_phyiscs/MOM_stochastics_stub.F90

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ module MOM_stochastics
33

44
! This file is part of MOM6. See LICENSE.md for the license.
55

6-
! This is the top level module for the MOM6 ocean model. It contains routines
7-
! for initialization, termination and update of ocean model state. This
8-
! particular version wraps all of the calls for MOM6 in the calls that had
9-
! been used for MOM4.
10-
!
11-
! This code is a stop-gap wrapper of the MOM6 code to enable it to be called
12-
! in the same way as MOM4.
6+
! This is the top level module for the MOM6 ocean model. It contains
7+
! placeholder for initialization, update, and writing restarts of ocean stochastic physics.
8+
! The actualy stochastic physics is available at
9+
! https://github.com/ufs-community/ufs-weather-model
10+
!
1311

1412
use MOM_diag_mediator, only : register_diag_field, diag_ctrl, time_type
1513
use MOM_grid, only : ocean_grid_type
@@ -62,6 +60,9 @@ subroutine update_stochastics(CS)
6260
type(stochastic_CS), intent(inout) :: CS !< diabatic control structure
6361
return
6462
end subroutine update_stochastics
65-
63+
subroutine write_mom_restart_stoch(filename)
64+
character(len=*) :: filename
65+
return
66+
end subroutine write_mom_restart_stoch
6667
end module MOM_stochastics
6768

src/core/MOM.F90

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
630630
call disable_averaging(CS%diag)
631631
endif
632632
endif
633-
633+
! advance the random pattern if stochastic physics is active
634634
if (CS%stoch_CS%do_sppt .OR. CS%stoch_CS%pert_epbl) call update_stochastics(CS%stoch_CS)
635635

636636
if (do_dyn) then
@@ -2380,8 +2380,6 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
23802380

23812381
if (.not. CS%rotate_index) &
23822382
G => G_in
2383-
! initialize stochastic physics
2384-
!call stochastics_init(CS%dt_therm, CS%G, CS%GV, CS%stoch_CS, param_file, diag, Time)
23852383
! Set a few remaining fields that are specific to the ocean grid type.
23862384
call set_first_direction(G, first_direction)
23872385
! Allocate the auxiliary non-symmetric domain for debugging or I/O purposes.

src/parameterizations/vertical/MOM_diabatic_driver.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ subroutine diabatic(u, v, h, tv, Hml, fluxes, visc, ADp, CDp, dt, Time_end, &
305305

306306
if (G%ke == 1) return
307307

308-
! save copy of the date for SPPT
308+
! save copy of the date for SPPT if active
309309
if (stoch_CS%do_sppt) then
310310
allocate(h_in(G%isd:G%ied, G%jsd:G%jed,G%ke))
311311
allocate(t_in(G%isd:G%ied, G%jsd:G%jed,G%ke))

0 commit comments

Comments
 (0)