43 private :: canopy_wind
47 private :: multi_layer
48 private :: urban_param_setup
49 private :: read_urban_param_table
50 private :: read_urban_gridded_data_2d
51 private :: read_urban_gridded_data_3d
60 real(RP),
private :: DTS_MAX = 0.1_rp
62 integer,
private :: BOUND = 1
65 logical,
private :: debug = .true.
67 logical,
private :: debug = .false.
72 real(RP),
private :: ZR = 10.0_rp
73 real(RP),
private :: roof_width = 9.0_rp
74 real(RP),
private :: road_width = 11.0_rp
75 real(RP),
private :: SIGMA_ZED = 1.0_rp
76 real(RP),
private :: AH_TBL = 17.5_rp
77 real(RP),
private :: AHL_TBL = 0.0_rp
78 real(RP),
private :: BETR_CONST = -1.0_rp
79 real(RP),
private :: BETB_CONST = -1.0_rp
80 real(RP),
private :: BETG_CONST = -1.0_rp
81 real(RP),
private :: STRGR = 0.0_rp
82 real(RP),
private :: STRGB = 0.0_rp
83 real(RP),
private :: STRGG = 0.0_rp
84 real(RP),
private :: CAPR = 1.2e6_rp
85 real(RP),
private :: CAPB = 1.2e6_rp
86 real(RP),
private :: CAPG = 1.2e6_rp
87 real(RP),
private :: AKSR = 2.28_rp
88 real(RP),
private :: AKSB = 2.28_rp
89 real(RP),
private :: AKSG = 2.28_rp
90 real(RP),
private :: ALBR = 0.2_rp
91 real(RP),
private :: ALBB = 0.2_rp
92 real(RP),
private :: ALBG = 0.2_rp
93 real(RP),
private :: EPSR = 0.90_rp
94 real(RP),
private :: EPSB = 0.90_rp
95 real(RP),
private :: EPSG = 0.90_rp
96 real(RP),
private :: Z0R = 0.01_rp
97 real(RP),
private :: Z0B = 0.0001_rp
98 real(RP),
private :: Z0G = 0.01_rp
99 real(RP),
private :: TRLEND = 293.00_rp
100 real(RP),
private :: TBLEND = 293.00_rp
101 real(RP),
private :: TGLEND = 293.00_rp
105 real(RP),
private :: R
106 real(RP),
private :: RW
107 real(RP),
private :: HGT
108 real(RP),
private :: Z0HR
109 real(RP),
private :: Z0HB
110 real(RP),
private :: Z0HG
111 real(RP),
private :: Z0C_TBL
112 real(RP),
private :: Z0HC_TBL
113 real(RP),
private :: ZDC_TBL
114 real(RP),
private :: SVF
118 integer,
private :: I_SHR, I_SHB, I_SHG
119 integer,
private :: I_LHR, I_LHB, I_LHG
120 integer,
private :: I_GHR, I_GHB, I_GHG
121 integer,
private :: I_RNR, I_RNB, I_RNG, I_RNgrd
123 #ifdef DEBUG_KUSAKA01
124 integer,
private :: cnt_num1, cnt_num2
125 integer,
private :: cnt_itr1, cnt_itr2
126 integer,
private :: max_itr1, max_itr2
135 UIA, UIS, UIE, UJA, UJS, UJE, &
138 AH_URB, AHL_URB, AH_TOFFSET )
148 integer,
intent(in) :: uia, uis, uie
149 integer,
intent(in) :: uja, ujs, uje
150 real(rp),
intent(in) :: fact_urban(uia,uja)
151 real(rp),
intent(out) :: z0m(uia,uja)
152 real(rp),
intent(out) :: z0h(uia,uja)
153 real(rp),
intent(out) :: z0e(uia,uja)
154 real(rp),
intent(out) :: zd (uia,uja)
155 real(rp),
intent(out) :: ah_urb (uia,uja,1:24)
156 real(rp),
intent(out) :: ahl_urb (uia,uja,1:24)
157 real(rp),
intent(out) :: ah_toffset
159 character(len=H_LONG) :: urban_dyn_kusaka01_param_in_filename =
''
160 character(len=H_LONG) :: urban_dyn_kusaka01_gridded_z0m_in_filename =
''
161 character(len=H_LONG) :: urban_dyn_kusaka01_gridded_z0m_in_varname =
'URBAN_Z0M'
162 character(len=H_LONG) :: urban_dyn_kusaka01_gridded_z0h_in_filename =
''
163 character(len=H_LONG) :: urban_dyn_kusaka01_gridded_z0h_in_varname =
'URBAN_Z0H'
166 character(len=H_LONG) :: urban_dyn_kusaka01_gridded_ah_in_filename =
''
167 character(len=H_LONG) :: urban_dyn_kusaka01_gridded_ah_in_varname =
'URBAN_AH'
168 character(len=H_LONG) :: urban_dyn_kusaka01_gridded_ahl_in_filename =
''
169 character(len=H_LONG) :: urban_dyn_kusaka01_gridded_ahl_in_varname =
'URBAN_AHL'
171 namelist / param_urban_dyn_kusaka01 / &
175 urban_dyn_kusaka01_param_in_filename, &
176 urban_dyn_kusaka01_gridded_z0m_in_filename, &
177 urban_dyn_kusaka01_gridded_z0h_in_filename, &
179 urban_dyn_kusaka01_gridded_ah_in_filename, &
180 urban_dyn_kusaka01_gridded_ahl_in_filename
182 real(rp) :: udata(uia,uja)
183 real(rp) :: udata2(uia,uja,24)
187 real(rp) :: ahdiurnal(1:24)
194 log_info(
"URBAN_DYN_kusaka01_setup",*)
'Setup'
201 read(
io_fid_conf,nml=param_urban_dyn_kusaka01,iostat=ierr)
203 log_info(
"URBAN_DYN_kusaka01_setup",*)
'Not found namelist. Default used.'
204 elseif( ierr > 0 )
then
205 log_error(
"URBAN_DYN_kusaka01_setup",*)
'Not appropriate names in namelist PARAM_URBAN_DYN_KUSAKA01. Check!'
208 log_nml(param_urban_dyn_kusaka01)
211 if( urban_dyn_kusaka01_param_in_filename /=
'' )
then
212 call read_urban_param_table( trim(urban_dyn_kusaka01_param_in_filename) )
216 call urban_param_setup
219 ahdiurnal(:) = (/ 0.356, 0.274, 0.232, 0.251, 0.375, 0.647, 0.919, 1.135, 1.249, 1.328, &
220 1.365, 1.363, 1.375, 1.404, 1.457, 1.526, 1.557, 1.521, 1.372, 1.206, &
221 1.017, 0.876, 0.684, 0.512 /)
224 rtime = modulo(base_lon, 360.0_rp) / 15.0_rp
226 ah_toffset = rtime - itime
227 ahdiurnal(:) = cshift(ahdiurnal(:), -1*itime)
236 ah_urb(i,j,k) = ah_tbl * ahdiurnal(k) * fact_urban(i,j)
237 ahl_urb(i,j,k) = ahl_tbl * ahdiurnal(k) * fact_urban(i,j)
243 if( urban_dyn_kusaka01_gridded_z0m_in_filename /=
'' )
then
245 call read_urban_gridded_data_2d( &
247 urban_dyn_kusaka01_gridded_z0m_in_filename, &
248 urban_dyn_kusaka01_gridded_z0m_in_varname, &
254 if( udata(i,j) /= undef )
then
255 if ( udata(i,j) > 0.0_rp )
then
256 z0m(i,j) = udata(i,j)
257 else if ( udata(i,j) < 0.0_rp )
then
258 log_error(
"URBAN_DYN_kusaka01_setup",*)
'Gridded Z0M data includes data less than 0. Please check data!',i,j
261 log_warn(
"URBAN_DYN_kusaka01_setup",*)
'Gridded Z0M data includes 0; default or table value is used to avoid zero division',
prc_myrank,i,j
269 if( urban_dyn_kusaka01_gridded_z0h_in_filename /=
'' )
then
271 call read_urban_gridded_data_2d( &
273 urban_dyn_kusaka01_gridded_z0h_in_filename, &
274 urban_dyn_kusaka01_gridded_z0h_in_varname, &
280 if( udata(i,j) /= undef )
then
281 if ( udata(i,j) > 0.0_rp )
then
282 z0h(i,j) = udata(i,j)
283 z0e(i,j) = udata(i,j)
284 else if ( udata(i,j) < 0.0_rp )
then
285 log_error(
"URBAN_DYN_kusaka01_setup",*)
'Gridded Z0H data includes data less than 0. Please check data!',i,j
288 log_warn(
"URBAN_DYN_kusaka01_setup",*)
'Gridded Z0H data includes 0; default or table value is used to avoid zero division',
prc_myrank,i,j
321 if( urban_dyn_kusaka01_gridded_ah_in_filename /=
'' )
then
323 call read_urban_gridded_data_3d( &
325 urban_dyn_kusaka01_gridded_ah_in_filename, &
326 urban_dyn_kusaka01_gridded_ah_in_varname, &
333 if( udata2(i,j,k) /= undef )
then
334 ah_urb(i,j,k) = udata2(i,j,k)
342 if( urban_dyn_kusaka01_gridded_ahl_in_filename /=
'' )
then
344 call read_urban_gridded_data_3d( &
346 urban_dyn_kusaka01_gridded_ahl_in_filename, &
347 urban_dyn_kusaka01_gridded_ahl_in_varname, &
354 if( udata2(i,j,k) /= undef )
then
355 ahl_urb(i,j,k) = udata2(i,j,k)
362 call file_history_reg(
'URBAN_SHR',
'urban sensible heat flux on roof',
'W/m2', i_shr , ndims=2 )
363 call file_history_reg(
'URBAN_SHB',
'urban sensible heat flux on wall',
'W/m2', i_shb , ndims=2 )
364 call file_history_reg(
'URBAN_SHG',
'urban sensible heat flux on road',
'W/m2', i_shg , ndims=2 )
365 call file_history_reg(
'URBAN_LHR',
'urban latent heat flux on roof',
'W/m2', i_lhr , ndims=2 )
366 call file_history_reg(
'URBAN_LHB',
'urban latent heat flux on wall',
'W/m2', i_lhb , ndims=2 )
367 call file_history_reg(
'URBAN_LHG',
'urban latent heat flux on road',
'W/m2', i_lhg , ndims=2 )
368 call file_history_reg(
'URBAN_GHR',
'urban ground heat flux on roof',
'W/m2', i_ghr , ndims=2 )
369 call file_history_reg(
'URBAN_GHB',
'urban ground heat flux on wall',
'W/m2', i_ghb , ndims=2 )
370 call file_history_reg(
'URBAN_GHG',
'urban ground heat flux on road',
'W/m2', i_ghg , ndims=2 )
371 call file_history_reg(
'URBAN_RNR',
'urban net radiation on roof',
'W/m2', i_rnr , ndims=2 )
372 call file_history_reg(
'URBAN_RNB',
'urban net radiation on wall',
'W/m2', i_rnb , ndims=2 )
373 call file_history_reg(
'URBAN_RNG',
'urban net radiation on road',
'W/m2', i_rng , ndims=2 )
374 call file_history_reg(
'URBAN_RNgrd',
'urban grid average of net radiation',
'W/m2', i_rngrd, ndims=2 )
383 #ifdef DEBUG_KUSAKA01
405 #ifdef DEBUG_KUSAKA01
406 integer :: iwork1(4), iwork2(2), ierr
418 log_info(
"URBAN_DYN_kusaka01_finalize",*)
"Averaged iteration count"
419 log_info_cont(*)
"TR: ", real(iwork1(3),
dp) / iwork1(1),
", (max ", iwork2(1),
")"
420 log_info_cont(*)
"TB/TG: ", real(iwork1(4),
dp) / iwork1(2),
", (max ", iwork2(2),
")"
430 UKA, UKS, UKE, UIA, UIS, UIE, UJA, UJS, UJE, &
444 TRL_URB, TBL_URB, TGL_URB, &
445 TR_URB, TB_URB, TG_URB, &
446 TC_URB, QC_URB, UC_URB, &
447 RAINR_URB, RAINB_URB, RAING_URB, &
451 MWFLX, MUFLX, MVFLX, &
452 SHFLX, LHFLX, GHFLX, &
453 Ustar, Tstar, Qstar, Wstar, &
467 integer,
intent(in) :: uka, uks, uke
468 integer,
intent(in) :: uia, uis, uie
469 integer,
intent(in) :: uja, ujs, uje
471 real(rp),
intent(in) :: tmpa(uia,uja)
472 real(rp),
intent(in) :: prsa(uia,uja)
473 real(rp),
intent(in) :: u1 (uia,uja)
474 real(rp),
intent(in) :: v1 (uia,uja)
475 real(rp),
intent(in) :: dens(uia,uja)
476 real(rp),
intent(in) :: qa (uia,uja)
477 real(rp),
intent(in) :: lhv (uia,uja)
478 real(rp),
intent(in) :: z1 (uia,uja)
479 real(rp),
intent(in) :: rhos(uia,uja)
480 real(rp),
intent(in) :: prss(uia,uja)
481 real(rp),
intent(in) :: lwd (uia,uja,2)
482 real(rp),
intent(in) :: swd (uia,uja,2)
483 real(rp),
intent(in) :: rain(uia,uja)
484 real(rp),
intent(in) :: eflx(uia,uja)
485 real(rp),
intent(in) :: z0m (uia,uja)
486 real(rp),
intent(in) :: z0h (uia,uja)
487 real(rp),
intent(in) :: z0e (uia,uja)
488 real(rp),
intent(in) :: zd (uia,uja)
489 real(rp),
intent(in) :: cdz(uka)
490 real(rp),
intent(in) :: tansl_x(uia,uja)
491 real(rp),
intent(in) :: tansl_y(uia,uja)
492 real(rp),
intent(in) :: fact_urban(uia,uja)
493 real(
dp),
intent(in) :: dt
495 real(rp),
intent(inout) :: tr_urb (uia,uja)
496 real(rp),
intent(inout) :: tb_urb (uia,uja)
497 real(rp),
intent(inout) :: tg_urb (uia,uja)
498 real(rp),
intent(inout) :: tc_urb (uia,uja)
499 real(rp),
intent(inout) :: qc_urb (uia,uja)
500 real(rp),
intent(inout) :: uc_urb (uia,uja)
501 real(rp),
intent(inout) :: trl_urb (uks:uke,uia,uja)
502 real(rp),
intent(inout) :: tbl_urb (uks:uke,uia,uja)
503 real(rp),
intent(inout) :: tgl_urb (uks:uke,uia,uja)
504 real(rp),
intent(inout) :: rainr_urb(uia,uja)
505 real(rp),
intent(inout) :: rainb_urb(uia,uja)
506 real(rp),
intent(inout) :: raing_urb(uia,uja)
507 real(rp),
intent(out) :: roff_urb (uia,uja)
509 real(rp),
intent(out) :: sfc_temp(uia,uja)
511 real(rp),
intent(out) :: mwflx (uia,uja)
512 real(rp),
intent(out) :: muflx (uia,uja)
513 real(rp),
intent(out) :: mvflx (uia,uja)
514 real(rp),
intent(out) :: shflx (uia,uja)
515 real(rp),
intent(out) :: lhflx (uia,uja)
516 real(rp),
intent(out) :: ghflx (uia,uja)
517 real(rp),
intent(out) :: ustar (uia,uja)
518 real(rp),
intent(out) :: tstar (uia,uja)
519 real(rp),
intent(out) :: qstar (uia,uja)
520 real(rp),
intent(out) :: wstar (uia,uja)
521 real(rp),
intent(out) :: rlmo (uia,uja)
522 real(rp),
intent(out) :: u10 (uia,uja)
523 real(rp),
intent(out) :: v10 (uia,uja)
524 real(rp),
intent(out) :: t2 (uia,uja)
525 real(rp),
intent(out) :: q2 (uia,uja)
528 logical,
parameter :: lsolar = .false.
530 real(rp),
parameter :: uabs_min = 0.1_rp
539 real(rp) :: trl(uks:uke)
540 real(rp) :: tbl(uks:uke)
541 real(rp) :: tgl(uks:uke)
548 real(rp) :: shr (uia,uja)
549 real(rp) :: shb (uia,uja)
550 real(rp) :: shg (uia,uja)
551 real(rp) :: lhr (uia,uja)
552 real(rp) :: lhb (uia,uja)
553 real(rp) :: lhg (uia,uja)
554 real(rp) :: ghr (uia,uja)
555 real(rp) :: ghb (uia,uja)
556 real(rp) :: ghg (uia,uja)
557 real(rp) :: rnr (uia,uja)
558 real(rp) :: rnb (uia,uja)
559 real(rp) :: rng (uia,uja)
560 real(rp) :: rngrd(uia,uja)
575 real(rp) :: trlp(uka)
576 real(rp) :: tblp(uka)
577 real(rp) :: tglp(uka)
587 #ifdef DEBUG_KUSAKA01
588 integer :: cn1, cn2, ci1, ci2, mi1, mi2
594 log_progress(*)
'urban / dynamics / Kusaka01'
610 #ifdef DEBUG_KUSAKA01
611 cn1 = 0; cn2 = 0; ci1 = 0; ci2 = 0; mi1 = 0; mi2 = 0
615 #ifdef DEBUG_KUSAKA01
622 #ifdef DEBUG_KUSAKA01
630 if( fact_urban(i,j) > 0.0_rp )
then
632 w = u1(i,j) * tansl_x(i,j) + v1(i,j) * tansl_y(i,j)
633 uabs = sqrt( u1(i,j)**2 + v1(i,j)**2 + w**2 )
644 trl(k) = trl_urb(k,i,j)
645 tbl(k) = tbl_urb(k,i,j)
646 tgl(k) = tgl_urb(k,i,j)
649 rainr = rainr_urb(i,j)
650 rainb = rainb_urb(i,j)
651 raing = raing_urb(i,j)
656 call slc_main( uka, uks, uke, &
721 #ifdef DEBUG_KUSAKA01
722 cn1, cn2, ci1, ci2, mi1, mi2, &
724 trlp(:), tblp(:), tglp(:), &
725 a(:), b(:), c(:), d(:), &
736 trl_urb(k,i,j) = trl(k)
737 tbl_urb(k,i,j) = tbl(k)
738 tgl_urb(k,i,j) = tgl(k)
740 rainr_urb(i,j) = rainr
741 rainb_urb(i,j) = rainb
742 raing_urb(i,j) = raing
751 if ( uabs < eps )
then
756 mwflx(i,j) = mflx * w / uabs
757 muflx(i,j) = mflx * u1(i,j) / uabs
758 mvflx(i,j) = mflx * v1(i,j) / uabs
762 sfc_temp(i,j) = undef
763 albedo(i,j,:,:) = undef
798 if ( .not. converged )
then
799 log_error(
"URBAN_DYN_kusaka01_SLC_main",*)
"not converged"
804 shr(:,:), shb(:,:), shg(:,:), &
805 lhr(:,:), lhb(:,:), lhg(:,:), &
806 ghr(:,:), ghb(:,:), ghg(:,:), &
807 rnr(:,:), rnb(:,:), rng(:,:), &
812 #ifdef DEBUG_KUSAKA01
813 cnt_num1 = cnt_num1 + cn1
814 cnt_num2 = cnt_num2 + cn2
815 cnt_itr1 = cnt_itr1 + ci1
816 cnt_itr2 = cnt_itr2 + ci2
817 max_itr1 = max(max_itr1, mi1)
818 max_itr2 = max(max_itr2, mi2)
826 subroutine slc_main( &
891 #ifdef DEBUG_KUSAKA01
892 cnt_num1, cnt_num2, &
893 cnt_itr1, cnt_itr2, &
894 max_itr1, max_itr2, &
904 karman => const_karman, &
905 cpdry => const_cpdry, &
906 grav => const_grav, &
907 rdry => const_rdry, &
908 rvap => const_rvap, &
910 tem00 => const_tem00, &
913 hydrometeor_lhv => atmos_hydrometeor_lhv
915 qsat => atmos_saturation_dens2qsat_liq, &
916 dqs_dtem => atmos_saturation_dqs_dtem_dens_liq
918 bulkflux_diagnose_surface
921 integer,
intent(in) :: uka, uks, uke
924 real(rp),
intent(inout) :: trl(uks:uke)
925 real(rp),
intent(inout) :: tbl(uks:uke)
926 real(rp),
intent(inout) :: tgl(uks:uke)
927 real(rp),
intent(inout) :: tr
928 real(rp),
intent(inout) :: tb
929 real(rp),
intent(inout) :: tg
930 real(rp),
intent(inout) :: tc
931 real(rp),
intent(inout) :: qc
932 real(rp),
intent(inout) :: uc
933 real(rp),
intent(inout) :: rainr
934 real(rp),
intent(inout) :: rainb
935 real(rp),
intent(inout) :: raing
936 real(rp),
intent(out) :: roff
939 real(rp),
intent(out) :: albd_sw_grid
940 real(rp),
intent(out) :: albd_lw_grid
941 real(rp),
intent(out) :: shr, shb, shg
942 real(rp),
intent(out) :: lhr, lhb, lhg
943 real(rp),
intent(out) :: ghr, ghb, ghg
944 real(rp),
intent(out) :: rnr, rnb, rng
945 real(rp),
intent(out) :: rts
946 real(rp),
intent(out) :: rn
947 real(rp),
intent(out) :: sh
948 real(rp),
intent(out) :: lh
949 real(rp),
intent(out) :: ghflx
950 real(rp),
intent(out) :: mflx
951 real(rp),
intent(out) :: ustar
952 real(rp),
intent(out) :: tstar
953 real(rp),
intent(out) :: qstar
954 real(rp),
intent(out) :: u10
955 real(rp),
intent(out) :: v10
956 real(rp),
intent(out) :: t2
957 real(rp),
intent(out) :: q2
958 logical,
intent(out) :: converged
961 logical ,
intent(in) :: lsolar
964 real(rp),
intent(in) :: prsa
965 real(rp),
intent(in) :: prss
966 real(rp),
intent(in) :: ta
967 real(rp),
intent(in) :: rhos
968 real(rp),
intent(in) :: qa
969 real(rp),
intent(in) :: ua
970 real(rp),
intent(in) :: u1
971 real(rp),
intent(in) :: v1
972 real(rp),
intent(in) :: lhv
973 real(rp),
intent(in) :: za
974 real(rp),
intent(in) :: ssg(2)
975 real(rp),
intent(in) :: llg(2)
976 real(rp),
intent(in) :: rain
977 real(rp),
intent(in) :: eflx
978 real(rp),
intent(in) :: rhoo
979 real(rp),
intent(in) :: z0c
980 real(rp),
intent(in) :: z0hc
981 real(rp),
intent(in) :: zdc
982 real(rp),
intent(in) :: dzr(uka)
983 real(rp),
intent(in) :: dzb(uka)
984 real(rp),
intent(in) :: dzg(uka)
985 real(
dp),
intent(in) :: dt
987 integer,
intent(in) :: i, j
989 #ifdef DEBUG_KUSAKA01
990 integer,
intent(inout) :: cnt_num1, cnt_num2
991 integer,
intent(inout) :: cnt_itr1, cnt_itr2
992 integer,
intent(inout) :: max_itr1, max_itr2
996 real(rp),
intent(out) :: trlp(uka)
997 real(rp),
intent(out) :: tblp(uka)
998 real(rp),
intent(out) :: tglp(uka)
999 real(rp),
intent(out) :: a(uka)
1000 real(rp),
intent(out) :: b(uka)
1001 real(rp),
intent(out) :: c(uka)
1002 real(rp),
intent(out) :: d(uka)
1003 real(rp),
intent(out) :: p(uka)
1004 real(rp),
intent(out) :: q(uka)
1010 real(rp),
parameter :: redf_min = 1.0e-2_rp
1011 real(rp),
parameter :: redf_max = 1.0_rp
1015 real(rp),
parameter :: rain_rate_r = 1.0_rp
1016 real(rp),
parameter :: rain_rate_b = 0.1_rp
1017 real(rp),
parameter :: rain_rate_g = 0.9_rp
1019 integer,
parameter :: itr_max = 100
1026 real(rp) :: w, vfgs, vfgw, vfwg, vfws, vfww
1027 real(rp) :: rflux_sw, rflux_lw
1040 real(rp) :: roffr, roffb, roffg
1042 real(rp) :: lup, ldn, rup
1043 real(rp) :: sup, sdn
1045 real(rp) :: lnet, snet, flxuv
1048 real(rp) :: psim,psim2,psim10
1049 real(rp) :: psih,psih2,psih10
1058 real(rp) :: sr, sb, sg, rr, rb, rg
1059 real(rp) :: sr1, sb1, sb2, sg1, sg2
1060 real(rp) :: rb1, rb2, rg1, rg2
1061 real(rp) :: hr, evpr, eler, g0r, betr
1062 real(rp) :: hb, evpb, eleb, g0b, betb
1063 real(rp) :: hg, evpg, eleg, g0g, betg
1064 real(rp) :: evprp, evpbp, evpgp
1067 real(rp) :: qs0r, qs0b, qs0g
1069 real(rp) :: ribr, bhr, cdr
1070 real(rp) :: ribc, bhc, cdc
1071 real(rp) :: alphab, alphag, alphac
1072 real(rp) :: chr, chb, chg, chc
1073 real(rp) :: tc1, tc2, qc1, qc2
1076 real(rp) :: xxx, xxx2, xxx10
1080 real(rp) :: tha,thc,ths,ths1,ths2
1084 real(rp) :: fracu10, fract2
1088 integer :: iteration
1089 real(rp) :: dts_max_onestep
1090 real(rp) :: resi1, resi2, resi3
1091 real(rp) :: fact1, fact2, fact3
1092 real(rp) :: threshold
1095 real(rp) :: dtr, dtb, dtg, dac
1096 real(rp) :: dtrp, dtbp, dtgp, dacp
1098 real(rp) :: dr1dtb, dr1dtg, dr1dac, dr2dtb, dr2dtg, dr2dac, dr3dtb, dr3dtg, dr3dac
1099 real(rp) :: dtrdg0r, dtbdg0b, dtgdg0g
1100 real(rp) :: dg0rdtr, dg0bdtb, dg0bdtg, dg0bdac, dg0gdtb, dg0gdtg, dg0gdac
1101 real(rp) :: dhr, dhbdtb, dhbdtg, dhbdac, dhgdtb, dhgdtg, dhgdac
1102 real(rp) :: deler, delebdtb, delebdtg, delebdac, delegdtb, delegdtg, delegdac
1104 real(rp) :: dbetr, dbetb, dbetg, betrp, betbp, betgp
1105 real(rp) :: drb1dtb, drb1dtg, drb2dtb, drb2dtg
1106 real(rp) :: drg1dtb, drg1dtg, drg2dtb, drg2dtg
1107 real(rp) :: dqcdtb, dqcdtg, dqcdac
1108 real(rp) :: dthcdtb, dthcdtg, dthcdac
1109 real(rp) :: dalphacdtb, dalphacdtg, dalphacdac
1110 real(rp) :: dchcdtb, dchcdtg, dchcdac
1111 real(rp) :: chc_tb, chc_tg, chc_ac
1112 real(rp) :: dqs0r, dqs0b, dqs0g
1113 real(rp) :: tdiff, adiff
1128 threshold = sqrt(eps)
1130 rovcp = rdry / cpdry
1131 tha = ta * ( pre00 / prsa )**rovcp
1150 dts_max_onestep = dts_max * dt_rp
1156 if ( zdc + z0c + 2.0_rp >= za )
then
1157 log_error(
"URBAN_DYN_kusaka01_SLC_main",*)
'ZDC + Z0C + 2m must be less than the 1st level! STOP.'
1166 w = 2.0_rp * 1.0_rp * hgt
1168 rflux_sw = ssg(1) + ssg(2)
1169 rflux_lw = llg(1) + llg(2)
1173 call canopy_wind(za, ua, z0c, zdc, uc)
1179 raint = rain * dt_rp
1181 rainr = rainr + raint * rain_rate_r
1182 rainb = rainb + raint * rain_rate_b
1183 raing = raing + raint * rain_rate_g
1187 vfwg = ( 1.0_rp - svf ) * ( 1.0_rp - r ) / w
1189 vfww = 1.0_rp - 2.0_rp * vfwg
1200 if( rflux_sw > 0.0_rp )
then
1205 sr1 = rflux_sw * ( 1.0_rp - albr )
1206 sg1 = rflux_sw * vfgs * ( 1.0_rp - albg )
1207 sb1 = rflux_sw * vfws * ( 1.0_rp - albb )
1208 sg2 = sb1 * albb / ( 1.0_rp - albb ) * vfgw * ( 1.0_rp - albg )
1209 sb2 = sg1 * albg / ( 1.0_rp - albg ) * vfwg * ( 1.0_rp - albb )
1214 snet = r * sr + w * sb + rw * sg
1226 exn = ( prss / pre00 )**rovcp
1239 bhr = log(z0r/z0hr) / 0.4_rp
1241 b1 = capr * dzr(1) / dt_rp + 2.0_rp * aksr / ( dzr(1)+dzr(2) )
1242 b2 = capr * dzr(2) / dt_rp + 2.0_rp * aksr / ( dzr(1)+dzr(2) ) + 2.0_rp * aksr / ( dzr(2)+dzr(3) )
1243 dtrdg0r = 1.0_rp / ( b1 - ( 2.0_rp * aksr / ( dzr(1)+dzr(2) ) )**2 / b2 )
1245 dtrdg0r = dtrdg0r * 0.5_rp
1254 do iteration = 1, itr_max
1258 ribr = ( grav * 2.0_rp / (tha+ths) ) * (tha-ths) * (z+z0r) / (ua*ua+eps)
1259 call mos(xxxr,chr,cdr,bhr,ribr,z,z0r,ua,tha,ths,rhoo,i,j)
1262 call dqs_dtem( tr, rhos, &
1265 rainr = max( rainrp - evpr * dt_rp, 0.0_rp )
1266 call cal_beta(betr, betr_const, rainr, strgr)
1267 dbetr = ( betr - betrp ) / sign( max(abs(dtrp), 1e-10_rp), dtrp )
1270 rr = epsr * ( rflux_lw - stb * (tr**4) )
1271 drr = - epsr * stb * 4.0_rp * tr**3
1274 hr = rhoo * cpdry * chr * ua * ( ths - tha ) * exn
1275 dhr = rhoo * cpdry * chr * ua
1277 evpr = min( rhoo * chr * ua * betr * (qs0r-qa), rainr / dt_rp )
1279 deler = rhoo * chr * ua * ( betr * dqs0r + dbetr * qs0r ) * lhv
1281 g0r = sr + rr - hr - eler
1282 dg0rdtr = drr - dhr - deler
1298 call multi_layer(uke,bound, &
1300 g0r,capr,aksr,trl,dzr,dt_rp,trlend)
1303 if( abs(resi1) < threshold )
then
1305 tr = max( trp - dts_max_onestep, min( trp + dts_max_onestep, tr ) )
1310 dr1dtr = dtrdg0r * dg0rdtr - 1.0_rp
1312 dtr = - resi1 / dr1dtr
1313 dtr = sign( min(abs(dtr), 5.0_rp), dtr )
1315 if ( iteration > 50 )
then
1316 if ( dtr*dtrp < 0.0_rp )
then
1317 fact1 = max( fact1 * 0.5_rp, 0.01_rp )
1319 fact1 = min( fact1 * 1.5_rp, 1.1_rp )
1323 tr = max( tr + dtr * fact1, 100.0_rp )
1326 evpr = ( evprp + evpr ) * 0.5_rp
1330 #ifdef DEBUG_KUSAKA01
1331 cnt_num1 = cnt_num1 + 1
1332 cnt_itr1 = cnt_itr1 + iteration - 1
1333 max_itr1 = max(max_itr1, iteration - 1)
1337 if ( iteration > itr_max .and. debug )
then
1338 log_warn(
"URBAN_DYN_kusaka01_SLC_main",*)
'iteration for TR was not converged',
prc_myrank,i,j
1339 log_warn_cont(*)
'---------------------------------------------------------------------------------'
1340 log_warn_cont(*)
'DEBUG Message --- Residual [K] :', resi1
1341 log_warn_cont(*)
'DEBUG Message --- TRP : Initial TR [K] :', trp
1343 log_warn_cont(*)
'DEBUG Message --- TRLP: Initial TRL [K] :', trlp(uks)
1345 log_warn_cont(*)
'DEBUG Message --- TRLP: Initial TRL [K] :', trlp(:)
1347 log_warn_cont(*)
'DEBUG Message --- rflux_SW : Shortwave radiation [W/m2] :', rflux_sw
1348 log_warn_cont(*)
'DEBUG Message --- rflux_LW : Longwave radiation [W/m2] :', rflux_lw
1349 log_warn_cont(*)
'DEBUG Message --- PRSS: Surface pressure [Pa] :', prss
1350 log_warn_cont(*)
'DEBUG Message --- PRSA: Pressure at 1st atmos layer [m] :', prsa
1351 log_warn_cont(*)
'DEBUG Message --- RHOO: Air density [kg/m3] :', rhoo
1352 log_warn_cont(*)
'DEBUG Message --- RHOS: Surface density [kg/m3] :', rhos
1353 log_warn_cont(*)
'DEBUG Message --- RAINRP: Initial RAINR [kg/m2] :', rainrp
1354 log_warn_cont(*)
'DEBUG Message --- ZA : Height at 1st atmos layer [m] :', za
1355 log_warn_cont(*)
'DEBUG Message --- TA : Temperature at 1st atmos layer [K] :', ta
1356 log_warn_cont(*)
'DEBUG Message --- UA : Wind speed at 1st atmos layer [m/s] :', ua
1357 log_warn_cont(*)
'DEBUG Message --- QA : Specific humidity at 1st atmos layer [kg/kg] :', qa
1359 log_warn_cont(*)
'DEBUG Message --- DZR : Depth of surface layer [m] :', dzr(1)
1361 log_warn_cont(*)
'DEBUG Message --- DZR : Depth of surface layer [m] :', dzr(:)
1363 log_warn_cont(*)
'DEBUG Message --- R, W, RW : Normalized height and road width [-] :', r, w,rw
1364 log_warn_cont(*)
'DEBUG Message --- SVF : Sky View Factors [-] :', svf
1365 log_warn_cont(*)
'DEBUG Message --- BETR: Evaporation efficiency [-] :', betr
1366 log_warn_cont(*)
'DEBUG Message --- EPSR: Surface emissivity of roof [-] :', epsr
1367 log_warn_cont(*)
'DEBUG Message --- CAPR: Heat capacity of roof [J m-3 K] :', capr
1368 log_warn_cont(*)
'DEBUG Message --- AKSR: Thermal conductivity of roof [W m-1 K] :', aksr
1369 log_warn_cont(*)
'DEBUG Message --- QS0R: Surface specific humidity [kg/kg] :', qs0r
1370 log_warn_cont(*)
'DEBUG Message --- ZDC : Desplacement height of canopy [m] :', zdc
1371 log_warn_cont(*)
'DEBUG Message --- Z0R : Momentum roughness length of roof [m] :', z0r
1372 log_warn_cont(*)
'DEBUG Message --- Z0HR: Thermal roughness length of roof [m] :', z0hr
1373 log_warn_cont(*)
'---------------------------------------------------------------------------------'
1378 ribr = ( grav * 2.0_rp / (tha+ths) ) * (tha-ths) * (z+z0r) / (ua*ua+eps)
1379 call mos(xxxr,chr,cdr,bhr,ribr,z,z0r,ua,tha,ths,rhoo,i,j)
1381 call qsat( tr, rhos, &
1384 call cal_beta(betr, betr_const, rainr, strgr)
1386 rr = epsr * ( rflux_lw - stb * (tr**4) )
1387 hr = rhoo * cpdry * chr * ua * (ths-tha) * exn
1388 evpr = min( rhoo * chr * ua * betr * (qs0r-qa), rainr / dt_rp )
1392 g0r = sr + rr - hr - eler
1393 rainr = max( rainrp - evpr * dt_rp, 0.0_rp )
1398 call multi_layer(uke,bound, &
1400 g0r,capr,aksr,trl,dzr,dt_rp,trlend)
1404 if ( abs(resi1) > dts_max_onestep )
then
1405 if ( abs(resi1) > dts_max_onestep*10.0_rp )
then
1406 log_error(
"URBAN_DYN_Kusaka01_main",*)
'tendency of TR exceeded a limit! STOP.'
1407 log_error_cont(*)
'previous TR and updated TR(TRL(1)) is ',tr-resi1, tr
1415 log_warn(
"URBAN_DYN_Kusaka01_main",*)
'tendency of TR exceeded a limit'
1416 log_warn_cont(*)
'previous TR and updated TR(TRL(1)) is ', tr-resi1, tr
1426 alphab = 6.15_rp + 4.18_rp * uc
1427 if( uc > 5.0_rp ) alphab = 7.51_rp * (uc**0.78_rp )
1428 alphag = 6.15_rp + 4.18_rp * uc
1429 if( uc > 5.0_rp ) alphag = 7.51_rp * (uc**0.78_rp )
1430 chb = alphab / rhoo / cpdry / uc
1431 chg = alphag / rhoo / cpdry / uc
1435 bhc = log(z0c/z0hc) / 0.4_rp
1437 b1 = capb * dzb(1) / dt_rp + 2.0_rp * aksb / ( dzb(1)+dzb(2) )
1438 b2 = capb * dzb(2) / dt_rp + 2.0_rp * aksb / ( dzb(1)+dzb(2) ) + 2.0_rp * aksb / ( dzb(2)+dzb(3) )
1439 dtbdg0b = 1.0_rp / ( b1 - ( 2.0_rp * aksb / ( dzb(1)+dzb(2) ) )**2 / b2 )
1441 dtbdg0b = dtbdg0b * 0.5_rp
1443 b1 = capg * dzg(1) / dt_rp + 2.0_rp * aksg / ( dzg(1)+dzg(2) )
1444 b2 = capg * dzg(2) / dt_rp + 2.0_rp * aksg / ( dzg(1)+dzg(2) ) + 2.0_rp * aksg / ( dzg(2)+dzg(3) )
1445 dtgdg0g = 1.0_rp / ( b1 - ( 2.0_rp * aksg / ( dzg(1)+dzg(2) ) )**2 / b2 )
1447 dtgdg0g = dtgdg0g * 0.5_rp
1456 alphacp = ( alphab + alphag ) * 0.5_rp
1465 do iteration = 1, itr_max
1470 if ( iteration > 1 )
then
1472 tdiff = tb * sqrt(eps) * 2.0_rp
1473 adiff = sign( alphac * sqrt(eps) * 2.0_rp, dac )
1476 tc1 = rw*alphac + rw*alphag + w*alphab
1477 tc2 = rw*alphac*tha + w*alphab*(tb+tdiff)/exn + rw*alphag*ths2
1479 ribc = ( grav * 2.0_rp / (tha+thc) ) * (tha-thc) * (z+z0c) / (ua*ua+eps)
1481 ribc = ( grav * 2.0_rp / (tha+thc) ) * (tha-thc) * (z+z0c) / (ua*ua+eps)
1482 call mos(xxxtmp,chc_tb,cdc,bhc,ribc,z,z0c,ua,tha,thc,rhoo,i,j)
1485 tc1 = rw*alphac + rw*alphag + w*alphab
1486 tc2 = rw*alphac*tha + w*alphab*ths1 + rw*alphag*(tg+tdiff)/exn
1488 ribc = ( grav * 2.0_rp / (tha+thc) ) * (tha-thc) * (z+z0c) / (ua*ua+eps)
1490 call mos(xxxtmp,chc_tg,cdc,bhc,ribc,z,z0c,ua,tha,thc,rhoo,i,j)
1493 tc1 = rw*(alphac+adiff) + rw*alphag + w*alphab
1494 tc2 = rw*(alphac+adiff)*tha + w*alphab*ths1 + rw*alphag*ths2
1496 ribc = ( grav * 2.0_rp / (tha+thc) ) * (tha-thc) * (z+z0c) / (ua*ua+eps)
1498 call mos(xxxtmp,chc_ac,cdc,bhc,ribc,z,z0c,ua,tha,thc,rhoo,i,j)
1502 tc1 = rw*alphac + rw*alphag + w*alphab
1504 tc2 = rw*alphac*tha + w*alphab*ths1 + rw*alphag*ths2
1506 ribc = ( grav * 2.0_rp / (tha+thc) ) * (tha-thc) * (z+z0c) / (ua*ua+eps)
1507 call mos(xxxc,chc,cdc,bhc,ribc,z,z0c,ua,tha,thc,rhoo,i,j)
1509 if ( iteration > 1 )
then
1510 dchcdtb = ( chc_tb - chc ) / tdiff
1511 dchcdtg = ( chc_tg - chc ) / tdiff
1512 dchcdac = ( chc_ac - chc ) / adiff
1519 alphac = chc * rhoo * cpdry * ua
1520 dalphacdtb = dchcdtb * rhoo * cpdry * ua
1521 dalphacdtg = dchcdtg * rhoo * cpdry * ua
1522 dalphacdac = dchcdac * rhoo * cpdry * ua
1524 call dqs_dtem( tb, rhos, dqs0b, qs0b )
1525 call dqs_dtem( tg, rhos, dqs0g, qs0g )
1527 rainb = max( ( rainbp - evpb * dt_rp ), 0.0_rp )
1528 raing = max( ( raingp - evpg * dt_rp ), 0.0_rp )
1529 call cal_beta(betb, betb_const, rainb, strgb)
1530 call cal_beta(betg, betg_const, raing, strgg)
1531 dbetb = ( betb - betbp ) / sign( max(abs(dtbp),1e-10_rp), dtbp )
1532 dbetg = ( betg - betgp ) / sign( max(abs(dtgp),1e-10_rp), dtgp )
1537 tc1 = rw*alphac + rw*alphag + w*alphab
1539 tc2 = rw*alphac*tha + w*alphab*ths1 + rw*alphag*ths2
1541 dthcdtb = ( ( rw*dalphacdtb*tha + w*alphab/exn ) * tc1 - rw*dalphacdtb * tc2 ) / tc1**2
1542 dthcdtg = ( ( rw*dalphacdtg*tha + rw*alphag/exn ) * tc1 - rw*dalphacdtg * tc2 ) / tc1**2
1543 dthcdac = ( ( rw* tha ) * tc1 - rw * tc2 ) / tc1**2
1545 qc1 = rw*(chc*ua) + rw*(chg*betg*uc) + w*(chb*betb*uc)
1546 qc2 = rw*(chc*ua)*qa + rw*(chg*betg*uc)*qs0g + w*(chb*betb*uc)*qs0b
1547 qc = max( qc2 / ( qc1 + eps ), 0.0_rp )
1548 dqcdtb = ( ( rw*(dchcdtb*ua)*qa + w*(chb*uc)*(betb*dqs0b+dbetb*qs0b) ) * qc1 &
1549 - ( rw*(dchcdtb*ua) + w*(chb*uc*dbetb) ) * qc2 ) / ( qc1**2 + eps )
1550 dqcdtg = ( ( rw*(dchcdtg*ua)*qa + rw*(chg*uc)*(betg*dqs0g+dbetg*qs0g) ) * qc1 &
1551 - ( rw*(dchcdtg*ua) + rw*(chg*uc*dbetg) ) * qc2 ) / ( qc1**2 + eps )
1552 dqcdac = ( ( rw*(dchcdac*ua)*qa ) * qc1 &
1553 - ( rw*(dchcdac*ua) ) * qc2 ) / ( qc1**2 + eps )
1555 rg1 = epsg * ( rflux_lw * vfgs &
1556 + epsb * vfgw * stb * tb**4 &
1558 drg1dtb = epsg * epsb * vfgw * stb * 4.0_rp * tb**3
1559 drg1dtg = - epsg * stb * 4.0_rp * tg**3
1561 rb1 = epsb * ( rflux_lw * vfws &
1562 + epsg * vfwg * stb * tg**4 &
1563 + epsb * vfww * stb * tb**4 &
1565 drb1dtb = epsb * ( epsb * vfww - 1.0_rp ) * stb * 4.0_rp * tb**3
1566 drb1dtg = epsb * epsg * vfwg * stb * 4.0_rp * tg**3
1568 rg2 = epsg * ( (1.0_rp-epsb) * vfgw * vfws * rflux_lw &
1569 + (1.0_rp-epsb) * vfgw * vfwg * epsg * stb * tg**4 &
1570 + epsb * (1.0_rp-epsb) * vfgw * vfww * stb * tb**4 )
1571 drg2dtb = epsg * epsb * (1.0_rp-epsb) * vfgw * vfww * stb * 4.0_rp * tb**3
1572 drg2dtg = epsg * (1.0_rp-epsb) * vfgw * vfwg * epsg * stb * 4.0_rp * tg**3
1574 rb2 = epsb * ( (1.0_rp-epsg) * vfwg * vfgs * rflux_lw &
1575 + (1.0_rp-epsb) * vfws * vfww * rflux_lw &
1576 + (1.0_rp-epsb) * epsg * vfwg * vfww * stb * tg**4 &
1577 + (1.0_rp-epsg) * epsb * vfgw * vfwg * stb * tb**4 &
1578 + (1.0_rp-epsb) * epsb * vfww * (1.0_rp-2.0_rp*vfws) * stb * tb**4 )
1579 drb2dtb = epsb**2 * ( (1.0_rp-epsg) * vfgw * vfwg + (1.0_rp-epsb) * vfww * (1.0_rp-2.0_rp*vfws) ) * stb * 4.0_rp * tb**3
1580 drb2dtg = epsb * (1.0_rp-epsb) * epsg * vfwg * vfww * stb * 4.0_rp * tg**3
1585 hb = rhoo * cpdry * chb * uc * ( ths1 - thc ) * exn
1586 dhbdtb = rhoo * cpdry * chb * uc * ( 1.0_rp - dthcdtb * exn )
1587 dhbdtg = rhoo * cpdry * chb * uc * ( - dthcdtg * exn )
1588 dhbdac = rhoo * cpdry * chb * uc * ( - dthcdac * exn )
1590 evpb = min( rhoo * chb * uc * betb * (qs0b-qc), rainb / dt_rp )
1592 delebdtb = rhoo * chb * uc * ( betb * ( dqs0b - dqcdtb ) + dbetb * (qs0b-qc) ) * lhv
1593 delebdtg = rhoo * chb * uc * betb * ( - dqcdtg ) * lhv
1594 delebdac = rhoo * chb * uc * betb * ( - dqcdac ) * lhv
1597 g0b = sb + rb - hb - eleb
1598 dg0bdtb = drb1dtb + drb2dtb - dhbdtb - delebdtb
1599 dg0bdtg = drb1dtg + drb2dtg - dhbdtg - delebdtg
1600 dg0bdac = - dhbdac - delebdac
1602 hg = rhoo * cpdry * chg * uc * ( ths2 - thc ) * exn
1603 dhgdtb = rhoo * cpdry * chg * uc * ( - dthcdtb * exn )
1604 dhgdtg = rhoo * cpdry * chg * uc * ( 1.0_rp - dthcdtg * exn )
1605 dhgdac = rhoo * cpdry * chg * uc * ( - dthcdac * exn )
1607 evpg = min( rhoo * chg * uc * betg * (qs0g-qc), raing / dt_rp )
1609 delegdtb = rhoo * chg * uc * betg * ( - dqcdtb ) * lhv
1610 delegdtg = rhoo * chg * uc * ( betg * ( dqs0g - dqcdtg ) + dbetg * (qs0g-qc) ) * lhv
1611 delegdac = rhoo * chg * uc * betg * ( - dqcdac ) * lhv
1614 g0g = sg + rg - hg - eleg
1615 dg0gdtb = drg1dtb + drg2dtb - dhgdtb - delegdtb
1616 dg0gdtg = drg1dtg + drg2dtg - dhgdtg - delegdtg
1617 dg0gdac = - dhgdac - delegdac
1622 call multi_layer(uke,bound, &
1624 g0b,capb,aksb,tbl,dzb,dt_rp,tblend)
1630 call multi_layer(uke,bound, &
1632 g0g,capg,aksg,tgl,dzg,dt_rp,tglend)
1636 resi3 = alphac - alphacp
1638 if ( abs(resi1) < threshold .AND. abs(resi2) < threshold .AND. abs(resi3) < threshold )
then
1641 tb = max( tbp - dts_max_onestep, min( tbp + dts_max_onestep, tb ) )
1642 tg = max( tgp - dts_max_onestep, min( tgp + dts_max_onestep, tg ) )
1647 dr1dtb = dtbdg0b * dg0bdtb - 1.0_rp
1648 dr1dtg = dtbdg0b * dg0bdtg
1649 dr1dac = dtbdg0b * dg0bdac
1650 dr2dtb = dtgdg0g * dg0gdtb
1651 dr2dtg = dtgdg0g * dg0gdtg - 1.0_rp
1652 dr2dac = dtgdg0g * dg0gdac
1655 dr3dac = dalphacdac - 1.0_rp
1656 if ( iteration > 3 ) dr3dac = min( dr3dac, -0.02_rp )
1659 / ( dr1dtb * dr2dtg * dr3dac + dr1dtg * dr2dac * dr3dtb + dr1dac * dr2dtb * dr3dtg &
1660 - dr1dac * dr2dtg * dr3dtb - dr1dtg * dr2dtb * dr3dac - dr1dtb * dr2dac * dr3dtg )
1661 dtb = ( - ( dr2dtg * dr3dac - dr2dac * dr3dtg ) * resi1 &
1662 + ( dr1dtg * dr3dac - dr1dac * dr3dtg ) * resi2 &
1663 - ( dr1dtg * dr2dac - dr1dac * dr2dtg ) * resi3 ) * rdet
1664 dtg = ( ( dr2dtb * dr3dac - dr2dac * dr3dtb ) * resi1 &
1665 - ( dr1dtb * dr3dac - dr1dac * dr3dtb ) * resi2 &
1666 + ( dr1dtb * dr2dac - dr1dac * dr2dtb ) * resi3 ) * rdet
1667 dac = ( - ( dr2dtb * dr3dtg - dr2dtg * dr3dtb ) * resi1 &
1668 + ( dr1dtb * dr3dtg - dr1dtg * dr3dtb ) * resi2 &
1669 - ( dr1dtb * dr2dtg - dr1dtg * dr2dtb ) * resi3 ) * rdet
1671 dtb = sign( min(abs(dtb), 5.0_rp), dtb )
1672 dtg = sign( min(abs(dtg), 5.0_rp), dtg )
1673 dac = sign( min(abs(dac), 50.0_rp), dac )
1675 if ( iteration > 50 )
then
1676 if ( dtb*dtbp < 0.0_rp )
then
1677 fact1 = max( fact1 * 0.5_rp, 1e-10_rp )
1679 fact1 = min( fact1 * 1.5_rp, 1.1_rp )
1681 if ( dtg*dtgp < 0.0_rp )
then
1682 fact2 = max( fact2 * 0.5_rp, 1e-10_rp )
1684 fact2 = min( fact2 * 1.5_rp, 1.1_rp )
1686 if ( dac*dacp < 0.0_rp )
then
1687 fact3 = max( fact3 * 0.5_rp, 1e-10_rp )
1689 fact3 = min( fact3 * 1.5_rp, 1.1_rp )
1694 tb = max( tb + dtb * fact1, 100.0_rp )
1697 tg = max( tg + dtg * fact2, 100.0_rp )
1699 alphac = max( alphacp + dac * fact3, eps )
1700 dacp = alphac - alphacp
1702 if ( abs(dtbp) < threshold .AND. abs(dtgp) < threshold .AND. abs(dacp) < threshold )
then
1705 tb = max( tbp - dts_max_onestep, min( tbp + dts_max_onestep, tb ) )
1706 tg = max( tgp - dts_max_onestep, min( tgp + dts_max_onestep, tg ) )
1712 evpb = ( evpbp + evpb ) * 0.5_rp
1715 evpg = ( evpgp + evpg ) * 0.5_rp
1720 #ifdef DEBUG_KUSAKA01
1721 cnt_num2 = cnt_num2 + 1
1722 cnt_itr2 = cnt_itr2 + iteration - 1
1723 max_itr2 = max(max_itr2, iteration - 1)
1727 if ( iteration > itr_max .and. debug )
then
1728 log_warn(
"URBAN_DYN_Kusaka01_main",*)
'iteration for TB/TG was not converged',
prc_myrank,i,j
1729 log_warn_cont(*)
'---------------------------------------------------------------------------------'
1730 log_warn_cont(*)
'DEBUG Message --- Residual [K] :', resi1, resi2, resi3
1731 log_warn_cont(*)
'DEBUG Message --- TBP : Initial TB [K] :', tbp
1733 log_warn_cont(*)
'DEBUG Message --- TBLP: Initial TBL [K] :', tblp(uks)
1735 log_warn_cont(*)
'DEBUG Message --- TBLP: Initial TBL [K] :', tblp(:)
1737 log_warn_cont(*)
'DEBUG Message --- TGP : Initial TG [K] :', tgp
1739 log_warn_cont(*)
'DEBUG Message --- TGLP: Initial TGL [K] :', tglp(uks)
1741 log_warn_cont(*)
'DEBUG Message --- TGLP: Initial TGL [K] :', tglp(:)
1743 log_warn_cont(*)
'DEBUG Message --- TCP : Initial TC [K] :', tcp
1744 log_warn_cont(*)
'DEBUG Message --- QCP : Initial QC [K] :', qcp
1745 log_warn_cont(*)
'DEBUG Message --- UC : Canopy wind [m/s] :', uc
1746 log_warn_cont(*)
'DEBUG Message --- rflux_SW : Shortwave radiation [W/m2] :', rflux_sw
1747 log_warn_cont(*)
'DEBUG Message --- rflux_LW : Longwave radiation [W/m2] :', rflux_lw
1748 log_warn_cont(*)
'DEBUG Message --- PRSS: Surface pressure [Pa] :', prss
1749 log_warn_cont(*)
'DEBUG Message --- PRSA: Pressure at 1st atmos layer [m] :', prsa
1750 log_warn_cont(*)
'DEBUG Message --- RHOO: Air density [kg/m3] :', rhoo
1751 log_warn_cont(*)
'DEBUG Message --- RHOS: Surface density [kg/m3] :', rhos
1752 log_warn_cont(*)
'DEBUG Message --- RAINBP: Initial RAINB [kg/m2] :', rainbp
1753 log_warn_cont(*)
'DEBUG Message --- RAINGP: Initial RAING [kg/m2] :', raingp
1754 log_warn_cont(*)
'DEBUG Message --- ZA : Height at 1st atmos layer [m] :', za
1755 log_warn_cont(*)
'DEBUG Message --- TA : Temperature at 1st atmos layer [K] :', ta
1756 log_warn_cont(*)
'DEBUG Message --- UA : Wind speed at 1st atmos layer [m/s] :', ua
1757 log_warn_cont(*)
'DEBUG Message --- QA : Specific humidity at 1st atmos layer [kg/kg] :', qa
1759 log_warn_cont(*)
'DEBUG Message --- DZB : Depth of surface layer [m] :', dzb(1)
1760 log_warn_cont(*)
'DEBUG Message --- DZG : Depth of surface layer [m] :', dzg(1)
1762 log_warn_cont(*)
'DEBUG Message --- DZB : Depth of surface layer [m] :', dzb(:)
1763 log_warn_cont(*)
'DEBUG Message --- DZG : Depth of surface layer [m] :', dzg(:)
1765 log_warn_cont(*)
'DEBUG Message --- R, W, RW : Normalized height and road width [-] :', r, w,rw
1766 log_warn_cont(*)
'DEBUG Message --- SVF : Sky View Factors [-] :', svf
1767 log_warn_cont(*)
'DEBUG Message --- BETB,BETG : Evaporation efficiency [-] :', betb,betg
1768 log_warn_cont(*)
'DEBUG Message --- EPSB,EPSG : Surface emissivity [-] :', epsb,epsg
1769 log_warn_cont(*)
'DEBUG Message --- CAPB,CAPG : Heat capacity [J m-3 K] :', capb,capg
1770 log_warn_cont(*)
'DEBUG Message --- AKSB,AKSG : Thermal conductivity [W m-1 K] :', aksb,aksb
1771 log_warn_cont(*)
'DEBUG Message --- QS0B,QS0G : Surface specific humidity [kg/kg] :', qs0b,qs0g
1772 log_warn_cont(*)
'DEBUG Message --- ZDC : Desplacement height of canopy [m] :', zdc
1773 log_warn_cont(*)
'DEBUG Message --- Z0M : Momentum roughness length of canopy [m] :', z0c
1774 log_warn_cont(*)
'DEBUG Message --- Z0H/Z0E : Thermal roughness length of canopy [m] :', z0hc
1775 log_warn_cont(*)
'DEBUG Message --- LHV : Latent heat of vapor [J kg-1] :', lhv
1776 log_warn_cont(*)
'DEBUG Message --- dt : Time step [s] :', dt_rp
1777 log_warn_cont(*)
'---------------------------------------------------------------------------------'
1783 call qsat( tb, rhos, qs0b )
1784 call qsat( tg, rhos, qs0g )
1786 call cal_beta(betb, betb_const, rainb, strgb)
1787 call cal_beta(betg, betg_const, raing, strgg)
1790 rg1 = epsg * ( rflux_lw * vfgs &
1791 + epsb * vfgw * stb * tb**4 &
1793 rb1 = epsb * ( rflux_lw * vfws &
1794 + epsg * vfwg * stb * tg**4 &
1795 + epsb * vfww * stb * tb**4 &
1798 rg2 = epsg * ( (1.0_rp-epsb) * vfgw * vfws * rflux_lw &
1799 + (1.0_rp-epsb) * vfgw * vfwg * epsg * stb * tg**4 &
1800 + epsb * (1.0_rp-epsb) * vfgw * vfww * stb * tb**4 )
1801 rb2 = epsb * ( (1.0_rp-epsg) * vfwg * vfgs * rflux_lw &
1802 + (1.0_rp-epsg) * epsb * vfgw * vfwg * stb * tb**4 &
1803 + (1.0_rp-epsb) * vfws * vfww * rflux_lw &
1804 + (1.0_rp-epsb) * vfwg * vfww * stb * epsg * tg**4 &
1805 + epsb * (1.0_rp-epsb) * vfww * (1.0_rp-2.0_rp*vfws) * stb * tb**4 )
1814 hb = rhoo * cpdry * chb * uc * (ths1-thc) * exn
1815 evpb = min( rhoo * chb * uc * betb * (qs0b-qc), rainb / dt_rp )
1818 g0b = sb + rb - hb - eleb
1819 rainb = max( rainbp - evpb * dt_rp, 0.0_rp )
1821 hg = rhoo * cpdry * chg * uc * (ths2-thc) * exn
1822 evpg = min( rhoo * chg * uc * betg * (qs0g-qc), raing / dt_rp )
1825 g0g = sg + rg - hg - eleg
1826 raing = max( raingp - evpg * dt_rp, 0.0_rp )
1831 call multi_layer(uke,bound, &
1833 g0b,capb,aksb,tbl,dzb,dt_rp,tblend)
1840 call multi_layer(uke,bound, &
1842 g0g,capg,aksg,tgl,dzg,dt_rp,tglend)
1846 if ( abs(resi1) > dts_max_onestep )
then
1847 if ( abs(resi1) > dts_max_onestep*10.0_rp )
then
1848 log_error(
"URBAN_DYN_Kusaka01_main",*)
'tendency of TB exceeded a limit! STOP.'
1849 log_error_cont(*)
'previous TB and updated TB(TBL(1)) is ', tb-resi1,tb
1857 log_warn(
"URBAN_DYN_Kusaka01_main",*)
'tendency of TB exceeded a limit'
1858 log_warn_cont(*)
'previous TB and updated TB(TBL(1)) is ', tb-resi1, tb
1861 if ( abs(resi2) > dts_max_onestep )
then
1862 if ( abs(resi2) > dts_max_onestep*10.0_rp )
then
1863 log_error(
"URBAN_DYN_Kusaka01_main",*)
'tendency of TG exceeded a limit! STOP.'
1864 log_error_cont(*)
'previous TG and updated TG(TGL(1)) is ', tg-resi2, tg, resi2
1872 log_warn(
"URBAN_DYN_Kusaka01_main",*)
'tendency of TG exceeded a limit'
1873 log_warn_cont(*)
'previous TG and updated TG(TGL(1)) is ', tg-resi2, tg
1880 flxuv = ( r*cdr + rw*cdc ) * ua * ua
1881 mflx = - rhoo * flxuv
1882 sh = ( r*hr + w*hb + rw*hg )
1883 lh = ( r*eler + w*eleb + rw*eleg )
1884 ghflx = r*g0r + w*g0b + rw*g0g
1885 lnet = r*rr + w*rb + rw*rg
1891 lw = rflux_lw - lnet
1892 sw = rflux_sw - snet
1896 sdn = r + w * (vfws + vfgs * albg * vfwg) + rw * (vfgs + vfws * albb * vfgw)
1898 + w * ( vfws * albb + vfgs * albg * vfwg *albb ) &
1899 + rw * ( vfgs * albg + vfws * albb * vfgw *albg )
1901 albd_sw_grid = sup / sdn
1904 ldn = r + w*vfws + rw*vfgs
1905 lup = r * (1.0_rp-epsr) &
1906 + w*( (1.0_rp-epsb*vfww)*(1.0_rp-epsb)*vfws - epsb*vfwg*(1.0_rp-epsg)*vfgs ) &
1907 + rw*( (1.0_rp-epsg)*vfgs - epsg*(1.0_rp-vfgs)*(1.0_rp-epsb)*vfws )
1909 rup = (ldn - lup) * rflux_lw - lnet
1910 albd_lw_grid = lup / ldn
1938 roffr = max( rainr - strgr, 0.0_rp )
1939 roffb = max( rainb - strgb, 0.0_rp )
1940 roffg = max( raing - strgg, 0.0_rp )
1942 roff = r * roffr + rw * ( roffb + roffg )
1944 rainr = max( rainr - roffr, 0.0_rp )
1945 rainb = max( rainb - roffb, 0.0_rp )
1946 raing = max( raing - roffg, 0.0_rp )
1952 rts = ( rup / stb / ( 1.0_rp-albd_lw_grid) )**0.25
1958 ustar = sqrt( flxuv )
1959 tstar = -sh / rhoo / cpdry / ustar
1960 qstar = -lh / rhoo / lhv / ustar
1965 call cal_psi(xxx,psim,psih)
1967 xxx2 = (2.0_rp/z) * xxx
1968 call cal_psi(xxx2,psim2,psih2)
1970 xxx10 = (10.0_rp/z) * xxx
1971 call cal_psi(xxx10,psim10,psih10)
1974 fracu10 = ( log(10.0_rp/z0c ) - psim10 ) / ( log(z/z0c ) - psim )
1975 fract2 = ( log( 2.0_rp/z0hc) - psih2 ) / ( log(z/z0hc) - psih )
1977 call bulkflux_diagnose_surface( u1, v1, &
1981 z0c, z0hc, 1.0_rp, &
1983 fracu10, fract2, 1.0_rp )
1988 end subroutine slc_main
1991 subroutine canopy_wind(ZA, UA, Z0C, ZDC, UC)
1995 real(rp),
intent(in) :: za
1996 real(rp),
intent(in) :: ua
1997 real(rp),
intent(in) :: z0c
1998 real(rp),
intent(in) :: zdc
1999 real(rp),
intent(out) :: uc
2001 real(rp) :: ur,zc,xlb,bb
2003 if( zr + 2.0_rp < za )
then
2004 ur = ua * log((zr-zdc)/z0c) / log((za-zdc)/z0c)
2006 xlb = 0.4_rp * (zr-zdc)
2008 bb = 0.4_rp * zr / ( xlb * log((zr-zdc)/z0c) )
2009 uc = ur * exp( -bb * (1.0_rp-zc/zr) )
2016 uc = max(uc,0.01_rp)
2019 end subroutine canopy_wind
2022 subroutine cal_beta(BET, BET_CONST, WATER, STRG)
2026 real(rp),
intent(out) :: bet
2027 real(rp),
intent(in) :: bet_const
2028 real(rp),
intent(in) :: water
2029 real(rp),
intent(in) :: strg
2031 if ( bet_const > 0.0_rp )
then
2033 else if ( strg == 0.0_rp )
then
2036 bet = max( min( water / strg, 1.0_rp ), &
2041 end subroutine cal_beta
2044 subroutine cal_psi(zeta,psim,psih)
2050 real(rp),
intent(inout) :: zeta
2051 real(rp),
intent(out) :: psim
2052 real(rp),
intent(out) :: psih
2055 if( zeta >= 1.0_rp ) zeta = 1.0_rp
2056 if( zeta <= -5.0_rp ) zeta = -5.0_rp
2058 if( zeta > 0.0_rp )
then
2059 psim = -5.0_rp * zeta
2060 psih = -5.0_rp * zeta
2062 x = ( 1.0_rp - 16.0_rp * zeta )**0.25_rp
2063 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
2064 psih = 2.0_rp * log((1.0_rp+x*x)/2.0_rp)
2068 end subroutine cal_psi
2076 subroutine mos(XXX,CH,CD,B1,RIB,Z,Z0,UA,TA,TSF,RHO,i,j)
2082 integer,
intent(in)::i,j
2083 real(rp),
intent(in) :: b1, z, z0, ua, ta, tsf, rho
2084 real(rp),
intent(out) :: cd, ch
2085 real(rp),
intent(inout) :: xxx, rib
2086 real(rp) :: xxx0, x, x0, faih, dpsim, dpsih
2087 real(rp) :: f, df, xxxp, us, ts, al, xkb, dd, psim, psih
2089 integer,
parameter :: newt_end = 10
2092 real(rp) :: sqx, sqx0
2094 lnz = log( (z+z0)/z0 )
2096 if( rib < 0.0_rp )
then
2098 rib = max( rib, -15.0_rp )
2100 do newt = 1, newt_end
2102 xxx = min( xxx, -1.0e-3_rp )
2104 xxx0 = xxx * z0/(z+z0)
2106 sqx = sqrt( 1.0_rp - 16.0_rp * xxx )
2107 sqx0 = sqrt( 1.0_rp - 16.0_rp * xxx0 )
2113 - log( (x+1.0_rp)**2 * (sqx + 1.0_rp) ) &
2114 + 2.0_rp * atan(x) &
2115 + log( (x+1.0_rp)**2 * (sqx0 + 1.0_rp) ) &
2118 psih = lnz + 0.4_rp*b1 &
2119 - 2.0_rp * log( sqx + 1.0_rp ) &
2120 + 2.0_rp * log( sqx0 + 1.0_rp )
2122 dpsim = 1.0_rp / ( x * xxx ) &
2123 - 1.0_rp / ( x0 * xxx )
2124 dpsih = 1.0_rp / ( sqx * xxx ) &
2125 - 1.0_rp / ( sqx0 * xxx )
2127 f = rib * psim**2 / psih - xxx
2129 df = rib * ( 2.0_rp*dpsim*psim*psih - dpsih*psim**2 ) &
2135 xxx = max( xxx, -10.0_rp )
2139 else if( rib >= 0.142857_rp )
then
2142 psim = lnz + 7.0_rp * xxx
2143 psih = psim + 0.4_rp * b1
2149 dd = -4.0_rp * rib * 7.0_rp * xkb * al + (al+xkb)**2
2150 dd = max( dd, 0.0_rp )
2152 xxx = ( al + xkb - 2.0_rp*rib*7.0_rp*al - sqrt(dd) ) / ( 2.0_rp * ( rib*7.0_rp**2 - 7.0_rp ) )
2153 xxx = min( xxx, 0.714_rp )
2154 psim = lnz + 7.0_rp * xxx
2155 psih = psim + 0.4_rp * b1
2159 us = 0.4_rp * ua / psim
2160 if( us <= 0.01_rp ) us = 0.01_rp
2163 cd = us * us / (ua+eps)**2
2164 ch = 0.4_rp * us / psih / (ua+eps)
2172 subroutine multi_layer( &
2175 G0,CAP,AKS,TSL,DZ,DELT,TSLEND)
2183 integer,
intent(in) :: km
2184 integer,
intent(in) :: bound
2185 real(rp),
intent(in) :: g0
2186 real(rp),
intent(in) :: cap
2187 real(rp),
intent(in) :: aks
2188 real(rp),
intent(inout) :: tsl(km)
2189 real(rp),
intent(in) :: dz(km)
2190 real(rp),
intent(in) :: delt
2191 real(rp),
intent(in) :: tslend
2192 real(rp),
intent(out) :: a(km), b(km), c(km), d(km), p(km), q(km)
2201 b(1) = cap * dz(1) / delt &
2202 + 2.0_rp * aks / (dz(1)+dz(2))
2203 c(1) = -2.0_rp * aks / (dz(1)+dz(2))
2204 d(1) = cap * dz(1) / delt * tsl(1) + g0
2207 a(k) = -2.0_rp * aks / (dz(k-1)+dz(k))
2208 b(k) = cap * dz(k) / delt + 2.0_rp * aks / (dz(k-1)+dz(k)) + 2.0_rp * aks / (dz(k)+dz(k+1))
2209 c(k) = -2.0_rp * aks / (dz(k)+dz(k+1))
2210 d(k) = cap * dz(k) / delt * tsl(k)
2213 if( bound == 1 )
then
2214 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
2215 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km))
2217 d(km) = cap * dz(km) / delt * tsl(km)
2219 a(km) = -2.0_rp * aks / (dz(km-1)+dz(km))
2220 b(km) = cap * dz(km) / delt + 2.0_rp * aks / (dz(km-1)+dz(km)) + 2.0_rp * aks / (dz(km)+dzend)
2222 d(km) = cap * dz(km) / delt * tsl(km) + 2.0_rp * aks * tslend / (dz(km)+dzend)
2230 p(k) = -c(k) / ( a(k) * p(k-1) + b(k) )
2231 q(k) = ( -a(k) * q(k-1) + d(k) ) / ( a(k) * p(k-1) + b(k) )
2238 tsl(k) = p(k) * tsl(k+1) + q(k)
2242 end subroutine multi_layer
2323 subroutine urban_param_setup
2326 real(rp) :: dhgt,thgt,vfws,vfgs
2345 zdc_tbl = zr * 0.3_rp
2346 z0c_tbl = zr * 0.15_rp
2347 z0hc_tbl = 0.1_rp * z0c_tbl
2350 hgt = zr / ( road_width + roof_width )
2353 r = roof_width / ( road_width + roof_width )
2357 dhgt = hgt / 100.0_rp
2360 thgt = hgt - dhgt / 2.0_rp
2363 vfws = vfws + 0.25_rp * ( 1.0_rp - thgt / sqrt( thgt**2 + rw**2 ) )
2366 vfws = vfws / 99.0_rp
2367 vfws = vfws * 2.0_rp
2368 vfgs = 1.0_rp - 2.0_rp * vfws * hgt / rw
2372 end subroutine urban_param_setup
2376 subroutine read_urban_param_table( INFILENAME )
2381 character(*),
intent(in) :: infilename
2383 real(rp) :: betr, betb, betg
2385 namelist / param_urban_data / &
2417 character(len=H_LONG) :: fname
2426 form =
'formatted', &
2429 if ( ierr /= 0 )
then
2431 log_error(
"URBAN_DYN_kusaka01_setup",*)
'Failed to open a parameter file : ', trim(fname)
2436 log_info(
"URBAN_DYN_kusaka01_setup",*)
'read_urban_param_table: Read urban parameters from file'
2444 read (fid,nml=param_urban_data,iostat=ierr)
2445 if ( ierr < 0 )
then
2446 log_info(
"read_urban_param_table",*)
'Not found namelist of PARAM_URBAN_DATA. Default used.'
2447 elseif( ierr > 0 )
then
2448 log_error(
"read_urban_param_table",*)
'Not appropriate names in PARAM_URBAN_DATA of ', trim(infilename)
2451 log_nml(param_urban_data)
2455 if ( zr <= 0.0_rp )
then
2456 log_error(
"read_urban_param_table",*)
'ZR is not appropriate value; ZR must be larger than 0. ZR=', zr
2465 end subroutine read_urban_param_table
2469 subroutine read_urban_gridded_data_2d( &
2476 file_cartesc_read, &
2478 file_cartesc_check_coordinates, &
2483 integer ,
intent(in) :: uia, uja
2484 character(len=*),
intent(in) :: infilename
2485 character(len=*),
intent(in) :: varname
2486 real(rp),
intent(out) :: udata(uia,uja)
2491 log_info(
"URBAN_DYN_kusaka01_setup",*)
'read_urban_gridded_data ',trim(varname)
2495 call file_cartesc_read( fid, varname,
'XY', udata(:,:) )
2498 call file_cartesc_check_coordinates( fid )
2502 end subroutine read_urban_gridded_data_2d
2506 subroutine read_urban_gridded_data_3d( &
2513 file_cartesc_read, &
2515 file_cartesc_check_coordinates, &
2520 integer ,
intent(in) :: uia, uja
2521 character(len=*),
intent(in) :: infilename
2522 character(len=*),
intent(in) :: varname
2523 real(rp),
intent(out) :: udata(uia,uja,24)
2528 log_info(
"URBAN_DYN_kusaka01_setup",*)
'read_urban_gridded_data ',trim(varname)
2533 call file_cartesc_read( fid, varname,
'XY', udata(:,:,k), k )
2537 call file_cartesc_check_coordinates( fid )
2541 end subroutine read_urban_gridded_data_3d
2553 integer,
intent(in) :: UIA, UJA
2554 real(RP),
intent(in) :: SHR(UIA,UJA), SHB(UIA,UJA), SHG(UIA,UJA)
2555 real(RP),
intent(in) :: LHR(UIA,UJA), LHB(UIA,UJA), LHG(UIA,UJA)
2556 real(RP),
intent(in) :: GHR(UIA,UJA), GHB(UIA,UJA), GHG(UIA,UJA)
2557 real(RP),
intent(in) :: RNR(UIA,UJA), RNB(UIA,UJA), RNG(UIA,UJA)
2558 real(RP),
intent(in) :: RNgrd(UIA,UJA)
2560 call file_history_put( i_shr, shr(:,:) )
2561 call file_history_put( i_shb, shb(:,:) )
2562 call file_history_put( i_shg, shg(:,:) )
2563 call file_history_put( i_lhr, lhr(:,:) )
2564 call file_history_put( i_lhb, lhb(:,:) )
2565 call file_history_put( i_lhg, lhg(:,:) )
2566 call file_history_put( i_ghr, ghr(:,:) )
2567 call file_history_put( i_ghb, ghb(:,:) )
2568 call file_history_put( i_ghg, ghg(:,:) )
2569 call file_history_put( i_rnr, rnr(:,:) )
2570 call file_history_put( i_rnb, rnb(:,:) )
2571 call file_history_put( i_rng, rng(:,:) )
2572 call file_history_put( i_rngrd, rngrd(:,:) )