85 me, master, ntoz, h2o_phys, iaerclm, iccn, iaermdl, iflip, im, levs, &
86 nx, ny, idate, xlat_d, xlon_d, &
87 jindx1_o3, jindx2_o3, ddy_o3, jindx1_h, jindx2_h, ddy_h, h2opl,fhour, &
88 jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, &
89 jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, imap, jmap, &
90 do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, &
91 isot, ivegsrc, nlunit, sncovr, sncovr_ice, lsm, lsm_noahmp, lsm_ruc, min_seaice, &
92 fice, landfrac, vtype, weasd, lsoil, zs, dzs, lsnow_lsm_lbound, lsnow_lsm_ubound, &
93 tvxy, tgxy, tahxy, canicexy, canliqxy, eahxy, cmxy, chxy, fwetxy, sneqvoxy, alboldxy,&
94 qsnowxy, wslakexy, albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, albdvis_ice, &
95 albdnir_ice, albivis_ice, albinir_ice, emiss_lnd, emiss_ice, taussxy, waxy, wtxy, &
96 zwtxy, xlaixy, xsaixy, lfmassxy, stmassxy, rtmassxy, woodxy, stblcpxy, fastcpxy, &
97 smcwtdxy, deeprechxy, rechxy, snowxy, snicexy, snliqxy, tsnoxy , smoiseq, zsnsoxy, &
98 slc, smc, stc, tsfcl, snowd, canopy, tg3, stype, con_t0c, lsm_cold_start, nthrds, &
99 lkm, use_lake_model, lakefrac, lakedepth, iopt_lake, iopt_lake_clm, iopt_lake_flake, &
100 lakefrac_threshold, lakedepth_threshold, ozphys, errmsg, errflg)
105 integer,
intent(in) :: me, master, ntoz, iccn, iflip, im, nx, ny, levs, iaermdl
106 logical,
intent(in) :: h2o_phys, iaerclm, lsm_cold_start
107 integer,
intent(in) :: idate(:), iopt_lake, iopt_lake_clm, iopt_lake_flake
108 real(kind_phys),
intent(in) :: fhour, lakefrac_threshold, lakedepth_threshold
109 real(kind_phys),
intent(in) :: xlat_d(:), xlon_d(:)
111 integer,
intent(in) :: lkm
112 integer,
intent(inout) :: use_lake_model(:)
113 real(kind=kind_phys),
intent(in ) :: lakefrac(:), lakedepth(:)
115 integer,
intent(inout),
optional :: jindx1_o3(:), jindx2_o3(:), jindx1_h(:), jindx2_h(:)
116 real(kind_phys),
intent(inout),
optional :: ddy_o3(:), ddy_h(:)
117 real(kind_phys),
intent(in) :: h2opl(:,:,:)
119 integer,
intent(inout),
optional :: jindx1_aer(:), jindx2_aer(:), iindx1_aer(:), iindx2_aer(:)
120 real(kind_phys),
intent(inout),
optional :: ddy_aer(:), ddx_aer(:)
121 real(kind_phys),
intent(out) :: aer_nm(:,:,:)
122 integer,
intent(inout),
optional :: jindx1_ci(:), jindx2_ci(:), iindx1_ci(:), iindx2_ci(:)
123 real(kind_phys),
intent(inout),
optional :: ddy_ci(:), ddx_ci(:)
124 integer,
intent(inout) :: imap(:), jmap(:)
125 logical,
intent(in) :: do_ugwp_v1
126 real(kind_phys),
intent(inout),
optional :: ddy_j1tau(:), ddy_j2tau(:)
127 integer,
intent(inout),
optional :: jindx1_tau(:), jindx2_tau(:)
129 integer,
intent(in) :: isot, ivegsrc, nlunit
130 real(kind_phys),
intent(inout) :: sncovr(:), sncovr_ice(:)
131 integer,
intent(in) :: lsm, lsm_noahmp,
lsm_ruc, vtype(:)
132 real(kind_phys),
intent(in) :: min_seaice, fice(:)
133 real(kind_phys),
intent(in) :: landfrac(:)
134 real(kind_phys),
intent(inout) :: weasd(:)
138 integer,
intent(in) :: lsoil, lsnow_lsm_lbound, lsnow_lsm_ubound
139 real(kind_phys),
intent(in) :: zs(:)
140 real(kind_phys),
intent(in) :: dzs(:)
141 real(kind_phys),
intent(inout),
optional :: tvxy(:)
142 real(kind_phys),
intent(inout),
optional :: tgxy(:)
143 real(kind_phys),
intent(inout),
optional :: tahxy(:)
144 real(kind_phys),
intent(inout),
optional :: canicexy(:)
145 real(kind_phys),
intent(inout),
optional :: canliqxy(:)
146 real(kind_phys),
intent(inout),
optional :: eahxy(:)
147 real(kind_phys),
intent(inout),
optional :: cmxy(:)
148 real(kind_phys),
intent(inout),
optional :: chxy(:)
149 real(kind_phys),
intent(inout),
optional :: fwetxy(:)
150 real(kind_phys),
intent(inout),
optional :: sneqvoxy(:)
151 real(kind_phys),
intent(inout),
optional :: alboldxy(:)
152 real(kind_phys),
intent(inout),
optional :: qsnowxy(:)
153 real(kind_phys),
intent(inout),
optional :: wslakexy(:)
154 real(kind_phys),
intent(inout) :: albdvis_lnd(:)
155 real(kind_phys),
intent(inout) :: albdnir_lnd(:)
156 real(kind_phys),
intent(inout) :: albivis_lnd(:)
157 real(kind_phys),
intent(inout) :: albinir_lnd(:)
158 real(kind_phys),
intent(inout),
optional :: albdvis_ice(:)
159 real(kind_phys),
intent(inout),
optional :: albdnir_ice(:)
160 real(kind_phys),
intent(inout),
optional :: albivis_ice(:)
161 real(kind_phys),
intent(inout),
optional :: albinir_ice(:)
162 real(kind_phys),
intent(inout) :: emiss_lnd(:)
163 real(kind_phys),
intent(inout) :: emiss_ice(:)
164 real(kind_phys),
intent(inout),
optional :: taussxy(:)
165 real(kind_phys),
intent(inout),
optional :: waxy(:)
166 real(kind_phys),
intent(inout),
optional :: wtxy(:)
167 real(kind_phys),
intent(inout),
optional :: zwtxy(:)
168 real(kind_phys),
intent(inout),
optional :: xlaixy(:)
169 real(kind_phys),
intent(inout),
optional :: xsaixy(:)
170 real(kind_phys),
intent(inout),
optional :: lfmassxy(:)
171 real(kind_phys),
intent(inout),
optional :: stmassxy(:)
172 real(kind_phys),
intent(inout),
optional :: rtmassxy(:)
173 real(kind_phys),
intent(inout),
optional :: woodxy(:)
174 real(kind_phys),
intent(inout),
optional :: stblcpxy(:)
175 real(kind_phys),
intent(inout),
optional :: fastcpxy(:)
176 real(kind_phys),
intent(inout),
optional :: smcwtdxy(:)
177 real(kind_phys),
intent(inout),
optional :: deeprechxy(:)
178 real(kind_phys),
intent(inout),
optional :: rechxy(:)
179 real(kind_phys),
intent(inout),
optional :: snowxy(:)
180 real(kind_phys),
intent(inout),
optional :: snicexy(:,lsnow_lsm_lbound:)
181 real(kind_phys),
intent(inout),
optional :: snliqxy(:,lsnow_lsm_lbound:)
182 real(kind_phys),
intent(inout),
optional :: tsnoxy (:,lsnow_lsm_lbound:)
183 real(kind_phys),
intent(inout),
optional :: smoiseq(:,:)
184 real(kind_phys),
intent(inout),
optional :: zsnsoxy(:,lsnow_lsm_lbound:)
185 real(kind_phys),
intent(inout) :: slc(:,:)
186 real(kind_phys),
intent(inout) :: smc(:,:)
187 real(kind_phys),
intent(inout) :: stc(:,:)
188 real(kind_phys),
intent(in) :: tsfcl(:)
189 real(kind_phys),
intent(in) :: snowd(:)
190 real(kind_phys),
intent(in) :: canopy(:)
191 real(kind_phys),
intent(in) :: tg3(:)
192 integer,
intent(in) :: stype(:)
194 real(kind_phys),
intent(in) :: con_t0c
196 integer,
intent(in) :: nthrds
197 character(len=*),
intent(out) :: errmsg
198 integer,
intent(out) :: errflg
201 integer :: i, j, ix, vegtyp
202 real(kind_phys) :: rsnow
205 integer :: soiltyp, isnow, is, imn
206 real(kind=kind_phys) :: masslai, masssai, snd
207 real(kind=kind_phys) :: bexp, ddz, smcmax, smcwlt, dwsat, dksat, psisat
209 real(kind=kind_phys),
dimension(:),
allocatable :: dzsno
210 real(kind=kind_phys),
dimension(:),
allocatable :: dzsnso
213 character(len=255) :: myerrmsg
219 if (is_initialized)
return
226 need_h2odata:
if(h2o_phys)
then
227 call read_h2odata (h2o_phys, me, master)
232 if (
size(h2opl, dim=2).ne.levh2o)
then
233 write(myerrmsg,
'(2a,i0,a,i0)')
"Value error in GFS_phys_time_vary_init: ", &
234 "levh2o from read_h2odata does not match value in GFS_typedefs.F90: ", &
235 levh2o,
" /= ",
size(h2opl, dim=2)
237 call copy_error(myerrmsg, myerrflg, errmsg, errflg)
239 if (
size(h2opl, dim=3).ne.h2o_coeff)
then
240 write(myerrmsg,
'(2a,i0,a,i0)')
"Value error in GFS_phys_time_vary_init: ", &
241 "h2o_coeff from read_h2odata does not match value in GFS_typedefs.F90: ", &
242 h2o_coeff,
" /= ",
size(h2opl, dim=3)
244 call copy_error(myerrmsg, myerrflg, errmsg, errflg)
253 myerrmsg =
'read_aerdata failed without a message'
254 call read_aerdata (me,master,iflip,idate,myerrmsg,myerrflg)
255 call copy_error(myerrmsg, myerrflg, errmsg, errflg)
256 else if(iaermdl ==2 )
then
260 aer_nm(i,j,ix) = 1.e-20_kind_phys
271 call read_cidata (me,master)
279 myerrmsg =
'read_tau_amf failed without a message'
280 call read_tau_amf(me, master, myerrmsg, myerrflg)
281 call copy_error(myerrmsg, myerrflg, errmsg, errflg)
286 myerrmsg =
'set_soilveg failed without a message'
287 call set_soilveg(me, isot, ivegsrc, nlunit, myerrmsg, myerrflg)
288 call copy_error(myerrmsg, myerrflg, errmsg, errflg)
291 if(lsm == lsm_noahmp)
then
293 myerrmsg =
'read_mp_table_parameters failed without a message'
294 call read_mp_table_parameters(myerrmsg, myerrflg)
295 call copy_error(myerrmsg, myerrflg, errmsg, errflg)
303 call ozphys%setup_o3prog(xlat_d, jindx1_o3, jindx2_o3, ddy_o3)
308 call setindxh2o (im, xlat_d, jindx1_h, jindx2_h, ddy_h)
313 call setindxaer (im, xlat_d, jindx1_aer, &
314 jindx2_aer, ddy_aer, xlon_d, &
315 iindx1_aer, iindx2_aer, ddx_aer, &
317 iamin = min(minval(iindx1_aer), iamin)
318 iamax = max(maxval(iindx2_aer), iamax)
319 jamin = min(minval(jindx1_aer), jamin)
320 jamax = max(maxval(jindx2_aer), jamax)
325 call setindxci (im, xlat_d, jindx1_ci, &
326 jindx2_ci, ddy_ci, xlon_d, &
327 iindx1_ci, iindx2_ci, ddx_ci)
332 call cires_indx_ugwp (im, me, master, xlat_d, jindx1_tau, jindx2_tau, &
333 ddy_j1tau, ddy_j2tau)
347 if (all(sncovr <
zero))
then
348 if (me == master )
write(*,
'(a)')
'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters'
353 if (landfrac(ix) >=
drythresh .or. fice(ix) >= min_seaice)
then
355 if (vegtyp == 0) vegtyp = 7
356 rsnow = 0.001_kind_phys*weasd(ix)/snupx(vegtyp)
357 if (0.001_kind_phys*weasd(ix) < snupx(vegtyp))
then
358 sncovr(ix) =
one - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data))
368 if (all(sncovr_ice <
zero))
then
369 if (me == master )
write(*,
'(a)')
'GFS_phys_time_vary_init: fill sncovr_ice with sncovr for RUC LSM'
370 sncovr_ice(:) = sncovr(:)
374 if (errflg/=0)
return
378 call read_aerdataf (me, master, iflip, idate, fhour, errmsg, errflg)
380 if (errflg/=0)
return
385 lsm_init:
if (lsm_cold_start)
then
386 if (lsm == lsm_noahmp .or. lsm ==
lsm_ruc)
then
387 if (me == master )
write(*,
'(a)')
'GFS_phys_time_vary_init: initialize albedo for land and ice'
389 albdvis_lnd(ix) = 0.2_kind_phys
390 albdnir_lnd(ix) = 0.2_kind_phys
391 albivis_lnd(ix) = 0.2_kind_phys
392 albinir_lnd(ix) = 0.2_kind_phys
393 emiss_lnd(ix) = 0.95_kind_phys
398 albdvis_ice(ix) = 0.6_kind_phys
399 albdnir_ice(ix) = 0.6_kind_phys
400 albivis_ice(ix) = 0.6_kind_phys
401 albinir_ice(ix) = 0.6_kind_phys
402 emiss_ice(ix) = 0.97_kind_phys
406 noahmp_init:
if (lsm == lsm_noahmp)
then
407 allocate(dzsno(lsnow_lsm_lbound:lsnow_lsm_ubound))
408 allocate(dzsnso(lsnow_lsm_lbound:lsoil) )
471 tahxy(ix) = tsfcl(ix)
473 if (snowd(ix) > 0.01_kind_phys .and. tsfcl(ix) > con_t0c )
then
479 canicexy(ix) = 0.0_kind_phys
480 canliqxy(ix) = canopy(ix)
482 eahxy(ix) = 2000.0_kind_phys
487 sneqvoxy(ix) = weasd(ix)
488 alboldxy(ix) = 0.65_kind_phys
496 waxy(ix) = 4900.0_kind_phys
498 zwtxy(ix) = (25.0_kind_phys + 2.0_kind_phys) - waxy(ix) / 1000.0_kind_phys / 0.2_kind_phys
501 if (vegtyp == 0) vegtyp = 7
503 if ((vegtyp == isbarren_table) .or. (vegtyp == isice_table) .or. (vegtyp == isurban_table) .or. (vegtyp == iswater_table))
then
518 xlaixy(ix) = max(laim_table(vegtyp, imn),0.05_kind_phys)
520 xsaixy(ix) = max(xlaixy(ix)*0.1_kind_phys,0.05_kind_phys)
522 masslai = 1000.0_kind_phys / max(sla_table(vegtyp),
one)
523 lfmassxy(ix) = xlaixy(ix)*masslai
524 masssai = 1000.0_kind_phys / 3.0_kind_phys
525 stmassxy(ix) = xsaixy(ix)* masssai
527 rtmassxy(ix) = 500.0_kind_phys
529 woodxy(ix) = 500.0_kind_phys
530 stblcpxy(ix) = 1000.0_kind_phys
531 fastcpxy(ix) = 1000.0_kind_phys
535 if (vegtyp == isice_table)
then
537 stc(ix,is) = min(stc(ix,is),min(tg3(ix),263.15_kind_phys))
543 snd = snowd(ix)/1000.0_kind_phys
545 if (weasd(ix) /=
zero .and. snd ==
zero )
then
546 snd = weasd(ix)/1000.0
549 if (vegtyp == 15)
then
550 if (weasd(ix) < 0.1_kind_phys)
then
551 weasd(ix) = 0.1_kind_phys
556 if (snd < 0.025_kind_phys )
then
559 elseif (snd >= 0.025_kind_phys .and. snd <= 0.05_kind_phys )
then
560 snowxy(ix) = -1.0_kind_phys
562 elseif (snd > 0.05_kind_phys .and. snd <= 0.10_kind_phys )
then
563 snowxy(ix) = -2.0_kind_phys
564 dzsno(-1) = 0.5_kind_phys*snd
565 dzsno(0) = 0.5_kind_phys*snd
566 elseif (snd > 0.10_kind_phys .and. snd <= 0.25_kind_phys )
then
567 snowxy(ix) = -2.0_kind_phys
568 dzsno(-1) = 0.05_kind_phys
569 dzsno(0) = snd - 0.05_kind_phys
570 elseif (snd > 0.25_kind_phys .and. snd <= 0.45_kind_phys )
then
571 snowxy(ix) = -3.0_kind_phys
572 dzsno(-2) = 0.05_kind_phys
573 dzsno(-1) = 0.5_kind_phys*(snd-0.05_kind_phys)
574 dzsno(0) = 0.5_kind_phys*(snd-0.05_kind_phys)
575 elseif (snd > 0.45_kind_phys)
then
576 snowxy(ix) = -3.0_kind_phys
577 dzsno(-2) = 0.05_kind_phys
578 dzsno(-1) = 0.20_kind_phys
579 dzsno(0) = snd - 0.05_kind_phys - 0.20_kind_phys
581 myerrmsg =
'Error in GFS_phys_time_vary.fv3.F90: Problem with the logic assigning snow layers in Noah MP initialization'
583 call copy_error(myerrmsg, myerrflg, errmsg, errflg)
594 isnow = nint(snowxy(ix))+1
597 tsnoxy(ix,is) = tgxy(ix)
598 snliqxy(ix,is) =
zero
599 snicexy(ix,is) =
one * dzsno(is) * weasd(ix)/snd
605 dzsnso(is) = -dzsno(is)
609 dzsnso(is) = -dzs(is)
614 zsnsoxy(ix,isnow) = dzsnso(isnow)
616 zsnsoxy(ix,is) = zsnsoxy(ix,is-1) + dzsnso(is)
623 if (soiltyp /= 0)
then
624 bexp = bexp_table(soiltyp)
625 smcmax = smcmax_table(soiltyp)
626 smcwlt = smcwlt_table(soiltyp)
627 dwsat = dwsat_table(soiltyp)
628 dksat = dksat_table(soiltyp)
629 psisat = -psisat_table(soiltyp)
632 if (vegtyp == isurban_table)
then
633 smcmax = 0.45_kind_phys
634 smcwlt = 0.40_kind_phys
637 if ((bexp >
zero) .and. (smcmax >
zero) .and. (-psisat >
zero))
then
640 ddz = -zs(is+1) * 0.5_kind_phys
641 elseif ( is < lsoil )
then
642 ddz = ( zs(is-1) - zs(is+1) ) * 0.5_kind_phys
644 ddz = zs(is-1) - zs(is)
646 smoiseq(ix,is) = min(max(
find_eq_smc(bexp, dwsat, dksat, ddz, smcmax),1.e-4_kind_phys),smcmax*0.99_kind_phys)
649 smoiseq(ix,1:4) = smcmax
652 smcwtdxy(ix) = smcmax
653 deeprechxy(ix) =
zero
661 if (errflg/=0)
return
670 if(lkm>0 .and. iopt_lake>0)
then
676 if (lakefrac(i) > lakefrac_threshold .and. lakedepth(i) > lakedepth_threshold )
then
678 use_lake_model(i) = lkm
682 use_lake_model(i) = 0
690 is_initialized = .true.
697 function find_eq_smc(bexp, dwsat, dksat, ddz, smcmax)
result(smc)
699 real(kind=kind_phys),
intent(in) :: bexp, dwsat, dksat, ddz, smcmax
700 real(kind=kind_phys) :: smc
701 real(kind=kind_phys) :: expon, aa, bb, func, dfunc, dx
706 bb = dksat / smcmax ** expon
710 func = (smc - smcmax) * aa + bb * smc ** expon
711 dfunc = aa + bb * expon * smc ** bexp
714 if ( abs(dx) < 1.e-6_kind_phys)
return
727 me, master, cnx, cny, isc, jsc, nrcm, im, levs, kdt, idate, nsswr, fhswr, lsswr, fhour, &
728 imfdeepcnv, cal_pre, random_clds, nscyc, ntoz, h2o_phys, iaerclm, iccn, clstp, &
729 jindx1_o3, jindx2_o3, ddy_o3, ozpl, jindx1_h, jindx2_h, ddy_h, h2opl, iflip, &
730 jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, &
731 jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, in_nm, ccn_nm, fn_nml, &
732 imap, jmap, prsl, seed0, rann, nthrds, nx, ny, nsst, tile_num, nlunit, lsoil, lsoil_lsm,&
733 kice, ialb, isot, ivegsrc, input_nml_file, use_ufo, nst_anl, frac_grid, fhcyc, phour, &
734 lakefrac, min_seaice, min_lakeice, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, &
735 tsfc, tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, zorli, zorll, &
736 zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, stype,scolor, shdmin, shdmax, snowd, &
737 cv, cvb, cvt, oro, oro_uf, xlat_d, xlon_d, slmsk, landfrac, ozphys, &
738 do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, errmsg, errflg)
743 integer,
intent(in) :: me, master, cnx, cny, isc, jsc, nrcm, im, levs, kdt, &
744 nsswr, imfdeepcnv, iccn, nscyc, ntoz, iflip
745 integer,
intent(in) :: idate(:)
746 real(kind_phys),
intent(in) :: fhswr, fhour
747 logical,
intent(in) :: lsswr, cal_pre, random_clds, h2o_phys, iaerclm
748 real(kind_phys),
intent(out) :: clstp
749 integer,
intent(in),
optional :: jindx1_o3(:), jindx2_o3(:), jindx1_h(:), jindx2_h(:)
750 real(kind_phys),
intent(in),
optional :: ddy_o3(:), ddy_h(:)
751 real(kind_phys),
intent(inout) :: ozpl(:,:,:), h2opl(:,:,:)
752 integer,
intent(in),
optional :: jindx1_aer(:), jindx2_aer(:), iindx1_aer(:), iindx2_aer(:)
753 real(kind_phys),
intent(in),
optional :: ddy_aer(:), ddx_aer(:)
754 real(kind_phys),
intent(inout) :: aer_nm(:,:,:)
755 integer,
intent(in),
optional :: jindx1_ci(:), jindx2_ci(:), iindx1_ci(:), iindx2_ci(:)
756 real(kind_phys),
intent(in),
optional :: ddy_ci(:), ddx_ci(:)
757 real(kind_phys),
intent(inout) :: in_nm(:,:), ccn_nm(:,:)
758 integer,
intent(in) :: imap(:), jmap(:)
759 real(kind_phys),
intent(in) :: prsl(:,:)
760 integer,
intent(in) :: seed0
761 real(kind_phys),
intent(inout) :: rann(:,:)
763 logical,
intent(in) :: do_ugwp_v1
764 integer,
intent(in),
optional :: jindx1_tau(:), jindx2_tau(:)
765 real(kind_phys),
intent(in),
optional :: ddy_j1tau(:), ddy_j2tau(:)
766 real(kind_phys),
intent(inout) :: tau_amf(:)
770 integer,
intent(in) :: nthrds, nx, ny, nsst, tile_num, nlunit, lsoil
771 integer,
intent(in) :: lsoil_lsm, kice, ialb, isot, ivegsrc
772 character(len=*),
intent(in) :: input_nml_file(:)
773 character(len=*),
intent(in) :: fn_nml
774 logical,
intent(in) :: use_ufo, nst_anl, frac_grid
775 real(kind_phys),
intent(in) :: fhcyc, phour, lakefrac(:), min_seaice, min_lakeice, &
776 xlat_d(:), xlon_d(:), landfrac(:)
777 real(kind_phys),
intent(inout) :: smc(:,:), slc(:,:), stc(:,:), tiice(:,:), tg3(:), &
778 tsfc(:), tsfco(:), tisfc(:), hice(:), fice(:), &
779 facsf(:), facwf(:), alvsf(:), alvwf(:), alnsf(:), alnwf(:), &
780 zorli(:), zorll(:), zorlo(:), weasd(:), snoalb(:), &
781 canopy(:), vfrac(:), shdmin(:), shdmax(:), &
782 snowd(:), cv(:), cvb(:), cvt(:), oro(:), oro_uf(:), slmsk(:)
783 real(kind_phys),
intent(inout),
optional :: smois(:,:), sh2o(:,:), tslb(:,:), tref(:)
784 integer,
intent(inout) :: vtype(:), stype(:),scolor(:), slope(:)
786 character(len=*),
intent(out) :: errmsg
787 integer,
intent(out) :: errflg
790 integer :: i, j, k, iseed, iskip, ix, idat(8), jdat(8), iday, j1, j2, nc, n1, n2, jdow, &
791 jdoy, jday, w3kindreal, w3kindint
792 real(kind_phys) :: wrk(1), tem, tx1, tx2, rjday
793 real(kind_phys) :: rannie(cny)
794 real(kind_phys) :: rndval(cnx*cny*nrcm)
795 real(kind_dbl_prec) :: rinc(5)
802 if (.not.is_initialized)
then
803 write(errmsg,
'(*(a))')
"Logic error: GFS_phys_time_vary_timestep_init called before GFS_phys_time_vary_init"
825 if ((mod(kdt,nsswr) == 0) .and. (lsswr))
then
828 elseif (mod(kdt,nsswr) == 0)
then
843 if ( (imfdeepcnv <= 0 .or. cal_pre) .and. random_clds )
then
849 iseed = iseed + nint(wrk(1)*1000.0) * i
852 rndval(1+(i-1)*cny:i*cny) = rannie(1:cny)
856 iskip = (k-1)*cnx*cny
860 rann(ix,k) = rndval(i+isc-1 + (j+jsc-2)*cnx + iskip)
875 CALL w3movdat(rinc,idat,jdat)
879 call w3doxdat(jdat,jdow,jdoy,jday)
880 rjday = jdoy + jdat(5) / 24.
881 if (rjday < ozphys%time(1)) rjday = rjday + 365.
883 n2 = ozphys%ntime + 1
885 if (rjday < ozphys%time(j))
then
891 if (n2 > ozphys%ntime) n2 = n2 - ozphys%ntime
895 call ozphys%update_o3prog(jindx1_o3, jindx2_o3, ddy_o3, rjday, n1, n2, ozpl)
901 call h2ointerpol (me, im, idate, fhour, &
902 jindx1_h, jindx2_h, &
909 call ciinterpol (me, im, idate, fhour, &
910 jindx1_ci, jindx2_ci, &
913 levs, prsl, in_nm, ccn_nm)
919 call tau_amf_interp(me, master, im, idate, fhour, &
920 jindx1_tau, jindx2_tau, &
921 ddy_j1tau, ddy_j2tau, tau_amf)
931 call aerinterpol (me, master, nthrds, im, idate, &
932 fhour, iflip, jindx1_aer, jindx2_aer, &
933 ddy_aer, iindx1_aer, &
934 iindx2_aer, ddx_aer, &
935 levs, prsl, aer_nm, errmsg, errflg)
943 if (mod(kdt,nscyc) == 1)
THEN
944 call gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, fn_nml, &
945 input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, &
946 use_ufo, nst_anl, fhcyc, phour, landfrac, lakefrac, min_seaice, min_lakeice,&
947 frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, &
948 tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, &
949 zorli, zorll, zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, &
950 stype, scolor, shdmin, shdmax, snowd, cv, cvb, cvt, oro, oro_uf, &
951 xlat_d, xlon_d, slmsk, imap, jmap, errmsg, errflg)
subroutine, public gfs_phys_time_vary_init(me, master, ntoz, h2o_phys, iaerclm, iccn, iflip, im, nx, ny, idate, xlat_d, xlon_d, jindx1_o3, jindx2_o3, ddy_o3, jindx1_h, jindx2_h, ddy_h, h2opl, fhour, jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, imap, jmap, do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, isot, ivegsrc, nlunit, sncovr, sncovr_ice, lsm, lsm_noahmp, lsm_ruc, min_seaice, fice, landfrac, vtype, weasd, lsoil, zs, dzs, lsnow_lsm_lbound, lsnow_lsm_ubound, tvxy, tgxy, tahxy, canicexy, canliqxy, eahxy, cmxy, chxy, fwetxy, sneqvoxy, alboldxy, qsnowxy, wslakexy, albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, albdvis_ice, albdnir_ice, albivis_ice, albinir_ice, emiss_lnd, emiss_ice, taussxy, waxy, wtxy, zwtxy, xlaixy, xsaixy, lfmassxy, stmassxy, rtmassxy, woodxy, stblcpxy, fastcpxy, smcwtdxy, deeprechxy, rechxy, snowxy, snicexy, snliqxy, tsnoxy, smoiseq, zsnsoxy, slc, smc, stc, tsfcl, snowd, canopy, tg3, stype, con_t0c, lsm_cold_start, nthrds, ozphys, errmsg, errflg)
subroutine, public gcycle(me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, fn_nml, input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, use_ufo, nst_anl, fhcyc, phour, landfrac, lakefrac, min_seaice, min_lakeice, frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, zorli, zorll, zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, stype, scolor, shdmin, shdmax, snowd, cv, cvb, cvt, oro, oro_uf, xlat_d, xlon_d, slmsk, imap, jmap, errmsg, errflg)
This subroutine repopulates specific time-varying surface properties for atmospheric forecast runs.
subroutine, public gfs_phys_time_vary_timestep_init(me, master, cnx, cny, isc, jsc, nrcm, im, levs, kdt, idate, nsswr, fhswr, lsswr, fhour, imfdeepcnv, cal_pre, random_clds, ozphys, ntoz, h2o_phys, iaerclm, iccn, clstp, jindx1_o3, jindx2_o3, ddy_o3, ozpl, jindx1_h, jindx2_h, ddy_h, h2opl, iflip, jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, in_nm, ccn_nm, imap, jmap, prsl, seed0, rann, do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, nthrds, errmsg, errflg)