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
127 character(len=*),
intent(in) :: urban_type
128 real(RP) ,
intent(out) :: z0m(
ia,
ja)
129 real(RP) ,
intent(out) :: z0h(
ia,
ja)
130 real(RP) ,
intent(out) :: z0e(
ia,
ja)
132 namelist / param_urban_phy_slc / &
171 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[SLC] / Categ[URBAN PHY] / Origin[SCALElib]' 175 read(
io_fid_conf,nml=param_urban_phy_slc,iostat=ierr)
177 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 178 elseif( ierr > 0 )
then 179 write(*,*)
'xxx Not appropriate names in namelist PARAM_URBAN_PHY_SLC. Check!' 187 dzr(
uks:
uke) = (/0.01_rp,0.01_rp,0.03_rp,0.05_rp,0.10_rp/)
188 dzb(
uks:
uke) = (/0.01_rp,0.01_rp,0.03_rp,0.05_rp,0.10_rp/)
189 dzg(
uks:
uke) = (/0.01_rp,0.01_rp,0.03_rp,0.05_rp,0.10_rp/)
191 ahdiurnal(:) = (/ 0.356, 0.274, 0.232, 0.251, 0.375, 0.647, 0.919, 1.135, 1.249, 1.328, &
192 1.365, 1.363, 1.375, 1.404, 1.457, 1.526, 1.557, 1.521, 1.372, 1.206, &
193 1.017, 0.876, 0.684, 0.512 /)
196 call urban_param_setup
199 allocate( is_urb(
ia,
ja) )
206 is_urb(i,j) = .false.
216 if ( is_urb(i,j) )
then 295 qsat => atmos_saturation_pres2qsat_all
301 logical,
parameter :: lsolar = .false.
303 real(RP),
parameter :: uabs_min = 0.1_rp
306 real(RP),
intent(out) :: tr_urb_t (
ia,
ja)
307 real(RP),
intent(out) :: tb_urb_t (
ia,
ja)
308 real(RP),
intent(out) :: tg_urb_t (
ia,
ja)
309 real(RP),
intent(out) :: tc_urb_t (
ia,
ja)
310 real(RP),
intent(out) :: qc_urb_t (
ia,
ja)
311 real(RP),
intent(out) :: uc_urb_t (
ia,
ja)
312 real(RP),
intent(out) :: trl_urb_t (
uks:
uke,
ia,
ja)
313 real(RP),
intent(out) :: tbl_urb_t (
uks:
uke,
ia,
ja)
314 real(RP),
intent(out) :: tgl_urb_t (
uks:
uke,
ia,
ja)
315 real(RP),
intent(out) :: rainr_urb_t(
ia,
ja)
316 real(RP),
intent(out) :: rainb_urb_t(
ia,
ja)
317 real(RP),
intent(out) :: raing_urb_t(
ia,
ja)
318 real(RP),
intent(out) :: roff_urb_t (
ia,
ja)
320 real(RP),
intent(out) :: sfc_temp(
ia,
ja)
321 real(RP),
intent(out) :: albd_lw (
ia,
ja)
322 real(RP),
intent(out) :: albd_sw (
ia,
ja)
323 real(RP),
intent(out) :: mwflx (
ia,
ja)
324 real(RP),
intent(out) :: muflx (
ia,
ja)
325 real(RP),
intent(out) :: mvflx (
ia,
ja)
326 real(RP),
intent(out) :: shflx (
ia,
ja)
327 real(RP),
intent(out) :: lhflx (
ia,
ja)
328 real(RP),
intent(out) :: ghflx (
ia,
ja)
329 real(RP),
intent(out) :: z0m (
ia,
ja)
330 real(RP),
intent(out) :: z0h (
ia,
ja)
331 real(RP),
intent(out) :: z0e (
ia,
ja)
332 real(RP),
intent(out) :: u10 (
ia,
ja)
333 real(RP),
intent(out) :: v10 (
ia,
ja)
334 real(RP),
intent(out) :: t2 (
ia,
ja)
335 real(RP),
intent(out) :: q2 (
ia,
ja)
337 real(RP),
intent(in) :: tmpa (
ia,
ja)
338 real(RP),
intent(in) :: prsa (
ia,
ja)
339 real(RP),
intent(in) :: w1 (
ia,
ja)
340 real(RP),
intent(in) :: u1 (
ia,
ja)
341 real(RP),
intent(in) :: v1 (
ia,
ja)
342 real(RP),
intent(in) :: dens (
ia,
ja)
343 real(RP),
intent(in) :: qa (
ia,
ja)
344 real(RP),
intent(in) :: z1 (
ia,
ja)
345 real(RP),
intent(in) :: pbl (
ia,
ja)
346 real(RP),
intent(in) :: prss (
ia,
ja)
347 real(RP),
intent(in) :: lwd (
ia,
ja,2)
348 real(RP),
intent(in) :: swd (
ia,
ja,2)
349 real(RP),
intent(in) :: prec (
ia,
ja)
351 real(RP),
intent(in) :: tr_urb (
ia,
ja)
352 real(RP),
intent(in) :: tb_urb (
ia,
ja)
353 real(RP),
intent(in) :: tg_urb (
ia,
ja)
354 real(RP),
intent(in) :: tc_urb (
ia,
ja)
355 real(RP),
intent(in) :: qc_urb (
ia,
ja)
356 real(RP),
intent(in) :: uc_urb (
ia,
ja)
357 real(RP),
intent(in) :: trl_urb (
uks:
uke,
ia,
ja)
358 real(RP),
intent(in) :: tbl_urb (
uks:
uke,
ia,
ja)
359 real(RP),
intent(in) :: tgl_urb (
uks:
uke,
ia,
ja)
360 real(RP),
intent(in) :: rainr_urb(
ia,
ja)
361 real(RP),
intent(in) :: rainb_urb(
ia,
ja)
362 real(RP),
intent(in) :: raing_urb(
ia,
ja)
363 real(RP),
intent(in) :: roff_urb (
ia,
ja)
365 real(RP),
intent(in) :: lon
366 real(RP),
intent(in) :: lat
367 integer,
intent(in) :: nowdate(6)
368 real(DP),
intent(in) :: dt
385 real(RP) :: shr (
ia,
ja)
386 real(RP) :: shb (
ia,
ja)
387 real(RP) :: shg (
ia,
ja)
388 real(RP) :: lhr (
ia,
ja)
389 real(RP) :: lhb (
ia,
ja)
390 real(RP) :: lhg (
ia,
ja)
391 real(RP) :: ghr (
ia,
ja)
392 real(RP) :: ghb (
ia,
ja)
393 real(RP) :: ghg (
ia,
ja)
394 real(RP) :: rnr (
ia,
ja)
395 real(RP) :: rnb (
ia,
ja)
396 real(RP) :: rng (
ia,
ja)
397 real(RP) :: rngrd(
ia,
ja)
413 if(
io_l )
write(
io_fid_log,*)
'*** Urban surface physics step: Single Layer Canopy' 418 if( is_urb(i,j) )
then 420 uabs = max( sqrt( u1(i,j)**2 + v1(i,j)**2 + w1(i,j)**2 ), uabs_min )
431 trl(k) = trl_urb(k,i,j)
432 tbl(k) = tbl_urb(k,i,j)
433 tgl(k) = tgl_urb(k,i,j)
436 rainr = rainr_urb(i,j)
437 rainb = rainb_urb(i,j)
438 raing = raing_urb(i,j)
496 tr_urb_t(i,j) = ( tr - tr_urb(i,j) ) / dt
497 tb_urb_t(i,j) = ( tb - tb_urb(i,j) ) / dt
498 tg_urb_t(i,j) = ( tg - tg_urb(i,j) ) / dt
499 tc_urb_t(i,j) = ( tc - tc_urb(i,j) ) / dt
500 qc_urb_t(i,j) = ( qc - qc_urb(i,j) ) / dt
501 uc_urb_t(i,j) = ( uc - uc_urb(i,j) ) / dt
504 trl_urb_t(k,i,j) = ( trl(k) - trl_urb(k,i,j) ) / dt
505 tbl_urb_t(k,i,j) = ( tbl(k) - tbl_urb(k,i,j) ) / dt
506 tgl_urb_t(k,i,j) = ( tgl(k) - tgl_urb(k,i,j) ) / dt
509 rainr_urb_t(i,j) = ( rainr - rainr_urb(i,j) ) / dt
510 rainb_urb_t(i,j) = ( rainb - rainb_urb(i,j) ) / dt
511 raing_urb_t(i,j) = ( raing - raing_urb(i,j) ) / dt
512 roff_urb_t(i,j) = ( roff - roff_urb(i,j) ) / dt
515 call qsat( qvsat, sfc_temp(i,j), prss(i,j) )
538 mwflx(i,j) = -dens(i,j) * ustar**2 / uabs * w1(i,j)
539 muflx(i,j) = -dens(i,j) * ustar**2 / uabs * u1(i,j)
540 mvflx(i,j) = -dens(i,j) * ustar**2 / uabs * v1(i,j)
548 tr_urb_t(i,j) = 0.0_rp
549 tb_urb_t(i,j) = 0.0_rp
550 tg_urb_t(i,j) = 0.0_rp
551 tc_urb_t(i,j) = 0.0_rp
552 qc_urb_t(i,j) = 0.0_rp
553 uc_urb_t(i,j) = 0.0_rp
554 trl_urb_t(:,i,j) = 0.0_rp
555 tbl_urb_t(:,i,j) = 0.0_rp
556 tgl_urb_t(:,i,j) = 0.0_rp
557 rainr_urb_t(i,j) = 0.0_rp
558 rainb_urb_t(i,j) = 0.0_rp
559 raing_urb_t(i,j) = 0.0_rp
560 roff_urb_t(i,j) = 0.0_rp
561 sfc_temp(i,j) = 300.0_rp
562 albd_lw(i,j) = 0.0_rp
563 albd_sw(i,j) = 0.0_rp
596 call hist_in( shr(:,:),
'URBAN_SHR',
'urban sensible heat flux on roof',
'W/m2' )
597 call hist_in( shb(:,:),
'URBAN_SHB',
'urban sensible heat flux on wall',
'W/m2' )
598 call hist_in( shg(:,:),
'URBAN_SHG',
'urban sensible heat flux on road',
'W/m2' )
599 call hist_in( lhr(:,:),
'URBAN_LHR',
'urban latent heat flux on roof',
'W/m2' )
600 call hist_in( lhb(:,:),
'URBAN_LHB',
'urban latent heat flux on wall',
'W/m2' )
601 call hist_in( lhg(:,:),
'URBAN_LHG',
'urban latent heat flux on road',
'W/m2' )
602 call hist_in( ghr(:,:),
'URBAN_GHR',
'urban ground heat flux on roof',
'W/m2' )
603 call hist_in( ghb(:,:),
'URBAN_GHB',
'urban ground heat flux on wall',
'W/m2' )
604 call hist_in( ghg(:,:),
'URBAN_GHG',
'urban ground heat flux on road',
'W/m2' )
605 call hist_in( rnr(:,:),
'URBAN_RNR',
'urban net radiation on roof',
'W/m2' )
606 call hist_in( rnb(:,:),
'URBAN_RNB',
'urban net radiation on wall',
'W/m2' )
607 call hist_in( rng(:,:),
'URBAN_RNG',
'urban net radiation on road',
'W/m2' )
608 call hist_in( rngrd(:,:),
'URBAN_RNgrd',
'urban grid average of net radiation',
'W/m2' )
614 subroutine slc_main( &
677 karman => const_karman, &
678 cpdry => const_cpdry, &
679 grav => const_grav, &
680 rdry => const_rdry, &
681 rvap => const_rvap, &
683 tem00 => const_tem00, &
686 hydrometeor_lhv => atmos_hydrometeor_lhv
688 qsat => atmos_saturation_pres2qsat_all
692 logical ,
intent(in) :: lsolar
695 real(RP),
intent(in) :: prsa
696 real(RP),
intent(in) :: prss
697 real(RP),
intent(in) :: ta
698 real(RP),
intent(in) :: qa
699 real(RP),
intent(in) :: ua
700 real(RP),
intent(in) :: u1
701 real(RP),
intent(in) :: v1
702 real(RP),
intent(in) :: za
703 real(RP),
intent(in) :: ssg(2)
704 real(RP),
intent(in) :: llg(2)
705 real(RP),
intent(in) :: rain
706 real(RP),
intent(in) :: rhoo
707 real(RP),
intent(in) :: xlat
708 real(RP),
intent(in) :: xlon
709 integer,
intent(in) :: nowdate(6)
710 real(DP),
intent(in) :: dt
713 real(RP),
intent(inout) :: tr
714 real(RP),
intent(inout) :: tb
715 real(RP),
intent(inout) :: tg
716 real(RP),
intent(inout) :: tc
717 real(RP),
intent(inout) :: qc
718 real(RP),
intent(inout) :: uc
719 real(RP),
intent(inout) :: trl(
uks:
uke)
720 real(RP),
intent(inout) :: tbl(
uks:
uke)
721 real(RP),
intent(inout) :: tgl(
uks:
uke)
722 real(RP),
intent(inout) :: rainr
723 real(RP),
intent(inout) :: rainb
724 real(RP),
intent(inout) :: raing
725 real(RP),
intent(inout) :: roff
728 real(RP),
intent(out) :: albd_sw_grid
729 real(RP),
intent(out) :: albd_lw_grid
730 real(RP),
intent(out) :: rts
731 real(RP),
intent(out) :: sh
732 real(RP),
intent(out) :: lh
733 real(RP),
intent(out) :: ghflx
734 real(RP),
intent(out) :: rn
735 real(RP),
intent(out) :: u10
736 real(RP),
intent(out) :: v10
737 real(RP),
intent(out) :: t2
738 real(RP),
intent(out) :: q2
739 real(RP),
intent(out) :: rnr, rnb, rng
740 real(RP),
intent(out) :: shr, shb, shg
741 real(RP),
intent(out) :: lhr, lhb, lhg
742 real(RP),
intent(out) :: ghr, ghb, ghg
743 integer ,
intent(in) :: i, j
749 real(RP),
parameter :: redf_min = 1.0e-2_rp
750 real(RP),
parameter :: redf_max = 1.0_rp
763 real(RP) :: tahdiurnal
770 real(RP) :: w, vfgs, vfgw, vfwg, vfws, vfww
789 real(RP) :: roffr, roffb, roffg
791 real(RP) :: lup, ldn, rup
794 real(RP) :: lnet, snet, flxuv
797 real(RP) :: psim,psim2,psim10
798 real(RP) :: psih,psih2,psih10
807 real(RP) :: sr, sb, sg, rr, rb, rg
808 real(RP) :: sr1, sb1, sb2, sg1, sg2
809 real(RP) :: rb1, rb2, rg1, rg2
810 real(RP) :: hr, eler, g0r
811 real(RP) :: hb, eleb, g0b
812 real(RP) :: hg, eleg, g0g
815 real(RP) :: qs0r, qs0b, qs0g
817 real(RP) :: ribr, bhr, cdr
818 real(RP) :: ribc, bhc, cdc
819 real(RP) :: alphar, alphab, alphag, alphac
820 real(RP) :: chr, chb, chg, chc
821 real(RP) :: tc1, tc2, qc1, qc2
824 real(RP) :: dts_max_onestep = 0.0_rp
825 real(RP) :: resi1,resi2
826 real(RP) :: resi1p,resi2p
827 real(RP) :: g0rp,g0bp,g0gp
829 real(RP) :: xxx, x, cd, ch, chu, xxx2, xxx10
831 real(RP) :: tha,thc,ths,ths1,ths2
841 call hydrometeor_lhv( lhv, ta )
844 tha = ta * ( pre00 / prsa )**rovcp
866 time =
real( NOWDATE(4)*3600.0_RP + NOWDATE(5)*60.0_RP + NOWDATE(6), kind=
rp )
867 tloc = mod((nowdate(4) + int(lon/15.0_rp)),24 )
868 dsec =
real( NOWDATE(5)*60.0_RP + NOWDATE(6), kind=RP ) / 3600.0_rp
869 if( tloc == 0 ) tloc = 24
872 if ( tloc == 24 )
then 873 tahdiurnal = ( 1.0_rp-dsec ) * ahdiurnal(tloc ) &
874 + ( dsec ) * ahdiurnal(1 )
876 tahdiurnal = ( 1.0_rp-dsec ) * ahdiurnal(tloc ) &
877 + ( dsec ) * ahdiurnal(tloc+1)
879 ah_t = ah * tahdiurnal
880 alh_t = alh * tahdiurnal
883 dts_max_onestep = dts_max * dt
885 if ( zdc + z0c + 2.0_rp >= za )
then 886 write(*,*)
'xxx [URBAN_PHY_SLC] ZDC + Z0C + 2m is larger than the 1st level! STOP.' 890 w = 2.0_rp * 1.0_rp * hgt
893 vfwg = ( 1.0_rp - svf ) * ( 1.0_rp - r ) / w
895 vfww = 1.0_rp - 2.0_rp * vfwg
905 call canopy_wind(za, ua, uc)
912 raint = 1.0_rp * ( rain * dt )
913 call cal_beta(betr, raint, rainr, strgr, roffr)
915 raint = 0.1_rp * ( rain * dt )
916 call cal_beta(betb, raint, rainb, strgb, roffb)
918 raint = 0.9_rp * ( rain * dt )
919 call cal_beta(betg, raint, raing, strgg, roffg)
921 roff = roff + r * roffr + rw * ( roffb + roffg )
927 if( sx > 0.0_rp )
then 932 sr1 = sx * ( 1.0_rp - albr )
933 sg1 = sx * vfgs * ( 1.0_rp - albg )
934 sb1 = sx * vfws * ( 1.0_rp - albb )
935 sg2 = sb1 * albb / ( 1.0_rp - albb ) * vfgw * ( 1.0_rp - albg )
936 sb2 = sg1 * albg / ( 1.0_rp - albg ) * vfwg * ( 1.0_rp - albb )
941 snet = r * sr + w * sb + rw * sg
953 exn = ( prss / pre00 )**rovcp
968 do iteration = 1, 100
973 bhr = log(z0r/z0hr) / 0.4_rp
974 ribr = ( grav * 2.0_rp / (tha+ths) ) * (tha-ths) * (z+z0r) / (ua*ua)
975 call mos(xxxr,chr,cdr,bhr,ribr,z,z0r,ua,tha,ths,rhoo)
977 call qsat( qs0r, tr, prss )
979 rr = epsr * ( rx - stb * (tr**4) )
981 hr = rhoo * cpdry * chr * ua * (ths-tha) * exn
982 eler = rhoo * lhv * chr * ua * betr * (qs0r-qa)
983 g0r = sr + rr - hr - eler
997 call multi_layer(
uke,bound,g0r,capr,aksr,trl,dzr,dt,trlend)
1002 if( abs(resi1) < sqrt(eps) )
then 1004 tr = max( trp - dts_max_onestep, min( trp + dts_max_onestep, tr ) )
1008 if ( resi1*resi1p < 0.0_rp )
then 1009 tr = (tr + trl(1)) * 0.5_rp
1013 tr = max( trp - dts_max_onestep, min( trp + dts_max_onestep, tr ) )
1026 if ( iteration > 100 )
then 1027 if(
io_l )
write(
io_fid_log,*)
'*** Warning: [URBAN_PHY_SLC/SLC_main] iteration for TR was not converged',
prc_myrank,i,j
1028 if(
io_l )
write(
io_fid_log,*)
'---------------------------------------------------------------------------------' 1029 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Residual [K] :', resi1
1031 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TRP : Initial TR [K] :', trp
1032 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TRLP: Initial TRL [K] :', trlp
1034 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- SX : Shortwave radiation [W/m2] :', sx
1035 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- RX : Longwave radiation [W/m2] :', rx
1036 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- PRSS: Surface pressure [Pa] :', prss
1037 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- PRSA: Pressure at 1st atmos layer [m] :', prsa
1038 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- RHOO: Air density [kg/m3] :', rhoo
1039 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- ZA : Height at 1st atmos layer [m] :', za
1040 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TA : Temperature at 1st atmos layer [K] :', ta
1041 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- UA : Wind speed at 1st atmos layer [m/s] :', ua
1042 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QA : Specific humidity at 1st atmos layer [kg/kg] :', qa
1043 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- DZR : Depth of surface layer [m] :', dzr
1045 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- R, W, RW : Normalized height and road width [-] :', r, w,rw
1046 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- SVF : Sky View Factors [-] :', svf
1047 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- BETR: Evaporation efficiency [-] :', betr
1048 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- EPSR: Surface emissivity of roof [-] :', epsr
1049 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- CAPR: Heat capacity of roof [J m-3 K] :', capr
1050 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- AKSR: Thermal conductivity of roof [W m-1 K] :', aksr
1051 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QS0R: Surface specific humidity [kg/kg] :', qs0r
1052 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- ZDC : Desplacement height of canopy [m] :', zdc
1053 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Z0R : Momentum roughness length of roof [m] :', z0r
1054 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Z0HR: Thermal roughness length of roof [m] :', z0hr
1055 if(
io_l )
write(
io_fid_log,*)
'---------------------------------------------------------------------------------' 1060 ribr = ( grav * 2.0_rp / (tha+ths) ) * (tha-ths) * (z+z0r) / (ua*ua)
1061 call mos(xxxr,chr,cdr,bhr,ribr,z,z0r,ua,tha,ths,rhoo)
1063 call qsat( qs0r, tr, prss )
1065 rr = epsr * ( rx - stb * (tr**4) )
1066 hr = rhoo * cpdry * chr * ua * (ths-tha) * exn
1067 eler = rhoo * lhv * chr * ua * betr * (qs0r-qa)
1068 g0r = sr + rr - hr - eler
1071 call multi_layer(
uke,bound,g0r,capr,aksr,trl,dzr,dt,trlend)
1075 if ( abs(resi1) > dts_max_onestep )
then 1076 if ( abs(resi1) > dts_max_onestep*10.0_rp )
then 1077 write(*,*)
'xxx [URBAN_PHY_SLC/SLC_main] tendency of TR exceeded a limit! STOP.' 1078 write(*,*)
'xxx previous TR and updated TR(TRL(1)) is ',tr-resi1, tr
1081 if(
io_l )
write(
io_fid_log,*)
'*** [URBAN_PHY_SLC/SLC_main] tendency of TR exceeded a limit' 1082 if(
io_l )
write(
io_fid_log,*)
'*** previous TR and updated TR(TRL(1)) is ', tr-resi1, tr
1092 alphab = 6.15_rp + 4.18_rp * uc
1093 if( uc > 5.0_rp ) alphab = 7.51_rp * (uc**0.78_rp )
1094 alphag = 6.15_rp + 4.18_rp * uc
1095 if( uc > 5.0_rp ) alphag = 7.51_rp * (uc**0.78_rp )
1096 chb = alphab / rhoo / cpdry / uc
1097 chg = alphag / rhoo / cpdry / uc
1105 do iteration = 1, 200
1112 bhc = log(z0c/z0hc) / 0.4_rp
1113 ribc = ( grav * 2.0_rp / (tha+thc) ) * (tha-thc) * (z+z0c) / (ua*ua)
1114 call mos(xxxc,chc,cdc,bhc,ribc,z,z0c,ua,tha,thc,rhoo)
1115 alphac = chc * rhoo * cpdry * ua
1117 call qsat( qs0b, tb, prss )
1118 call qsat( qs0g, tg, prss )
1120 tc1 = rw*alphac + rw*alphag + w*alphab
1122 tc2 = rw*alphac*tha + w*alphab*ths1 + rw*alphag*ths2
1124 qc1 = rw*(chc*ua) + rw*(chg*betg*uc) + w*(chb*betb*uc)
1125 qc2 = rw*(chc*ua)*qa + rw*(chg*betg*uc)*qs0g + w*(chb*betb*uc)*qs0b
1128 rg1 = epsg * ( rx * vfgs &
1129 + epsb * vfgw * stb * tb**4 &
1132 rb1 = epsb * ( rx * vfws &
1133 + epsg * vfwg * stb * tg**4 &
1134 + epsb * vfww * stb * tb**4 &
1137 rg2 = epsg * ( (1.0_rp-epsb) * vfgw * vfws * rx &
1138 + (1.0_rp-epsb) * vfgw * vfwg * epsg * stb * tg**4 &
1139 + epsb * (1.0_rp-epsb) * vfgw * vfww * stb * tb**4 )
1141 rb2 = epsb * ( (1.0_rp-epsg) * vfwg * vfgs * rx &
1142 + (1.0_rp-epsg) * epsb * vfgw * vfwg * stb * tb**4 &
1143 + (1.0_rp-epsb) * vfws * vfww * rx &
1144 + (1.0_rp-epsb) * vfwg * vfww * stb * epsg * tg**4 &
1145 + epsb * (1.0_rp-epsb) * vfww * (1.0_rp-2.0_rp*vfws) * stb * tb**4 )
1150 hb = rhoo * cpdry * chb * uc * (ths1-thc) * exn
1151 eleb = rhoo * lhv * chb * uc * betb * (qs0b-qc)
1152 g0b = sb + rb - hb - eleb
1154 hg = rhoo * cpdry * chg * uc * (ths2-thc) * exn
1155 eleg = rhoo * lhv * chg * uc * betg * (qs0g-qc)
1156 g0g = sg + rg - hg - eleg
1159 call multi_layer(
uke,bound,g0b,capb,aksb,tbl,dzb,dt,tblend)
1163 call multi_layer(
uke,bound,g0g,capg,aksg,tgl,dzg,dt,tglend)
1181 if ( abs(resi1) < sqrt(eps) .AND. abs(resi2) < sqrt(eps) )
then 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 ) )
1189 if ( resi1*resi1p < 0.0_rp )
then 1190 tb = (tb + tbl(1)) * 0.5_rp
1194 if ( resi2*resi2p < 0.0_rp )
then 1195 tg = (tg + tgl(1)) * 0.5_rp
1199 tb = max( tbp - dts_max_onestep, min( tbp + dts_max_onestep, tb ) )
1200 tg = max( tgp - dts_max_onestep, min( tgp + dts_max_onestep, tg ) )
1206 call qsat( qs0b, tb, prss )
1207 call qsat( qs0g, tg, prss )
1212 tc1 = rw*alphac + rw*alphag + w*alphab
1214 tc2 = rw*alphac*tha + w*alphab*ths1 + rw*alphag*ths2
1218 qc1 = rw*(chc*ua) + rw*(chg*betg*uc) + w*(chb*betb*uc)
1219 qc2 = rw*(chc*ua)*qa + rw*(chg*betg*uc)*qs0g + w*(chb*betb*uc)*qs0b
1240 if ( iteration > 200 )
then 1241 if(
io_l )
write(
io_fid_log,*)
'*** Warning: [URBAN_PHY_SLC/SLC_main] iteration for TB/TG was not converged',
prc_myrank,i,j
1242 if(
io_l )
write(
io_fid_log,*)
'---------------------------------------------------------------------------------' 1243 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Residual [K] :', resi1,resi2
1245 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TBP : Initial TB [K] :', tbp
1246 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TBLP: Initial TBL [K] :', tblp
1247 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TGP : Initial TG [K] :', tgp
1248 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TGLP: Initial TGL [K] :', tglp
1249 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TCP : Initial TC [K] :', tcp
1250 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QCP : Initial QC [K] :', qcp
1252 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- UC : Canopy wind [m/s] :', uc
1253 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- SX : Shortwave radiation [W/m2] :', sx
1254 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- RX : Longwave radiation [W/m2] :', rx
1255 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- PRSS: Surface pressure [Pa] :', prss
1256 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- PRSA: Pressure at 1st atmos layer [m] :', prsa
1257 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- RHOO: Air density [kg/m3] :', rhoo
1258 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- ZA : Height at 1st atmos layer [m] :', za
1259 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TA : Temperature at 1st atmos layer [K] :', ta
1260 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- UA : Wind speed at 1st atmos layer [m/s] :', ua
1261 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QA : Specific humidity at 1st atmos layer [kg/kg] :', qa
1262 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- DZB : Depth of surface layer [m] :', dzb
1263 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- DZG : Depth of surface layer [m] :', dzg
1265 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- R, W, RW : Normalized height and road width [-] :', r, w,rw
1266 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- SVF : Sky View Factors [-] :', svf
1267 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- BETB,BETG : Evaporation efficiency [-] :', betb,betg
1268 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- EPSB,EPSG : Surface emissivity [-] :', epsb,epsg
1269 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- CAPB,CAPG : Heat capacity [J m-3 K] :', capb,capg
1270 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- AKSB,AKSG : Thermal conductivity [W m-1 K] :', aksb,aksb
1271 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QS0B,QS0G : Surface specific humidity [kg/kg] :', qs0b,qs0g
1272 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- ZDC : Desplacement height of canopy [m] :', zdc
1273 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Z0C : Momentum roughness length of canopy [m] :', z0c
1274 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Z0HC : Thermal roughness length of canopy [m] :', z0hc
1275 if(
io_l )
write(
io_fid_log,*)
'---------------------------------------------------------------------------------' 1280 rg1 = epsg * ( rx * vfgs &
1281 + epsb * vfgw * stb * tb**4 &
1283 rb1 = epsb * ( rx * vfws &
1284 + epsg * vfwg * stb * tg**4 &
1285 + epsb * vfww * stb * tb**4 &
1288 rg2 = epsg * ( (1.0_rp-epsb) * vfgw * vfws * rx &
1289 + (1.0_rp-epsb) * vfgw * vfwg * epsg * stb * tg**4 &
1290 + epsb * (1.0_rp-epsb) * vfgw * vfww * stb * tb**4 )
1291 rb2 = epsb * ( (1.0_rp-epsg) * vfwg * vfgs * rx &
1292 + (1.0_rp-epsg) * epsb * vfgw * vfwg * stb * tb**4 &
1293 + (1.0_rp-epsb) * vfws * vfww * rx &
1294 + (1.0_rp-epsb) * vfwg * vfww * stb * epsg * tg**4 &
1295 + epsb * (1.0_rp-epsb) * vfww * (1.0_rp-2.0_rp*vfws) * stb * tb**4 )
1304 hb = rhoo * cpdry * chb * uc * (ths1-thc) * exn
1305 eleb = rhoo * lhv * chb * uc * betb * (qs0b-qc)
1306 g0b = sb + rb - hb - eleb
1308 hg = rhoo * cpdry * chg * uc * (ths2-thc) * exn
1309 eleg = rhoo * lhv * chg * uc * betg * (qs0g-qc)
1310 g0g = sg + rg - hg - eleg
1313 call multi_layer(
uke,bound,g0b,capb,aksb,tbl,dzb,dt,tblend)
1318 call multi_layer(
uke,bound,g0g,capg,aksg,tgl,dzg,dt,tglend)
1322 if ( abs(resi1) > dts_max_onestep )
then 1323 if ( abs(resi1) > dts_max_onestep*10.0_rp )
then 1324 write(*,*)
'xxx [URBAN_PHY_SLC/SLC_main] tendency of TB exceeded a limit! STOP.' 1325 write(*,*)
'xxx previous TB and updated TB(TBL(1)) is ', tb-resi1,tb
1328 if(
io_l )
write(
io_fid_log,*)
'*** [URBAN_PHY_SLC/SLC_main] tendency of TB exceeded a limit' 1329 if(
io_l )
write(
io_fid_log,*)
'*** previous TB and updated TB(TBL(1)) is ', tb-resi1, tb
1332 if ( abs(resi2) > dts_max_onestep )
then 1333 if ( abs(resi2) > dts_max_onestep*10.0_rp )
then 1334 write(*,*)
'xxx [URBAN_PHY_SLC/SLC_main] tendency of TG exceeded a limit! STOP.' 1335 write(*,*)
'xxx previous TG and updated TG(TGL(1)) is ', tg-resi2, tg, resi2
1338 if(
io_l )
write(
io_fid_log,*)
'*** [URBAN_PHY_SLC/SLC_main] tendency of TG exceeded a limit' 1339 if(
io_l )
write(
io_fid_log,*)
'*** previous TG and updated TG(TGL(1)) is ', tg-resi2, tg
1346 flxuv = ( r*cdr + rw*cdc ) * ua * ua
1347 sh = ( r*hr + w*hb + rw*hg )
1348 lh = ( r*eler + w*eleb + rw*eleg )
1349 ghflx = -1.0_rp * ( r*g0r + w*g0b + rw*g0g )
1350 lnet = r*rr + w*rb + rw*rg
1361 sdn = r + w * (vfws + vfgs * albg * vfwg) + rw * (vfgs + vfws * albb * vfgw)
1363 + w * ( vfws * albb + vfgs * albg * vfwg *albb ) &
1364 + rw * ( vfgs * albg + vfws * albb * vfgw *albg )
1366 albd_sw_grid = sup / sdn
1369 ldn = r + w*vfws + rw*vfgs
1370 lup = r * (1.0_rp-epsr) &
1371 + w*( (1.0_rp-epsb*vfww)*(1.0_rp-epsb)*vfws - epsb*vfwg*(1.0_rp-epsg)*vfgs ) &
1372 + rw*( (1.0_rp-epsg)*vfgs - epsg*(1.0_rp-vfgs)*(1.0_rp-epsb)*vfws )
1374 rup = (ldn - lup) * rx - lnet
1375 albd_lw_grid = lup / ldn
1401 rainr = max(0.0_rp, rainr-(lhr/lhv)*
real(dt,kind=
rp))
1402 rainb = max(0.0_rp, rainb-(lhb/lhv)*
real(dt,kind=
rp))
1403 raing = max(0.0_rp, raing-(lhg/lhv)*
real(dt,kind=
rp))
1409 rts = ( rup / stb / ( 1.0_rp-albd_lw_grid) )**0.25
1422 call cal_psi(xxx,psim,psih)
1424 xxx2 = (2.0_rp/z) * xxx
1425 call cal_psi(xxx2,psim2,psih2)
1427 xxx10 = (10.0_rp/z) * xxx
1428 call cal_psi(xxx10,psim10,psih10)
1432 u10 = u1 * log(10.0_rp/z0c) / log(z/z0c)
1433 v10 = v1 * log(10.0_rp/z0c) / log(z/z0c)
1435 t2 = rts + (ta-rts)*((log(2.0_rp/z0hc)-psih2)/(log(z/z0hc)-psih))
1446 end subroutine slc_main
1449 subroutine canopy_wind(ZA, UA, UC)
1452 real(RP),
intent(in) :: za
1453 real(RP),
intent(in) :: ua
1454 real(RP),
intent(out) :: uc
1456 real(RP) :: ur,zc,xlb,bb
1458 if( zr + 2.0_rp < za )
then 1459 ur = ua * log((zr-zdc)/z0c) / log((za-zdc)/z0c)
1461 xlb = 0.4_rp * (zr-zdc)
1463 bb = 0.4_rp * zr / ( xlb * log((zr-zdc)/z0c) )
1464 uc = ur * exp( -bb * (1.0_rp-zc/zr) )
1471 uc = max(uc,0.01_rp)
1474 end subroutine canopy_wind
1477 subroutine cal_beta(BET, RAIN, WATER, STRG, ROFF)
1480 real(RP),
intent(out) :: bet
1481 real(RP),
intent(in) :: rain
1482 real(RP),
intent(inout) :: water
1483 real(RP),
intent(inout) :: strg
1484 real(RP),
intent(inout) :: roff
1486 if ( strg == 0.0_rp )
then 1490 water = water + rain
1491 roff = max(0.0_rp, water-strg)
1492 water = water - max(0.0_rp, water-strg)
1493 bet = min( water / strg, 1.0_rp)
1497 end subroutine cal_beta
1500 subroutine cal_psi(zeta,psim,psih)
1505 real(RP),
intent(inout) :: zeta
1506 real(RP),
intent(out) :: psim
1507 real(RP),
intent(out) :: psih
1510 if( zeta >= 1.0_rp ) zeta = 1.0_rp
1511 if( zeta <= -5.0_rp ) zeta = -5.0_rp
1513 if( zeta > 0.0_rp )
then 1514 psim = -5.0_rp * zeta
1515 psih = -5.0_rp * zeta
1517 x = ( 1.0_rp - 16.0_rp * zeta )**0.25_rp
1518 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
1519 psih = 2.0_rp * log((1.0_rp+x*x)/2.0_rp)
1523 end subroutine cal_psi
1530 subroutine mos(XXX,CH,CD,B1,RIB,Z,Z0,UA,TA,TSF,RHO)
1535 real(RP),
intent(in) :: b1, z, z0, ua, ta, tsf, rho
1536 real(RP),
intent(out) :: cd, ch
1537 real(RP),
intent(inout) :: xxx, rib
1538 real(RP) :: xxx0, x, x0, faih, dpsim, dpsih
1539 real(RP) :: f, df, xxxp, us, ts, al, xkb, dd, psim, psih
1541 integer,
parameter :: newt_end = 10
1545 lnz = log( (z+z0)/z0 )
1547 if( rib <= -15.0_rp ) rib = -15.0_rp
1549 if( rib < 0.0_rp )
then 1551 do newt = 1, newt_end
1553 if( xxx >= 0.0_rp ) xxx = -1.0e-3_rp
1555 xxx0 = xxx * z0/(z+z0)
1557 x = (1.0_rp-16.0_rp*xxx)**0.25
1558 x0 = (1.0_rp-16.0_rp*xxx0)**0.25
1561 - log( (x+1.0_rp)**2 * (x**2+1.0_rp) ) &
1562 + 2.0_rp * atan(x) &
1563 + log( (x+1.0_rp)**2 * (x0**2+1.0_rp) ) &
1565 faih = 1.0_rp / sqrt( 1.0_rp - 16.0_rp*xxx )
1566 psih = lnz + 0.4_rp*b1 &
1567 - 2.0_rp * log( sqrt( 1.0_rp - 16.0_rp*xxx ) + 1.0_rp ) &
1568 + 2.0_rp * log( sqrt( 1.0_rp - 16.0_rp*xxx0 ) + 1.0_rp )
1570 dpsim = ( 1.0_rp - 16.0_rp*xxx )**(-0.25) / xxx &
1571 - ( 1.0_rp - 16.0_rp*xxx0 )**(-0.25) / xxx
1572 dpsih = 1.0_rp / sqrt( 1.0_rp - 16.0_rp*xxx ) / xxx &
1573 - 1.0_rp / sqrt( 1.0_rp - 16.0_rp*xxx0 ) / xxx
1575 f = rib * psim**2 / psih - xxx
1577 df = rib * ( 2.0_rp*dpsim*psim*psih - dpsih*psim**2 ) &
1583 if( xxx <= -10.0_rp ) xxx = -10.0_rp
1587 else if( rib >= 0.142857_rp )
then 1590 psim = lnz + 7.0_rp * xxx
1591 psih = psim + 0.4_rp * b1
1597 dd = -4.0_rp * rib * 7.0_rp * xkb * al + (al+xkb)**2
1598 if( dd <= 0.0_rp ) dd = 0.0_rp
1600 xxx = ( al + xkb - 2.0_rp*rib*7.0_rp*al - sqrt(dd) ) / ( 2.0_rp * ( rib*7.0_rp**2 - 7.0_rp ) )
1601 psim = lnz + 7.0_rp * min( xxx, 0.714_rp )
1602 psih = psim + 0.4_rp * b1
1606 us = 0.4_rp * ua / psim
1607 if( us <= 0.01_rp ) us = 0.01_rp
1608 ts = 0.4_rp * (ta-tsf) / psih
1610 cd = us * us / ua**2
1611 ch = 0.4_rp * us / psih / ua
1618 subroutine multi_layer(KM,BOUND,G0,CAP,AKS,TSL,DZ,DELT,TSLEND)
1627 real(RP),
intent(in) :: g0
1628 real(RP),
intent(in) :: cap
1629 real(RP),
intent(in) :: aks
1630 real(DP),
intent(in) :: delt
1631 real(RP),
intent(in) :: tslend
1632 integer,
intent(in) :: km
1633 integer,
intent(in) :: bound
1634 real(RP),
intent(in) :: dz(km)
1635 real(RP),
intent(inout) :: tsl(km)
1636 real(RP) :: a(km), b(km), c(km), d(km), p(km), q(km)
1644 b(1) = cap * dz(1) / delt &
1645 + 2.0_rp * aks / (dz(1)+dz(2))
1646 c(1) = -2.0_rp * aks / (dz(1)+dz(2))
1647 d(1) = cap * dz(1) / delt * tsl(1) + g0
1650 a(k) = -2.0_rp * aks / (dz(k-1)+dz(k))
1651 b(k) = cap * dz(k) / delt + 2.0_rp * aks / (dz(k-1)+dz(k)) + 2.0_rp * aks / (dz(k)+dz(k+1))
1652 c(k) = -2.0_rp * aks / (dz(k)+dz(k+1))
1653 d(k) = cap * dz(k) / delt * tsl(k)
1656 if( bound == 1 )
then 1657 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
1658 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km))
1660 d(km) = cap * dz(km) / delt * tsl(km)
1662 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
1663 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km)) + 2.0_rp * aks / (dz(km)+dzend)
1665 d(km) = cap * dz(km) / delt * tsl(km) + 2.0_rp * aks * tslend / (dz(km)+dzend)
1672 p(k) = -c(k) / ( a(k) * p(k-1) + b(k) )
1673 q(k) = ( -a(k) * q(k-1) + d(k) ) / ( a(k) * p(k-1) + b(k) )
1679 tsl(k) = p(k) * tsl(k+1) + q(k)
1683 end subroutine multi_layer
1686 subroutine multi_layer2(KM,BOUND,G0,CAP,AKS,TSL,DZ,DELT,TSLEND,CAP1,AKS1)
1695 real(RP),
intent(in) :: g0
1696 real(RP),
intent(in) :: cap
1697 real(RP),
intent(in) :: aks
1698 real(RP),
intent(in) :: cap1
1699 real(RP),
intent(in) :: aks1
1700 real(DP),
intent(in) :: delt
1701 real(RP),
intent(in) :: tslend
1702 integer,
intent(in) :: km
1703 integer,
intent(in) :: bound
1704 real(RP),
intent(in) :: dz(km)
1705 real(RP),
intent(inout) :: tsl(km)
1706 real(RP) :: a(km), b(km), c(km), d(km), x(km), p(km), q(km)
1714 b(1) = cap1 * dz(1) / delt &
1715 + 2.0_rp * aks1 / (dz(1)+dz(2))
1716 c(1) = -2.0_rp * aks1 / (dz(1)+dz(2))
1717 d(1) = cap1 * dz(1) / delt * tsl(1) + g0
1720 a(k) = -2.0_rp * aks / (dz(k-1)+dz(k))
1721 b(k) = cap * dz(k) / delt + 2.0_rp * aks / (dz(k-1)+dz(k)) + 2.0_rp * aks / (dz(k)+dz(k+1))
1722 c(k) = -2.0_rp * aks / (dz(k)+dz(k+1))
1723 d(k) = cap * dz(k) / delt * tsl(k)
1726 if( bound == 1 )
then 1727 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
1728 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km))
1730 d(km) = cap * dz(km) / delt * tsl(km)
1732 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
1733 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km)) + 2.0_rp * aks / (dz(km)+dzend)
1735 d(km) = cap * dz(km) / delt * tsl(km) + 2.0_rp * aks * tslend / (dz(km)+dzend)
1742 p(k) = -c(k) / ( a(k) * p(k-1) + b(k) )
1743 q(k) = ( -a(k) * q(k-1) + d(k) ) / ( a(k) * p(k-1) + b(k) )
1749 x(k) = p(k) * x(k+1) + q(k)
1757 end subroutine multi_layer2
1760 subroutine urban_param_setup
1763 real(RP) :: dhgt,thgt,vfws,vfgs
1787 hgt = zr / ( road_width + roof_width )
1790 r = roof_width / ( road_width + roof_width )
1794 dhgt = hgt / 100.0_rp
1797 thgt = hgt - dhgt / 2.0_rp
1800 vfws = vfws + 0.25_rp * ( 1.0_rp - thgt / sqrt( thgt**2 + rw**2 ) )
1803 vfws = vfws / 99.0_rp
1804 vfws = vfws * 2.0_rp
1805 vfgs = 1.0_rp - 2.0_rp * vfws * hgt / rw
1809 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)
real(rp), public const_undef
logical, public io_nml
output log or not? (for namelist, this process)
integer, public ia
of whole cells: x, 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)
Main routine for land submodel.
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
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 io_fid_nml
Log file ID (only for output namelist)
integer, public ja
of whole cells: y, local, with HALO