Skip to content

Commit 1d7ffa3

Browse files
committed
clean up code
1 parent 2cba995 commit 1d7ffa3

4 files changed

Lines changed: 6 additions & 35 deletions

File tree

src/core/MOM.F90

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,6 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
911911
call enable_averages(CS%time_in_thermo_cycle, Time_local, CS%diag)
912912
call post_surface_thermo_diags(CS%sfc_IDs, G, GV, US, CS%diag, CS%time_in_thermo_cycle, &
913913
sfc_state_diag, CS%tv, ssh, CS%ave_ssh_ibc)
914-
!sfc_state_diag, CS%tv, ssh,fluxes%t_rp,fluxes%sppt_wts, CS%ave_ssh_ibc)
915914
endif
916915
call disable_averaging(CS%diag)
917916
call cpu_clock_end(id_clock_diagnostics)
@@ -1699,9 +1698,9 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
16991698
integer :: dynamics_stencil ! The computational stencil for the calculations
17001699
! in the dynamic core.
17011700
integer,allocatable :: pelist(:) ! list of pes for this instance of the ocean
1702-
integer :: mom_comm ! list of pes for this instance of the ocean
1703-
integer :: num_procs,iret
1704-
! model
1701+
integer :: mom_comm ! list of pes for this instance of the ocean
1702+
integer :: num_procs ! number of processors to pass to stochastic physics
1703+
integer :: iret ! return code from stochastic physics
17051704
integer :: me ! my pe
17061705
integer :: master ! root pe
17071706
real :: conv2watt, conv2salt

src/core/MOM_forcing_type.F90

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ module MOM_forcing_type
141141
!< Pressure at the top ocean interface [R L2 T-2 ~> Pa] that is used in corrections to the sea surface
142142
!! height field that is passed back to the calling routines.
143143
!! p_surf_SSH may point to p_surf or to p_surf_full.
144-
! real, pointer, dimension(:,:) :: t_rp => NULL()
145-
! !< random pattern at t-points
146-
! real, pointer, dimension(:,:) :: sppt_wts => NULL()
147-
! !< random pattern at t-points
148144
logical :: accumulate_p_surf = .false. !< If true, the surface pressure due to the atmosphere
149145
!! and various types of ice needs to be accumulated, and the
150146
!! surface pressure explicitly reset to zero at the driver level
@@ -242,10 +238,6 @@ module MOM_forcing_type
242238
!! u-points [L4 Z-1 T-1 ~> m3 s-1]
243239
rigidity_ice_v => NULL() !< Depth-integrated lateral viscosity of ice shelves or sea ice at
244240
!! v-points [L4 Z-1 T-1 ~> m3 s-1]
245-
! real, pointer, dimension(:,:) :: t_rp => NULL()
246-
! !< random pattern at t-points
247-
! real, pointer, dimension(:,:) :: sppt_wts => NULL()
248-
! !< random pattern at t-points
249241
real :: dt_force_accum = -1.0 !< The amount of time over which the mechanical forcing fluxes
250242
!! have been averaged [s].
251243
logical :: net_mass_src_set = .false. !< If true, an estimate of net_mass_src has been provided.
@@ -2086,18 +2078,6 @@ subroutine copy_common_forcing_fields(forces, fluxes, G, skip_pres)
20862078

20872079
do_pres = .true. ; if (present(skip_pres)) do_pres = .not.skip_pres
20882080

2089-
! if (associated(forces%t_rp) .and. associated(fluxes%t_rp)) then
2090-
! do j=js,je ; do i=is,ie
2091-
! fluxes%t_rp(i,j) = forces%t_rp(i,j)
2092-
! enddo ; enddo
2093-
! endif
2094-
!
2095-
! if (associated(forces%sppt_wts) .and. associated(fluxes%sppt_wts)) then
2096-
! do j=js,je ; do i=is,ie
2097-
! fluxes%sppt_wts(i,j) = forces%sppt_wts(i,j)
2098-
! enddo ; enddo
2099-
! endif
2100-
21012081
if (associated(forces%ustar) .and. associated(fluxes%ustar)) then
21022082
do j=js,je ; do i=is,ie
21032083
fluxes%ustar(i,j) = forces%ustar(i,j)
@@ -3041,8 +3021,6 @@ subroutine allocate_mech_forcing_by_group(G, forces, stress, ustar, shelf, &
30413021
call myAlloc(forces%p_surf,isd,ied,jsd,jed, press)
30423022
call myAlloc(forces%p_surf_full,isd,ied,jsd,jed, press)
30433023
call myAlloc(forces%net_mass_src,isd,ied,jsd,jed, press)
3044-
! call myAlloc(forces%t_rp,isd,ied,jsd,jed, press)
3045-
! call myAlloc(forces%sppt_wts,isd,ied,jsd,jed, press)
30463024

30473025
call myAlloc(forces%rigidity_ice_u,IsdB,IedB,jsd,jed, shelf)
30483026
call myAlloc(forces%rigidity_ice_v,isd,ied,JsdB,JedB, shelf)
@@ -3198,8 +3176,6 @@ subroutine deallocate_forcing_type(fluxes)
31983176
if (associated(fluxes%seaice_melt)) deallocate(fluxes%seaice_melt)
31993177
if (associated(fluxes%salt_flux)) deallocate(fluxes%salt_flux)
32003178
if (associated(fluxes%p_surf_full)) deallocate(fluxes%p_surf_full)
3201-
! if (associated(fluxes%t_rp)) deallocate(fluxes%t_rp)
3202-
! if (associated(fluxes%sppt_wts)) deallocate(fluxes%sppt_wts)
32033179
if (associated(fluxes%p_surf)) deallocate(fluxes%p_surf)
32043180
if (associated(fluxes%TKE_tidal)) deallocate(fluxes%TKE_tidal)
32053181
if (associated(fluxes%ustar_tidal)) deallocate(fluxes%ustar_tidal)
@@ -3224,8 +3200,6 @@ subroutine deallocate_mech_forcing(forces)
32243200
if (associated(forces%ustar)) deallocate(forces%ustar)
32253201
if (associated(forces%p_surf)) deallocate(forces%p_surf)
32263202
if (associated(forces%p_surf_full)) deallocate(forces%p_surf_full)
3227-
! if (associated(forces%t_rp)) deallocate(forces%t_rp)
3228-
! if (associated(forces%sppt_wts)) deallocate(forces%sppt_wts)
32293203
if (associated(forces%net_mass_src)) deallocate(forces%net_mass_src)
32303204
if (associated(forces%rigidity_ice_u)) deallocate(forces%rigidity_ice_u)
32313205
if (associated(forces%rigidity_ice_v)) deallocate(forces%rigidity_ice_v)

src/diagnostics/MOM_diagnostics.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ module MOM_diagnostics
177177
integer :: id_salt_deficit = -1
178178
integer :: id_Heat_PmE = -1
179179
integer :: id_intern_heat = -1
180-
!!@}
180+
!>@}
181181
end type surface_diag_IDs
182182

183183

src/parameterizations/vertical/MOM_energetic_PBL.F90

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,6 @@ subroutine energetic_PBL(h_3d, u_3d, v_3d, tv, fluxes, t_rp, stoch_epbl, dt, Kd_
465465
u_star, u_star_mean, dt, MLD_io, Kd, mixvel, mixlen, GV, &
466466
US, CS, eCD, t_rp(i,j,1),t_rp(i,j,2), stoch_epbl, dt_diag=dt_diag, Waves=Waves, G=G, i=i, j=j)
467467

468-
! applly stochastic perturbation to TKE generation
469-
470468
! Copy the diffusivities to a 2-d array.
471469
do K=1,nz+1
472470
Kd_2d(i,K) = Kd(K)
@@ -972,8 +970,8 @@ subroutine ePBL_column(h, u, v, T0, S0, dSV_dT, dSV_dS, TKE_forcing, B_flux, abs
972970
exp_kh = 1.0
973971
if (Idecay_len_TKE > 0.0) exp_kh = exp(-h(k-1)*Idecay_len_TKE)
974972
if (CS%TKE_diagnostics) &
975-
!eCD%dTKE_mech_decay = eCD%dTKE_mech_decay + (exp_kh-1.0) * mech_TKE * I_dtdiag
976-
eCD%dTKE_mech_decay = exp_kh
973+
eCD%dTKE_mech_decay = eCD%dTKE_mech_decay + (exp_kh-1.0) * mech_TKE * I_dtdiag
974+
mech_TKE = mech_TKE * exp_kh
977975
if (stoch_epbl) mech_TKE = mech_TKE * (1+(exp_kh-1) * t_rp2)
978976

979977
! Accumulate any convectively released potential energy to contribute

0 commit comments

Comments
 (0)