Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ocean stochastic physics #72

Merged
merged 50 commits into from
Sep 30, 2021
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
671c714
Merge pull request #1 from NOAA-EMC/dev/emc
pjpegion May 5, 2020
182ef34
additions for stochastic physics and ePBL perts
May 5, 2020
c2aa2a8
updates from dev/emc
May 5, 2020
3cad1ba
Merge pull request #8 from NOAA-EMC/dev/emc
pjpegion Oct 1, 2020
0a62737
Merge branch 'ocn_stoch' into dev/emc_merge
pjpegion Oct 1, 2020
9896d61
Merge pull request #9 from pjpegion/dev/emc_merge
pjpegion Oct 1, 2020
cd06356
Merge pull request #11 from NOAA-EMC/dev/emc
pjpegion Dec 2, 2020
7de295c
cleanup of code and enhancement of ePBL perts
pjpegion Dec 2, 2020
7212400
Update MOM_diabatic_driver.F90
pjpegion Dec 2, 2020
bd477a9
Update MOM_diabatic_driver.F90
pjpegion Dec 2, 2020
167a62e
Merge pull request #12 from pjpegion/dev/emc
pjpegion Dec 2, 2020
0c15f4c
Update MOM_diabatic_driver.F90
pjpegion Dec 2, 2020
a2a374b
add stochy_restart writing to mom_cap
pjpegion Dec 14, 2020
25ed5ef
additions for stochy restarts
pjpegion Dec 22, 2020
4bd9b9e
clean up debug statements
pjpegion Dec 23, 2020
1dc0f4f
Merge remote-tracking branch 'upstream/dev/emc' into dev/emc
pjpegion Dec 23, 2020
2cba995
Merge branch 'dev/emc' into ocn_stoch
pjpegion Dec 23, 2020
040e1f1
Merge pull request #13 from NOAA-EMC/dev/emc
pjpegion Jan 6, 2021
1d7ffa3
clean up code
pjpegion Jan 6, 2021
6bb9d0b
fix non stochastic ePBL calculation
pjpegion Jan 7, 2021
600ebf9
Merge remote-tracking branch 'upstream/dev/emc' into ocn_stoch
pjpegion Jan 22, 2021
1727d9a
re-write of stochastic code to remove CPP directives
pjpegion Jan 29, 2021
5443f8e
remove blank link in MOM_diagnostics
pjpegion Jan 29, 2021
80f9f44
clean up MOM_domains
pjpegion Jan 29, 2021
85023f8
Merge remote-tracking branch 'upstream/dev/emc' into ocn_stoch
pjpegion Feb 1, 2021
0b99c1f
make stochastics optional
pjpegion Feb 2, 2021
6e3ea1b
correct coupled_driver/ocean_model_MOM.F90 and other cleanup
pjpegion Feb 2, 2021
eb88219
clean up of code for MOM6 coding standards
pjpegion Feb 2, 2021
d984a7e
remove stochastics container
pjpegion Feb 4, 2021
b8d9888
place stochastic array in fluxes container and make SPPT specific arr…
pjpegion Feb 4, 2021
25ed4fc
revert MOM_domains.F90
pjpegion Feb 5, 2021
8afe969
clean up of mom_ocean_model_nuopc.F90
pjpegion Feb 5, 2021
689a73f
remove PE_here from mom_ocean_model_nuopc.F90
pjpegion Feb 5, 2021
a4c0411
Merge remote-tracking branch 'upstream/dev/emc' into ocn_stoch
pjpegion Feb 16, 2021
565e0bb
remove debug statements
pjpegion Feb 26, 2021
61717ee
Merge remote-tracking branch 'origin/dev/emc' into ocn_stoch
pjpegion Feb 26, 2021
202cbd4
update to dev/emc
pjpegion Jul 1, 2021
e4bc007
stochastic physics re-write
pjpegion Jul 26, 2021
a3fa3a1
Merge remote-tracking branch 'upstream/dev/emc' into ocn_stoch_july2021
pjpegion Jul 26, 2021
8bc4acc
move stochastics to external directory
pjpegion Jul 26, 2021
bdf2dc7
doxygen cleanup
pjpegion Jul 26, 2021
c5f2b72
add write_stoch_restart_ocn to MOM_stochastics
pjpegion Jul 26, 2021
5b2040e
add logic to remove incrments from restart if outside IAU window
pjpegion Jul 27, 2021
1b4273d
revert logic wrt increments
pjpegion Jul 28, 2021
237a510
add comments
pjpegion Jul 28, 2021
16e6af0
update to dev/emc
pjpegion Jul 28, 2021
a8577df
Merge branch 'NOAA-EMC:dev/emc' into ocn_stoch_july2021
pjpegion Aug 16, 2021
ca2ae1c
update to dev/emc
pjpegion Sep 21, 2021
56bb41e
Merge branch 'ocn_stoch_july2021' of https://github.com/pjpegion/MOM6…
pjpegion Sep 21, 2021
a9a957e
return a more accurate error message in MOM_stochasics
pjpegion Sep 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add comments
pjpegion committed Jul 28, 2021
commit 237a5109b474e9849d67c6f07595fb85b7fbaed7
16 changes: 3 additions & 13 deletions config_src/external/OCEAN_stochastic_phyiscs/MOM_stochastics.F90
Original file line number Diff line number Diff line change
@@ -4,13 +4,10 @@ module MOM_stochastics
! This file is part of MOM6. See LICENSE.md for the license.

! This is the top level module for the MOM6 ocean model. It contains routines
! for initialization, termination and update of ocean model state. This
! for initialization, update, and writing restart of stochastic physics. This
! particular version wraps all of the calls for MOM6 in the calls that had
! been used for MOM4.
!
! This code is a stop-gap wrapper of the MOM6 code to enable it to be called
! in the same way as MOM4.

use MOM_diag_mediator, only : register_diag_field, diag_ctrl, time_type
use MOM_grid, only : ocean_grid_type
use MOM_verticalGrid, only : verticalGrid_type
@@ -45,17 +42,9 @@ module MOM_stochastics
type(time_type), pointer :: Time !< Pointer to model time (needed for sponges)
end type stochastic_CS

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

!> ocean_model_init initializes the ocean model, including registering fields
!! for restarts and reading restart files if appropriate.
!!
!! This subroutine initializes both the ocean state and the ocean surface type.
!! Because of the way that indicies and domains are handled, Ocean_sfc must have
!! been used in a previous call to cean_type.
!! This subroutine initializes the stochastics physics control structure.
subroutine stochastics_init(dt, grid, GV, CS, param_file, diag, Time)
real, intent(in) :: dt !< time step [T ~> s]
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)
write(*,'(/12x,a/)') '=== COMPLETED MOM STOCHASTIC INITIALIZATION ====='

call callTree_leave("ocean_model_init(")
return
end subroutine stochastics_init

!> update_ocean_model uses the forcing in Ice_ocean_boundary to advance the
Original file line number Diff line number Diff line change
@@ -3,13 +3,11 @@ module MOM_stochastics

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

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

use MOM_diag_mediator, only : register_diag_field, diag_ctrl, time_type
use MOM_grid, only : ocean_grid_type
@@ -62,6 +60,9 @@ subroutine update_stochastics(CS)
type(stochastic_CS), intent(inout) :: CS !< diabatic control structure
return
end subroutine update_stochastics

subroutine write_mom_restart_stoch(filename)
character(len=*) :: filename
return
end subroutine write_mom_restart_stoch
end module MOM_stochastics

4 changes: 1 addition & 3 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
@@ -630,7 +630,7 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
call disable_averaging(CS%diag)
endif
endif

! advance the random pattern if stochastic physics is active
if (CS%stoch_CS%do_sppt .OR. CS%stoch_CS%pert_epbl) call update_stochastics(CS%stoch_CS)

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

if (.not. CS%rotate_index) &
G => G_in
! initialize stochastic physics
!call stochastics_init(CS%dt_therm, CS%G, CS%GV, CS%stoch_CS, param_file, diag, Time)
! Set a few remaining fields that are specific to the ocean grid type.
call set_first_direction(G, first_direction)
! Allocate the auxiliary non-symmetric domain for debugging or I/O purposes.
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_diabatic_driver.F90
Original file line number Diff line number Diff line change
@@ -305,7 +305,7 @@ subroutine diabatic(u, v, h, tv, Hml, fluxes, visc, ADp, CDp, dt, Time_end, &

if (G%ke == 1) return

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