Skip to content

Commit a018a00

Browse files
committed
changes to RAS tendency application update code from code review
1 parent 55e658d commit a018a00

1 file changed

Lines changed: 2 additions & 44 deletions

File tree

physics/CONV/RAS/rascnv.F90

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -613,20 +613,15 @@ subroutine rascnv_run(IM, k, itc, ntc, ntr, dt, dtf &
613613
ll = kp1 -l
614614
tem = ccin(ipt,ll,1) &
615615
& * MAX(ZERO, MIN(ONE, (TCR-toi(L))*TCRF))
616-
!##### GJF - change to something else
617616
qli_l(ll) = ccin(ipt,ll,1) - tem
618617
qii_l(ll) = tem
619-
!ccin(ipt,ll,2) = ccin(ipt,ll,1) - tem
620-
!ccin(ipt,ll,1) = tem
621618
enddo
622619
endif
623620
if (advcld) then
624621
do l=1,k
625622
ll = kp1 -l ! Input variables are bottom to top!
626623
QII(L) = qii_l(ll)
627624
QLI(L) = qli_l(ll)
628-
!QII(L) = ccin(ipt,ll,1)
629-
!QLI(L) = ccin(ipt,ll,2)
630625
enddo
631626
endif
632627
KBL = MAX(MIN(k, kp1-KPBL(ipt)), k/2)
@@ -665,19 +660,14 @@ subroutine rascnv_run(IM, k, itc, ntc, ntr, dt, dtf &
665660
do l=1,k
666661
tem = ccin(ipt,l,1) &
667662
& * MAX(ZERO, MIN(ONE, (TCR-toi(L))*TCRF))
668-
!##### GJF - change to something else
669663
qli_l(l) = ccin(ipt,l,1) - tem
670664
qii_l(l) = tem
671-
!ccin(ipt,l,2) = ccin(ipt,l,1) - tem
672-
!ccin(ipt,l,1) = tem
673665
enddo
674666
endif
675667
if (advcld) then
676668
do l=1,k
677669
qii(l) = qii_l(l)
678670
qli(l) = qli_l(l)
679-
!QII(L) = ccin(ipt,l,1)
680-
!QLI(L) = ccin(ipt,l,2)
681671
enddo
682672
endif
683673
!
@@ -988,24 +978,16 @@ subroutine rascnv_run(IM, k, itc, ntc, ntr, dt, dtf &
988978
if (flipv) then
989979
do l=1,k
990980
ll = kp1 - l
991-
!##### GJF - change to tendencies
992981
ten_t(ipt,ll) = (toi(l) - tin(ipt,ll))/dt
993982
ten_q(ipt,ll,1) = (qoi(l) - qin(ipt,ll))/dt
994983
ten_u(ipt,ll) = (uvi(l,ntr+1) - uin(ipt,ll))/dt
995-
ten_v(ipt,ll) = (uvi(l,ntr+1) - vin(ipt,ll))/dt
996-
!tin(ipt,ll) = toi(l) ! Temperature
997-
!qin(ipt,ll) = qoi(l) ! Specific humidity
998-
!uin(ipt,ll) = uvi(l,ntr+1) ! U momentum
999-
!vin(ipt,ll) = uvi(l,ntr+2) ! V momentum
984+
ten_v(ipt,ll) = (uvi(l,ntr+2) - vin(ipt,ll))/dt
1000985

1001986
!! for 2M microphysics, always output these variables
1002987
if (mp_phys == mp_phys_mg) then
1003988
if (advcld) then
1004-
!##### GJF - adjust to match ccin changes above
1005989
QLCN(ipt,ll) = max(qli(l)-qli_l(ll), zero)
1006990
QICN(ipt,ll) = max(qii(l)-qii_l(ll), zero)
1007-
!QLCN(ipt,ll) = max(qli(l)-ccin(ipt,ll,2), zero)
1008-
!QICN(ipt,ll) = max(qii(l)-ccin(ipt,ll,1), zero)
1009991
CNV_FICE(ipt,ll) = QICN(ipt,ll) &
1010992
& / max(1.0e-10_kp,QLCN(ipt,ll)+QICN(ipt,ll))
1011993
else
@@ -1022,30 +1004,22 @@ subroutine rascnv_run(IM, k, itc, ntc, ntr, dt, dtf &
10221004
endif
10231005

10241006
if (ntr > 0) then
1025-
!##### GJF - change to tendencies
10261007
do n=1,ntr
1027-
ten_cc(ipt,ll,n+2) = (uvi(l,n) - ccin(ipt,ll,n+2))
1028-
!ccin(ipt,ll,n+2) = uvi(l,n) ! Tracers
1008+
ten_cc(ipt,ll,n+2) = (uvi(l,n) - ccin(ipt,ll,n+2))/dt
10291009
enddo
10301010
endif
10311011
enddo
10321012
if (advcld) then
10331013
do l=1,k
10341014
ll = kp1 - l
1035-
!##### GJF - change to tendencies
10361015
ten_cc(ipt,ll,1) = (qii(l) - ccin(ipt,ll,1))/dt
10371016
ten_cc(ipt,ll,2) = (qli(l) - ccin(ipt,ll,2))/dt
1038-
!ccin(ipt,ll,1) = qii(l) ! Cloud ice
1039-
!ccin(ipt,ll,2) = qli(l) ! Cloud water
10401017
enddo
10411018
else
10421019
do l=1,k
10431020
ll = kp1 - l
1044-
!##### GJF - change to tendencies
10451021
ten_cc(ipt,ll,1) = cli(l)/dt
10461022
ten_cc(ipt,ll,2) = clw(l)/dt
1047-
!ccin(ipt,ll,1) = ccin(ipt,ll,1) + cli(l)
1048-
!ccin(ipt,ll,2) = ccin(ipt,ll,2) + clw(l)
10491023
enddo
10501024
endif
10511025
!
@@ -1055,24 +1029,16 @@ subroutine rascnv_run(IM, k, itc, ntc, ntr, dt, dtf &
10551029
else
10561030

10571031
do l=1,k
1058-
!##### GJF - change to tendencies
10591032
ten_t(ipt,l) = (toi(l) - tin(ipt,l))/dt
10601033
ten_q(ipt,l,1) = (qoi(l) - qin(ipt,l))/dt
10611034
ten_u(ipt,l) = (uvi(l,ntr+1) - uin(ipt,l))/dt
10621035
ten_v(ipt,l) = (uvi(l,ntr+2) - vin(ipt,l))/dt
1063-
!tin(ipt,l) = toi(l) ! Temperature
1064-
!qin(ipt,l) = qoi(l) ! Specific humidity
1065-
!uin(ipt,l) = uvi(l,ntr+1) ! U momentum
1066-
!vin(ipt,l) = uvi(l,ntr+2) ! V momentum
10671036

10681037
!! for 2M microphysics, always output these variables
10691038
if (mp_phys == mp_phys_mg) then
10701039
if (advcld) then
1071-
!##### GJF - change to match change to ccin above
10721040
QLCN(ipt,l) = max(qli(l)-qli_l(l), zero)
10731041
QICN(ipt,l) = max(qii(l)-qii_l(l), zero)
1074-
!QLCN(ipt,l) = max(qli(l)-ccin(ipt,l,2), zero)
1075-
!QICN(ipt,l) = max(qii(l)-ccin(ipt,l,1), zero)
10761042
CNV_FICE(ipt,l) = QICN(ipt,l) &
10771043
& / max(1.0e-10_kp,QLCN(ipt,l)+QICN(ipt,l))
10781044
else
@@ -1092,28 +1058,20 @@ subroutine rascnv_run(IM, k, itc, ntc, ntr, dt, dtf &
10921058
endif
10931059

10941060
if (ntr > 0) then
1095-
!##### GJF - change to tendencies
10961061
do n=1,ntr
10971062
ten_cc(ipt,l,n+2) = (uvi(l,n) - ccin(ipt,l,n+2))/dt
1098-
!ccin(ipt,l,n+2) = uvi(l,n) ! Tracers
10991063
enddo
11001064
endif
11011065
enddo
11021066
if (advcld) then
1103-
!##### GJF - change to tendencies
11041067
do l=1,k
11051068
ten_cc(ipt,l,1) = (qii(l) - ccin(ipt,l,1))/dt
11061069
ten_cc(ipt,l,2) = (qli(l) - ccin(ipt,l,2))/dt
1107-
!ccin(ipt,l,1) = qii(l) ! Cloud ice
1108-
!ccin(ipt,l,2) = qli(l) ! Cloud water
11091070
enddo
11101071
else
1111-
!##### GJF - change to tendencies
11121072
do l=1,k
11131073
ten_cc(ipt,l,1) = cli(l)/dt
11141074
ten_cc(ipt,l,2) = clw(l)/dt
1115-
!ccin(ipt,l,1) = ccin(ipt,l,1) + cli(l)
1116-
!ccin(ipt,l,2) = ccin(ipt,l,2) + clw(l)
11171075
enddo
11181076
endif
11191077
endif

0 commit comments

Comments
 (0)