diff --git a/config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90 b/config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90 index 095a8a0c48..ef1f25e401 100644 --- a/config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90 +++ b/config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90 @@ -179,7 +179,7 @@ module MOM_ocean_model_nuopc !! processes before time stepping the dynamics. logical :: do_sppt !< If true, stochastically perturb the diabatic and !! write restarts - logical :: pert_epbl !< If true, then randomly perturb the KE dissipation and + logical :: pert_epbl !< If true, then randomly perturb the KE dissipation and !! genration termsand write restarts real :: eps_omesh !< Max allowable difference between ESMF mesh and MOM6 diff --git a/config_src/external/stochastic_physics/stochastic_physics.F90 b/config_src/external/stochastic_physics/stochastic_physics.F90 index bc01760857..df62aa1591 100644 --- a/config_src/external/stochastic_physics/stochastic_physics.F90 +++ b/config_src/external/stochastic_physics/stochastic_physics.F90 @@ -16,12 +16,17 @@ module stochastic_physics subroutine init_stochastic_physics_ocn(delt,geoLonT,geoLatT,nx,ny,nz,pert_epbl_in,do_sppt_in, & mpiroot, mpicomm, iret) implicit none -real,intent(in) :: delt -integer,intent(in) :: nx,ny,nz -real,intent(in) :: geoLonT(nx,ny),geoLatT(nx,ny) -logical,intent(in) :: pert_epbl_in,do_sppt_in -integer,intent(in) :: mpiroot, mpicomm -integer, intent(out) :: iret +real,intent(in) :: delt !< timestep in seconds between calls to run_stochastic_physics_ocn +integer,intent(in) :: nx !< number of gridpoints in the x-direction of the compute grid +integer,intent(in) :: ny !< number of gridpoints in the y-direction of the compute grid +integer,intent(in) :: nz !< number of gridpoints in the z-direction of the compute grid +real,intent(in) :: geoLonT(nx,ny) !< Longitude in degrees +real,intent(in) :: geoLatT(nx,ny) !< Latitude in degrees +logical,intent(in) :: pert_epbl_in !< logical flag, if true generate random pattern for ePBL perturbations +logical,intent(in) :: do_sppt_in !< logical flag, if true generate random pattern for SPPT perturbations +integer,intent(in) :: mpiroot !< root processor +integer,intent(in) :: mpicomm !< mpi communicator +integer, intent(out) :: iret !< return code iret=0 if (pert_epbl_in .EQV. .true. ) then @@ -37,7 +42,11 @@ end subroutine init_stochastic_physics_ocn subroutine run_stochastic_physics_ocn(sppt_wts,t_rp1,t_rp2) implicit none -real, intent(inout) :: sppt_wts(:,:),t_rp1(:,:),t_rp2(:,:) +real, intent(inout) :: sppt_wts(:,:) !< array containing random weights for SPPT range [0,2] +real, intent(inout) :: t_rp1(:,:) !< array containing random weights for ePBL + !! perturbations (KE generation) range [0,2] +real, intent(inout) :: t_rp2(:,:) !< array containing random weights for ePBL + !! perturbations (KE dissipation) range [0,2] return end subroutine run_stochastic_physics_ocn @@ -52,7 +61,7 @@ module get_stochy_pattern_mod contains subroutine write_stoch_restart_ocn(sfile) -character(len=*) :: sfile +character(len=*) :: sfile !< name of restart file return end subroutine write_stoch_restart_ocn diff --git a/src/parameterizations/stochastic/MOM_stochastics.F90 b/src/parameterizations/stochastic/MOM_stochastics.F90 index 1dc650eabb..21a22a222e 100644 --- a/src/parameterizations/stochastic/MOM_stochastics.F90 +++ b/src/parameterizations/stochastic/MOM_stochastics.F90 @@ -59,7 +59,7 @@ subroutine stochastics_init(dt, grid, GV, CS, param_file, diag, Time) integer :: num_procs ! number of processors to pass to stochastic physics integer :: iret ! return code from stochastic physics integer :: me ! my pe - integer :: master ! root pe + integer :: pe_zero ! root pe integer :: nx ! number of x-points including halo integer :: ny ! number of x-points including halo @@ -95,11 +95,11 @@ subroutine stochastics_init(dt, grid, GV, CS, param_file, diag, Time) num_procs=num_PEs() allocate(pelist(num_procs)) call Get_PElist(pelist,commID = mom_comm) - master=root_PE() + pe_zero=root_PE() nx = grid%ied - grid%isd + 1 ny = grid%jed - grid%jsd + 1 call init_stochastic_physics_ocn(dt,grid%geoLonT,grid%geoLatT,nx,ny,GV%ke, & - CS%pert_epbl,CS%do_sppt,master,mom_comm,iret) + CS%pert_epbl,CS%do_sppt,pe_zero,mom_comm,iret) if (iret/=0) then call MOM_error(FATAL, "call to init_stochastic_physics_ocn failed") return