Skip to content

Commit 80a7f37

Browse files
committed
undo Tiedtke and DCNV interstitial changes for testing
1 parent 02b8783 commit 80a7f37

File tree

5 files changed

+441
-264
lines changed

5 files changed

+441
-264
lines changed

physics/CONV/nTiedtke/cu_ntiedtke.F90

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ subroutine cu_ntiedtke_run(pu,pv,pt,pqv,ntqv,tdi,qvdi,pqvf,ptf,clw,poz,pzz,prsl,
210210
real(kind=kind_phys), dimension(:,:),intent(in) :: pzz, prsi
211211

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

216216
!--- output arguments:
217217
real(kind=kind_phys), dimension(:), intent(out) :: zprecc
@@ -390,17 +390,21 @@ subroutine cu_ntiedtke_run(pu,pv,pt,pqv,ntqv,tdi,qvdi,pqvf,ptf,clw,poz,pzz,prsl,
390390
if(pcte(j,k1).gt.0.) then
391391
fliq=foealfa(ztp1(j,k1))
392392
fice=1.0-fliq
393-
dclw_l(j,k) = fliq*pcte(j,k1)
394-
dclw_i(j,k) = fice*pcte(j,k1)
393+
clw(j,k,2)=clw(j,k,2)+fliq*pcte(j,k1)*ztmst
394+
clw(j,k,1)=clw(j,k,1)+fice*pcte(j,k1)*ztmst
395+
!dclw_l(j,k) = fliq*pcte(j,k1)
396+
!dclw_i(j,k) = fice*pcte(j,k1)
395397
endif
396398
end do
397399
end do
398400
!
399401
do k=1,km
400402
k1 = km-k+1
401403
do j=1,lq
402-
ten_t(j,k) = ptte(j,k1)-ztt(j,k1)
403-
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)
404408
ud_mf(j,k)= zmfu(j,k1)*ztmst
405409
dd_mf(j,k)= -zmfd(j,k1)*ztmst
406410
dt_mf(j,k)= zmfude_rate(j,k1)*ztmst
@@ -427,8 +431,10 @@ subroutine cu_ntiedtke_run(pu,pv,pt,pqv,ntqv,tdi,qvdi,pqvf,ptf,clw,poz,pzz,prsl,
427431
do k=1,km
428432
k1=km-k+1
429433
do j=1,lq
430-
ten_u(j,k) = pvom(j,k1)
431-
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)
432438
end do
433439
end do
434440
endif

physics/CONV/nTiedtke/cu_ntiedtke.meta

Lines changed: 5 additions & 5 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 = in
79+
intent = inout
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 = in
87+
intent = inout
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 = in
95+
intent = inout
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 = in
103+
intent = inout
104104
[ntqv]
105105
standard_name = index_of_specific_humidity_in_tracer_concentration_array
106106
long_name = tracer index for water vapor (specific humidity)
@@ -149,7 +149,7 @@
149149
dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers_for_convective_transport)
150150
type = real
151151
kind = kind_phys
152-
intent = in
152+
intent = inout
153153
[poz]
154154
standard_name = geopotential
155155
long_name = geopotential at model layer centers

physics/Interstitials/UFS_SCM_NEPTUNE/GFS_DCNV_generic_post.F90

Lines changed: 123 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -73,130 +73,130 @@ subroutine GFS_DCNV_generic_post_run (im, levs, tracers_total, otsptflag, &
7373
errmsg = ''
7474
errflg = 0
7575

76-
!ten_q(:,:,1) already has a value from the deep convection scheme
77-
if (tracers_total > 0) then
78-
tracers = 2
79-
do n=2,ntrac
80-
if ( otsptflag(n) ) then
81-
tracers = tracers + 1
82-
ten_q(1:im,:,n) = dclw(1:im,:,tracers)
83-
endif
84-
enddo
85-
endif
86-
if (ntcw > 0) then
87-
if (imp_physics == imp_physics_zhao_carr .or. &
88-
imp_physics == imp_physics_zhao_carr_pdf .or. &
89-
imp_physics == imp_physics_gfdl) then
90-
ten_q(1:im,:,ntcw) = dclw(1:im,:,1) + dclw(1:im,:,2)
91-
elseif (ntiw > 0) then
92-
ten_q(1:im,:,ntiw) = dclw(1:im,:,1)
93-
ten_q(1:im,:,ntcw) = dclw(1:im,:,2)
94-
else
95-
ten_q(1:im,:,ntcw) = dclw(1:im,:,1) + dclw(1:im,:,2)
96-
endif ! end if_ntiw
97-
endif ! end if_ntcw
98-
99-
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
76+
! !ten_q(:,:,1) already has a value from the deep convection scheme
77+
! if (tracers_total > 0) then
78+
! tracers = 2
79+
! do n=2,ntrac
80+
! if ( otsptflag(n) ) then
81+
! tracers = tracers + 1
82+
! ten_q(1:im,:,n) = dclw(1:im,:,tracers)
83+
! endif
84+
! enddo
85+
! endif
86+
! if (ntcw > 0) then
87+
! if (imp_physics == imp_physics_zhao_carr .or. &
88+
! imp_physics == imp_physics_zhao_carr_pdf .or. &
89+
! imp_physics == imp_physics_gfdl) then
90+
! ten_q(1:im,:,ntcw) = dclw(1:im,:,1) + dclw(1:im,:,2)
91+
! elseif (ntiw > 0) then
92+
! ten_q(1:im,:,ntiw) = dclw(1:im,:,1)
93+
! ten_q(1:im,:,ntcw) = dclw(1:im,:,2)
94+
! else
95+
! ten_q(1:im,:,ntcw) = dclw(1:im,:,1) + dclw(1:im,:,2)
96+
! endif ! end if_ntiw
97+
! endif ! end if_ntcw
98+
!
99+
!
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

154-
if (cscnv .or. satmedmf .or. trans_trac .or. ras) then
155-
tracers = 2
156-
do n=2,ntrac
157-
! if ( n /= ntcw .and. n /= ntiw .and. n /= ntclamt .and. &
158-
! n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. &
159-
! n /= ntsnc .and. n /= ntgl .and. n /= ntgnc) then
160-
IF ( otsptflag(n) ) THEN
161-
tracers = tracers + 1
162-
do k=1,levs
163-
do i=1,im
164-
clw(i,k,tracers) = gq0(i,k,n)
165-
enddo
166-
enddo
167-
endif
168-
enddo
169-
endif ! end if_ras or cfscnv or samf
170-
if (imp_physics == imp_physics_zhao_carr .or. imp_physics == imp_physics_zhao_carr_pdf) then ! zhao-carr microphysics
171-
do k=1,levs
172-
do i=1,im
173-
clw(i,k,1) = gq0(i,k,ntcw)
174-
enddo
175-
enddo
176-
elseif (imp_physics == imp_physics_gfdl) then
177-
clw(1:im,:,1) = gq0(1:im,:,ntcw)
178-
elseif (imp_physics == imp_physics_thompson) then
179-
do k=1,levs
180-
do i=1,im
181-
clw(i,k,1) = gq0(i,k,ntiw) ! ice
182-
clw(i,k,2) = gq0(i,k,ntcw) ! water
183-
enddo
184-
enddo
185-
else if (imp_physics == imp_physics_nssl ) then
186-
do k=1,levs
187-
do i=1,im
188-
clw(i,k,1) = gq0(i,k,ntiw) ! cloud ice
189-
clw(i,k,2) = gq0(i,k,ntcw) ! cloud droplets
190-
enddo
191-
enddo
192-
elseif (imp_physics == imp_physics_wsm6 .or. imp_physics == imp_physics_mg .or. imp_physics == imp_physics_fer_hires) then
193-
do k=1,levs
194-
do i=1,im
195-
clw(i,k,1) = gq0(i,k,ntiw) ! ice
196-
clw(i,k,2) = gq0(i,k,ntcw) ! water
197-
enddo
198-
enddo
199-
endif
154+
! if (cscnv .or. satmedmf .or. trans_trac .or. ras) then
155+
! tracers = 2
156+
! do n=2,ntrac
157+
! ! if ( n /= ntcw .and. n /= ntiw .and. n /= ntclamt .and. &
158+
! ! n /= ntrw .and. n /= ntsw .and. n /= ntrnc .and. &
159+
! ! n /= ntsnc .and. n /= ntgl .and. n /= ntgnc) then
160+
! IF ( otsptflag(n) ) THEN
161+
! tracers = tracers + 1
162+
! do k=1,levs
163+
! do i=1,im
164+
! clw(i,k,tracers) = gq0(i,k,n)
165+
! enddo
166+
! enddo
167+
! endif
168+
! enddo
169+
! endif ! end if_ras or cfscnv or samf
170+
! if (imp_physics == imp_physics_zhao_carr .or. imp_physics == imp_physics_zhao_carr_pdf) then ! zhao-carr microphysics
171+
! do k=1,levs
172+
! do i=1,im
173+
! clw(i,k,1) = gq0(i,k,ntcw)
174+
! enddo
175+
! enddo
176+
! elseif (imp_physics == imp_physics_gfdl) then
177+
! clw(1:im,:,1) = gq0(1:im,:,ntcw)
178+
! elseif (imp_physics == imp_physics_thompson) then
179+
! do k=1,levs
180+
! do i=1,im
181+
! clw(i,k,1) = gq0(i,k,ntiw) ! ice
182+
! clw(i,k,2) = gq0(i,k,ntcw) ! water
183+
! enddo
184+
! enddo
185+
! else if (imp_physics == imp_physics_nssl ) then
186+
! do k=1,levs
187+
! do i=1,im
188+
! clw(i,k,1) = gq0(i,k,ntiw) ! cloud ice
189+
! clw(i,k,2) = gq0(i,k,ntcw) ! cloud droplets
190+
! enddo
191+
! enddo
192+
! elseif (imp_physics == imp_physics_wsm6 .or. imp_physics == imp_physics_mg .or. imp_physics == imp_physics_fer_hires) then
193+
! do k=1,levs
194+
! do i=1,im
195+
! clw(i,k,1) = gq0(i,k,ntiw) ! ice
196+
! clw(i,k,2) = gq0(i,k,ntcw) ! water
197+
! enddo
198+
! enddo
199+
! endif
200200

201201
!shallow convection expects clw has already been updated
202202

0 commit comments

Comments
 (0)