@@ -35,6 +35,7 @@ module GFS_phys_time_vary
35
35
!- -- variables needed for calculating 'sncovr'
36
36
use namelist_soilveg, only: salp_data, snupx
37
37
use set_soilveg_mod, only: set_soilveg
38
+ use physparam, only : iaermdl
38
39
39
40
! --- needed for Noah MP init
40
41
use noahmp_tables, only: laim_table,saim_table,sla_table, &
@@ -67,7 +68,8 @@ module GFS_phys_time_vary
67
68
! >\section gen_GFS_phys_time_vary_init GFS_phys_time_vary_init General Algorithm
68
69
! ! @{
69
70
subroutine GFS_phys_time_vary_init ( &
70
- me , master , ntoz , h2o_phys , iaerclm , iccn , iflip , im , nx , ny , idate , xlat_d , xlon_d , &
71
+ me , master , ntoz , h2o_phys , iaerclm , iccn , iflip , im , levs , &
72
+ nx , ny , idate , xlat_d , xlon_d , &
71
73
jindx1_o3 , jindx2_o3 , ddy_o3 , ozpl , jindx1_h , jindx2_h , ddy_h , h2opl ,fhour , &
72
74
jindx1_aer , jindx2_aer , ddy_aer , iindx1_aer , iindx2_aer , ddx_aer , aer_nm , &
73
75
jindx1_ci , jindx2_ci , ddy_ci , iindx1_ci , iindx2_ci , ddx_ci , imap , jmap , &
@@ -85,7 +87,7 @@ subroutine GFS_phys_time_vary_init (
85
87
implicit none
86
88
87
89
! Interface variables
88
- integer , intent (in ) :: me, master, ntoz, iccn, iflip, im, nx, ny
90
+ integer , intent (in ) :: me, master, ntoz, iccn, iflip, im, nx, ny, levs
89
91
logical , intent (in ) :: h2o_phys, iaerclm, lsm_cold_start
90
92
integer , intent (in ) :: idate(:)
91
93
real (kind_phys), intent (in ) :: fhour
@@ -96,7 +98,7 @@ subroutine GFS_phys_time_vary_init (
96
98
real (kind_phys), intent (in ) :: ozpl(:,:,:), h2opl(:,:,:)
97
99
integer , intent (inout ) :: jindx1_aer(:), jindx2_aer(:), iindx1_aer(:), iindx2_aer(:)
98
100
real (kind_phys), intent (inout ) :: ddy_aer(:), ddx_aer(:)
99
- real (kind_phys), intent (in ) :: aer_nm(:,:,:)
101
+ real (kind_phys), intent (out ) :: aer_nm(:,:,:)
100
102
integer , intent (inout ) :: jindx1_ci(:), jindx2_ci(:), iindx1_ci(:), iindx2_ci(:)
101
103
real (kind_phys), intent (inout ) :: ddy_ci(:), ddx_ci(:)
102
104
integer , intent (inout ) :: imap(:), jmap(:)
@@ -196,12 +198,12 @@ subroutine GFS_phys_time_vary_init (
196
198
jamax=- 999
197
199
198
200
! $OMP parallel num_threads(nthrds) default(none) &
199
- ! $OMP shared (me,master,ntoz,h2o_phys,im,nx,ny,idate) &
201
+ ! $OMP shared (me,master,ntoz,h2o_phys,im,nx,ny,levs, idate) &
200
202
! $OMP shared (xlat_d,xlon_d,imap,jmap,errmsg,errflg) &
201
203
! $OMP shared (levozp,oz_coeff,oz_pres,ozpl) &
202
204
! $OMP shared (levh2o,h2o_coeff,h2o_pres,h2opl) &
203
205
! $OMP shared (iamin, iamax, jamin, jamax) &
204
- ! $OMP shared (iaerclm,ntrcaer,aer_nm,iflip,iccn) &
206
+ ! $OMP shared (iaerclm,iaermdl, ntrcaer,aer_nm,iflip,iccn) &
205
207
! $OMP shared (jindx1_o3,jindx2_o3,ddy_o3,jindx1_h,jindx2_h,ddy_h) &
206
208
! $OMP shared (jindx1_aer,jindx2_aer,ddy_aer,iindx1_aer,iindx2_aer,ddx_aer) &
207
209
! $OMP shared (jindx1_ci,jindx2_ci,ddy_ci,iindx1_ci,iindx2_ci,ddx_ci) &
@@ -253,28 +255,22 @@ subroutine GFS_phys_time_vary_init (
253
255
end if
254
256
255
257
! $OMP section
256
- ! > - Call read_aerdata() to read aerosol climatology
258
+ ! > - Call read_aerdata() to read aerosol climatology, Anning added coupled
259
+ ! > added coupled gocart and radiation option to initializing aer_nm
257
260
if (iaerclm) then
258
- ! Consistency check that the value for ntrcaerm set in GFS_typedefs.F90
259
- ! and used to allocate aer_nm matches the value defined in aerclm_def
260
- if (size (aer_nm, dim= 3 ).ne. ntrcaerm) then
261
- write (errmsg,' (2a,i0,a,i0)' ) " Value error in GFS_phys_time_vary_init: " , &
262
- " ntrcaerm from aerclm_def does not match value in GFS_typedefs.F90: " , &
263
- ntrcaerm, " /= " , size (aer_nm, dim= 3 )
264
- errflg = 1
265
- else
266
- ! Update the value of ntrcaer in aerclm_def with the value defined
267
- ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT.
268
- ! If iaerclm is .true., then ntrcaer == ntrcaerm
269
- ntrcaer = size (aer_nm, dim= 3 )
270
- ! Read aerosol climatology
271
- call read_aerdata (me,master,iflip,idate,errmsg,errflg)
272
- endif
261
+ ntrcaer = ntrcaerm
262
+ call read_aerdata (me,master,iflip,idate,errmsg,errflg)
263
+ else if (iaermdl ==2 ) then
264
+ do ix= 1 ,ntrcaerm
265
+ do j= 1 ,levs
266
+ do i= 1 ,im
267
+ aer_nm(i,j,ix) = 1.e-20_kind_phys
268
+ end do
269
+ end do
270
+ end do
271
+ ntrcaer = ntrcaerm
273
272
else
274
- ! Update the value of ntrcaer in aerclm_def with the value defined
275
- ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT.
276
- ! If iaerclm is .false., then ntrcaer == 1
277
- ntrcaer = size (aer_nm, dim= 3 )
273
+ ntrcaer = 1
278
274
endif
279
275
280
276
! $OMP section
0 commit comments