41 private :: canopy_wind
45 private :: multi_layer
46 private :: urban_param_setup
54 logical,
allocatable,
private :: is_urb(:,:)
56 real(RP),
private :: dts_max = 0.1_rp
58 real(RP),
private :: zr = 10.0_rp
59 real(RP),
private :: roof_width = 9.0_rp
60 real(RP),
private :: road_width = 11.0_rp
61 real(RP),
private :: sigma_zed = 1.0_rp
62 real(RP),
private :: ah = 17.5_rp
63 real(RP),
private :: alh = 0.0_rp
64 real(RP),
private :: betr = 0.0_rp
65 real(RP),
private :: betb = 0.0_rp
66 real(RP),
private :: betg = 0.0_rp
67 real(RP),
private :: strgr = 0.0_rp
68 real(RP),
private :: strgb = 0.0_rp
69 real(RP),
private :: strgg = 0.0_rp
70 real(RP),
private :: capr = 1.2e6_rp
71 real(RP),
private :: capb = 1.2e6_rp
72 real(RP),
private :: capg = 1.2e6_rp
73 real(RP),
private :: aksr = 2.28_rp
74 real(RP),
private :: aksb = 2.28_rp
75 real(RP),
private :: aksg = 2.28_rp
76 real(RP),
private :: albr = 0.2_rp
77 real(RP),
private :: albb = 0.2_rp
78 real(RP),
private :: albg = 0.2_rp
79 real(RP),
private :: epsr = 0.90_rp
80 real(RP),
private :: epsb = 0.90_rp
81 real(RP),
private :: epsg = 0.90_rp
82 real(RP),
private :: z0r = 0.01_rp
83 real(RP),
private :: z0b = 0.0001_rp
84 real(RP),
private :: z0g = 0.01_rp
85 real(RP),
private :: trlend = 293.00_rp
86 real(RP),
private :: tblend = 293.00_rp
87 real(RP),
private :: tglend = 293.00_rp
88 integer ,
private :: bound = 1
90 real(RP),
private :: ahdiurnal(1:24)
93 real(RP),
private :: r
94 real(RP),
private :: rw
95 real(RP),
private :: hgt
96 real(RP),
private :: z0hr
97 real(RP),
private :: z0hb
98 real(RP),
private :: z0hg
99 real(RP),
private :: z0c
100 real(RP),
private :: z0hc
101 real(RP),
private :: zdc
102 real(RP),
private :: svf
104 real(RP),
private,
allocatable :: dzr(:)
105 real(RP),
private,
allocatable :: dzb(:)
106 real(RP),
private,
allocatable :: dzg(:)
108 real(RP),
private :: xxxr = 0.0_rp
109 real(RP),
private :: xxxc = 0.0_rp
125 character(len=*),
intent(in) :: URBAN_TYPE
126 real(RP) ,
intent(out) :: Z0M(
ia,
ja)
127 real(RP) ,
intent(out) :: Z0H(
ia,
ja)
128 real(RP) ,
intent(out) :: Z0E(
ia,
ja)
131 namelist / param_urban_phy_slc / &
169 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[SLC] / Categ[URBAN PHY] / Origin[SCALElib]' 174 dzr(
uks:
uke) = (/0.01_rp,0.01_rp,0.03_rp,0.05_rp,0.10_rp/)
175 dzb(
uks:
uke) = (/0.01_rp,0.01_rp,0.03_rp,0.05_rp,0.10_rp/)
176 dzg(
uks:
uke) = (/0.01_rp,0.01_rp,0.03_rp,0.05_rp,0.10_rp/)
180 read(
io_fid_conf,nml=param_urban_phy_slc,iostat=ierr)
182 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 183 elseif( ierr > 0 )
then 184 write(*,*)
'xxx Not appropriate names in namelist PARAM_URBAN_PHY_SLC. Check!' 189 ahdiurnal(:) = (/ 0.356, 0.274, 0.232, 0.251, 0.375, 0.647, 0.919, 1.135, 1.249, 1.328, &
190 1.365, 1.363, 1.375, 1.404, 1.457, 1.526, 1.557, 1.521, 1.372, 1.206, &
191 1.017, 0.876, 0.684, 0.512 /)
194 call urban_param_setup
197 allocate( is_urb(
ia,
ja) )
204 is_urb(i,j) = .false.
212 if( is_urb(i,j) )
then 289 qsat => atmos_saturation_pres2qsat_all
295 logical,
parameter :: LSOLAR = .false.
297 real(RP),
parameter :: Uabs_min = 0.1_rp
300 real(RP),
intent(out) :: TR_URB_t (
ia,
ja)
301 real(RP),
intent(out) :: TB_URB_t (
ia,
ja)
302 real(RP),
intent(out) :: TG_URB_t (
ia,
ja)
303 real(RP),
intent(out) :: TC_URB_t (
ia,
ja)
304 real(RP),
intent(out) :: QC_URB_t (
ia,
ja)
305 real(RP),
intent(out) :: UC_URB_t (
ia,
ja)
306 real(RP),
intent(out) :: TRL_URB_t (
uks:
uke,
ia,
ja)
307 real(RP),
intent(out) :: TBL_URB_t (
uks:
uke,
ia,
ja)
308 real(RP),
intent(out) :: TGL_URB_t (
uks:
uke,
ia,
ja)
309 real(RP),
intent(out) :: RAINR_URB_t(
ia,
ja)
310 real(RP),
intent(out) :: RAINB_URB_t(
ia,
ja)
311 real(RP),
intent(out) :: RAING_URB_t(
ia,
ja)
312 real(RP),
intent(out) :: ROFF_URB_t (
ia,
ja)
314 real(RP),
intent(out) :: SFC_TEMP(
ia,
ja)
315 real(RP),
intent(out) :: ALBD_LW (
ia,
ja)
316 real(RP),
intent(out) :: ALBD_SW (
ia,
ja)
317 real(RP),
intent(out) :: MWFLX (
ia,
ja)
318 real(RP),
intent(out) :: MUFLX (
ia,
ja)
319 real(RP),
intent(out) :: MVFLX (
ia,
ja)
320 real(RP),
intent(out) :: SHFLX (
ia,
ja)
321 real(RP),
intent(out) :: LHFLX (
ia,
ja)
322 real(RP),
intent(out) :: GHFLX (
ia,
ja)
323 real(RP),
intent(out) :: Z0M (
ia,
ja)
324 real(RP),
intent(out) :: Z0H (
ia,
ja)
325 real(RP),
intent(out) :: Z0E (
ia,
ja)
326 real(RP),
intent(out) :: U10 (
ia,
ja)
327 real(RP),
intent(out) :: V10 (
ia,
ja)
328 real(RP),
intent(out) :: T2 (
ia,
ja)
329 real(RP),
intent(out) :: Q2 (
ia,
ja)
331 real(RP),
intent(in) :: TMPA (
ia,
ja)
332 real(RP),
intent(in) :: PRSA (
ia,
ja)
333 real(RP),
intent(in) :: W1 (
ia,
ja)
334 real(RP),
intent(in) :: U1 (
ia,
ja)
335 real(RP),
intent(in) :: V1 (
ia,
ja)
336 real(RP),
intent(in) :: DENS (
ia,
ja)
337 real(RP),
intent(in) :: QA (
ia,
ja)
338 real(RP),
intent(in) :: Z1 (
ia,
ja)
339 real(RP),
intent(in) :: PBL (
ia,
ja)
340 real(RP),
intent(in) :: PRSS (
ia,
ja)
341 real(RP),
intent(in) :: LWD (
ia,
ja,2)
342 real(RP),
intent(in) :: SWD (
ia,
ja,2)
343 real(RP),
intent(in) :: PREC (
ia,
ja)
345 real(RP),
intent(in) :: TR_URB (
ia,
ja)
346 real(RP),
intent(in) :: TB_URB (
ia,
ja)
347 real(RP),
intent(in) :: TG_URB (
ia,
ja)
348 real(RP),
intent(in) :: TC_URB (
ia,
ja)
349 real(RP),
intent(in) :: QC_URB (
ia,
ja)
350 real(RP),
intent(in) :: UC_URB (
ia,
ja)
351 real(RP),
intent(in) :: TRL_URB (
uks:
uke,
ia,
ja)
352 real(RP),
intent(in) :: TBL_URB (
uks:
uke,
ia,
ja)
353 real(RP),
intent(in) :: TGL_URB (
uks:
uke,
ia,
ja)
354 real(RP),
intent(in) :: RAINR_URB(
ia,
ja)
355 real(RP),
intent(in) :: RAINB_URB(
ia,
ja)
356 real(RP),
intent(in) :: RAING_URB(
ia,
ja)
357 real(RP),
intent(in) :: ROFF_URB (
ia,
ja)
359 real(RP),
intent(in) :: LON
360 real(RP),
intent(in) :: LAT
361 integer,
intent(in) :: NOWDATE(6)
362 real(DP),
intent(in) :: dt
379 real(RP) :: SHR (
ia,
ja)
380 real(RP) :: SHB (
ia,
ja)
381 real(RP) :: SHG (
ia,
ja)
382 real(RP) :: LHR (
ia,
ja)
383 real(RP) :: LHB (
ia,
ja)
384 real(RP) :: LHG (
ia,
ja)
385 real(RP) :: GHR (
ia,
ja)
386 real(RP) :: GHB (
ia,
ja)
387 real(RP) :: GHG (
ia,
ja)
388 real(RP) :: RNR (
ia,
ja)
389 real(RP) :: RNB (
ia,
ja)
390 real(RP) :: RNG (
ia,
ja)
391 real(RP) :: RNgrd(
ia,
ja)
403 if(
io_l )
write(
io_fid_log,*)
'*** Urban step: Single Layer Canopy' 409 if( is_urb(i,j) )
then 411 uabs = max( sqrt( u1(i,j)**2 + v1(i,j)**2 + w1(i,j)**2 ), uabs_min )
422 trl(k) = trl_urb(k,i,j)
423 tbl(k) = tbl_urb(k,i,j)
424 tgl(k) = tgl_urb(k,i,j)
427 rainr = rainr_urb(i,j)
428 rainb = rainb_urb(i,j)
429 raing = raing_urb(i,j)
487 tr_urb_t(i,j) = ( tr - tr_urb(i,j) ) / dt
488 tb_urb_t(i,j) = ( tb - tb_urb(i,j) ) / dt
489 tg_urb_t(i,j) = ( tg - tg_urb(i,j) ) / dt
490 tc_urb_t(i,j) = ( tc - tc_urb(i,j) ) / dt
491 qc_urb_t(i,j) = ( qc - qc_urb(i,j) ) / dt
492 uc_urb_t(i,j) = ( uc - uc_urb(i,j) ) / dt
495 trl_urb_t(k,i,j) = ( trl(k) - trl_urb(k,i,j) ) / dt
496 tbl_urb_t(k,i,j) = ( tbl(k) - tbl_urb(k,i,j) ) / dt
497 tgl_urb_t(k,i,j) = ( tgl(k) - tgl_urb(k,i,j) ) / dt
500 rainr_urb_t(i,j) = ( rainr - rainr_urb(i,j) ) / dt
501 rainb_urb_t(i,j) = ( rainb - rainb_urb(i,j) ) / dt
502 raing_urb_t(i,j) = ( raing - raing_urb(i,j) ) / dt
503 roff_urb_t(i,j) = ( roff - roff_urb(i,j) ) / dt
506 call qsat( qvs, sfc_temp(i,j), prss(i,j) )
526 mwflx(i,j) = -dens(i,j) * ustar**2 / uabs * w1(i,j)
527 muflx(i,j) = -dens(i,j) * ustar**2 / uabs * u1(i,j)
528 mvflx(i,j) = -dens(i,j) * ustar**2 / uabs * v1(i,j)
536 tr_urb_t(i,j) = 0.0_rp
537 tb_urb_t(i,j) = 0.0_rp
538 tg_urb_t(i,j) = 0.0_rp
539 tc_urb_t(i,j) = 0.0_rp
540 qc_urb_t(i,j) = 0.0_rp
541 uc_urb_t(i,j) = 0.0_rp
542 trl_urb_t(:,i,j) = 0.0_rp
543 tbl_urb_t(:,i,j) = 0.0_rp
544 tgl_urb_t(:,i,j) = 0.0_rp
545 rainr_urb_t(i,j) = 0.0_rp
546 rainb_urb_t(i,j) = 0.0_rp
547 raing_urb_t(i,j) = 0.0_rp
548 roff_urb_t(i,j) = 0.0_rp
549 sfc_temp(i,j) = 300.0_rp
550 albd_lw(i,j) = 0.0_rp
551 albd_sw(i,j) = 0.0_rp
584 call hist_in( shr(:,:),
'URBAN_SHR',
'urban sensible heat flux on roof',
'W/m2' )
585 call hist_in( shb(:,:),
'URBAN_SHB',
'urban sensible heat flux on wall',
'W/m2' )
586 call hist_in( shg(:,:),
'URBAN_SHG',
'urban sensible heat flux on road',
'W/m2' )
587 call hist_in( lhr(:,:),
'URBAN_LHR',
'urban latent heat flux on roof',
'W/m2' )
588 call hist_in( lhb(:,:),
'URBAN_LHB',
'urban latent heat flux on wall',
'W/m2' )
589 call hist_in( lhg(:,:),
'URBAN_LHG',
'urban latent heat flux on road',
'W/m2' )
590 call hist_in( ghr(:,:),
'URBAN_GHR',
'urban ground heat flux on roof',
'W/m2' )
591 call hist_in( ghb(:,:),
'URBAN_GHB',
'urban ground heat flux on wall',
'W/m2' )
592 call hist_in( ghg(:,:),
'URBAN_GHG',
'urban ground heat flux on road',
'W/m2' )
593 call hist_in( rnr(:,:),
'URBAN_RNR',
'urban net radiation on roof',
'W/m2' )
594 call hist_in( rnb(:,:),
'URBAN_RNB',
'urban net radiation on wall',
'W/m2' )
595 call hist_in( rng(:,:),
'URBAN_RNG',
'urban net radiation on road',
'W/m2' )
596 call hist_in( rngrd(:,:),
'URBAN_RNgrd',
'urban grid average of net radiation',
'W/m2' )
602 subroutine slc_main( &
665 karman => const_karman, &
666 cpdry => const_cpdry, &
667 grav => const_grav, &
668 rdry => const_rdry, &
669 rvap => const_rvap, &
671 tem00 => const_tem00, &
674 atmos_thermodyn_templhv
676 qsat => atmos_saturation_pres2qsat_all
680 logical ,
intent(in) :: LSOLAR
683 real(RP),
intent(in) :: PRSA
684 real(RP),
intent(in) :: PRSS
685 real(RP),
intent(in) :: TA
686 real(RP),
intent(in) :: QA
687 real(RP),
intent(in) :: UA
688 real(RP),
intent(in) :: U1
689 real(RP),
intent(in) :: V1
690 real(RP),
intent(in) :: ZA
691 real(RP),
intent(in) :: SSG(2)
692 real(RP),
intent(in) :: LLG(2)
693 real(RP),
intent(in) :: RAIN
694 real(RP),
intent(in) :: RHOO
695 real(RP),
intent(in) :: XLAT
696 real(RP),
intent(in) :: XLON
697 integer,
intent(in) :: NOWDATE(6)
698 real(DP),
intent(in) :: dt
701 real(RP),
intent(inout) :: TR
702 real(RP),
intent(inout) :: TB
703 real(RP),
intent(inout) :: TG
704 real(RP),
intent(inout) :: TC
705 real(RP),
intent(inout) :: QC
706 real(RP),
intent(inout) :: UC
707 real(RP),
intent(inout) :: TRL(
uks:
uke)
708 real(RP),
intent(inout) :: TBL(
uks:
uke)
709 real(RP),
intent(inout) :: TGL(
uks:
uke)
710 real(RP),
intent(inout) :: RAINR
711 real(RP),
intent(inout) :: RAINB
712 real(RP),
intent(inout) :: RAING
713 real(RP),
intent(inout) :: ROFF
716 real(RP),
intent(out) :: ALBD_SW_grid
717 real(RP),
intent(out) :: ALBD_LW_grid
718 real(RP),
intent(out) :: RTS
719 real(RP),
intent(out) :: SH
720 real(RP),
intent(out) :: LH
721 real(RP),
intent(out) :: GHFLX
722 real(RP),
intent(out) :: RN
723 real(RP),
intent(out) :: U10
724 real(RP),
intent(out) :: V10
725 real(RP),
intent(out) :: T2
726 real(RP),
intent(out) :: Q2
727 real(RP),
intent(out) :: RNR, RNB, RNG
728 real(RP),
intent(out) :: SHR, SHB, SHG
729 real(RP),
intent(out) :: LHR, LHB, LHG
730 real(RP),
intent(out) :: GHR, GHB, GHG
731 integer ,
intent(in) :: i, j
737 real(RP),
parameter :: redf_min = 1.0e-2_rp
738 real(RP),
parameter :: redf_max = 1.0_rp
751 real(RP) :: tahdiurnal
758 real(RP) :: W, VFGS, VFGW, VFWG, VFWS, VFWW
777 real(RP) :: ROFFR, ROFFB, ROFFG
779 real(RP) :: LUP, LDN, RUP
782 real(RP) :: LNET, SNET, FLXUV
785 real(RP) :: psim,psim2,psim10
786 real(RP) :: psih,psih2,psih10
795 real(RP) :: SR, SB, SG, RR, RB, RG
796 real(RP) :: SR1, SB1, SB2, SG1, SG2
797 real(RP) :: RB1, RB2, RG1, RG2
798 real(RP) :: HR, ELER, G0R
799 real(RP) :: HB, ELEB, G0B
800 real(RP) :: HG, ELEG, G0G
803 real(RP) :: QS0R, QS0B, QS0G
805 real(RP) :: RIBR, BHR, CDR
806 real(RP) :: RIBC, BHC, CDC
807 real(RP) :: ALPHAR, ALPHAB, ALPHAG, ALPHAC
808 real(RP) :: CHR, CHB, CHG, CHC
809 real(RP) :: TC1, TC2, QC1, QC2
812 real(RP) :: DTS_MAX_onestep = 0.0_rp
813 real(RP) :: resi1,resi2
814 real(RP) :: resi1p,resi2p
815 real(RP) :: G0RP,G0BP,G0GP
817 real(RP) :: XXX, X, CD, CH, CHU, XXX2, XXX10
819 real(RP) :: THA,THC,THS,THS1,THS2
828 call atmos_thermodyn_templhv( lhv, ta )
831 tha = ta * ( pre00 / prsa )**rovcp
853 time =
real( NOWDATE(4)*3600.0_RP + NOWDATE(5)*60.0_RP + NOWDATE(6), kind=
rp )
854 tloc = mod((nowdate(4) + int(lon/15.0_rp)),24 )
855 dsec =
real( NOWDATE(5)*60.0_RP + NOWDATE(6), kind=RP ) / 3600.0_RP
856 if( tloc == 0 ) tloc = 24
859 if ( tloc == 24 )
then 860 tahdiurnal = ( 1.0_rp-dsec ) * ahdiurnal(tloc ) &
861 + ( dsec ) * ahdiurnal(1 )
863 tahdiurnal = ( 1.0_rp-dsec ) * ahdiurnal(tloc ) &
864 + ( dsec ) * ahdiurnal(tloc+1)
866 ah_t = ah * tahdiurnal
867 alh_t = alh * tahdiurnal
870 dts_max_onestep = dts_max * dt
872 if ( zdc + z0c + 2.0_rp >= za )
then 873 if(
io_l )
write(
io_fid_log,*)
'ZDC + Z0C + 2m is larger than the 1st WRF level' // &
874 'Stop in subroutine urban - change ZDC and Z0C' 878 w = 2.0_rp * 1.0_rp * hgt
881 vfwg = ( 1.0_rp - svf ) * ( 1.0_rp - r ) / w
883 vfww = 1.0_rp - 2.0_rp * vfwg
893 call canopy_wind(za, ua, uc)
900 raint = 1.0_rp * ( rain * dt )
901 call cal_beta(betr, raint, rainr, strgr, roffr)
903 raint = 0.1_rp * ( rain * dt )
904 call cal_beta(betb, raint, rainb, strgb, roffb)
906 raint = 0.9_rp * ( rain * dt )
907 call cal_beta(betg, raint, raing, strgg, roffg)
909 roff = roff + r * roffr + rw * ( roffb + roffg )
915 if( sx > 0.0_rp )
then 920 sr1 = sx * ( 1.0_rp - albr )
921 sg1 = sx * vfgs * ( 1.0_rp - albg )
922 sb1 = sx * vfws * ( 1.0_rp - albb )
923 sg2 = sb1 * albb / ( 1.0_rp - albb ) * vfgw * ( 1.0_rp - albg )
924 sb2 = sg1 * albg / ( 1.0_rp - albg ) * vfwg * ( 1.0_rp - albb )
929 snet = r * sr + w * sb + rw * sg
953 do iteration = 1, 100
955 ths = tr * ( pre00 / prss )**rovcp
958 bhr =
log(z0r/z0hr) / 0.4_rp
959 ribr = ( grav * 2.0_rp / (tha+ths) ) * (tha-ths) * (z+z0r) / (ua*ua)
960 call mos(xxxr,chr,cdr,bhr,ribr,z,z0r,ua,tha,ths,rhoo)
962 call qsat( qs0r, tr, prss )
964 rr = epsr * ( rx - stb * (tr**4) )
966 hr = rhoo * cpdry * chr * ua * (ths-tha)
967 eler = rhoo * lhv * chr * ua * betr * (qs0r-qa)
968 g0r = sr + rr - hr - eler
982 call multi_layer(
uke,bound,g0r,capr,aksr,trl,dzr,dt,trlend)
987 if( abs(resi1) < sqrt(eps) )
then 989 tr = max( trp - dts_max_onestep, min( trp + dts_max_onestep, tr ) )
993 if ( resi1*resi1p < 0.0_rp )
then 994 tr = (tr + trl(1)) * 0.5_rp
998 tr = max( trp - dts_max_onestep, min( trp + dts_max_onestep, tr ) )
1011 if ( iteration > 100 )
then 1012 if(
io_l )
write(
io_fid_log,*)
'*** Warning: Kusaka urban (SLC_main) iteration for TR was not converged',
prc_myrank,i,j
1013 if(
io_l )
write(
io_fid_log,*)
'---------------------------------------------------------------------------------' 1014 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Residual [K] :', resi1
1016 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TRP : Initial TR [K] :', trp
1017 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TRLP: Initial TRL [K] :', trlp
1019 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- SX : Shortwave radiation [W/m2] :', sx
1020 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- RX : Longwave radiation [W/m2] :', rx
1021 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- PRSS: Surface pressure [Pa] :', prss
1022 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- PRSA: Pressure at 1st atmos layer [m] :', prsa
1023 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- RHOO: Air density [kg/m3] :', rhoo
1024 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- ZA : Height at 1st atmos layer [m] :', za
1025 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TA : Temperature at 1st atmos layer [K] :', ta
1026 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- UA : Wind speed at 1st atmos layer [m/s] :', ua
1027 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QA : Specific humidity at 1st atmos layer [kg/kg] :', qa
1028 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- DZR : Depth of surface layer [m] :', dzr
1030 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- R, W, RW : Normalized height and road width [-] :', r, w,rw
1031 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- SVF : Sky View Factors [-] :', svf
1032 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- BETR: Evaporation efficiency [-] :', betr
1033 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- EPSR: Surface emissivity of roof [-] :', epsr
1034 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- CAPR: Heat capacity of roof [J m-3 K] :', capr
1035 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- AKSR: Thermal conductivity of roof [W m-1 K] :', aksr
1036 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QS0R: Surface specific humidity [kg/kg] :', qs0r
1037 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- ZDC : Desplacement height of canopy [m] :', zdc
1038 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Z0R : Momentum roughness length of roof [m] :', z0r
1039 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Z0HR: Thermal roughness length of roof [m] :', z0hr
1040 if(
io_l )
write(
io_fid_log,*)
'---------------------------------------------------------------------------------' 1044 ths = tr * ( pre00 / prss )**rovcp
1045 ribr = ( grav * 2.0_rp / (tha+ths) ) * (tha-ths) * (z+z0r) / (ua*ua)
1046 call mos(xxxr,chr,cdr,bhr,ribr,z,z0r,ua,tha,ths,rhoo)
1048 call qsat( qs0r, tr, prss )
1050 rr = epsr * ( rx - stb * (tr**4) )
1051 hr = rhoo * cpdry * chr * ua * (ths-tha)
1052 eler = rhoo * lhv * chr * ua * betr * (qs0r-qa)
1053 g0r = sr + rr - hr - eler
1056 call multi_layer(
uke,bound,g0r,capr,aksr,trl,dzr,dt,trlend)
1060 if ( abs(resi1) > dts_max_onestep )
then 1061 if ( abs(resi1) > dts_max_onestep*10.0_rp )
then 1062 if(
io_l )
write(
io_fid_log,*)
'!xxx Error xxx!: Kusaka urban (SLC_main) tendency of TR is over limitter' 1063 if(
io_l )
write(
io_fid_log,*)
'!xxx previous TR and updated TR(TRL(1)) is ',tr-resi1,tr
1066 if(
io_l )
write(
io_fid_log,*)
'!xxx Warning xxx!: Kusaka urban (SLC_main) tendency of TR is over limitter' 1067 if(
io_l )
write(
io_fid_log,*)
'!xxx previous TR and updated TR(TRL(1)) is ',tr-resi1,tr
1077 alphab = 6.15_rp + 4.18_rp * uc
1078 if( uc > 5.0_rp ) alphab = 7.51_rp * (uc**0.78_rp )
1079 alphag = 6.15_rp + 4.18_rp * uc
1080 if( uc > 5.0_rp ) alphag = 7.51_rp * (uc**0.78_rp )
1081 chb = alphab / rhoo / cpdry / uc
1082 chg = alphag / rhoo / cpdry / uc
1090 do iteration = 1, 200
1092 ths1 = tb * ( pre00 / prss )**rovcp
1093 ths2 = tg * ( pre00 / prss )**rovcp
1094 thc = tc * ( pre00 / prss )**rovcp
1097 bhc =
log(z0c/z0hc) / 0.4_rp
1098 ribc = ( grav * 2.0_rp / (tha+thc) ) * (tha-thc) * (z+z0c) / (ua*ua)
1099 call mos(xxxc,chc,cdc,bhc,ribc,z,z0c,ua,tha,thc,rhoo)
1100 alphac = chc * rhoo * cpdry * ua
1102 call qsat( qs0b, tb, prss )
1103 call qsat( qs0g, tg, prss )
1105 tc1 = rw*alphac + rw*alphag + w*alphab
1107 tc2 = rw*alphac*tha + w*alphab*ths1 + rw*alphag*ths2
1109 qc1 = rw*(chc*ua) + rw*(chg*betg*uc) + w*(chb*betb*uc)
1110 qc2 = rw*(chc*ua)*qa + rw*(chg*betg*uc)*qs0g + w*(chb*betb*uc)*qs0b
1113 rg1 = epsg * ( rx * vfgs &
1114 + epsb * vfgw * stb * tb**4 &
1117 rb1 = epsb * ( rx * vfws &
1118 + epsg * vfwg * stb * tg**4 &
1119 + epsb * vfww * stb * tb**4 &
1122 rg2 = epsg * ( (1.0_rp-epsb) * vfgw * vfws * rx &
1123 + (1.0_rp-epsb) * vfgw * vfwg * epsg * stb * tg**4 &
1124 + epsb * (1.0_rp-epsb) * vfgw * vfww * stb * tb**4 )
1126 rb2 = epsb * ( (1.0_rp-epsg) * vfwg * vfgs * rx &
1127 + (1.0_rp-epsg) * epsb * vfgw * vfwg * stb * tb**4 &
1128 + (1.0_rp-epsb) * vfws * vfww * rx &
1129 + (1.0_rp-epsb) * vfwg * vfww * stb * epsg * tg**4 &
1130 + epsb * (1.0_rp-epsb) * vfww * (1.0_rp-2.0_rp*vfws) * stb * tb**4 )
1135 hb = rhoo * cpdry * chb * uc * (ths1-thc)
1136 eleb = rhoo * lhv * chb * uc * betb * (qs0b-qc)
1137 g0b = sb + rb - hb - eleb
1139 hg = rhoo * cpdry * chg * uc * (ths2-thc)
1140 eleg = rhoo * lhv * chg * uc * betg * (qs0g-qc)
1141 g0g = sg + rg - hg - eleg
1144 call multi_layer(
uke,bound,g0b,capb,aksb,tbl,dzb,dt,tblend)
1148 call multi_layer(
uke,bound,g0g,capg,aksg,tgl,dzg,dt,tglend)
1166 if ( abs(resi1) < sqrt(eps) .AND. abs(resi2) < sqrt(eps) )
then 1169 tb = max( tbp - dts_max_onestep, min( tbp + dts_max_onestep, tb ) )
1170 tg = max( tgp - dts_max_onestep, min( tgp + dts_max_onestep, tg ) )
1174 if ( resi1*resi1p < 0.0_rp )
then 1175 tb = (tb + tbl(1)) * 0.5_rp
1179 if ( resi2*resi2p < 0.0_rp )
then 1180 tg = (tg + tgl(1)) * 0.5_rp
1184 tb = max( tbp - dts_max_onestep, min( tbp + dts_max_onestep, tb ) )
1185 tg = max( tgp - dts_max_onestep, min( tgp + dts_max_onestep, tg ) )
1191 call qsat( qs0b, tb, prss )
1192 call qsat( qs0g, tg, prss )
1194 ths1 = tb * ( pre00 / prss )**rovcp
1195 ths2 = tg * ( pre00 / prss )**rovcp
1197 tc1 = rw*alphac + rw*alphag + w*alphab
1199 tc2 = rw*alphac*tha + w*alphab*ths1 + rw*alphag*ths2
1201 tc = thc * ( prss / pre00 )**rovcp
1203 qc1 = rw*(chc*ua) + rw*(chg*betg*uc) + w*(chb*betb*uc)
1204 qc2 = rw*(chc*ua)*qa + rw*(chg*betg*uc)*qs0g + w*(chb*betb*uc)*qs0b
1225 if ( iteration > 200 )
then 1226 if(
io_l )
write(
io_fid_log,*)
'*** Warning: Kusaka urban (SLC_main) iteration for TB/TG was not converged',
prc_myrank,i,j
1227 if(
io_l )
write(
io_fid_log,*)
'---------------------------------------------------------------------------------' 1228 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Residual [K] :', resi1,resi2
1230 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TBP : Initial TB [K] :', tbp
1231 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TBLP: Initial TBL [K] :', tblp
1232 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TGP : Initial TG [K] :', tgp
1233 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TGLP: Initial TGL [K] :', tglp
1234 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TCP : Initial TC [K] :', tcp
1235 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QCP : Initial QC [K] :', qcp
1237 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- UC : Canopy wind [m/s] :', uc
1238 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- SX : Shortwave radiation [W/m2] :', sx
1239 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- RX : Longwave radiation [W/m2] :', rx
1240 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- PRSS: Surface pressure [Pa] :', prss
1241 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- PRSA: Pressure at 1st atmos layer [m] :', prsa
1242 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- RHOO: Air density [kg/m3] :', rhoo
1243 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- ZA : Height at 1st atmos layer [m] :', za
1244 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TA : Temperature at 1st atmos layer [K] :', ta
1245 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- UA : Wind speed at 1st atmos layer [m/s] :', ua
1246 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QA : Specific humidity at 1st atmos layer [kg/kg] :', qa
1247 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- DZB : Depth of surface layer [m] :', dzb
1248 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- DZG : Depth of surface layer [m] :', dzg
1250 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- R, W, RW : Normalized height and road width [-] :', r, w,rw
1251 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- SVF : Sky View Factors [-] :', svf
1252 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- BETB,BETG : Evaporation efficiency [-] :', betb,betg
1253 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- EPSB,EPSG : Surface emissivity [-] :', epsb,epsg
1254 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- CAPB,CAPG : Heat capacity [J m-3 K] :', capb,capg
1255 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- AKSB,AKSG : Thermal conductivity [W m-1 K] :', aksb,aksb
1256 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QS0B,QS0G : Surface specific humidity [kg/kg] :', qs0b,qs0g
1257 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- ZDC : Desplacement height of canopy [m] :', zdc
1258 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Z0C : Momentum roughness length of canopy [m] :', z0c
1259 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Z0HC : Thermal roughness length of canopy [m] :', z0hc
1260 if(
io_l )
write(
io_fid_log,*)
'---------------------------------------------------------------------------------' 1265 rg1 = epsg * ( rx * vfgs &
1266 + epsb * vfgw * stb * tb**4 &
1268 rb1 = epsb * ( rx * vfws &
1269 + epsg * vfwg * stb * tg**4 &
1270 + epsb * vfww * stb * tb**4 &
1273 rg2 = epsg * ( (1.0_rp-epsb) * vfgw * vfws * rx &
1274 + (1.0_rp-epsb) * vfgw * vfwg * epsg * stb * tg**4 &
1275 + epsb * (1.0_rp-epsb) * vfgw * vfww * stb * tb**4 )
1276 rb2 = epsb * ( (1.0_rp-epsg) * vfwg * vfgs * rx &
1277 + (1.0_rp-epsg) * epsb * vfgw * vfwg * stb * tb**4 &
1278 + (1.0_rp-epsb) * vfws * vfww * rx &
1279 + (1.0_rp-epsb) * vfwg * vfww * stb * epsg * tg**4 &
1280 + epsb * (1.0_rp-epsb) * vfww * (1.0_rp-2.0_rp*vfws) * stb * tb**4 )
1285 ths1 = tb * ( pre00 / prss )**rovcp
1286 ths2 = tg * ( pre00 / prss )**rovcp
1287 thc = tc * ( pre00 / prss )**rovcp
1289 hb = rhoo * cpdry * chb * uc * (ths1-thc)
1290 eleb = rhoo * lhv * chb * uc * betb * (qs0b-qc)
1291 g0b = sb + rb - hb - eleb
1293 hg = rhoo * cpdry * chg * uc * (ths2-thc)
1294 eleg = rhoo * lhv * chg * uc * betg * (qs0g-qc)
1295 g0g = sg + rg - hg - eleg
1298 call multi_layer(
uke,bound,g0b,capb,aksb,tbl,dzb,dt,tblend)
1303 call multi_layer(
uke,bound,g0g,capg,aksg,tgl,dzg,dt,tglend)
1308 if ( abs(resi1) > dts_max_onestep )
then 1309 if ( abs(resi1) > dts_max_onestep*10.0_rp )
then 1310 if(
io_l )
write(
io_fid_log,*)
'!xxx Error xxx!: Kusaka urban (SLC_main) tendency of TB is over limitter' 1311 if(
io_l )
write(
io_fid_log,*)
'!xxx previous TB and updated TB(TBL(1)) is ',tb-resi1,tb
1314 if(
io_l )
write(
io_fid_log,*)
'!xxx Warning xxx!: Kusaka urban (SLC_main) tendency of TB is over limitter' 1315 if(
io_l )
write(
io_fid_log,*)
'!xxx previous TB and updated TB(TBL(1)) is ',tb-resi1,tb
1318 if ( abs(resi2) > dts_max_onestep )
then 1319 if ( abs(resi2) > dts_max_onestep*10.0_rp )
then 1320 if(
io_l )
write(
io_fid_log,*)
'!xxx Error xxx!: Kusaka urban (SLC_main) tendency of TG is over limitter' 1321 if(
io_l )
write(
io_fid_log,*)
'!xxx previous TG and updated TG(TGL(1)) is ',tg-resi2,tg,resi2
1324 if(
io_l )
write(
io_fid_log,*)
'!xxx Warning xxx!: Kusaka urban (SLC_main) tendency of TG is over limitter' 1325 if(
io_l )
write(
io_fid_log,*)
'!xxx previous TG and updated TG(TGL(1)) is ',tg-resi2,tg
1332 flxuv = ( r*cdr + rw*cdc ) * ua * ua
1333 sh = ( r*hr + w*hb + rw*hg )
1334 lh = ( r*eler + w*eleb + rw*eleg )
1335 ghflx = -1.0_rp * ( r*g0r + w*g0b + rw*g0g )
1336 lnet = r*rr + w*rb + rw*rg
1347 sdn = r + w * (vfws + vfgs * albg * vfwg) + rw * (vfgs + vfws * albb * vfgw)
1349 + w * ( vfws * albb + vfgs * albg * vfwg *albb ) &
1350 + rw * ( vfgs * albg + vfws * albb * vfgw *albg )
1352 albd_sw_grid = sup / sdn
1355 ldn = r + w*vfws + rw*vfgs
1356 lup = r * (1.0_rp-epsr) &
1357 + w*( (1.0_rp-epsb*vfww)*(1.0_rp-epsb)*vfws - epsb*vfwg*(1.0_rp-epsg)*vfgs ) &
1358 + rw*( (1.0_rp-epsg)*vfgs - epsg*(1.0_rp-vfgs)*(1.0_rp-epsb)*vfws )
1360 rup = (ldn - lup) * rx - lnet
1361 albd_lw_grid = lup / ldn
1387 rainr = max(0.0_rp, rainr-(lhr/lhv)*dt)
1388 rainb = max(0.0_rp, rainb-(lhb/lhv)*dt)
1389 raing = max(0.0_rp, raing-(lhg/lhv)*dt)
1395 rts = ( rup / stb / ( 1.0_rp-albd_lw_grid) )**0.25
1408 call cal_psi(xxx,psim,psih)
1410 xxx2 = (2.0_rp/z) * xxx
1411 call cal_psi(xxx2,psim2,psih2)
1413 xxx10 = (10.0_rp/z) * xxx
1414 call cal_psi(xxx10,psim10,psih10)
1418 u10 = u1 *
log(10.0_rp/z0c) /
log(z/z0c)
1419 v10 = v1 *
log(10.0_rp/z0c) /
log(z/z0c)
1421 t2 = rts + (ta-rts)*((
log(2.0_rp/z0hc)-psih2)/(
log(z/z0hc)-psih))
1432 end subroutine slc_main
1435 subroutine canopy_wind(ZA, UA, UC)
1438 real(RP),
intent(in) :: ZA
1439 real(RP),
intent(in) :: UA
1440 real(RP),
intent(out) :: UC
1442 real(RP) :: UR,ZC,XLB,BB
1444 if( zr + 2.0_rp < za )
then 1445 ur = ua *
log((zr-zdc)/z0c) /
log((za-zdc)/z0c)
1447 xlb = 0.4_rp * (zr-zdc)
1449 bb = 0.4_rp * zr / ( xlb *
log((zr-zdc)/z0c) )
1450 uc = ur * exp( -bb * (1.0_rp-zc/zr) )
1457 uc = max(uc,0.01_rp)
1460 end subroutine canopy_wind
1463 subroutine cal_beta(BET, RAIN, WATER, STRG, ROFF)
1466 real(RP),
intent(out) :: BET
1467 real(RP),
intent(in) :: RAIN
1468 real(RP),
intent(inout) :: WATER
1469 real(RP),
intent(inout) :: STRG
1470 real(RP),
intent(inout) :: ROFF
1472 if ( strg == 0.0_rp )
then 1476 water = water + rain
1477 roff = max(0.0_rp, water-strg)
1478 water = water - max(0.0_rp, water-strg)
1479 bet = min( water / strg, 1.0_rp)
1483 end subroutine cal_beta
1486 subroutine cal_psi(zeta,psim,psih)
1491 real(RP),
intent(inout) :: zeta
1492 real(RP),
intent(out) :: psim
1493 real(RP),
intent(out) :: psih
1496 if( zeta >= 1.0_rp ) zeta = 1.0_rp
1497 if( zeta <= -5.0_rp ) zeta = -5.0_rp
1499 if( zeta > 0.0_rp )
then 1500 psim = -5.0_rp * zeta
1501 psih = -5.0_rp * zeta
1503 x = ( 1.0_rp - 16.0_rp * zeta )**0.25_rp
1504 psim = 2.0_rp *
log((1.0_rp+x)/2.0_rp) +
log((1.0_rp+x*x)/2.0_rp) - 2.0_rp*atan(x) + pi/2.0_rp
1505 psih = 2.0_rp *
log((1.0_rp+x*x)/2.0_rp)
1509 end subroutine cal_psi
1516 subroutine mos(XXX,CH,CD,B1,RIB,Z,Z0,UA,TA,TSF,RHO)
1521 real(RP),
intent(in) :: B1, Z, Z0, UA, TA, TSF, RHO
1522 real(RP),
intent(out) :: CD, CH
1523 real(RP),
intent(inout) :: XXX, RIB
1524 real(RP) :: XXX0, X, X0, FAIH, DPSIM, DPSIH
1525 real(RP) :: F, DF, XXXP, US, TS, AL, XKB, DD, PSIM, PSIH
1527 integer,
parameter :: NEWT_END = 10
1531 lnz =
log( (z+z0)/z0 )
1533 if( rib <= -15.0_rp ) rib = -15.0_rp
1535 if( rib < 0.0_rp )
then 1537 do newt = 1, newt_end
1539 if( xxx >= 0.0_rp ) xxx = -1.0e-3_rp
1541 xxx0 = xxx * z0/(z+z0)
1543 x = (1.0_rp-16.0_rp*xxx)**0.25
1544 x0 = (1.0_rp-16.0_rp*xxx0)**0.25
1547 -
log( (x+1.0_rp)**2 * (x**2+1.0_rp) ) &
1548 + 2.0_rp * atan(x) &
1549 +
log( (x+1.0_rp)**2 * (x0**2+1.0_rp) ) &
1551 faih = 1.0_rp / sqrt( 1.0_rp - 16.0_rp*xxx )
1552 psih = lnz + 0.4_rp*b1 &
1553 - 2.0_rp *
log( sqrt( 1.0_rp - 16.0_rp*xxx ) + 1.0_rp ) &
1554 + 2.0_rp *
log( sqrt( 1.0_rp - 16.0_rp*xxx0 ) + 1.0_rp )
1556 dpsim = ( 1.0_rp - 16.0_rp*xxx )**(-0.25) / xxx &
1557 - ( 1.0_rp - 16.0_rp*xxx0 )**(-0.25) / xxx
1558 dpsih = 1.0_rp / sqrt( 1.0_rp - 16.0_rp*xxx ) / xxx &
1559 - 1.0_rp / sqrt( 1.0_rp - 16.0_rp*xxx0 ) / xxx
1561 f = rib * psim**2 / psih - xxx
1563 df = rib * ( 2.0_rp*dpsim*psim*psih - dpsih*psim**2 ) &
1569 if( xxx <= -10.0_rp ) xxx = -10.0_rp
1573 else if( rib >= 0.142857_rp )
then 1576 psim = lnz + 7.0_rp * xxx
1577 psih = psim + 0.4_rp * b1
1583 dd = -4.0_rp * rib * 7.0_rp * xkb * al + (al+xkb)**2
1584 if( dd <= 0.0_rp ) dd = 0.0_rp
1586 xxx = ( al + xkb - 2.0_rp*rib*7.0_rp*al - sqrt(dd) ) / ( 2.0_rp * ( rib*7.0_rp**2 - 7.0_rp ) )
1587 psim = lnz + 7.0_rp * min( xxx, 0.714_rp )
1588 psih = psim + 0.4_rp * b1
1592 us = 0.4_rp * ua / psim
1593 if( us <= 0.01_rp ) us = 0.01_rp
1594 ts = 0.4_rp * (ta-tsf) / psih
1596 cd = us * us / ua**2
1597 ch = 0.4_rp * us / psih / ua
1604 subroutine multi_layer(KM,BOUND,G0,CAP,AKS,TSL,DZ,DELT,TSLEND)
1613 real(RP),
intent(in) :: G0
1614 real(RP),
intent(in) :: CAP
1615 real(RP),
intent(in) :: AKS
1616 real(DP),
intent(in) :: DELT
1617 real(RP),
intent(in) :: TSLEND
1618 integer,
intent(in) :: KM
1619 integer,
intent(in) :: BOUND
1620 real(RP),
intent(in) :: DZ(km)
1621 real(RP),
intent(inout) :: TSL(km)
1622 real(RP) :: A(km), B(km), C(km), D(km), P(km), Q(km)
1630 b(1) = cap * dz(1) / delt &
1631 + 2.0_rp * aks / (dz(1)+dz(2))
1632 c(1) = -2.0_rp * aks / (dz(1)+dz(2))
1633 d(1) = cap * dz(1) / delt * tsl(1) + g0
1636 a(k) = -2.0_rp * aks / (dz(k-1)+dz(k))
1637 b(k) = cap * dz(k) / delt + 2.0_rp * aks / (dz(k-1)+dz(k)) + 2.0_rp * aks / (dz(k)+dz(k+1))
1638 c(k) = -2.0_rp * aks / (dz(k)+dz(k+1))
1639 d(k) = cap * dz(k) / delt * tsl(k)
1642 if( bound == 1 )
then 1643 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
1644 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km))
1646 d(km) = cap * dz(km) / delt * tsl(km)
1648 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
1649 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km)) + 2.0_rp * aks / (dz(km)+dzend)
1651 d(km) = cap * dz(km) / delt * tsl(km) + 2.0_rp * aks * tslend / (dz(km)+dzend)
1658 p(k) = -c(k) / ( a(k) * p(k-1) + b(k) )
1659 q(k) = ( -a(k) * q(k-1) + d(k) ) / ( a(k) * p(k-1) + b(k) )
1665 tsl(k) = p(k) * tsl(k+1) + q(k)
1669 end subroutine multi_layer
1672 subroutine multi_layer2(KM,BOUND,G0,CAP,AKS,TSL,DZ,DELT,TSLEND,CAP1,AKS1)
1681 real(RP),
intent(in) :: G0
1682 real(RP),
intent(in) :: CAP
1683 real(RP),
intent(in) :: AKS
1684 real(RP),
intent(in) :: CAP1
1685 real(RP),
intent(in) :: AKS1
1686 real(DP),
intent(in) :: DELT
1687 real(RP),
intent(in) :: TSLEND
1688 integer,
intent(in) :: KM
1689 integer,
intent(in) :: BOUND
1690 real(RP),
intent(in) :: DZ(km)
1691 real(RP),
intent(inout) :: TSL(km)
1692 real(RP) :: A(km), B(km), C(km), D(km), X(km), P(km), Q(km)
1700 b(1) = cap1 * dz(1) / delt &
1701 + 2.0_rp * aks1 / (dz(1)+dz(2))
1702 c(1) = -2.0_rp * aks1 / (dz(1)+dz(2))
1703 d(1) = cap1 * dz(1) / delt * tsl(1) + g0
1706 a(k) = -2.0_rp * aks / (dz(k-1)+dz(k))
1707 b(k) = cap * dz(k) / delt + 2.0_rp * aks / (dz(k-1)+dz(k)) + 2.0_rp * aks / (dz(k)+dz(k+1))
1708 c(k) = -2.0_rp * aks / (dz(k)+dz(k+1))
1709 d(k) = cap * dz(k) / delt * tsl(k)
1712 if( bound == 1 )
then 1713 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
1714 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km))
1716 d(km) = cap * dz(km) / delt * tsl(km)
1718 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
1719 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km)) + 2.0_rp * aks / (dz(km)+dzend)
1721 d(km) = cap * dz(km) / delt * tsl(km) + 2.0_rp * aks * tslend / (dz(km)+dzend)
1728 p(k) = -c(k) / ( a(k) * p(k-1) + b(k) )
1729 q(k) = ( -a(k) * q(k-1) + d(k) ) / ( a(k) * p(k-1) + b(k) )
1735 x(k) = p(k) * x(k+1) + q(k)
1743 end subroutine multi_layer2
1746 subroutine urban_param_setup
1749 real(RP) :: DHGT,THGT,VFWS,VFGS
1773 hgt = zr / ( road_width + roof_width )
1776 r = roof_width / ( road_width + roof_width )
1780 dhgt = hgt / 100.0_rp
1783 thgt = hgt - dhgt / 2.0_rp
1786 vfws = vfws + 0.25_rp * ( 1.0_rp - thgt / sqrt( thgt**2 + rw**2 ) )
1789 vfws = vfws / 99.0_rp
1790 vfws = vfws * 2.0_rp
1791 vfgs = 1.0_rp - 2.0_rp * vfws * hgt / rw
1795 end subroutine urban_param_setup
integer, public is
start point of inner domain: x, local
integer, public je
end point of inner domain: y, local
real(rp), public const_cpdry
specific heat (dry air,constant pressure) [J/kg/K]
module ATMOSPHERE / Saturation adjustment
subroutine, public prc_mpistop
Abort MPI.
real(rp), dimension(:,:), allocatable, public landuse_fact_urban
urban factor
logical, public io_l
output log or not? (this process)
integer, public ia
of x whole cells (local, with HALO)
subroutine, public urban_phy_slc_setup(URBAN_TYPE, Z0M, Z0H, Z0E)
Setup.
procedure(bc), pointer, public bulkflux
integer, public js
start point of inner domain: y, local
module URBAN / Surface fluxes with Single-layer Canpoy Model
subroutine, public urban_phy_slc(TR_URB_t, TB_URB_t, TG_URB_t, TC_URB_t, QC_URB_t, UC_URB_t, TRL_URB_t, TBL_URB_t, TGL_URB_t, RAINR_URB_t, RAINB_URB_t, RAING_URB_t, ROFF_URB_t, SFC_TEMP, ALBD_LW, ALBD_SW, MWFLX, MUFLX, MVFLX, SHFLX, LHFLX, GHFLX, Z0M, Z0H, Z0E, U10, V10, T2, Q2, TMPA, PRSA, W1, U1, V1, DENS, QA, Z1, PBL, PRSS, LWD, SWD, PREC, TR_URB, TB_URB, TG_URB, TC_URB, QC_URB, UC_URB, TRL_URB, TBL_URB, TGL_URB, RAINR_URB, RAINB_URB, RAING_URB, ROFF_URB, LON, LAT, NOWDATE, dt)
subroutine, public log(type, message)
integer, public prc_myrank
process num in local communicator
integer, public ie
end point of inner domain: x, local
real(rp), public const_eps
small number
module ATMOSPHERE / Thermodynamics
logical, public io_lnml
output log or not? (for namelist, this process)
real(rp), public const_pi
pi
integer, public io_fid_conf
Config file ID.
integer, public io_fid_log
Log file ID.
integer, parameter, public rp
integer, public ja
of y whole cells (local, with HALO)