35 real(RP),
public ::
w0 46 real(RP) :: a0, a1, a2, c1, c2, c3
47 real(RP) :: esat, qsat, deltaqsat, cp
50 integer,
parameter :: data_length_max=10000
59 real(RP) :: albedomin = 0.4_rp
60 real(RP) :: albedomax = 0.85_rp
61 real(RP) :: zmin = 0.01_rp
64 real(RP),
parameter :: epsilon = 0.97_rp
65 real(RP),
parameter :: sigma = 5.67e-08_rp
67 real(RP),
parameter :: ch = 0.002_rp
68 real(RP),
parameter :: ce = 0.0021_rp
69 real(RP),
parameter :: lv = 2.5e6_rp
70 real(RP),
parameter :: lf = 3.34e5_rp
72 logical :: albedo_const = .true.
73 logical :: debug = .false.
75 integer :: zn_flag, ts_flag, sflag
85 real(RP) :: snow_conductivity = 0.42_rp
86 real(RP) :: water_content = 0.1_rp
87 real(RP) :: snow_heat_capacityRHO = 8.4e+05_rp
88 real(RP) :: snow_rho = 400.0_rp
89 real(RP) :: snowDepth_initial = 0.0_rp
90 real(RP) :: albedo_value = 0.686_rp
92 namelist / param_land_phy_snow_ky90 / &
96 snow_heat_capacityrho, &
106 log_info(
"LAND_PHY_SNOW_KY90_setup",*)
'Setup' 110 read(
io_fid_conf,nml=param_land_phy_snow_ky90,iostat=ierr)
112 log_info(
"LAND_PHY_SNOW_KY90_setup",*)
'Not found namelist. Default used.' 113 elseif( ierr > 0 )
then 114 log_error(
"LAND_PHY_SNOW_KY90_setup",*)
'Not appropriate names in namelist PARAM_LAND_PHY_SNOW_KY90. Check!' 117 log_nml(param_land_phy_snow_ky90)
119 lambdas = snow_conductivity
121 csrhos = snow_heat_capacityrho
125 albedo = albedo_value
134 LIA, LIS, LIE, LJA, LJS, LJE, &
135 SFLX_rain, SFLX_snow, & ! [IN]
136 PRSA, TA, QA, & ! [IN]
139 SFLX_RAD_dn, & ! [IN]
140 LANDUSE_fact_land, dt, & ! [IN]
141 TSNOW, SWE, & ! [INOUT]
142 SDepth, SDzero, & ! [INOUT]
143 nosnowsec, & ! [INOUT]
145 SFLX_SH, SFLX_LH, & ! [OUT]
146 SFLX_GH, SNOW_LAND_GH, & ! [OUT]
147 SNOW_LAND_Water, & ! [OUT]
154 qsatf => atmos_saturation_psat_all
161 integer,
intent(in) :: LIA, LIS, LIE
162 integer,
intent(in) :: LJA, LJS, LJE
165 real(RP),
intent(in) :: SFLX_rain (lia,lja)
166 real(RP),
intent(in) :: SFLX_snow (lia,lja)
167 real(RP),
intent(in) :: PRSA (lia,lja)
168 real(RP),
intent(in) :: TA (lia,lja)
169 real(RP),
intent(in) :: WA (lia,lja)
170 real(RP),
intent(in) :: UA (lia,lja)
171 real(RP),
intent(in) :: VA (lia,lja)
172 real(RP),
intent(in) :: QA (lia,lja)
173 real(RP),
intent(in) :: DENS (lia,lja)
175 real(DP),
intent(in) :: dt
176 real(RP),
intent(in) :: LANDUSE_fact_land(lia,lja)
179 real(RP),
intent(inout) :: TSNOW (lia,lja)
180 real(RP),
intent(inout) :: SWE (lia,lja)
181 real(RP),
intent(inout) :: SDepth (lia,lja)
182 real(RP),
intent(inout) :: SDzero (lia,lja)
183 real(RP),
intent(inout) :: nosnowsec (lia,lja)
186 real(RP),
intent(out) :: Salbedo (lia,lja,2)
187 real(RP),
intent(out) :: SFLX_SH (lia,lja)
188 real(RP),
intent(out) :: SFLX_LH (lia,lja)
189 real(RP),
intent(out) :: SFLX_GH (lia,lja)
190 real(RP),
intent(out) :: SNOW_LAND_GH (lia,lja)
191 real(RP),
intent(out) :: SNOW_LAND_water(lia,lja)
192 real(RP),
intent(out) :: SNOW_frac (lia,lja)
194 real(RP) :: QCC (lia,lja)
195 real(RP) :: QFUSION (lia,lja)
196 real(RP) :: MELT (lia,lja)
197 real(RP) :: SWEMELT (lia,lja)
198 real(RP) :: SFLX_evap (lia,lja)
206 real(RP),
parameter :: Uabs_min = 0.1_rp
210 real(RP) :: qdry, psat
211 real(RP) :: SFLX_SW_dn, SFLX_LW_dn
215 log_progress(*)
'Land / physics / snow / KY90' 220 if( ( landuse_fact_land(i,j) > 0.0_rp ) .and. &
221 ( swe(i,j)>0. .or. sflx_snow(i,j)>0. ) )
then 223 uabs = max( sqrt( ua(i,j)**2 + va(i,j)**2 + wa(i,j)**2 ), uabs_min )
229 call qsatf( ta(i,j), psat )
230 qasat = epsvap * psat / ( prsa(i,j) - ( 1.0_rp-epsvap ) * psat )
233 log_info(
"LAND_PHY_SNOW_KY90",*)
"RH, ",rh,
" DENS (1.289 org) ",dens(i,j)
245 znsnow1 = sdzero(i,j)
273 snow_land_gh(i,j) = snow_land_gh(i,j) / dt
274 snow_land_water(i,j) = sflx_rain(i,j) + swemelt(i,j) / dt
276 if ( swe1 <= 0. .and. swe(i,j) <= 0. )
then 277 snow_frac(i,j) = 0.0_rp
279 snow_frac(i,j) = 1.0_rp
285 sdzero(i,j) = znsnow1
288 log_info(
"LAND_PHY_SNOW_KY90",*)
"SNOW_frac, SWE, TSNOW", snow_frac(i,j), swe(i,j), tsnow(i,j)
293 snow_land_water(i,j) = sflx_rain(i,j)
294 snow_frac(i,j) = 0.0_rp
300 salbedo(i,j,:) = 0.0_rp
301 sflx_sh(i,j) = 0.0_rp
302 sflx_lh(i,j) = 0.0_rp
303 sflx_gh(i,j) = 0.0_rp
304 sflx_evap(i,j) = 0.0_rp
306 qfusion(i,j) = 0.0_rp
308 swemelt(i,j) = 0.0_rp
309 snow_land_gh(i,j) = 0.0_rp
313 call file_history_in( qcc(:,:),
'SNOW_QCC',
'Heat used for changing temperature profile',
'J/m2', dim_type=
'XY' )
314 call file_history_in( qfusion(:,:),
'SNOW_QFUSION',
'Heat used for phase change of snow',
'J/m2', dim_type=
'XY' )
315 call file_history_in( melt(:,:),
'SNOW_MELT',
'Heat used for snow melt',
'J/m2', dim_type=
'XY' )
316 call file_history_in( swemelt(:,:),
'SNOW_SWEMELT',
'Equivalent water of melt snow',
'kg/m2', dim_type=
'XY' )
332 nosnowsec, & ! [INOUT]
333 ALBEDO_out, & ! [OUT]
336 LATENTFLUX, & ! [OUT]
343 Gflux2land, & ! [OUT]
357 real(RP),
intent(inout) :: TSNOW
358 real(RP),
intent(inout) :: SWE
359 real(RP),
intent(inout) :: DEPTH
360 real(RP),
intent(inout) :: ZNSNOW
362 real(RP),
intent(inout) :: nosnowsec
363 real(RP),
intent(out) :: ALBEDO_out
364 real(RP),
intent(out) :: Emiss
367 real(RP),
intent(out) :: HFLUX
368 real(RP),
intent(out) :: LATENTFLUX
369 real(RP),
intent(out) :: GFLUX
370 real(RP),
intent(out) :: EvapFLX
372 real(RP),
intent(out) :: QCC
373 real(RP),
intent(out) :: QFUSION
374 real(RP),
intent(out) :: MELT
375 real(RP),
intent(out) :: SWEMELT
376 real(RP),
intent(out) :: Gflux2land
380 real(RP),
intent(in) :: SFLX_SNOW
381 real(RP),
intent(in) :: TA
382 real(RP),
intent(in) :: UA
383 real(RP),
intent(in) :: RH
384 real(RP),
intent(in) :: DENS
385 real(RP),
intent(in) :: SW
386 real(RP),
intent(in) :: LW
387 real(DP),
intent(in) :: time
401 real(RP) :: DELTADEPTH
420 snow = sflx_snow * time
430 depth0 = depth0 + (snow /
rhosnow)
431 znsnow0 = znsnow0 + (snow /
rhosnow)
434 log_info(
"SNOW_ky90_main",*)
"UA, SNOW,SFLX_SNOW,time : ", ua, snow, sflx_snow, time
435 log_info(
"SNOW_ky90_main",*)
"SWE , TSNOW, and TA : ", swe0, tsnow0, ta
436 log_info(
"SNOW_ky90_main",*)
"DEPTH is: ", depth0
437 log_info(
"SNOW_ky90_main",*)
"ZN beginning: ", znsnow0
442 if (snow > 0.0_rp)
then 445 nosnowsec = nosnowsec + time
447 if ( .not. albedo_const )
then 448 albedo = albedomin + (albedomax-albedomin)*exp(-1.0_rp*nosnowsec/
real(4.0_rp*24.0_rp*3600.0_rp))
452 emiss = 1.0_rp - epsilon
454 log_info(
"SNOW_ky90_main",*)
"Albedo ",albedo
459 call groundflux (tsnow0, ta, ua, rh, dens, albedo, sw, lw, &
460 gflux, rflux, sflux, linflux, loutflux, hflux, latentflux)
463 evapflx = latentflux / lv
465 swe0 = swe0 - evapflx * time
466 deltadepth = (evapflx * time) /
rhosnow 467 depth0 = depth0 - deltadepth
468 znsnow0 = znsnow0 - deltadepth
473 call check_allsnowmelt (gflux, tsnow0, znsnow0, depth0, sflag, time)
475 log_info(
"SNOW_ky90_main",*)
'LAND/snow: All snow melt' 476 qcc = 0.5_rp*csrhos*znsnow0*(t0-tsnow0)
485 gflux2land = gflux*time - (qcc + qfusion + melt)
489 call cal_param (znsnow0, tsnow0, gflux, ta, ua, rh, dens, lw, time)
492 call check_applicability (gflux, tsnow0, znsnow0, ta, ua, rh, dens, lw, gres, beta, time)
493 if ((gres >= 0.0_rp).and.(beta >= 0.0_rp))
then 494 log_info(
"SNOW_ky90_main",*)
'LAND/snow model is not appropriate',gres,beta
495 qcc = 0.5_rp*csrhos*znsnow0*(t0-tsnow0)
506 call snowdepth ( gflux, znsnow0, znsnow, time)
509 log_info(
"SNOW_ky90_main",*)
"ZN is: ", znsnow
511 IF(znsnow < zmin)
THEN 514 log_info(
"SNOW_ky90_main",*)
"ZN is replaced to: ", znsnow ,
" to ", zmin
517 ELSE IF(znsnow > depth0)
THEN 520 log_info(
"SNOW_ky90_main",*)
"ZN is replaced to: ", znsnow ,
" to ", depth0
526 call equation415(lambdas, c2, znsnow, rh, qsat, tsnow0, znsnow0, gflux, ta, ua, dens, lw, tsnow, time)
529 log_info(
"SNOW_ky90_main",*)
'TSNOW is: ', tsnow
536 call check_res(znsnow0, znsnow, tsnow0, tsnow, gflux, ta, ua, rh, dens, lw,
"1", time)
537 IF (znsnow < zmin)
THEN 540 log_info(
"SNOW_ky90_main",*)
"ZN is updated/replaced to: ", znsnow ,
" to ", zmin
543 ELSE IF(znsnow > depth0)
THEN 546 log_info(
"SNOW_ky90_main",*)
"ZN is updated/replaced to: ", znsnow ,
" to ", depth0
554 log_info(
"SNOW_ky90_main",*)
'TSNOW is updated: ', tsnow
555 log_info(
"SNOW_ky90_main",*)
'ZNSNOW is updated: ', znsnow
558 call check_res( znsnow0, znsnow, tsnow0, tsnow, gflux, ta, ua, rh, dens, lw,
"0", time)
561 IF ( (znsnow-zmin)/zmin < 0.00001 )
THEN 563 gflux, csrhos, znsnow0, tsnow0, znsnow, tsnow, &
564 melt, qcc, qfusion, time)
567 gflux, csrhos, znsnow0, tsnow0, znsnow, tsnow, &
568 melt, qcc, qfusion, time)
573 gflux2land = gflux*time - (qcc + qfusion + melt)
575 log_info(
"SNOW_ky90_main",*)
"### ZN_flag = ", zn_flag,
"TS_flag = ", ts_flag
576 log_info(
"SNOW_ky90_main",*)
'### Heat flux from snowpack to land surface: ', gflux2land
579 deltadepth = melt / ((1.0_rp-
w0)*lf*
rhosnow)
582 depth = depth0 - deltadepth
583 if (depth < znsnow)
then 586 log_info(
"SNOW_ky90_main",*)
"replace ZNSNOW <= DEPTH" 592 log_info(
"SNOW_ky90_main",*)
'MELT in water equivalent is: ', swemelt
593 log_info(
"SNOW_ky90_main",*)
'SWE0 is: ', swe
594 log_info(
"SNOW_ky90_main",*)
'DELTADEPTH is: ', deltadepth
595 log_info(
"SNOW_ky90_main",*)
'DEPTH0 is: ', depth
596 log_info(
"SNOW_ky90_main",*)
'ZNSNOW0 is: ', znsnow
606 subroutine groundflux (TS, TA, UA, RH, rhoair, ALPHA, SW, LW, &
607 GFLUX, RFLUX, SFLUX, LINFLUX, LOUTFLUX, HFLUX, LATENTFLUX)
610 real(RP),
intent(in) :: TS, TA, UA, RH, rhoair, ALPHA, SW, LW
611 real(RP),
intent(out) :: GFLUX, RFLUX, SFLUX, LINFLUX, LOUTFLUX, HFLUX, LATENTFLUX
613 esat = 0.6112_rp * exp( (17.67_rp * (ta-273.15_rp)) / (ta-29.66_rp) )
614 qsat = 0.622_rp * esat / 101.325_rp
615 deltaqsat = 0.622_rp * lv * qsat /(287.04_rp * (ta**2))
616 cp = 1004.67_rp * (1.0_rp + (0.84_rp * qsat))
619 sflux = (1.0_rp-alpha) * sw
620 rflux = epsilon * (lw-(sigma*(ts**4)))
621 linflux = epsilon * lw
622 loutflux = -1.0_rp * (epsilon * sigma * (ts**4))
623 hflux = cp * rhoair * ch * ua * (ts-ta)
624 latentflux = lv * rhoair * ce * ua * ((1-rh)*qsat + (deltaqsat*(ts-ta)))
626 gflux = (sflux + rflux - hflux - latentflux)
629 log_info(
"LAND_PHY_SNOW_KY90_groundflux",*)
"-------------- groundflux --------------" 630 log_info_cont(*)
"GFLUX is: ", gflux
631 log_info_cont(*)
"SFLUX: ", sflux
632 log_info_cont(*)
"RFLUX: ", rflux, linflux+loutflux
633 log_info_cont(*)
" (LONG in: ", linflux,
")" 634 log_info_cont(*)
" (LONG out: ", loutflux,
")" 635 log_info_cont(*)
"HFLUX is: ", hflux
636 log_info_cont(*)
"LATENT FLUX: ", latentflux
643 subroutine check_allsnowmelt (GFLUX, TS1, ZN1, D, sflag, time)
648 real(RP),
intent(in) :: GFLUX, TS1, ZN1, D
649 real(DP),
intent(in) ::time
650 integer,
intent(out) :: sflag
651 real(RP) :: energy_in, energy_use
652 real(RP) :: energy_use_ripe, energy_use_melt
654 energy_in = gflux * time
656 energy_use_ripe = 0.5_rp*csrhos*zn1*(t0-ts1) +
w0*
rhosnow*lf*zn1
657 energy_use_melt = (1.0_rp-
w0)*
rhosnow*lf*d
658 energy_use = energy_use_ripe + energy_use_melt
660 if(energy_in >= energy_use)
then 667 log_info(
"LAND_PHY_SNOW_KY90_check_allSnowMelt",*)
"Energy in =",energy_in
668 log_info(
"LAND_PHY_SNOW_KY90_check_allSnowMelt",*)
"Energy use =",energy_use
675 subroutine cal_param (ZN1, TS1, GFLUX, TA, UA, RH, rhoair, LW, time)
680 real(RP),
intent(in) :: ZN1, TS1, TA, UA, RH, rhoair, LW
681 real(RP),
intent(in) :: GFLUX
682 real(DP),
intent(in) :: time
685 c2 = (4.0_rp*epsilon*sigma*(ta**3)) + (cp*rhoair*ch*ua) + (lv*rhoair*ce*ua*deltaqsat)
688 a0 = lambdas*(c3*zn1 + (c1*zn1*(t0-ts1)- gflux*time))
689 a1 = c2*(c3*zn1 + c1*zn1*(t0-ts1) - gflux*time) - c3*lambdas
691 ( epsilon*(lw-(sigma*(ta**4))) + (c2*(ta-t0)) - (lv*rhoair*ce*ua*(1.0_rp-rh)*qsat) ) &
695 log_info(
"LAND_PHY_SNOW_KY90_cal_param",*)
"-------------- snowdepth --------------" 696 log_info_cont(*)
"C1",c1
697 log_info_cont(*)
"C2",c2,(4.0_rp*epsilon*sigma*(ta**3)),(cp*rhoair*ch*ua), (lv*rhoair*ce*ua*deltaqsat)
698 log_info_cont(*)
"C3",c3
699 log_info_cont(*)
"A0",a0
700 log_info_cont(*)
"A1",a1
701 log_info_cont(*)
"A2",a2
707 subroutine check_applicability (GFLUX, TS1, ZN1, TA, UA, RH, rhoair, LW, GFLUX_res, beta, time)
712 real(RP),
intent(in) :: GFLUX, TS1, ZN1
713 real(RP),
intent(in) :: TA, UA, RH, rhoair, LW
714 real(DP),
intent(in) :: time
715 real(RP),
intent(out) :: GFLUX_res, beta
716 real(RP) :: energy_in, energy_use_max
718 energy_in = gflux * time
719 energy_use_max = 0.5_rp*csrhos*zn1*(t0-ts1) +
w0*
rhosnow*lf*zn1
721 gflux_res = energy_in - energy_use_max
724 beta = (lambdas/c2)* &
725 ( t0 - ( ta*c2 - lv*rhoair*ce*ua*(1.0_rp-rh)*qsat + epsilon*(lw-sigma*(ta**4)))/c2 )
731 subroutine snowdepth (GFLUX, ZN1, ZN2, time)
735 real(RP),
intent(in) :: GFLUX
736 real(RP),
intent(in) :: ZN1
737 real(DP),
intent(in) :: time
738 real(RP),
intent(out) :: ZN2
747 zn2 = ((-1.0_rp*a1) - ((a1**2.0_rp - 4.0_rp*a2*a0)**0.5_rp)) / (2.0_rp*a2)
750 log_info(
"LAND_PHY_SNOW_KY90_snowdepth",*)
"ZN old = ",zn1,
"ZN new = ",zn2
756 subroutine equation415(LAMBDAS, C2, ZN2, RH, QSAT, TS1, ZN1, GFLUX, TA, UA, rhoair, LW, TS2, time)
761 real(RP),
intent(in) :: TA, UA, rhoair, LW, ZN2, GFLUX, TS1,ZN1
762 real(RP),
intent(in) :: C2, LAMBDAS, RH, QSAT
763 real(DP),
intent(in) :: time
764 real(RP),
intent(out) :: TS2
767 ts2 = ((lambdas*t0) + (ta*c2*zn2) - (zn2*lv*rhoair*ce*ua*(1.0_rp-rh)*qsat) &
768 + zn2*epsilon*(lw - (sigma*(ta**4))))/ (lambdas + (c2*zn2))
771 log_info(
"LAND_PHY_SNOW_KY90_equation415",*)
"-------------- equation415 --------------" 773 ts_check = gflux*time/(0.5*csrhos*zn2) + t0 - zn1*(t0-ts1)/zn2 -
w0*
rhosnow*lf*(zn1-zn2)/(0.5*csrhos*zn2)
775 log_info_cont(*)
"compare ",ts2, ts_check, ts2-ts_check
780 end subroutine equation415
787 real(RP),
intent(in) :: ZN1
788 real(RP),
intent(in) :: TS, GFLUX
789 real(DP),
intent(in) :: time
790 real(RP),
intent(out) :: ZN2
792 zn2 = zn1 + ((c1*zn1*(t0-ts) - gflux*time) / c3)
795 log_info(
"LAND_PHY_SNOW_KY90_recalculateZ",*)
"-------------- recalculate Z --------------" 802 subroutine calculationmo(GFLUX, CSRHOS, ZN1, TS1, ZN2, TS2, &
803 MELT, QCC, QFUSION, time)
809 real(RP),
intent(in) :: GFLUX, CSRHOS, ZN1, TS1, TS2, ZN2
810 real(DP),
intent(in) :: time
811 real(RP),
intent(out) :: MELT, QCC, QFUSION
813 qcc = 0.5_rp*csrhos*(zn1*(t0-ts1)-zn2*(t0-ts2))
815 melt = ( gflux*time - qcc - qfusion )
818 log_info(
"LAND_PHY_SNOW_KY90_calculationMO",*)
"--------------------------MELT----------------" 819 log_info_cont(*)
"GFLUX*time is: ", gflux*time
820 log_info_cont(*)
"QCC is : ", qcc
821 log_info_cont(*)
"QFUSION is : ", qfusion
822 log_info_cont(*)
"QMELT is : ", melt
824 log_info_cont(*) qcc+qfusion+melt
825 log_info_cont(*)
"diff= ", qcc + qfusion + melt - (gflux*time)
828 if ( abs(qcc+qfusion+melt - (gflux*time)) > 10.)
then 829 log_error(
"LAND_PHY_SNOW_KY90_calculationMO",*)
"Calculation is fault. Model would include bugs. Please check! Melt" 839 MELT, QCC, QFUSION, time)
843 real(RP),
intent(in) :: GFLUX, CSRHOS, ZN1, TS1, TS2, ZN2
844 real(DP),
intent(in) :: time
845 real(RP),
intent(out) :: MELT, QCC, QFUSION
847 qcc = 0.5_rp*csrhos*(zn1*(t0-ts1)-zn2*(t0-ts2))
852 log_info(
"LAND_PHY_SNOW_KY90_calculationNoMO",*)
"--------------------------NOMELT----------------" 853 log_info_cont(*)
"GFLUX*time is: ", gflux*time
854 log_info_cont(*)
"QCC is : ", qcc
855 log_info_cont(*)
"QFUSION is : ", qfusion
856 log_info_cont(*)
"QMELT is : ", melt
858 log_info_cont(*) qcc+qfusion+melt
859 log_info_cont(*)
"diff= ", qcc +qfusion - (gflux*time)
871 subroutine check_res(ZN1, ZN2, TS1, TS2, GFLUX, TA, UA, RH, rhoair, LW, flag, time)
875 real(RP),
intent(in) :: ZN1, ZN2, TS1, TS2, GFLUX
876 real(RP),
intent(in) :: TA, UA, RH, rhoair, LW
877 real(DP),
intent(in) :: time
878 character(len=*) :: flag
884 r1 = c1 * (zn1*(t0-ts1) - zn2*(t0-ts2)) + c3*(zn1-zn2)-gflux*time
885 r2 = zn2*( epsilon*lw-epsilon*sigma*(ta**4) - (c2*(ts2-ta)) - (lv*rhoair*ce*ua*(1.0_rp-rh)*qsat) ) &
887 r3 = ((lambdas*t0) + (ta*c2*zn2) - (zn2*lv*rhoair*ce*ua*(1.0_rp-rh)*qsat) &
888 + zn2*epsilon*( lw - (sigma*(ta**4))))/ (lambdas + (c2*zn2))-ts2
892 log_info(
"LAND_PHY_SNOW_KY90_check_res",*)
"R1 is : ", r1,
"flag = ", flag
893 log_info(
"LAND_PHY_SNOW_KY90_check_res",*)
"R2 is : ", r2, r3,
"flag = ", flag
895 if(abs(r1)>10000)
then 896 log_info(
"LAND_PHY_SNOW_KY90_check_res",*) c1 * (zn1*(t0-ts1) - zn2*(t0-ts2)), c3*(zn1-zn2), -gflux*time
904 subroutine cal_r1r2(ZN1, TS1, GFLUX, TA, UA, RH, rhoair, LW, time)
908 real(RP),
intent(in) :: ZN1, TS1
909 real(RP),
intent(in) :: GFLUX, TA, UA, RH, rhoair, LW
910 real(DP),
intent(in) :: time
918 real(RP) :: ts_r1,ts_r2,zn_r1,zn_r2
919 character(len=3) :: ttt =
"" 921 real(RP) :: a,b,c,d,e,f,g
928 open(70,file=
'check_R1-R2_zn-base'//ttt//
'.dat',status=
'unknown')
930 zn2 = zn0 + 9.0_rp*0.0001_rp*
real((j-1),kind=
rp)
933 ts_r1 = t0 - (c1*zn1*(t0-ts1) + c3*(zn1-zn2) - gflux*time)/(c1*zn2)
935 ts_r2 = ((lambdas*t0) + (ta*c2*zn2) - (zn2*lv*rhoair*ce*ua*(1.0_rp-rh)*qsat) &
936 + zn2*epsilon*( lw - (sigma*(ta**4))))/ (lambdas + (c2*zn2))
938 if ( debug )
write(70,
'(3f15.5)') zn2, ts_r1, ts_r2
941 zn2 = -1.0_rp + 2.0_rp*0.00001_rp*
real((j-1),kind=
rp)
944 ts_r1 = t0 - (c1*zn1*(t0-ts1) + c3*(zn1-zn2) - gflux*time)/(c1*zn2)
946 ts_r2 = ((lambdas*t0) + (ta*c2*zn2) - (zn2*lv*rhoair*ce*ua*(1.0_rp-rh)*qsat) &
947 + zn2*epsilon*( lw - (sigma*(ta**4))))/ (lambdas + (c2*zn2))
949 if ( debug )
write(70,
'(3f15.5)') zn2, ts_r1, ts_r2
952 zn2 = 1.0_rp + 9.0_rp*0.0001_rp*
real((j-1),kind=
rp)
955 ts_r1 = t0 - (c1*zn1*(t0-ts1) + c3*(zn1-zn2) - gflux*time)/(c1*zn2)
957 ts_r2 = ((lambdas*t0) + (ta*c2*zn2) - (zn2*lv*rhoair*ce*ua*(1.0_rp-rh)*qsat) &
958 + zn2*epsilon*( lw - (sigma*(ta**4))))/ (lambdas + (c2*zn2))
960 if ( debug )
write(70,
'(3f15.5)') zn2, ts_r1, ts_r2
965 b=-1.0_rp * (c1*zn1*(t0-ts1) + c3*zn1 - gflux*time)
969 e=( ta*c2 - (lv*rhoair*ce*ua*(1.0_rp-rh)*qsat) + epsilon*( lw - (sigma*(ta**4))))
970 f=(lambdas + (c2*zn2))
974 open(71,file=
'check_R1-R2-grad'//ttt//
'.dat',status=
'unknown')
975 write(71,
'(5f15.5)') b/c, d,e,lambdas,c2
978 open(70,file=
'check_R1-R2_ts-base'//ttt//
'.dat',status=
'unknown')
980 ts2 = ts0 + 150.0_rp*0.00001_rp*
real((i-1),kind=
rp)
982 zn_r1 = (c1*zn1*(t0-ts1) + c3*zn1 - gflux*time)/(c1*(t0-ts2)+c3)
983 zn_r2 = -1.0_rp*lambdas*(t0-ts2)/(lw*epsilon-epsilon*sigma*(ta**4) - (c2*(ts2-ta)) - (lv*rhoair*ce*ua*(1.0_rp-rh)*qsat))
985 write(70,
'(3f15.5)') ts2, zn_r1, zn_r2
module atmosphere / saturation
integer, public const_i_lw
long-wave radiation index
module coupler / surface-atmospehre
module land / physics / snow / ky90
integer, parameter, public i_r_vis
subroutine cal_r1r2(ZN1, TS1, GFLUX, TA, UA, RH, rhoair, LW, time)
subroutine snow_ky90_main(TSNOW, SWE, DEPTH, ZNSNOW, nosnowsec, ALBEDO_out, Emiss, HFLUX, LATENTFLUX, GFLUX, EvapFLX, QCC, QFUSION, MELT, SWEMELT, Gflux2land, SFLX_SNOW, TA, UA, RH, DENS, SW, LW, time)
snow model main routine
real(rp), parameter, public const_tem00
temperature reference (0C) [K]
integer, public io_fid_conf
Config file ID.
integer, parameter, public n_rad_dir
integer, parameter, public n_rad_rgn
subroutine check_res(ZN1, ZN2, TS1, TS2, GFLUX, TA, UA, RH, rhoair, LW, flag, time)
subroutine recalculatez(ZN1, TS, GFLUX, ZN2, time)
subroutine calculationnomo(GFLUX, CSRHOS, ZN1, TS1, ZN2, TS2, MELT, QCC, QFUSION, time)
subroutine, public land_phy_snow_ky90_setup
Setup.
real(rp), public const_epsvap
Rdry / Rvap.
subroutine calculationmo(GFLUX, CSRHOS, ZN1, TS1, ZN2, TS2, MELT, QCC, QFUSION, time)
subroutine, public prc_abort
Abort Process.
integer, parameter, public i_r_direct
subroutine snowdepth(GFLUX, ZN1, ZN2, time)
subroutine groundflux(TS, TA, UA, RH, rhoair, ALPHA, SW, LW, GFLUX, RFLUX, SFLUX, LINFLUX, LOUTFLUX, HFLUX, LATENTFLUX)
subroutine cal_param(ZN1, TS1, GFLUX, TA, UA, RH, rhoair, LW, time)
integer, parameter, public i_r_nir
integer, public const_i_sw
short-wave radiation index
integer, parameter, public i_r_ir
subroutine, public land_phy_snow_ky90(LIA, LIS, LIE, LJA, LJS, LJE, SFLX_rain, SFLX_snow, PRSA, TA, QA, WA, UA, VA, DENS, SFLX_RAD_dn, LANDUSE_fact_land, dt, TSNOW, SWE, SDepth, SDzero, nosnowsec, Salbedo, SFLX_SH, SFLX_LH, SFLX_GH, SNOW_LAND_GH, SNOW_LAND_Water, SNOW_frac)
Main routine for land submodel.
integer, parameter, public i_r_diffuse
integer, parameter, public rp
subroutine check_applicability(GFLUX, TS1, ZN1, TA, UA, RH, rhoair, LW, GFLUX_res, beta, time)