Skip to content

Commit 1e02fc8

Browse files
Merge pull request #2 from grantfirl/feature/stoch_spp_gjf
edit module_mp_thompson.F90 to remove optional keyword for rand_pert …
2 parents def0e78 + 372febe commit 1e02fc8

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

physics/module_mp_thompson.F90

+4-10
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
10261026
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(INOUT):: &
10271027
re_cloud, re_ice, re_snow
10281028
INTEGER, INTENT(IN) :: rand_perturb_on, kme_stoch
1029-
REAL, DIMENSION(ims:ime,kms:kme_stoch,jms:jme), INTENT(IN), OPTIONAL:: &
1029+
REAL, DIMENSION(:,:), INTENT(IN) :: &
10301030
rand_pert
10311031

10321032
INTEGER, INTENT(IN):: has_reqc, has_reqi, has_reqs
@@ -1123,12 +1123,6 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
11231123
! No need to test for every subcycling step
11241124
test_only_once: if (first_time_step .and. istep==1) then
11251125
! Activate this code when removing the guard above
1126-
if (rand_perturb_on .ne. 0 .and. .not. present(rand_pert)) then
1127-
errmsg = 'Logic error in mp_gt_driver: random perturbations are on, ' // &
1128-
'but optional argument rand_pert is not present'
1129-
errflg = 1
1130-
return
1131-
end if
11321126

11331127
if ( (present(tt) .and. (present(th) .or. present(pii))) .or. &
11341128
(.not.present(tt) .and. .not.(present(th) .and. present(pii))) ) then
@@ -1294,11 +1288,11 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
12941288
rand2 = 0.0
12951289
rand3 = 0.0
12961290
if (rand_perturb_on .ne. 0) then
1297-
if (MOD(rand_perturb_on,2) .ne. 0) rand1 = rand_pert(i,1,j)
1291+
if (MOD(rand_perturb_on,2) .ne. 0) rand1 = rand_pert(i,1)
12981292
m = RSHIFT(ABS(rand_perturb_on),1)
1299-
if (MOD(m,2) .ne. 0) rand2 = rand_pert(i,1,j)*2.
1293+
if (MOD(m,2) .ne. 0) rand2 = rand_pert(i,1)*2.
13001294
m = RSHIFT(ABS(rand_perturb_on),2)
1301-
if (MOD(m,2) .ne. 0) rand3 = 0.25*(rand_pert(i,1,j)+ABS(min_rand))
1295+
if (MOD(m,2) .ne. 0) rand3 = 0.25*(rand_pert(i,1)+ABS(min_rand))
13021296
m = RSHIFT(ABS(rand_perturb_on),3)
13031297
endif
13041298
!+---+-----------------------------------------------------------------+

0 commit comments

Comments
 (0)