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
121 character(len=*),
intent(in) :: URBAN_TYPE
124 namelist / param_urban_phy_slc / &
162 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[SLC] / Categ[URBAN PHY] / Origin[SCALElib]' 167 dzr(
uks:
uke) = (/0.01_rp,0.01_rp,0.03_rp,0.05_rp,0.10_rp/)
168 dzb(
uks:
uke) = (/0.01_rp,0.01_rp,0.03_rp,0.05_rp,0.10_rp/)
169 dzg(
uks:
uke) = (/0.01_rp,0.01_rp,0.03_rp,0.05_rp,0.10_rp/)
173 read(
io_fid_conf,nml=param_urban_phy_slc,iostat=ierr)
175 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 176 elseif( ierr > 0 )
then 177 write(*,*)
'xxx Not appropriate names in namelist PARAM_URBAN_PHY_SLC. Check!' 182 ahdiurnal(:) = (/ 0.356, 0.274, 0.232, 0.251, 0.375, 0.647, 0.919, 1.135, 1.249, 1.328, &
183 1.365, 1.363, 1.375, 1.404, 1.457, 1.526, 1.557, 1.521, 1.372, 1.206, &
184 1.017, 0.876, 0.684, 0.512 /)
187 call urban_param_setup
190 allocate( is_urb(
ia,
ja) )
197 is_urb(i,j) = .false.
270 qsat => atmos_saturation_pres2qsat_all
276 logical,
parameter :: LSOLAR = .false.
278 real(RP),
parameter :: Uabs_min = 0.1_rp
281 real(RP),
intent(out) :: TR_URB_t (
ia,
ja)
282 real(RP),
intent(out) :: TB_URB_t (
ia,
ja)
283 real(RP),
intent(out) :: TG_URB_t (
ia,
ja)
284 real(RP),
intent(out) :: TC_URB_t (
ia,
ja)
285 real(RP),
intent(out) :: QC_URB_t (
ia,
ja)
286 real(RP),
intent(out) :: UC_URB_t (
ia,
ja)
287 real(RP),
intent(out) :: TRL_URB_t (
uks:
uke,
ia,
ja)
288 real(RP),
intent(out) :: TBL_URB_t (
uks:
uke,
ia,
ja)
289 real(RP),
intent(out) :: TGL_URB_t (
uks:
uke,
ia,
ja)
290 real(RP),
intent(out) :: RAINR_URB_t(
ia,
ja)
291 real(RP),
intent(out) :: RAINB_URB_t(
ia,
ja)
292 real(RP),
intent(out) :: RAING_URB_t(
ia,
ja)
293 real(RP),
intent(out) :: ROFF_URB_t (
ia,
ja)
295 real(RP),
intent(out) :: SFC_TEMP(
ia,
ja)
296 real(RP),
intent(out) :: ALBD_LW (
ia,
ja)
297 real(RP),
intent(out) :: ALBD_SW (
ia,
ja)
298 real(RP),
intent(out) :: MWFLX (
ia,
ja)
299 real(RP),
intent(out) :: MUFLX (
ia,
ja)
300 real(RP),
intent(out) :: MVFLX (
ia,
ja)
301 real(RP),
intent(out) :: SHFLX (
ia,
ja)
302 real(RP),
intent(out) :: LHFLX (
ia,
ja)
303 real(RP),
intent(out) :: GHFLX (
ia,
ja)
304 real(RP),
intent(out) :: Z0M (
ia,
ja)
305 real(RP),
intent(out) :: Z0H (
ia,
ja)
306 real(RP),
intent(out) :: Z0E (
ia,
ja)
307 real(RP),
intent(out) :: U10 (
ia,
ja)
308 real(RP),
intent(out) :: V10 (
ia,
ja)
309 real(RP),
intent(out) :: T2 (
ia,
ja)
310 real(RP),
intent(out) :: Q2 (
ia,
ja)
312 real(RP),
intent(in) :: TMPA (
ia,
ja)
313 real(RP),
intent(in) :: PRSA (
ia,
ja)
314 real(RP),
intent(in) :: W1 (
ia,
ja)
315 real(RP),
intent(in) :: U1 (
ia,
ja)
316 real(RP),
intent(in) :: V1 (
ia,
ja)
317 real(RP),
intent(in) :: DENS (
ia,
ja)
318 real(RP),
intent(in) :: QA (
ia,
ja)
319 real(RP),
intent(in) :: Z1 (
ia,
ja)
320 real(RP),
intent(in) :: PBL (
ia,
ja)
321 real(RP),
intent(in) :: PRSS (
ia,
ja)
322 real(RP),
intent(in) :: LWD (
ia,
ja,2)
323 real(RP),
intent(in) :: SWD (
ia,
ja,2)
324 real(RP),
intent(in) :: PREC (
ia,
ja)
326 real(RP),
intent(in) :: TR_URB (
ia,
ja)
327 real(RP),
intent(in) :: TB_URB (
ia,
ja)
328 real(RP),
intent(in) :: TG_URB (
ia,
ja)
329 real(RP),
intent(in) :: TC_URB (
ia,
ja)
330 real(RP),
intent(in) :: QC_URB (
ia,
ja)
331 real(RP),
intent(in) :: UC_URB (
ia,
ja)
332 real(RP),
intent(in) :: TRL_URB (
uks:
uke,
ia,
ja)
333 real(RP),
intent(in) :: TBL_URB (
uks:
uke,
ia,
ja)
334 real(RP),
intent(in) :: TGL_URB (
uks:
uke,
ia,
ja)
335 real(RP),
intent(in) :: RAINR_URB(
ia,
ja)
336 real(RP),
intent(in) :: RAINB_URB(
ia,
ja)
337 real(RP),
intent(in) :: RAING_URB(
ia,
ja)
338 real(RP),
intent(in) :: ROFF_URB (
ia,
ja)
340 real(RP),
intent(in) :: LON
341 real(RP),
intent(in) :: LAT
342 integer,
intent(in) :: NOWDATE(6)
343 real(DP),
intent(in) :: dt
360 real(RP) :: SHR (
ia,
ja)
361 real(RP) :: SHB (
ia,
ja)
362 real(RP) :: SHG (
ia,
ja)
363 real(RP) :: LHR (
ia,
ja)
364 real(RP) :: LHB (
ia,
ja)
365 real(RP) :: LHG (
ia,
ja)
366 real(RP) :: GHR (
ia,
ja)
367 real(RP) :: GHB (
ia,
ja)
368 real(RP) :: GHG (
ia,
ja)
369 real(RP) :: RNR (
ia,
ja)
370 real(RP) :: RNB (
ia,
ja)
371 real(RP) :: RNG (
ia,
ja)
372 real(RP) :: RNgrd(
ia,
ja)
384 if(
io_l )
write(
io_fid_log,*)
'*** Urban step: Single Layer Canopy' 390 if( is_urb(i,j) )
then 392 uabs = max( sqrt( u1(i,j)**2 + v1(i,j)**2 + w1(i,j)**2 ), uabs_min )
403 trl(k) = trl_urb(k,i,j)
404 tbl(k) = tbl_urb(k,i,j)
405 tgl(k) = tgl_urb(k,i,j)
408 rainr = rainr_urb(i,j)
409 rainb = rainb_urb(i,j)
410 raing = raing_urb(i,j)
468 tr_urb_t(i,j) = ( tr - tr_urb(i,j) ) / dt
469 tb_urb_t(i,j) = ( tb - tb_urb(i,j) ) / dt
470 tg_urb_t(i,j) = ( tg - tg_urb(i,j) ) / dt
471 tc_urb_t(i,j) = ( tc - tc_urb(i,j) ) / dt
472 qc_urb_t(i,j) = ( qc - qc_urb(i,j) ) / dt
473 uc_urb_t(i,j) = ( uc - uc_urb(i,j) ) / dt
476 trl_urb_t(k,i,j) = ( trl(k) - trl_urb(k,i,j) ) / dt
477 tbl_urb_t(k,i,j) = ( tbl(k) - tbl_urb(k,i,j) ) / dt
478 tgl_urb_t(k,i,j) = ( tgl(k) - tgl_urb(k,i,j) ) / dt
481 rainr_urb_t(i,j) = ( rainr - rainr_urb(i,j) ) / dt
482 rainb_urb_t(i,j) = ( rainb - rainb_urb(i,j) ) / dt
483 raing_urb_t(i,j) = ( raing - raing_urb(i,j) ) / dt
484 roff_urb_t(i,j) = ( roff - roff_urb(i,j) ) / dt
487 call qsat( qvs, sfc_temp(i,j), prss(i,j) )
507 mwflx(i,j) = -dens(i,j) * ustar**2 / uabs * w1(i,j)
508 muflx(i,j) = -dens(i,j) * ustar**2 / uabs * u1(i,j)
509 mvflx(i,j) = -dens(i,j) * ustar**2 / uabs * v1(i,j)
517 tr_urb_t(i,j) = 0.0_rp
518 tb_urb_t(i,j) = 0.0_rp
519 tg_urb_t(i,j) = 0.0_rp
520 tc_urb_t(i,j) = 0.0_rp
521 qc_urb_t(i,j) = 0.0_rp
522 uc_urb_t(i,j) = 0.0_rp
523 trl_urb_t(:,i,j) = 0.0_rp
524 tbl_urb_t(:,i,j) = 0.0_rp
525 tgl_urb_t(:,i,j) = 0.0_rp
526 rainr_urb_t(i,j) = 0.0_rp
527 rainb_urb_t(i,j) = 0.0_rp
528 raing_urb_t(i,j) = 0.0_rp
529 roff_urb_t(i,j) = 0.0_rp
530 sfc_temp(i,j) = 300.0_rp
531 albd_lw(i,j) = 0.0_rp
532 albd_sw(i,j) = 0.0_rp
565 call hist_in( shr(:,:),
'URBAN_SHR',
'urban sensible heat flux on roof',
'W/m2' )
566 call hist_in( shb(:,:),
'URBAN_SHB',
'urban sensible heat flux on wall',
'W/m2' )
567 call hist_in( shg(:,:),
'URBAN_SHG',
'urban sensible heat flux on road',
'W/m2' )
568 call hist_in( lhr(:,:),
'URBAN_LHR',
'urban latent heat flux on roof',
'W/m2' )
569 call hist_in( lhb(:,:),
'URBAN_LHB',
'urban latent heat flux on wall',
'W/m2' )
570 call hist_in( lhg(:,:),
'URBAN_LHG',
'urban latent heat flux on road',
'W/m2' )
571 call hist_in( ghr(:,:),
'URBAN_GHR',
'urban ground heat flux on roof',
'W/m2' )
572 call hist_in( ghb(:,:),
'URBAN_GHB',
'urban ground heat flux on wall',
'W/m2' )
573 call hist_in( ghg(:,:),
'URBAN_GHG',
'urban ground heat flux on road',
'W/m2' )
574 call hist_in( rnr(:,:),
'URBAN_RNR',
'urban net radiation on roof',
'W/m2' )
575 call hist_in( rnb(:,:),
'URBAN_RNB',
'urban net radiation on wall',
'W/m2' )
576 call hist_in( rng(:,:),
'URBAN_RNG',
'urban net radiation on road',
'W/m2' )
577 call hist_in( rngrd(:,:),
'URBAN_RNgrd',
'urban grid average of net radiation',
'W/m2' )
583 subroutine slc_main( &
646 karman => const_karman, &
647 cpdry => const_cpdry, &
648 grav => const_grav, &
649 rdry => const_rdry, &
650 rvap => const_rvap, &
652 tem00 => const_tem00, &
655 atmos_thermodyn_templhv
657 qsat => atmos_saturation_pres2qsat_all
661 logical ,
intent(in) :: LSOLAR
664 real(RP),
intent(in) :: PRSA
665 real(RP),
intent(in) :: PRSS
666 real(RP),
intent(in) :: TA
667 real(RP),
intent(in) :: QA
668 real(RP),
intent(in) :: UA
669 real(RP),
intent(in) :: U1
670 real(RP),
intent(in) :: V1
671 real(RP),
intent(in) :: ZA
672 real(RP),
intent(in) :: SSG(2)
673 real(RP),
intent(in) :: LLG(2)
674 real(RP),
intent(in) :: RAIN
675 real(RP),
intent(in) :: RHOO
676 real(RP),
intent(in) :: XLAT
677 real(RP),
intent(in) :: XLON
678 integer,
intent(in) :: NOWDATE(6)
679 real(DP),
intent(in) :: dt
682 real(RP),
intent(inout) :: TR
683 real(RP),
intent(inout) :: TB
684 real(RP),
intent(inout) :: TG
685 real(RP),
intent(inout) :: TC
686 real(RP),
intent(inout) :: QC
687 real(RP),
intent(inout) :: UC
688 real(RP),
intent(inout) :: TRL(
uks:
uke)
689 real(RP),
intent(inout) :: TBL(
uks:
uke)
690 real(RP),
intent(inout) :: TGL(
uks:
uke)
691 real(RP),
intent(inout) :: RAINR
692 real(RP),
intent(inout) :: RAINB
693 real(RP),
intent(inout) :: RAING
694 real(RP),
intent(inout) :: ROFF
697 real(RP),
intent(out) :: ALBD_SW_grid
698 real(RP),
intent(out) :: ALBD_LW_grid
699 real(RP),
intent(out) :: RTS
700 real(RP),
intent(out) :: SH
701 real(RP),
intent(out) :: LH
702 real(RP),
intent(out) :: GHFLX
703 real(RP),
intent(out) :: RN
704 real(RP),
intent(out) :: U10
705 real(RP),
intent(out) :: V10
706 real(RP),
intent(out) :: T2
707 real(RP),
intent(out) :: Q2
708 real(RP),
intent(out) :: RNR, RNB, RNG
709 real(RP),
intent(out) :: SHR, SHB, SHG
710 real(RP),
intent(out) :: LHR, LHB, LHG
711 real(RP),
intent(out) :: GHR, GHB, GHG
712 integer ,
intent(in) :: i, j
718 real(RP),
parameter :: redf_min = 1.0e-2_rp
719 real(RP),
parameter :: redf_max = 1.0_rp
732 real(RP) :: tahdiurnal
739 real(RP) :: W, VFGS, VFGW, VFWG, VFWS, VFWW
758 real(RP) :: ROFFR, ROFFB, ROFFG
760 real(RP) :: LUP, LDN, RUP
763 real(RP) :: LNET, SNET, FLXUV
766 real(RP) :: psim,psim2,psim10
767 real(RP) :: psih,psih2,psih10
776 real(RP) :: SR, SB, SG, RR, RB, RG
777 real(RP) :: SR1, SB1, SB2, SG1, SG2
778 real(RP) :: RB1, RB2, RG1, RG2
779 real(RP) :: HR, ELER, G0R
780 real(RP) :: HB, ELEB, G0B
781 real(RP) :: HG, ELEG, G0G
784 real(RP) :: QS0R, QS0B, QS0G
786 real(RP) :: RIBR, BHR, CDR
787 real(RP) :: RIBC, BHC, CDC
788 real(RP) :: ALPHAR, ALPHAB, ALPHAG, ALPHAC
789 real(RP) :: CHR, CHB, CHG, CHC
790 real(RP) :: TC1, TC2, QC1, QC2
793 real(RP) :: DTS_MAX_onestep = 0.0_rp
794 real(RP) :: resi1,resi2
795 real(RP) :: resi1p,resi2p
796 real(RP) :: G0RP,G0BP,G0GP
798 real(RP) :: XXX, X, CD, CH, CHU, XXX2, XXX10
800 real(RP) :: THA,THC,THS,THS1,THS2
809 call atmos_thermodyn_templhv( lhv, ta )
812 tha = ta * ( pre00 / prsa )**rovcp
834 time =
real( NOWDATE(4)*3600.0_RP + NOWDATE(5)*60.0_RP + NOWDATE(6), kind=
rp )
835 tloc = mod((nowdate(4) + int(lon/15.0_rp)),24 )
836 dsec =
real( NOWDATE(5)*60.0_RP + NOWDATE(6), kind=RP ) / 3600.0_RP
837 if( tloc == 0 ) tloc = 24
840 if ( tloc == 24 )
then 841 tahdiurnal = ( 1.0_rp-dsec ) * ahdiurnal(tloc ) &
842 + ( dsec ) * ahdiurnal(1 )
844 tahdiurnal = ( 1.0_rp-dsec ) * ahdiurnal(tloc ) &
845 + ( dsec ) * ahdiurnal(tloc+1)
847 ah_t = ah * tahdiurnal
848 alh_t = alh * tahdiurnal
851 dts_max_onestep = dts_max * dt
853 if ( zdc + z0c + 2.0_rp >= za )
then 854 if(
io_l )
write(
io_fid_log,*)
'ZDC + Z0C + 2m is larger than the 1st WRF level' // &
855 'Stop in subroutine urban - change ZDC and Z0C' 859 w = 2.0_rp * 1.0_rp * hgt
862 vfwg = ( 1.0_rp - svf ) * ( 1.0_rp - r ) / w
864 vfww = 1.0_rp - 2.0_rp * vfwg
874 call canopy_wind(za, ua, uc)
881 raint = 1.0_rp * ( rain * dt )
882 call cal_beta(betr, raint, rainr, strgr, roffr)
884 raint = 0.1_rp * ( rain * dt )
885 call cal_beta(betb, raint, rainb, strgb, roffb)
887 raint = 0.9_rp * ( rain * dt )
888 call cal_beta(betg, raint, raing, strgg, roffg)
890 roff = roff + r * roffr + rw * ( roffb + roffg )
896 if( sx > 0.0_rp )
then 901 sr1 = sx * ( 1.0_rp - albr )
902 sg1 = sx * vfgs * ( 1.0_rp - albg )
903 sb1 = sx * vfws * ( 1.0_rp - albb )
904 sg2 = sb1 * albb / ( 1.0_rp - albb ) * vfgw * ( 1.0_rp - albg )
905 sb2 = sg1 * albg / ( 1.0_rp - albg ) * vfwg * ( 1.0_rp - albb )
910 snet = r * sr + w * sb + rw * sg
934 do iteration = 1, 100
936 ths = tr * ( pre00 / prss )**rovcp
939 bhr =
log(z0r/z0hr) / 0.4_rp
940 ribr = ( grav * 2.0_rp / (tha+ths) ) * (tha-ths) * (z+z0r) / (ua*ua)
941 call mos(xxxr,chr,cdr,bhr,ribr,z,z0r,ua,tha,ths,rhoo)
943 call qsat( qs0r, tr, prss )
945 rr = epsr * ( rx - stb * (tr**4) )
947 hr = rhoo * cpdry * chr * ua * (ths-tha)
948 eler = rhoo * lhv * chr * ua * betr * (qs0r-qa)
949 g0r = sr + rr - hr - eler
963 call multi_layer(
uke,bound,g0r,capr,aksr,trl,dzr,dt,trlend)
968 if( abs(resi1) < sqrt(eps) )
then 970 tr = max( trp - dts_max_onestep, min( trp + dts_max_onestep, tr ) )
974 if ( resi1*resi1p < 0.0_rp )
then 975 tr = (tr + trl(1)) * 0.5_rp
979 tr = max( trp - dts_max_onestep, min( trp + dts_max_onestep, tr ) )
992 if ( iteration > 100 )
then 993 if(
io_l )
write(
io_fid_log,*)
'*** Warning: Kusaka urban (SLC_main) iteration for TR was not converged',
prc_myrank,i,j
994 if(
io_l )
write(
io_fid_log,*)
'---------------------------------------------------------------------------------' 995 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Residual [K] :', resi1
997 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TRP : Initial TR [K] :', trp
998 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TRLP: Initial TRL [K] :', trlp
1000 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- SX : Shortwave radiation [W/m2] :', sx
1001 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- RX : Longwave radiation [W/m2] :', rx
1002 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- PRSS: Surface pressure [Pa] :', prss
1003 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- PRSA: Pressure at 1st atmos layer [m] :', prsa
1004 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- RHOO: Air density [kg/m3] :', rhoo
1005 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- ZA : Height at 1st atmos layer [m] :', za
1006 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TA : Temperature at 1st atmos layer [K] :', ta
1007 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- UA : Wind speed at 1st atmos layer [m/s] :', ua
1008 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QA : Specific humidity at 1st atmos layer [kg/kg] :', qa
1009 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- DZR : Depth of surface layer [m] :', dzr
1011 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- R, W, RW : Normalized height and road width [-] :', r, w,rw
1012 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- SVF : Sky View Factors [-] :', svf
1013 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- BETR: Evaporation efficiency [-] :', betr
1014 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- EPSR: Surface emissivity of roof [-] :', epsr
1015 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- CAPR: Heat capacity of roof [J m-3 K] :', capr
1016 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- AKSR: Thermal conductivity of roof [W m-1 K] :', aksr
1017 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QS0R: Surface specific humidity [kg/kg] :', qs0r
1018 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- ZDC : Desplacement height of canopy [m] :', zdc
1019 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Z0R : Momentum roughness length of roof [m] :', z0r
1020 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Z0HR: Thermal roughness length of roof [m] :', z0hr
1021 if(
io_l )
write(
io_fid_log,*)
'---------------------------------------------------------------------------------' 1025 ths = tr * ( pre00 / prss )**rovcp
1026 ribr = ( grav * 2.0_rp / (tha+ths) ) * (tha-ths) * (z+z0r) / (ua*ua)
1027 call mos(xxxr,chr,cdr,bhr,ribr,z,z0r,ua,tha,ths,rhoo)
1029 call qsat( qs0r, tr, prss )
1031 rr = epsr * ( rx - stb * (tr**4) )
1032 hr = rhoo * cpdry * chr * ua * (ths-tha)
1033 eler = rhoo * lhv * chr * ua * betr * (qs0r-qa)
1034 g0r = sr + rr - hr - eler
1037 call multi_layer(
uke,bound,g0r,capr,aksr,trl,dzr,dt,trlend)
1041 if ( abs(resi1) > dts_max_onestep )
then 1042 if ( abs(resi1) > dts_max_onestep*10.0_rp )
then 1043 if(
io_l )
write(
io_fid_log,*)
'!xxx Error xxx!: Kusaka urban (SLC_main) tendency of TR is over limitter' 1044 if(
io_l )
write(
io_fid_log,*)
'!xxx previous TR and updated TR(TRL(1)) is ',tr-resi1,tr
1047 if(
io_l )
write(
io_fid_log,*)
'!xxx Warning xxx!: Kusaka urban (SLC_main) tendency of TR is over limitter' 1048 if(
io_l )
write(
io_fid_log,*)
'!xxx previous TR and updated TR(TRL(1)) is ',tr-resi1,tr
1058 alphab = 6.15_rp + 4.18_rp * uc
1059 if( uc > 5.0_rp ) alphab = 7.51_rp * (uc**0.78_rp )
1060 alphag = 6.15_rp + 4.18_rp * uc
1061 if( uc > 5.0_rp ) alphag = 7.51_rp * (uc**0.78_rp )
1062 chb = alphab / rhoo / cpdry / uc
1063 chg = alphag / rhoo / cpdry / uc
1071 do iteration = 1, 200
1073 ths1 = tb * ( pre00 / prss )**rovcp
1074 ths2 = tg * ( pre00 / prss )**rovcp
1075 thc = tc * ( pre00 / prss )**rovcp
1078 bhc =
log(z0c/z0hc) / 0.4_rp
1079 ribc = ( grav * 2.0_rp / (tha+thc) ) * (tha-thc) * (z+z0c) / (ua*ua)
1080 call mos(xxxc,chc,cdc,bhc,ribc,z,z0c,ua,tha,thc,rhoo)
1081 alphac = chc * rhoo * cpdry * ua
1083 call qsat( qs0b, tb, prss )
1084 call qsat( qs0g, tg, prss )
1086 tc1 = rw*alphac + rw*alphag + w*alphab
1088 tc2 = rw*alphac*tha + w*alphab*ths1 + rw*alphag*ths2
1090 qc1 = rw*(chc*ua) + rw*(chg*betg*uc) + w*(chb*betb*uc)
1091 qc2 = rw*(chc*ua)*qa + rw*(chg*betg*uc)*qs0g + w*(chb*betb*uc)*qs0b
1094 rg1 = epsg * ( rx * vfgs &
1095 + epsb * vfgw * stb * tb**4 &
1098 rb1 = epsb * ( rx * vfws &
1099 + epsg * vfwg * stb * tg**4 &
1100 + epsb * vfww * stb * tb**4 &
1103 rg2 = epsg * ( (1.0_rp-epsb) * vfgw * vfws * rx &
1104 + (1.0_rp-epsb) * vfgw * vfwg * epsg * stb * tg**4 &
1105 + epsb * (1.0_rp-epsb) * vfgw * vfww * stb * tb**4 )
1107 rb2 = epsb * ( (1.0_rp-epsg) * vfwg * vfgs * rx &
1108 + (1.0_rp-epsg) * epsb * vfgw * vfwg * stb * tb**4 &
1109 + (1.0_rp-epsb) * vfws * vfww * rx &
1110 + (1.0_rp-epsb) * vfwg * vfww * stb * epsg * tg**4 &
1111 + epsb * (1.0_rp-epsb) * vfww * (1.0_rp-2.0_rp*vfws) * stb * tb**4 )
1116 hb = rhoo * cpdry * chb * uc * (ths1-thc)
1117 eleb = rhoo * lhv * chb * uc * betb * (qs0b-qc)
1118 g0b = sb + rb - hb - eleb
1120 hg = rhoo * cpdry * chg * uc * (ths2-thc)
1121 eleg = rhoo * lhv * chg * uc * betg * (qs0g-qc)
1122 g0g = sg + rg - hg - eleg
1125 call multi_layer(
uke,bound,g0b,capb,aksb,tbl,dzb,dt,tblend)
1129 call multi_layer(
uke,bound,g0g,capg,aksg,tgl,dzg,dt,tglend)
1147 if ( abs(resi1) < sqrt(eps) .AND. abs(resi2) < sqrt(eps) )
then 1150 tb = max( tbp - dts_max_onestep, min( tbp + dts_max_onestep, tb ) )
1151 tg = max( tgp - dts_max_onestep, min( tgp + dts_max_onestep, tg ) )
1155 if ( resi1*resi1p < 0.0_rp )
then 1156 tb = (tb + tbl(1)) * 0.5_rp
1160 if ( resi2*resi2p < 0.0_rp )
then 1161 tg = (tg + tgl(1)) * 0.5_rp
1165 tb = max( tbp - dts_max_onestep, min( tbp + dts_max_onestep, tb ) )
1166 tg = max( tgp - dts_max_onestep, min( tgp + dts_max_onestep, tg ) )
1172 call qsat( qs0b, tb, prss )
1173 call qsat( qs0g, tg, prss )
1175 ths1 = tb * ( pre00 / prss )**rovcp
1176 ths2 = tg * ( pre00 / prss )**rovcp
1178 tc1 = rw*alphac + rw*alphag + w*alphab
1180 tc2 = rw*alphac*tha + w*alphab*ths1 + rw*alphag*ths2
1182 tc = thc * ( prss / pre00 )**rovcp
1184 qc1 = rw*(chc*ua) + rw*(chg*betg*uc) + w*(chb*betb*uc)
1185 qc2 = rw*(chc*ua)*qa + rw*(chg*betg*uc)*qs0g + w*(chb*betb*uc)*qs0b
1206 if ( iteration > 200 )
then 1207 if(
io_l )
write(
io_fid_log,*)
'*** Warning: Kusaka urban (SLC_main) iteration for TB/TG was not converged',
prc_myrank,i,j
1208 if(
io_l )
write(
io_fid_log,*)
'---------------------------------------------------------------------------------' 1209 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Residual [K] :', resi1,resi2
1211 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TBP : Initial TB [K] :', tbp
1212 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TBLP: Initial TBL [K] :', tblp
1213 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TGP : Initial TG [K] :', tgp
1214 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TGLP: Initial TGL [K] :', tglp
1215 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TCP : Initial TC [K] :', tcp
1216 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QCP : Initial QC [K] :', qcp
1218 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- UC : Canopy wind [m/s] :', uc
1219 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- SX : Shortwave radiation [W/m2] :', sx
1220 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- RX : Longwave radiation [W/m2] :', rx
1221 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- PRSS: Surface pressure [Pa] :', prss
1222 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- PRSA: Pressure at 1st atmos layer [m] :', prsa
1223 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- RHOO: Air density [kg/m3] :', rhoo
1224 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- ZA : Height at 1st atmos layer [m] :', za
1225 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- TA : Temperature at 1st atmos layer [K] :', ta
1226 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- UA : Wind speed at 1st atmos layer [m/s] :', ua
1227 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QA : Specific humidity at 1st atmos layer [kg/kg] :', qa
1228 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- DZB : Depth of surface layer [m] :', dzb
1229 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- DZG : Depth of surface layer [m] :', dzg
1231 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- R, W, RW : Normalized height and road width [-] :', r, w,rw
1232 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- SVF : Sky View Factors [-] :', svf
1233 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- BETB,BETG : Evaporation efficiency [-] :', betb,betg
1234 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- EPSB,EPSG : Surface emissivity [-] :', epsb,epsg
1235 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- CAPB,CAPG : Heat capacity [J m-3 K] :', capb,capg
1236 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- AKSB,AKSG : Thermal conductivity [W m-1 K] :', aksb,aksb
1237 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- QS0B,QS0G : Surface specific humidity [kg/kg] :', qs0b,qs0g
1238 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- ZDC : Desplacement height of canopy [m] :', zdc
1239 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Z0C : Momentum roughness length of canopy [m] :', z0c
1240 if(
io_l )
write(
io_fid_log,*)
'DEBUG Message --- Z0HC : Thermal roughness length of canopy [m] :', z0hc
1241 if(
io_l )
write(
io_fid_log,*)
'---------------------------------------------------------------------------------' 1246 rg1 = epsg * ( rx * vfgs &
1247 + epsb * vfgw * stb * tb**4 &
1249 rb1 = epsb * ( rx * vfws &
1250 + epsg * vfwg * stb * tg**4 &
1251 + epsb * vfww * stb * tb**4 &
1254 rg2 = epsg * ( (1.0_rp-epsb) * vfgw * vfws * rx &
1255 + (1.0_rp-epsb) * vfgw * vfwg * epsg * stb * tg**4 &
1256 + epsb * (1.0_rp-epsb) * vfgw * vfww * stb * tb**4 )
1257 rb2 = epsb * ( (1.0_rp-epsg) * vfwg * vfgs * rx &
1258 + (1.0_rp-epsg) * epsb * vfgw * vfwg * stb * tb**4 &
1259 + (1.0_rp-epsb) * vfws * vfww * rx &
1260 + (1.0_rp-epsb) * vfwg * vfww * stb * epsg * tg**4 &
1261 + epsb * (1.0_rp-epsb) * vfww * (1.0_rp-2.0_rp*vfws) * stb * tb**4 )
1266 ths1 = tb * ( pre00 / prss )**rovcp
1267 ths2 = tg * ( pre00 / prss )**rovcp
1268 thc = tc * ( pre00 / prss )**rovcp
1270 hb = rhoo * cpdry * chb * uc * (ths1-thc)
1271 eleb = rhoo * lhv * chb * uc * betb * (qs0b-qc)
1272 g0b = sb + rb - hb - eleb
1274 hg = rhoo * cpdry * chg * uc * (ths2-thc)
1275 eleg = rhoo * lhv * chg * uc * betg * (qs0g-qc)
1276 g0g = sg + rg - hg - eleg
1279 call multi_layer(
uke,bound,g0b,capb,aksb,tbl,dzb,dt,tblend)
1284 call multi_layer(
uke,bound,g0g,capg,aksg,tgl,dzg,dt,tglend)
1289 if ( abs(resi1) > dts_max_onestep )
then 1290 if ( abs(resi1) > dts_max_onestep*10.0_rp )
then 1291 if(
io_l )
write(
io_fid_log,*)
'!xxx Error xxx!: Kusaka urban (SLC_main) tendency of TB is over limitter' 1292 if(
io_l )
write(
io_fid_log,*)
'!xxx previous TB and updated TB(TBL(1)) is ',tb-resi1,tb
1295 if(
io_l )
write(
io_fid_log,*)
'!xxx Warning xxx!: Kusaka urban (SLC_main) tendency of TB is over limitter' 1296 if(
io_l )
write(
io_fid_log,*)
'!xxx previous TB and updated TB(TBL(1)) is ',tb-resi1,tb
1299 if ( abs(resi2) > dts_max_onestep )
then 1300 if ( abs(resi2) > dts_max_onestep*10.0_rp )
then 1301 if(
io_l )
write(
io_fid_log,*)
'!xxx Error xxx!: Kusaka urban (SLC_main) tendency of TG is over limitter' 1302 if(
io_l )
write(
io_fid_log,*)
'!xxx previous TG and updated TG(TGL(1)) is ',tg-resi2,tg,resi2
1305 if(
io_l )
write(
io_fid_log,*)
'!xxx Warning xxx!: Kusaka urban (SLC_main) tendency of TG is over limitter' 1306 if(
io_l )
write(
io_fid_log,*)
'!xxx previous TG and updated TG(TGL(1)) is ',tg-resi2,tg
1313 flxuv = ( r*cdr + rw*cdc ) * ua * ua
1314 sh = ( r*hr + w*hb + rw*hg )
1315 lh = ( r*eler + w*eleb + rw*eleg )
1316 ghflx = -1.0_rp * ( r*g0r + w*g0b + rw*g0g )
1317 lnet = r*rr + w*rb + rw*rg
1328 sdn = r + w * (vfws + vfgs * albg * vfwg) + rw * (vfgs + vfws * albb * vfgw)
1330 + w * ( vfws * albb + vfgs * albg * vfwg *albb ) &
1331 + rw * ( vfgs * albg + vfws * albb * vfgw *albg )
1333 albd_sw_grid = sup / sdn
1336 ldn = r + w*vfws + rw*vfgs
1337 lup = r * (1.0_rp-epsr) &
1338 + w*( (1.0_rp-epsb*vfww)*(1.0_rp-epsb)*vfws - epsb*vfwg*(1.0_rp-epsg)*vfgs ) &
1339 + rw*( (1.0_rp-epsg)*vfgs - epsg*(1.0_rp-vfgs)*(1.0_rp-epsb)*vfws )
1341 rup = (ldn - lup) * rx - lnet
1342 albd_lw_grid = lup / ldn
1368 rainr = max(0.0_rp, rainr-(lhr/lhv)*dt)
1369 rainb = max(0.0_rp, rainb-(lhb/lhv)*dt)
1370 raing = max(0.0_rp, raing-(lhg/lhv)*dt)
1376 rts = ( rup / stb / ( 1.0_rp-albd_lw_grid) )**0.25
1389 call cal_psi(xxx,psim,psih)
1391 xxx2 = (2.0_rp/z) * xxx
1392 call cal_psi(xxx2,psim2,psih2)
1394 xxx10 = (10.0_rp/z) * xxx
1395 call cal_psi(xxx10,psim10,psih10)
1399 u10 = u1 *
log(10.0_rp/z0c) /
log(z/z0c)
1400 v10 = v1 *
log(10.0_rp/z0c) /
log(z/z0c)
1402 t2 = rts + (ta-rts)*((
log(2.0_rp/z0hc)-psih2)/(
log(z/z0hc)-psih))
1413 end subroutine slc_main
1416 subroutine canopy_wind(ZA, UA, UC)
1419 real(RP),
intent(in) :: ZA
1420 real(RP),
intent(in) :: UA
1421 real(RP),
intent(out) :: UC
1423 real(RP) :: UR,ZC,XLB,BB
1425 if( zr + 2.0_rp < za )
then 1426 ur = ua *
log((zr-zdc)/z0c) /
log((za-zdc)/z0c)
1428 xlb = 0.4_rp * (zr-zdc)
1430 bb = 0.4_rp * zr / ( xlb *
log((zr-zdc)/z0c) )
1431 uc = ur * exp( -bb * (1.0_rp-zc/zr) )
1438 uc = max(uc,0.01_rp)
1441 end subroutine canopy_wind
1444 subroutine cal_beta(BET, RAIN, WATER, STRG, ROFF)
1447 real(RP),
intent(out) :: BET
1448 real(RP),
intent(in) :: RAIN
1449 real(RP),
intent(inout) :: WATER
1450 real(RP),
intent(inout) :: STRG
1451 real(RP),
intent(inout) :: ROFF
1453 if ( strg == 0.0_rp )
then 1457 water = water + rain
1458 roff = max(0.0_rp, water-strg)
1459 water = water - max(0.0_rp, water-strg)
1460 bet = min( water / strg, 1.0_rp)
1464 end subroutine cal_beta
1467 subroutine cal_psi(zeta,psim,psih)
1472 real(RP),
intent(inout) :: zeta
1473 real(RP),
intent(out) :: psim
1474 real(RP),
intent(out) :: psih
1477 if( zeta >= 1.0_rp ) zeta = 1.0_rp
1478 if( zeta <= -5.0_rp ) zeta = -5.0_rp
1480 if( zeta > 0.0_rp )
then 1481 psim = -5.0_rp * zeta
1482 psih = -5.0_rp * zeta
1484 x = ( 1.0_rp - 16.0_rp * zeta )**0.25_rp
1485 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
1486 psih = 2.0_rp *
log((1.0_rp+x*x)/2.0_rp)
1490 end subroutine cal_psi
1497 subroutine mos(XXX,CH,CD,B1,RIB,Z,Z0,UA,TA,TSF,RHO)
1502 real(RP),
intent(in) :: B1, Z, Z0, UA, TA, TSF, RHO
1503 real(RP),
intent(out) :: CD, CH
1504 real(RP),
intent(inout) :: XXX, RIB
1505 real(RP) :: XXX0, X, X0, FAIH, DPSIM, DPSIH
1506 real(RP) :: F, DF, XXXP, US, TS, AL, XKB, DD, PSIM, PSIH
1508 integer,
parameter :: NEWT_END = 10
1512 lnz =
log( (z+z0)/z0 )
1514 if( rib <= -15.0_rp ) rib = -15.0_rp
1516 if( rib < 0.0_rp )
then 1518 do newt = 1, newt_end
1520 if( xxx >= 0.0_rp ) xxx = -1.0e-3_rp
1522 xxx0 = xxx * z0/(z+z0)
1524 x = (1.0_rp-16.0_rp*xxx)**0.25
1525 x0 = (1.0_rp-16.0_rp*xxx0)**0.25
1528 -
log( (x+1.0_rp)**2 * (x**2+1.0_rp) ) &
1529 + 2.0_rp * atan(x) &
1530 +
log( (x+1.0_rp)**2 * (x0**2+1.0_rp) ) &
1532 faih = 1.0_rp / sqrt( 1.0_rp - 16.0_rp*xxx )
1533 psih = lnz + 0.4_rp*b1 &
1534 - 2.0_rp *
log( sqrt( 1.0_rp - 16.0_rp*xxx ) + 1.0_rp ) &
1535 + 2.0_rp *
log( sqrt( 1.0_rp - 16.0_rp*xxx0 ) + 1.0_rp )
1537 dpsim = ( 1.0_rp - 16.0_rp*xxx )**(-0.25) / xxx &
1538 - ( 1.0_rp - 16.0_rp*xxx0 )**(-0.25) / xxx
1539 dpsih = 1.0_rp / sqrt( 1.0_rp - 16.0_rp*xxx ) / xxx &
1540 - 1.0_rp / sqrt( 1.0_rp - 16.0_rp*xxx0 ) / xxx
1542 f = rib * psim**2 / psih - xxx
1544 df = rib * ( 2.0_rp*dpsim*psim*psih - dpsih*psim**2 ) &
1550 if( xxx <= -10.0_rp ) xxx = -10.0_rp
1554 else if( rib >= 0.142857_rp )
then 1557 psim = lnz + 7.0_rp * xxx
1558 psih = psim + 0.4_rp * b1
1564 dd = -4.0_rp * rib * 7.0_rp * xkb * al + (al+xkb)**2
1565 if( dd <= 0.0_rp ) dd = 0.0_rp
1567 xxx = ( al + xkb - 2.0_rp*rib*7.0_rp*al - sqrt(dd) ) / ( 2.0_rp * ( rib*7.0_rp**2 - 7.0_rp ) )
1568 psim = lnz + 7.0_rp * min( xxx, 0.714_rp )
1569 psih = psim + 0.4_rp * b1
1573 us = 0.4_rp * ua / psim
1574 if( us <= 0.01_rp ) us = 0.01_rp
1575 ts = 0.4_rp * (ta-tsf) / psih
1577 cd = us * us / ua**2
1578 ch = 0.4_rp * us / psih / ua
1585 subroutine multi_layer(KM,BOUND,G0,CAP,AKS,TSL,DZ,DELT,TSLEND)
1594 real(RP),
intent(in) :: G0
1595 real(RP),
intent(in) :: CAP
1596 real(RP),
intent(in) :: AKS
1597 real(DP),
intent(in) :: DELT
1598 real(RP),
intent(in) :: TSLEND
1599 integer,
intent(in) :: KM
1600 integer,
intent(in) :: BOUND
1601 real(RP),
intent(in) :: DZ(km)
1602 real(RP),
intent(inout) :: TSL(km)
1603 real(RP) :: A(km), B(km), C(km), D(km), P(km), Q(km)
1611 b(1) = cap * dz(1) / delt &
1612 + 2.0_rp * aks / (dz(1)+dz(2))
1613 c(1) = -2.0_rp * aks / (dz(1)+dz(2))
1614 d(1) = cap * dz(1) / delt * tsl(1) + g0
1617 a(k) = -2.0_rp * aks / (dz(k-1)+dz(k))
1618 b(k) = cap * dz(k) / delt + 2.0_rp * aks / (dz(k-1)+dz(k)) + 2.0_rp * aks / (dz(k)+dz(k+1))
1619 c(k) = -2.0_rp * aks / (dz(k)+dz(k+1))
1620 d(k) = cap * dz(k) / delt * tsl(k)
1623 if( bound == 1 )
then 1624 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
1625 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km))
1627 d(km) = cap * dz(km) / delt * tsl(km)
1629 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
1630 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km)) + 2.0_rp * aks / (dz(km)+dzend)
1632 d(km) = cap * dz(km) / delt * tsl(km) + 2.0_rp * aks * tslend / (dz(km)+dzend)
1639 p(k) = -c(k) / ( a(k) * p(k-1) + b(k) )
1640 q(k) = ( -a(k) * q(k-1) + d(k) ) / ( a(k) * p(k-1) + b(k) )
1646 tsl(k) = p(k) * tsl(k+1) + q(k)
1650 end subroutine multi_layer
1653 subroutine multi_layer2(KM,BOUND,G0,CAP,AKS,TSL,DZ,DELT,TSLEND,CAP1,AKS1)
1662 real(RP),
intent(in) :: G0
1663 real(RP),
intent(in) :: CAP
1664 real(RP),
intent(in) :: AKS
1665 real(RP),
intent(in) :: CAP1
1666 real(RP),
intent(in) :: AKS1
1667 real(DP),
intent(in) :: DELT
1668 real(RP),
intent(in) :: TSLEND
1669 integer,
intent(in) :: KM
1670 integer,
intent(in) :: BOUND
1671 real(RP),
intent(in) :: DZ(km)
1672 real(RP),
intent(inout) :: TSL(km)
1673 real(RP) :: A(km), B(km), C(km), D(km), X(km), P(km), Q(km)
1681 b(1) = cap1 * dz(1) / delt &
1682 + 2.0_rp * aks1 / (dz(1)+dz(2))
1683 c(1) = -2.0_rp * aks1 / (dz(1)+dz(2))
1684 d(1) = cap1 * dz(1) / delt * tsl(1) + g0
1687 a(k) = -2.0_rp * aks / (dz(k-1)+dz(k))
1688 b(k) = cap * dz(k) / delt + 2.0_rp * aks / (dz(k-1)+dz(k)) + 2.0_rp * aks / (dz(k)+dz(k+1))
1689 c(k) = -2.0_rp * aks / (dz(k)+dz(k+1))
1690 d(k) = cap * dz(k) / delt * tsl(k)
1693 if( bound == 1 )
then 1694 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
1695 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km))
1697 d(km) = cap * dz(km) / delt * tsl(km)
1699 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
1700 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km)) + 2.0_rp * aks / (dz(km)+dzend)
1702 d(km) = cap * dz(km) / delt * tsl(km) + 2.0_rp * aks * tslend / (dz(km)+dzend)
1709 p(k) = -c(k) / ( a(k) * p(k-1) + b(k) )
1710 q(k) = ( -a(k) * q(k-1) + d(k) ) / ( a(k) * p(k-1) + b(k) )
1716 x(k) = p(k) * x(k+1) + q(k)
1724 end subroutine multi_layer2
1727 subroutine urban_param_setup
1730 real(RP) :: DHGT,THGT,VFWS,VFGS
1754 hgt = zr / ( road_width + roof_width )
1757 r = roof_width / ( road_width + roof_width )
1761 dhgt = hgt / 100.0_rp
1764 thgt = hgt - dhgt / 2.0_rp
1767 vfws = vfws + 0.25_rp * ( 1.0_rp - thgt / sqrt( thgt**2 + rw**2 ) )
1770 vfws = vfws / 99.0_rp
1771 vfws = vfws * 2.0_rp
1772 vfgs = 1.0_rp - 2.0_rp * vfws * hgt / rw
1776 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)
subroutine, public urban_phy_slc_setup(URBAN_TYPE)
Setup.
integer, public ia
of x whole cells (local, with HALO)
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)