Skip to content

Commit 30e3c23

Browse files
committed
add back tendency changes for main state variables in tiedtke
1 parent e9bc2bd commit 30e3c23

3 files changed

Lines changed: 66 additions & 66 deletions

File tree

physics/CONV/nTiedtke/cu_ntiedtke.F90

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ subroutine cu_ntiedtke_run(pu,pv,pt,pqv,ntqv,tdi,qvdi,pqvf,ptf,clw,poz,pzz,prsl,
211211

212212
!--- inout arguments:
213213
real(kind=kind_phys), dimension(:,:,:), intent(inout) :: clw
214-
real(kind=kind_phys), dimension(:,:), intent(inout) :: pu, pv, pt, pqv
214+
real(kind=kind_phys), dimension(:,:), intent(in) :: pu, pv, pt, pqv
215215

216216
!--- output arguments:
217217
real(kind=kind_phys), dimension(:), intent(out) :: zprecc
@@ -401,10 +401,10 @@ subroutine cu_ntiedtke_run(pu,pv,pt,pqv,ntqv,tdi,qvdi,pqvf,ptf,clw,poz,pzz,prsl,
401401
do k=1,km
402402
k1 = km-k+1
403403
do j=1,lq
404-
pt(j,k) = ztp1(j,k1)+(ptte(j,k1)-ztt(j,k1))*ztmst
405-
pqv(j,k) = zqp1(j,k1)+(pqte(j,k1)-zqq(j,k1))*ztmst
406-
!ten_t(j,k) = ptte(j,k1)-ztt(j,k1)
407-
!ten_q(j,k,ntqv) = pqte(j,k1)-zqq(j,k1)
404+
!pt(j,k) = ztp1(j,k1)+(ptte(j,k1)-ztt(j,k1))*ztmst
405+
!pqv(j,k) = zqp1(j,k1)+(pqte(j,k1)-zqq(j,k1))*ztmst
406+
ten_t(j,k) = ptte(j,k1)-ztt(j,k1)
407+
ten_q(j,k,ntqv) = pqte(j,k1)-zqq(j,k1)
408408
ud_mf(j,k)= zmfu(j,k1)*ztmst
409409
dd_mf(j,k)= -zmfd(j,k1)*ztmst
410410
dt_mf(j,k)= zmfude_rate(j,k1)*ztmst
@@ -431,10 +431,10 @@ subroutine cu_ntiedtke_run(pu,pv,pt,pqv,ntqv,tdi,qvdi,pqvf,ptf,clw,poz,pzz,prsl,
431431
do k=1,km
432432
k1=km-k+1
433433
do j=1,lq
434-
pu(j,k)=pu(j,k)+pvom(j,k1)*ztmst
435-
pv(j,k)=pv(j,k)+pvol(j,k1)*ztmst
436-
!ten_u(j,k) = pvom(j,k1)
437-
!ten_v(j,k) = pvol(j,k1)
434+
!pu(j,k)=pu(j,k)+pvom(j,k1)*ztmst
435+
!pv(j,k)=pv(j,k)+pvol(j,k1)*ztmst
436+
ten_u(j,k) = pvom(j,k1)
437+
ten_v(j,k) = pvol(j,k1)
438438
end do
439439
end do
440440
endif

physics/CONV/nTiedtke/cu_ntiedtke.meta

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,31 +76,31 @@
7676
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
7777
type = real
7878
kind = kind_phys
79-
intent = inout
79+
intent = in
8080
[pv]
8181
standard_name = y_wind
8282
long_name = updated y-direction wind
8383
units = m s-1
8484
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
8585
type = real
8686
kind = kind_phys
87-
intent = inout
87+
intent = in
8888
[pt]
8989
standard_name = air_temperature
9090
long_name = updated temperature
9191
units = K
9292
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
9393
type = real
9494
kind = kind_phys
95-
intent = inout
95+
intent = in
9696
[pqv]
9797
standard_name = specific_humidity
9898
long_name = water vapor specific humidity
9999
units = kg kg-1
100100
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
101101
type = real
102102
kind = kind_phys
103-
intent = inout
103+
intent = in
104104
[ntqv]
105105
standard_name = index_of_specific_humidity_in_tracer_concentration_array
106106
long_name = tracer index for water vapor (specific humidity)

physics/Interstitials/UFS_SCM_NEPTUNE/GFS_DCNV_generic_post.F90

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -97,59 +97,59 @@ subroutine GFS_DCNV_generic_post_run (im, levs, tracers_total, otsptflag, &
9797
! endif ! end if_ntcw
9898
!
9999
!
100-
! case_DCNV_ten: select case (tend_opt_dcnv)
101-
! case (1) !immediately apply tendencies
102-
! !Current state = current state + dt*current tendency
103-
! !Accumulated tendency unchanged
104-
! do k=1,levs
105-
! do i=1,im
106-
! gt0(i,k) = gt0(i,k) + delt*ten_t(i,k)
107-
! gu0(i,k) = gu0(i,k) + delt*ten_u(i,k)
108-
! gv0(i,k) = gv0(i,k) + delt*ten_v(i,k)
109-
! do n = 1, ntrac
110-
! gq0(i,k,n) = gq0(i,k,n) + delt*ten_q(i,k,n)
111-
! end do
112-
! end do
113-
! end do
114-
! case (2) !add tendencies to sum
115-
! !Accumulated tendency = accumulated tendency + current tendency
116-
! !Current state unchanged
117-
! do k=1,levs
118-
! do i=1,im
119-
! dtdt(i,k) = dtdt(i,k) + ten_t(i,k)
120-
! dudt(i,k) = dudt(i,k) + ten_u(i,k)
121-
! dvdt(i,k) = dvdt(i,k) + ten_v(i,k)
122-
! do n = 1, ntrac
123-
! dqdt(i,k,n) = dqdt(i,k,n) + ten_q(i,k,n)
124-
! end do
125-
! end do
126-
! end do
127-
! case (3) !add tendencies to sum and apply
128-
! !Current state = current state + dt*(accumulated tendency + current tendency)
129-
! !Accumulated tendency = 0
130-
! do k=1,levs
131-
! do i=1,im
132-
! gt0(i,k) = gt0(i,k) + delt*(dtdt(i,k) + ten_t(i,k))
133-
! dtdt(i,k) = 0.0
134-
! gu0(i,k) = gu0(i,k) + delt*(dudt(i,k) + ten_u(i,k))
135-
! dudt(i,k) = 0.0
136-
! gv0(i,k) = gv0(i,k) + delt*(dvdt(i,k) + ten_v(i,k))
137-
! dvdt(i,k) = 0.0
138-
! do n = 1, ntrac
139-
! gq0(i,k,n) = gq0(i,k,n) + delt*(dqdt(i,k,n) + ten_q(i,k,n))
140-
! dqdt(i,k,n) = 0.0
141-
! end do
142-
! end do
143-
! end do
144-
! case (4) !Current state unchanged
145-
! !Accumulated tendency unchanged
146-
! !Current tendency unchanged (but will be overwritten during next primary scheme)
147-
! exit case_DCNV_ten
148-
! case default
149-
! errflg = 1
150-
! errmsg = 'A tendency application control was outside of the acceptable range (1-4)'
151-
! return
152-
! end select case_DCNV_ten
100+
case_DCNV_ten: select case (tend_opt_dcnv)
101+
case (1) !immediately apply tendencies
102+
!Current state = current state + dt*current tendency
103+
!Accumulated tendency unchanged
104+
do k=1,levs
105+
do i=1,im
106+
gt0(i,k) = gt0(i,k) + delt*ten_t(i,k)
107+
gu0(i,k) = gu0(i,k) + delt*ten_u(i,k)
108+
gv0(i,k) = gv0(i,k) + delt*ten_v(i,k)
109+
do n = 1, ntrac
110+
gq0(i,k,n) = gq0(i,k,n) + delt*ten_q(i,k,n)
111+
end do
112+
end do
113+
end do
114+
case (2) !add tendencies to sum
115+
!Accumulated tendency = accumulated tendency + current tendency
116+
!Current state unchanged
117+
do k=1,levs
118+
do i=1,im
119+
dtdt(i,k) = dtdt(i,k) + ten_t(i,k)
120+
dudt(i,k) = dudt(i,k) + ten_u(i,k)
121+
dvdt(i,k) = dvdt(i,k) + ten_v(i,k)
122+
do n = 1, ntrac
123+
dqdt(i,k,n) = dqdt(i,k,n) + ten_q(i,k,n)
124+
end do
125+
end do
126+
end do
127+
case (3) !add tendencies to sum and apply
128+
!Current state = current state + dt*(accumulated tendency + current tendency)
129+
!Accumulated tendency = 0
130+
do k=1,levs
131+
do i=1,im
132+
gt0(i,k) = gt0(i,k) + delt*(dtdt(i,k) + ten_t(i,k))
133+
dtdt(i,k) = 0.0
134+
gu0(i,k) = gu0(i,k) + delt*(dudt(i,k) + ten_u(i,k))
135+
dudt(i,k) = 0.0
136+
gv0(i,k) = gv0(i,k) + delt*(dvdt(i,k) + ten_v(i,k))
137+
dvdt(i,k) = 0.0
138+
do n = 1, ntrac
139+
gq0(i,k,n) = gq0(i,k,n) + delt*(dqdt(i,k,n) + ten_q(i,k,n))
140+
dqdt(i,k,n) = 0.0
141+
end do
142+
end do
143+
end do
144+
case (4) !Current state unchanged
145+
!Accumulated tendency unchanged
146+
!Current tendency unchanged (but will be overwritten during next primary scheme)
147+
exit case_DCNV_ten
148+
case default
149+
errflg = 1
150+
errmsg = 'A tendency application control was outside of the acceptable range (1-4)'
151+
return
152+
end select case_DCNV_ten
153153

154154
! if (cscnv .or. satmedmf .or. trans_trac .or. ras) then
155155
! tracers = 2

0 commit comments

Comments
 (0)