Skip to content

Commit

Permalink
change allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
iangrooms committed May 24, 2024
1 parent eaee2f3 commit ddeb138
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/parameterizations/stochastic/MOM_stochastics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,10 @@ module MOM_stochastics
type(diag_ctrl), pointer :: diag=>NULL() !< A structure that is used to regulate the

! Taper array to smoothly zero out the SKEBS velocity increment near land
real ALLOCABLE_, dimension(NIMEMB_PTR_,NJMEM_) :: taperCu !< Taper applied to u component of
!! stochastic velocity increment
!! range [0,1], [nondim]
real ALLOCABLE_, dimension(NIMEM_,NJMEMB_PTR_) :: taperCv !< Taper applied to v component of
!! stochastic velocity increment
!! range [0,1], [nondim]
real, allocatable :: taperCu(:,:) !< Taper applied to u component of stochastic velocity increment
!! range [0,1], [nondim]
real, allocatable :: taperCv(:,:) !< Taper applied to v component of stochastic velocity increment
!! range [0,1], [nondim]

end type stochastic_CS

Expand Down Expand Up @@ -180,8 +178,8 @@ subroutine stochastics_init(dt, grid, GV, CS, param_file, diag, Time)
! Initialize the "taper" fields. These fields multiply the components of the stochastic
! velocity increment in such a way as to smoothly taper them to zero at land boundaries.
if (CS%do_skeb) then
ALLOC_(CS%taperCu(grid%isdB:grid%iedB,grid%jsd:grid%jed))
ALLOC_(CS%taperCv(grid%isd:grid%ied,grid%jsdB:grid%jedB))
allocate(CS%taperCu(grid%isdB:grid%iedB,grid%jsd:grid%jed))
allocate(CS%taperCv(grid%isd:grid%ied,grid%jsdB:grid%jedB))
! Initialize taper from land mask
do j=grid%jsd,grid%jed ; do I=grid%isdB,grid%iedB
CS%taperCu(I,j) = grid%mask2dCu(I,j)
Expand Down

0 comments on commit ddeb138

Please sign in to comment.