17 logical :: is_initialized = .false.
20 character(40),
parameter :: &
21 & VTAGRAD=
'NCEP-Radiation_driver v5.2 Jan 2013 '
41 iaer, ntcw, num_p3d, npdf3d, ntoz, iovr, iovr_rand, iovr_maxrand, &
42 iovr_max, iovr_dcorr, iovr_exp, iovr_exprand, icliq_sw, lcrick, &
43 lcnorm, imp_physics, lnoprec, idate, iflip, do_RRTMGP, me, lalw1bd, &
44 iaermdl, iaerflg, aeros_file, con_pi, con_t0c, con_c, con_boltz, &
45 con_plnk, con_solr_2008, con_solr_2002, con_g, con_rd, co2usr_file, &
46 co2cyc_file, rad_hr_units, inc_minor_gas, icliq_lw, isubcsw, isubclw,&
47 iswmode, ipsd0, ltp, lextop, errmsg, errflg)
154 real (kind=kind_phys),
intent(in) :: si(:)
155 integer,
intent(in) :: levr, ictm, isol, ico2, iaer, ntcw, num_p3d, &
156 ltp, npdf3d, ntoz, iovr, iovr_rand, iovr_maxrand, iovr_max, &
157 iovr_dcorr, iovr_exp, iovr_exprand, icliq_sw, imp_physics, &
158 iflip, me, rad_hr_units, icliq_lw, isubcsw, isubclw, iswmode
159 integer,
intent(in) :: idate(:)
160 logical,
intent(in) :: lcrick, lcnorm, lnoprec, do_rrtmgp, lalw1bd, &
161 inc_minor_gas, lextop
162 character(len=26),
intent(in) :: aeros_file, solar_file, co2usr_file,&
164 real(kind_phys),
intent(in) :: con_pi, con_t0c, con_c, con_boltz, &
165 con_plnk, con_solr_2008, con_solr_2002, con_g, con_rd
166 integer,
intent(inout) :: ipsd0
167 character(len=*),
intent(out) :: errmsg
168 integer,
intent(out) :: errflg
169 integer,
intent(out) :: iaermdl, iaerflg
176 write(errmsg,
'(*(a))')
"Logic error: do_RRTMGP must be set to .false."
181 if ( ictm==0 .or. ictm==-2 )
then
182 iaerflg = mod(iaer, 100)
184 iaerflg = mod(iaer, 1000)
187 if ( iaermdl < 0 .or. (iaermdl>2 .and. iaermdl/=5) )
then
188 print *,
' Error -- IAER flag is incorrect, Abort'
190 errmsg =
'ERROR(GFS_rrtmg_setup): IAER flag is incorrect'
195 if ( isubcsw>0 .or. isubclw>0 )
then
197 ipsd0 = 17*idate(1)+43*idate(2)+37*idate(3)+23*idate(4)
201 print *,
' In rad_initialize (GFS_rrtmg_setup_init), before calling RRTMG initialization'
203 print *,
' levr=',levr,
' ictm=',ictm,
' isol=',isol,
' ico2=',ico2,&
204 ' iaermdl=',iaermdl,
' iaerflg=',iaerflg
205 print *,
' np3d=',num_p3d,
' ntoz=',ntoz, &
206 ' iovr=',iovr,
' isubcsw=',isubcsw, &
207 ' isubclw=',isubclw,
' icliq_sw=',icliq_sw, &
208 ' iflip=',iflip,
' me=',me
209 print *,
' lcrick=',lcrick, &
210 ' lcnorm=',lcnorm,
' lnoprec=',lnoprec
211 print *,
'lextop=',lextop,
' ltp=',ltp
214 if (is_initialized)
return
217 call sol_init ( me, isol, solar_file, con_solr_2008,con_solr_2002,&
219 call aer_init ( levr, me, iaermdl, iaerflg, lalw1bd, aeros_file, &
220 con_pi, con_t0c, con_c, con_boltz, con_plnk, errflg, errmsg)
221 call gas_init ( me, co2usr_file, co2cyc_file, ico2, ictm, con_pi, errflg, errmsg )
222 call cld_init ( si, levr, imp_physics, me, con_g, con_rd, errflg, errmsg)
223 call rlwinit ( me, rad_hr_units, inc_minor_gas, icliq_lw, isubcsw, &
224 iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, &
225 iovr_exp, iovr_exprand, errflg, errmsg )
226 call rswinit ( me, rad_hr_units, inc_minor_gas, icliq_sw, isubclw, &
227 iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, &
228 iovr_exp, iovr_exprand,iswmode, errflg, errmsg )
231 print *,
' Radiation sub-cloud initial seed =',ipsd0, &
232 &
' IC-idate =',idate
233 print *,
' return from rad_initialize (GFS_rrtmg_setup_init) - after calling RRTMG initialization'
236 is_initialized = .true.
246 lsswr, me, iaermdl, iaerflg, isol, aeros_file, slag, sdec, cdec, &
247 solcon, con_pi, co2dat_file, co2gbl_file, ictm, ico2, ntoz, ozphys,&
253 integer,
intent(in) :: idate(:)
254 integer,
intent(in) :: jdate(:)
255 real(kind=kind_phys),
intent(in) :: deltsw
256 real(kind=kind_phys),
intent(in) :: deltim
257 real(kind=kind_phys),
intent(in) :: con_pi
258 logical,
intent(in) :: lsswr
259 integer,
intent(in) :: me
260 integer,
intent(in) :: iaermdl, iaerflg, isol, ictm, ico2, ntoz
262 character(len=26),
intent(in) :: aeros_file, co2dat_file, co2gbl_file
263 real(kind=kind_phys),
intent(out) :: slag
264 real(kind=kind_phys),
intent(out) :: sdec
265 real(kind=kind_phys),
intent(out) :: cdec
266 real(kind=kind_phys),
intent(out) :: solcon
267 character(len=*),
intent(out) :: errmsg
268 integer,
intent(out) :: errflg
271 if (.not.is_initialized)
then
272 write(errmsg, fmt=
'((a))')
'GFS_rrtmg_setup_timestep_init called before GFS_rrtmg_setup_init'
281 call radupdate(idate,jdate,deltsw,deltim,lsswr,me,iaermdl, iaerflg,isol,aeros_file,&
282 slag,sdec,cdec,solcon,con_pi,co2dat_file,co2gbl_file,ictm,ico2,ntoz,ozphys,errflg,errmsg)
293 character(len=*),
intent( out) :: errmsg
294 integer,
intent( out) :: errflg
300 if (.not.is_initialized)
return
304 is_initialized = .false.
328 subroutine radupdate( idate,jdate,deltsw,deltim,lsswr,me, iaermdl,&
329 iaerflg, isol, aeros_file, slag,sdec,cdec,solcon, con_pi, &
330 co2dat_file,co2gbl_file, ictm, ico2, ntoz, ozphys, errflg, errmsg)
373 integer,
intent(in) :: idate(:), jdate(:), me, iaermdl, iaerflg, isol, ictm, ntoz, ico2
375 logical,
intent(in) :: lsswr
376 character(len=26),
intent(in) :: aeros_file,co2dat_file,co2gbl_file
378 real (kind=kind_phys),
intent(in) :: deltsw, deltim, con_pi
381 real (kind=kind_phys),
intent(out) :: slag, sdec, cdec, solcon
382 character(len=*),
intent(out) :: errmsg
383 integer,
intent(out) :: errflg
386 integer :: iyear, imon, iday, ihour
387 integer :: kyear, kmon, kday, khour
411 if ( ictm==0 .or. ictm==-2 )
then
423 if (
month0 /= imon )
then
434 if ( isol == 0 .or. isol == 10 )
then
436 elseif (
iyear0 /= iyear )
then
439 lsol_chg = ( isol==4 .and. lmon_chg )
445 & ( jdate,kyear,deltsw,deltim,lsol_chg, me, &
447 & slag,sdec,cdec,solcon,con_pi,errmsg,errflg &
455 call aer_update ( iyear, imon, me, iaermdl, aeros_file, errflg, errmsg )
460 if (
monthd /= kmon )
then
467 call gas_update ( kyear,kmon,kday,khour,lco2_chg, me, co2dat_file, &
468 co2gbl_file, ictm, ico2, errflg, errmsg )
470 call ozphys%update_o3clim(kmon, kday, khour,
loz1st)
subroutine radupdate(idate, jdate, deltsw, deltim, lsswr, me, iaermdl, iaerflg, isol, aeros_file, slag, sdec, cdec, solcon, con_pi, co2dat_file, co2gbl_file, ictm, ico2, ntoz, ozphys, errflg, errmsg)
This subroutine checks and updates time sensitive data used by radiation computations....
integer month0
new data input control variables (set/reset in subroutine radupdate):
subroutine, public gfs_rrtmg_setup_init(si, levr, ictm, isol, solar_file, ico2, iaer, ntcw, num_p3d, npdf3d, ntoz, iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, iovr_exp, iovr_exprand, icliq_sw, lcrick, lcnorm, imp_physics, lnoprec, idate, iflip, do_rrtmgp, me, lalw1bd, iaermdl, iaerflg, aeros_file, con_pi, con_t0c, con_c, con_boltz, con_plnk, con_solr_2008, con_solr_2002, con_g, con_rd, co2usr_file, co2cyc_file, rad_hr_units, inc_minor_gas, icliq_lw, isubcsw, isubclw, iswmode, ipsd0, ltp, lextop, errmsg, errflg)
subroutine, public gfs_rrtmg_setup_finalize(errmsg, errflg)
logical loz1st
control flag for the first time of reading climatological ozone data (set/reset in subroutines radini...
subroutine, public gfs_rrtmg_setup_timestep_init(idate, jdate, deltsw, deltim, lsswr, me, iaermdl, iaerflg, isol, aeros_file, slag, sdec, cdec, solcon, con_pi, co2dat_file, co2gbl_file, ictm, ico2, ntoz, ozphys, errmsg, errflg)
subroutine, public sol_init(me, isolar, solar_file, con_solr, con_solr_old, con_pi)
This subroutine initializes astronomy process, and set up module constants.
subroutine, public sol_update(jdate, kyear, deltsw, deltim, lsol_chg, me, slag, sdec, cdec, solcon, con_pi, errmsg, errflg)
This subroutine computes solar parameters at forecast time.
subroutine, public cld_init(si, nlay, imp_physics, me, con_g, con_rd, errflg, errmsg)
This subroutine is an initialization program for cloud-radiation calculations and sets up boundary la...
subroutine, public gas_init(me, co2usr_file, co2cyc_file, ico2flg, ictmflg, con_pi, errflg, errmsg)
This subroutine sets up co2, etc. parameters.
subroutine, public gas_update(iyear, imon, iday, ihour, ldoco2, me, co2dat_file, co2gbl_file, ictmflg, ico2flg, errflg, errmsg)
This subroutine reads in 2-d monthly co2 data set for a specified year. Data are in a 15 degree lat/l...
subroutine, public rlwinit(me, rad_hr_units, inc_minor_gas, ilwcliq, isubclw, iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, iovr_exp, iovr_exprand, errflg, errmsg)
This subroutine performs calculations necessary for the initialization of the longwave model,...
subroutine, public rswinit(me, rad_hr_units, inc_minor_gas, iswcliq, isubcsw, iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, iovr_exp, iovr_exprand, iswmode, errflg, errmsg)
This subroutine initializes non-varying module variables, conversion factors, and look-up tables.
The operational GFS currently parameterizes ozone production and destruction based on monthly mean co...
This module sets up astronomy quantities for solar radiation calculations.
This module computes cloud related quantities for radiation computations.
This module sets up constant gas rofiles, such as co2, ch4, n2o, o2, and those of cfc gases.
This module contains the CCPP-compliant NCEP's modifications of the rrtmg-lw radiation code from aer ...
This module contains the CCPP-compliant NCEP's modifications of the rrtmg-sw radiation code from aer ...
Derived type containing data and procedures needed by ozone photochemistry parameterization Note All ...