33 REAL(kind(1d0)),
DIMENSION(5) ::
zibld, &
79 REAL(kind(1d0)),
ALLOCATABLE,
DIMENSION(:, :) ::
tw_4
82 REAL(kind(1d0)),
ALLOCATABLE,
DIMENSION(:, :, :) ::
tw_4_grids
169 REAL(kind(1d0)),
PARAMETER ::
conv = 0.0001
185 ELEMENTAL FUNCTION interp1d(x1, x2, y1, y2, xi)
RESULT(yi)
186 REAL(kind(1d0)),
INTENT(in) :: x1, x2, xi
187 REAL(kind(1d0)),
INTENT(in) :: y1, y2
188 REAL(kind(1d0)) :: b0, b1
189 REAL(kind(1d0)) :: yi
191 b1 = (y2 - y1)/(x2 - x1)
216 REAL(kind(1d0)) :: x0, x, conv
217 REAL(kind(1d0)) :: pcoeff(:)
218 REAL(kind(1d0)) :: e, xprev
219 REAL(kind(1d0)) :: f, fp
222 LOGICAL :: converged = .false.
229 IF (abs(e) < conv)
THEN
235 f = f + pcoeff(j)*x**(n - j)
236 fp = fp + pcoeff(j)*(n - j)*x**(n - j - 1)
241 IF (fp == 0.) fp = tiny(1.)
246 IF (.NOT. converged)
THEN
247 print *,
"Solution did not converge. Niter=", niter,
" Error=", e
264 REAL(kind(1d0)) :: lat, dectime, zmin
265 REAL(kind(1d0)) :: latr, decl
269 decl = 0.409*cos(2*
pi*(dectime - 173)/365.25)
270 zmin =
pi/2.-asin(sin(latr)*sin(decl) - cos(latr)*cos(decl)*(-1))
277 REAL(kind(1d0)) :: lng, dectime, la_time
278 REAL(kind(1d0)) :: gamma, eqtime, lmst
280 lmst = dectime - 4.*lng/60./1440.
281 gamma = 2.*
pi/365.*(lmst - 1.)
282 eqtime = 229.18*(7.5e-5 + 1.868e-3*cos(gamma) - 0.032077*sin(gamma)&
283 & - 0.014615*cos(2.*gamma) - 0.040849*sin(2.*gamma))
284 la_time = lmst + eqtime/1440.
288 SUBROUTINE solar_angles(lat, lng, timezone, dectime, decl, zenith, azimuth)
290 REAL,
INTENT(in) :: lat, lng, timezone, dectime
291 INTEGER :: doy, hour, mn
292 REAL(KIND(1D0)),
INTENT(out) :: decl, zenith, azimuth
293 REAL(KIND(1D0)) :: ha, latr, eqtime, tst, &
298 hour = floor((dectime - doy)*24.)
299 mn = floor((dectime - doy - hour/24.)*60.)
301 gamma = 2.*
pi/365.25463*(doy - 1.+(hour - 12.)/24.)
302 eqtime = 229.18*(7.5e-5 + 1.868e-3*cos(gamma) - 0.032077*sin(gamma)&
303 & - 0.014615*cos(2.*gamma) - 0.040849*sin(2.*gamma))
304 decl = 6.918e-3 - 0.399912*cos(gamma) + 0.070257*sin(gamma)&
305 & - 0.006758*cos(2.*gamma) + 9.07e-4*sin(2.*gamma) - 2.697e-3*cos(3.*gamma)&
306 & + 1.48e-3*sin(3.*gamma)
307 time_offset = eqtime - 4.*lng + 60.*timezone
308 tst = hour*60.+mn + time_offset
312 zenith = acos(sin(latr)*sin(decl) + cos(latr)*cos(decl)*cos(ha))
313 azimuth =
pi + acos((sin(latr)*cos(zenith) - sin(decl))/(cos(latr)*sin(zenith)))
319 SUBROUTINE solar_times(lat, lng, timezone, dectime, sunrise, sunset, snoon)
323 REAL(KIND(1D0)),
INTENT(in) :: lat, lng, timezone, dectime
325 REAL(KIND(1D0)),
INTENT(out) :: sunrise, sunset, snoon
326 REAL(KIND(1D0)) :: ha, latr, eqtime, gamma, zenith, decl
330 gamma = 2.*
pi/365.*(float(doy) - 0.5)
331 eqtime = 229.18*(7.5e-5 + 1.868e-3*cos(gamma) - 0.032077*sin(gamma)&
332 & - 0.014615*cos(2.*gamma) - 0.040849*sin(2.*gamma))
333 decl = 6.918e-3 - 0.399912*cos(gamma) + 0.070257*sin(gamma)&
334 & - 0.006758*cos(2.*gamma) + 9.07e-4*sin(2.*gamma) - 2.697e-3*cos(3.*gamma)&
335 & + 1.48e-3*sin(3.*gamma)
336 ha = acos(cos(zenith)/(cos(latr)*cos(decl)) - tan(latr)*tan(decl))
338 sunrise = (720.-4.*(lng - ha) - eqtime)/60.-timezone
339 sunset = (720.-4.*(lng + ha) - eqtime)/60.-timezone
340 snoon = (720.-4.*lng - eqtime)/60.-timezone
348 REAL(kind(1d0)) :: zenith, isurf
350 REAL(kind(1d0)) :: rmean, rse, cosz, itoa
354 IF (zenith <
pi/2.)
THEN
356 itoa = 1370*(rmean/rse)**2
388 REAL(kind(1d0)) :: p, td, zenith, g, trans
389 REAL(kind(1d0)) :: m, trtpg, u, tw, ta, cosz
390 REAL(kind(1d0)) :: tdf
392 IF (zenith > 80.*
dtr)
THEN
399 m = 35*cosz/sqrt(1224.*cosz*cosz + 1)
400 trtpg = 1.021 - 0.084*sqrt(m*(0.000949*p + 0.051))
401 u = exp(0.113 - log(g + 1) + 0.0393*tdf)
402 tw = 1 - 0.077*(u*m)**0.3
460 REAL(kind(1d0)) :: rse
461 REAL(kind(1d0)) :: ma, nu, e, a
466 ma = 2.*
pi*(doy - 3)/365.25463
467 nu = ma + 0.0333988*sin(ma) + .0003486*sin(2.*ma) + 5e-6*sin(3.*ma)
468 rse = a*(1 - e*e)/(1 + e*cos(nu))
481 REAL(KIND(1D0)),
INTENT(inout) :: T(:)
482 REAL(KIND(1D0)),
INTENT(in) :: dx(:), dt, k(:), rhocp(:), bc(2)
483 REAL(KIND(1D0)),
INTENT(out) :: Qs
484 LOGICAL,
INTENT(in) :: bctype(2)
486 REAL(KIND(1D0)),
ALLOCATABLE :: w(:), a(:), T1(:)
488 ALLOCATE (w(0:n), a(n), t1(n))
491 w(0) = bc(1); w(n) = bc(2)
494 IF (bctype(1)) w(0) = bc(1)*0.5*dx(1)/k(1) + w(1)
495 IF (bctype(2)) w(n) = bc(2)*0.5*dx(n)/k(n) + w(n)
500 w(i) = (t(i + 1)*a(i + 1) + t(i)*a(i))/(a(i) + a(i + 1))
514 *(w(i - 1) - 2*t(i) + w(i)) &
522 qs = (w(0) - t(1))*2*a(1) + (w(n) - t(n))*2*a(n)
529 RECURSIVE SUBROUTINE heatcond1d_ext(T, Qs, Tsfc, dx, dt, k, rhocp, bc, bctype, debug)
530 REAL(kind(1d0)),
INTENT(inout) :: t(:)
531 REAL(kind(1d0)),
INTENT(in) :: dx(:), dt, k(:), rhocp(:), bc(2)
532 REAL(kind(1d0)),
INTENT(out) :: qs, tsfc
533 LOGICAL,
INTENT(in) :: bctype(2)
534 LOGICAL,
INTENT(in) :: debug
536 REAL(kind(1d0)),
ALLOCATABLE :: w(:), a(:), t1(:), cfl(:)
537 REAL(kind(1d0)) :: cfl_max
538 REAL(kind(1d0)),
ALLOCATABLE :: t_in(:), t_out(:)
539 REAL(kind(1d0)) :: dt_x
542 ALLOCATE (w(0:n), a(n), t1(n), cfl(n), t_in(n), t_out(n))
548 w(0) = bc(1); w(n) = bc(2)
551 IF (bctype(1)) w(0) = bc(1)*0.5*dx(1)/k(1) + w(1)
552 IF (bctype(2)) w(n) = bc(2)*0.5*dx(n)/k(n) + w(n)
558 w(i) = (t(i + 1)*a(i + 1) + t(i)*a(i))/(a(i) + a(i + 1))
573 *(w(i - 1) - 2*t(i) + w(i)) &
589 (([bc(1), t_out(1:n - 1)] + t_out)/2. &
590 -([bc(1), t_in(1:n - 1)] + t_in)/2) &
594 cfl = abs((w(0:n - 1) - w(1:n))*k/rhocp/(dx**2)*dt)
595 cfl_max = maxval(cfl)
604 IF (cfl_max > .005 .AND. dt > 1)
THEN
610 print *,
'entering recursion ', cfl_max, dt_x
613 CALL heatcond1d_ext(t, qs, tsfc, dx, dt_x, k, rhocp, bc, bctype, debug)
728 INTEGER,
INTENT(in) :: lunit
730 INTEGER :: iostat_var
731 REAL(KIND(1D0)),
DIMENSION(ncolsESTMdata) :: ESTMArray
732 REAL(KIND(1D0)) :: imin_prev, ih_prev, iday_prev, tstep_estm
743 OPEN (lunit, file=trim(
fileestmts), status=
'old', err=315)
755 READ (lunit, *, iostat=iostat_var) estmarray
759 imin_prev = estmarray(4)
760 ih_prev = estmarray(3)
761 iday_prev = estmarray(2)
763 tstep_estm = ((estmarray(4) + 60*estmarray(3)) - (imin_prev + 60*ih_prev))*60
764 IF (tstep_estm /=
tstep_real .AND. estmarray(2) == iday_prev)
THEN
765 CALL errorhint(39,
'TSTEP in RunControl does not match TSTEP of ESTM data (DOY).', &
766 REAL(tstep, KIND(1D0)), tstep_estm, INT(ESTMArray(2)))
805 OPEN (511, file=trim(
fileinputpath)//
'ESTMinput.nml', status=
'old')
806 READ (511, nml=estminput)
874 INTEGER,
INTENT(IN) :: gridIV
875 INTEGER,
INTENT(IN) :: diagnose
876 LOGICAL,
INTENT(IN) :: MultipleLayoutFiles
877 CHARACTER(len=100) :: FileLayout, str_gridIV
878 INTEGER :: istat, iunit, ERROR_UNIT, i
879 INTEGER :: igroup, ilayer, idepth
880 CHARACTER(len=1000) :: line
881 REAL(KIND(1D0)) :: k, dz
929 IF (multiplelayoutfiles)
THEN
930 CALL writenum(gridiv, str_gridiv,
'i4')
931 filelayout =
'GridLayout'//trim(
filecode)//trim(str_gridiv)//
'.nml'
933 filelayout =
'GridLayout'//trim(
filecode)//
'.nml'
936 IF (diagnose == 1) print *,
'Reading layout file: ', trim(
fileinputpath)//filelayout
938 OPEN (iunit, file=trim(
fileinputpath)//trim(filelayout), status=
'old')
939 IF (diagnose == 1) print *,
'Read dim info of GridLayout'
940 READ (iunit, nml=dim, iostat=istat)
941 IF (diagnose == 1) print *,
'Number of layers to read: ',
nlayer
945 READ (iunit, fmt=
'(A)') line
947 WRITE (error_unit,
'(A)') &
948 'Invalid line in namelist: '//trim(line)
991 OPEN (iunit, file=trim(
fileinputpath)//trim(filelayout), status=
'old')
992 IF (diagnose == 1) print *,
'Read geometry part of GridLayout'
993 READ (iunit, nml=geom, iostat=istat)
994 IF (diagnose == 1) print *,
'height',
height
996 IF (diagnose == 1) print *,
'veg_frac',
veg_frac
998 IF (diagnose == 1) print *,
'veg_scale',
veg_scale
1000 IF (diagnose == 1) print *,
'Read roof part of GridLayout'
1001 READ (iunit, nml=roof, iostat=istat)
1002 IF (diagnose == 1) print *,
'sfr_roof',
sfr_roof
1003 IF (diagnose == 1) print *,
'dz_roof',
dz_roof
1004 IF (diagnose == 1) print *,
'k_roof',
k_roof
1005 IF (diagnose == 1) print *,
'cp_roof',
cp_roof
1006 IF (diagnose == 1) print *,
'tin_roof',
tin_roof
1007 IF (diagnose == 1) print *,
'alb_roof',
alb_roof
1008 IF (diagnose == 1) print *,
'emis_roof',
emis_roof
1009 IF (diagnose == 1) print *,
'state_roof',
state_roof
1015 IF (diagnose == 1) print *,
'Read wall part of GridLayout'
1016 READ (iunit, nml=wall, iostat=istat)
1017 IF (diagnose == 1) print *,
'sfr_wall',
sfr_wall
1018 IF (diagnose == 1) print *,
'dz_wall',
dz_wall
1019 IF (diagnose == 1) print *,
'k_wall',
k_wall
1020 IF (diagnose == 1) print *,
'cp_wall',
cp_wall
1021 IF (diagnose == 1) print *,
'tin_wall',
tin_wall
1022 IF (diagnose == 1) print *,
'alb_wall',
alb_wall
1023 IF (diagnose == 1) print *,
'emis_wall',
emis_wall
1024 IF (diagnose == 1) print *,
'state_wall',
state_wall
1031 READ (iunit, nml=surf, iostat=istat)
1032 IF (istat /= 0)
THEN
1034 READ (iunit, fmt=
'(A)') line
1036 WRITE (error_unit,
'(A)') &
1037 'Invalid line in namelist: '//trim(line)
1041 IF (diagnose == 1) print *,
'Read GridLayout'
1042 IF (diagnose == 1) print *,
'sfr_roof in load_GridLayout',
sfr_roof
1043 IF (diagnose == 1) print *,
'sfr_wall in load_GridLayout',
sfr_wall
1044 IF (diagnose == 1) print *,
'tin_surf in load_GridLayout',
tin_surf
1045 IF (diagnose == 1) print *,
'dz_surf(1,:) in load_GridLayout',
dz_surf(1, :)
1046 IF (diagnose == 1) print *,
'k_surf(1,:) in load_GridLayout',
k_surf(1, :)
1213 LOGICAL :: flag_mutiple_layout_files
1217 flag_mutiple_layout_files = .false.
1219 flag_mutiple_layout_files = .true.
1273 print *,
'Reading layout data for grid ', i_grid
1344 REAL(KIND(1D0)) :: W, WB
1348 INTEGER :: ESTMStart = 0
1354 IF (gridiv == 1) estmstart = estmstart + 1
1356 IF (estmstart == 1)
THEN
1393 IF (.NOT.
ALLOCATED(
tibld))
THEN
1466 IF (
froof < 1.0)
THEN
1473 hw = max(0.00001,
hw)
1534 IF (
nroom == 0)
THEN
1558 print *,
"At least one internal view factor <> 1. Check ivf in ESTMinput.nml"
1599 IF (estmstart == 1)
THEN
1670 avkdn, avu1, temp_c, zenith_deg, avrh, press_hpa, ldown, &
1671 bldgh, Ts5mindata_ir, &
1673 dataOutLineESTM, QS)
1820 INTEGER,
PARAMETER :: ncolsESTMdata = 13
1822 INTEGER,
PARAMETER :: cTs_Tiair = 5
1823 INTEGER,
PARAMETER :: cTs_Tsurf = 6
1824 INTEGER,
PARAMETER :: cTs_Troof = 7
1825 INTEGER,
PARAMETER :: cTs_Troad = 8
1826 INTEGER,
PARAMETER :: cTs_Twall = 9
1827 INTEGER,
PARAMETER :: cTs_Twall_n = 10
1828 INTEGER,
PARAMETER :: cTs_Twall_e = 11
1829 INTEGER,
PARAMETER :: cTs_Twall_s = 12
1830 INTEGER,
PARAMETER :: cTs_Twall_w = 13
1831 REAL(KIND(1D0)),
PARAMETER :: NAN = -999
1833 INTEGER,
INTENT(in) :: Gridiv
1834 INTEGER,
INTENT(in) :: tstep
1840 REAL(KIND(1D0)),
INTENT(in) :: avkdn
1841 REAL(KIND(1D0)),
INTENT(in) :: avu1
1842 REAL(KIND(1D0)),
INTENT(in) :: temp_c
1843 REAL(KIND(1D0)),
INTENT(in) :: zenith_deg
1844 REAL(KIND(1D0)),
INTENT(in) :: avrh
1845 REAL(KIND(1D0)),
INTENT(in) :: press_hpa
1846 REAL(KIND(1D0)),
INTENT(in) :: ldown
1847 REAL(KIND(1D0)),
INTENT(in) :: bldgh
1849 REAL(KIND(1D0)),
DIMENSION(ncolsESTMdata),
INTENT(in) :: Ts5mindata_ir
1850 REAL(KIND(1D0)),
INTENT(in) :: Tair_av
1852 REAL(KIND(1D0)),
DIMENSION(27),
INTENT(out) :: dataOutLineESTM
1854 REAL(KIND(1D0)),
INTENT(out) :: QS
1859 INTEGER :: Tair2Set = 0
1860 REAL(KIND(1D0)) :: AIREXHR, AIREXDT
1861 REAL(KIND(1D0)),
DIMENSION(2) :: bc
1862 REAL(KIND(1D0)) :: chair_ground, chair_wall
1863 REAL(KIND(1D0)) :: EM_EQUIV
1864 REAL(KIND(1D0)) :: kdz
1865 REAL(KIND(1D0)) :: kup_estm, LUP_net, kdn_estm
1866 REAL(KIND(1D0)) :: QHestm
1867 REAL(KIND(1D0)) :: QFBld
1868 REAL(KIND(1D0)) :: shc_airbld
1869 REAL(KIND(1D0)) :: sw_hor, sw_vert
1870 REAL(KIND(1D0)) :: T0
1871 REAL(KIND(1D0)) :: Tinternal, Tsurf_all, Troof_in, Troad, Twall_all, Tw_n, Tw_e, Tw_s, Tw_w
1872 REAL(KIND(1D0)) :: Twallout(5), Troofout(5), Tibldout(5), Tgroundout(5)
1873 REAL(KIND(1D0)) :: Tadd, Tveg
1874 REAL(KIND(1D0)) :: Tairmix
1875 REAL(KIND(1D0)) :: RN
1876 REAL(KIND(1D0)) :: Rs_roof, Rl_roof, RN_ROOF
1877 REAL(KIND(1D0)) :: Rs_wall, Rl_wall, RN_WALL
1878 REAL(KIND(1D0)) :: Rs_ground, Rl_ground, RN_ground
1879 REAL(KIND(1D0)) :: Rs_ibld, Rl_ibld
1880 REAL(KIND(1D0)) :: Rs_iroof, Rl_iroof
1881 REAL(KIND(1D0)) :: Rs_iwall, Rl_iwall
1882 REAL(KIND(1D0)) :: zenith_rad
1883 REAL(KIND(1D0)) :: dum(50)
1884 REAL(KIND(1D0)) :: bldgHX
1885 REAL(KIND(1D0)),
PARAMETER :: WSmin = 0.1
1886 LOGICAL :: radforce, groundradforce
1889 groundradforce = .false.
1891 bldghx = max(bldgh, 0.001)
1899 dum = [(-999, i=1, 50)]
1904 chair_ground =
chair
1910 IF (
ws < wsmin)
ws = wsmin
1913 IF (gridiv == 1) tair2set = tair2set + 1
1914 IF (tair2set == 1)
THEN
1948 tinternal = ts5mindata_ir(cts_tiair)
1949 tsurf_all = ts5mindata_ir(cts_tsurf)
1950 troof_in = ts5mindata_ir(cts_troof)
1951 troad = ts5mindata_ir(cts_troad)
1952 twall_all = ts5mindata_ir(cts_twall)
1954 tw_n = ts5mindata_ir(cts_twall_n)
1955 tw_e = ts5mindata_ir(cts_twall_e)
1956 tw_s = ts5mindata_ir(cts_twall_s)
1957 tw_w = ts5mindata_ir(cts_twall_w)
1990 zenith_rad = zenith_deg/180*pi
1991 IF (zenith_rad > 0 .AND. zenith_rad < pi/2.-
hw)
THEN
2021 ELSEIF (tair_av < 17.+
c2k .OR.
hvac)
THEN
2027 airexdt = airexhr*(tstep/3600.0)
2064 IF (kdn_estm < 0) kdn_estm = 0.
2094 IF (kdn_estm > 10 .AND. kup_estm > 0)
THEN
2131 REAL(Tstep, KIND(1D0)), kibld(1:Ndepth_ibld), &
2132 ribld(1:Ndepth_ibld), bc, bctype)
2200 IF (radforce .OR. groundradforce)
THEN
2216 REAL(Tstep, KIND(1D0)), kground(1:Ndepth_ground), rground(1:Ndepth_ground), bc, bctype)
2241 em_equiv = lup_net/(
sbconst*t0**4)
2242 rn_ground = rs_ground + rl_ground -
lup_ground
2243 rn_roof = rs_roof + rl_roof -
lup_roof
2245 rn = kdn_estm - kup_estm + ldown*em_equiv - lup_net
2264 IF (ndepth_ground < 5)
THEN
2265 tgroundout = (/
tground, (dum(ii), ii=1, (5 - ndepth_ground))/)
2270 IF (ndepth_ibld < 5)
THEN
2271 tibldout = (/
tibld, (dum(ii), ii=1, (5 - ndepth_ibld))/)
2280 dataoutlineestm = [ &
2282 twallout, troofout, tgroundout, tibldout,
tievolve]
2284 dataoutlineestm =
set_nan(dataoutlineestm)
2665 REAL(kind(1d0)),
PARAMETER :: pnan = 9999
2666 REAL(kind(1d0)),
PARAMETER :: nan = -999
2667 REAL(kind(1d0)),
INTENT(in) :: x
2668 REAL(kind(1d0)) :: xx
2670 IF (abs(x) > pnan)
THEN
real(kind(1d0)), dimension(:), allocatable statelimit_wall
integer, parameter bldgsurf
real(kind(1d0)), dimension(:, :), allocatable tsfc_wall_grids
real(kind(1d0)), dimension(:, :), allocatable soilstorecap_wall_grids
real(kind(1d0)), dimension(:, :), allocatable dz_wall
real(kind(1d0)), dimension(:, :), allocatable ts5mindata
real(kind(1d0)), dimension(:, :), allocatable soilstore_wall_grids
real(kind(1d0)), dimension(:, :), allocatable tin_surf_grids
integer, parameter ncolsestmdata
integer, parameter conifsurf
real(kind(1d0)), dimension(:, :, :), allocatable cp_wall_grids
real(kind(1d0)), dimension(:, :), allocatable emis_wall_grids
real(kind(1d0)), dimension(:), allocatable soilstorecap_wall
integer, parameter cts_twall
real(kind(1d0)), dimension(:), allocatable alb_roof
real(kind(1d0)), dimension(:, :, :), allocatable temp_surf_grids
real(kind(1d0)), dimension(:), allocatable state_wall
real(kind(1d0)), dimension(:, :), allocatable tin_roof_grids
real(kind(1d0)), dimension(:, :), allocatable building_frac_grids
real(kind(1d0)), dimension(:, :, :), allocatable temp_wall_grids
real(kind(1d0)), dimension(:, :), allocatable tin_wall_grids
real(kind(1d0)), dimension(:), allocatable wetthresh_wall
real(kind(1d0)), dimension(:), allocatable state_roof
real(kind(1d0)), dimension(:, :), allocatable tsfc_roof_grids
real(kind(1d0)), dimension(:, :), allocatable dz_surf
integer, parameter cts_troad
real(kind(1d0)), dimension(nsurf) sfr_surf
integer, dimension(:), allocatable nlayer_grids
real(kind(1d0)), dimension(:, :), allocatable alb_wall_grids
real(kind(1d0)), dimension(:, :, :), allocatable cp_surf_grids
real(kind(1d0)), dimension(:), allocatable sfr_roof
real(kind(1d0)), dimension(nsurf) emis
real(kind(1d0)), dimension(:, :, :), allocatable wall_specular_frac_grids
real(kind(1d0)), dimension(:, :), allocatable alb_roof_grids
real(kind(1d0)), dimension(:, :, :), allocatable k_wall_grids
real(kind(1d0)), dimension(:, :), allocatable emis_roof_grids
real(kind(1d0)), dimension(:), allocatable building_scale
real(kind(1d0)), dimension(:, :, :), allocatable temp_roof_grids
real(kind(1d0)), dimension(:), allocatable soilstore_roof
real(kind(1d0)), dimension(:, :, :), allocatable cp_roof_grids
real(kind(1d0)), dimension(:, :), allocatable sfr_wall_grids
real(kind(1d0)), dimension(:, :), allocatable state_wall_grids
real(kind(1d0)), dimension(:, :), allocatable building_scale_grids
real(kind(1d0)), dimension(:, :, :), allocatable dz_surf_grids
real(kind(1d0)), dimension(:), allocatable height
real(kind(1d0)), dimension(:, :), allocatable cp_wall
real(kind(1d0)), dimension(:), allocatable tair24hr
real(kind(1d0)), dimension(:, :), allocatable soilstore_roof_grids
real(kind(1d0)), dimension(:), allocatable emis_roof
real(kind(1d0)), dimension(:, :), allocatable cp_surf
real(kind(1d0)), dimension(:, :, :), allocatable k_roof_grids
real(kind(1d0)), dimension(:, :), allocatable k_roof
real(kind(1d0)), dimension(:), allocatable wetthresh_roof
real(kind(1d0)), dimension(:), allocatable soilstorecap_roof
real(kind(1d0)), dimension(:), allocatable veg_frac
real(kind(1d0)), dimension(:, :), allocatable k_surf
real(kind(1d0)), dimension(:, :), allocatable statelimit_wall_grids
real(kind(1d0)), dimension(:, :), allocatable wetthresh_roof_grids
real(kind(1d0)), dimension(:, :), allocatable roof_albedo_dir_mult_fact
real(kind(1d0)), dimension(:, :), allocatable soilstorecap_roof_grids
real(kind(1d0)), dimension(:), allocatable tin_surf
integer, parameter watersurf
real(kind(1d0)), dimension(:), allocatable tin_wall
integer, parameter grasssurf
real(kind(1d0)), dimension(:, :, :), allocatable dz_roof_grids
real(kind(1d0)), dimension(:), allocatable statelimit_roof
real(kind(1d0)), dimension(:), allocatable alb_wall
real(kind(1d0)), dimension(:, :, :), allocatable roof_albedo_dir_mult_fact_grids
real(kind(1d0)), dimension(:, :), allocatable wall_specular_frac
real(kind(1d0)), dimension(:, :), allocatable height_grids
real(kind(1d0)), dimension(:, :), allocatable veg_scale_grids
real(kind(1d0)), dimension(:, :), allocatable dz_roof
real(kind(1d0)), dimension(:, :, :), allocatable k_surf_grids
integer, parameter bsoilsurf
real(kind(1d0)), dimension(:), allocatable emis_wall
integer, parameter pavsurf
real(kind(1d0)), dimension(:, :), allocatable cp_roof
real(kind(1d0)), dimension(nsurf) alb
real(kind(1d0)), dimension(:), allocatable building_frac
integer, parameter ndepth
real(kind(1d0)), dimension(:, :), allocatable veg_frac_grids
real(kind(1d0)), dimension(:, :), allocatable state_roof_grids
real(kind(1d0)), dimension(:, :), allocatable statelimit_roof_grids
real(kind(1d0)), dimension(:, :), allocatable sfr_roof_grids
integer, parameter cts_tiair
real(kind(1d0)), dimension(:, :, :), allocatable dz_wall_grids
real(kind(1d0)), dimension(:, :), allocatable k_wall
real(kind(1d0)), dimension(:, :, :), allocatable estmforcingdata
real(kind(1d0)), dimension(:), allocatable sfr_wall
integer, parameter nlayer_max
real(kind(1d0)), dimension(:), allocatable veg_scale
real(kind(1d0)), dimension(:, :), allocatable wetthresh_wall_grids
real(kind(1d0)), dimension(:), allocatable tin_roof
real(kind(1d0)), dimension(:), allocatable soilstore_wall
integer, parameter decidsurf
integer, parameter cts_troof
character(len=20) filecode
character(len=150) fileestmts
integer multiplelayoutfiles
character(len=150) fileinputpath
real(kind(1d0)), dimension(:), allocatable lup_roof_grids
real(kind(1d0)), dimension(5, 3) rsurf_paved
real(kind(1d0)), dimension(5) em_ibld_bldgs
real(kind(1d0)) theat_fix
real(kind(1d0)), dimension(:), allocatable t0_wall_grids
real(kind(1d0)), dimension(5) zground
real(kind(1d0)) em_roof_estm
real(kind(1d0)), dimension(5, 5) ribld_bldgs
real(kind(1d0)), dimension(:), allocatable t0_ground_grids
real(kind(1d0)), dimension(5, 5) kibld_bldgs
real(kind(1d0)), dimension(5, 5) rwall_bldgs
real(kind(1d0)) theat_off
real(kind(1d0)) lup_ground
real(kind(1d0)) t0_ground
real(kind(1d0)), dimension(:), allocatable tground
real(kind(1d0)) zvf_ground
real(kind(1d0)), dimension(5) alb_ibld_bldgs
real(kind(1d0)), dimension(5, 3) zsurf_paved
real(kind(1d0)) minshc_airbld
real(kind(1d0)), dimension(5) kwall
real(kind(1d0)) alb_ground_estm
real(kind(1d0)), dimension(:), allocatable twall
real(kind(1d0)), dimension(5) kroof
real(kind(1d0)), dimension(5) kground
real(kind(1d0)) alb_veg_estm
real(kind(1d0)), dimension(:), allocatable tn_wall_grids
real(kind(1d0)), dimension(5) zibld
real(kind(1d0)), dimension(5, 5) zibld_bldgs
real(kind(1d0)), dimension(:), allocatable troof
real(kind(1d0)), dimension(4) qs_4
real(kind(1d0)) tanzenith
real(kind(1d0)), dimension(5) ch_iwall_bldgs
real(kind(1d0)), dimension(:), allocatable t0_ibld_grids
real(kind(1d0)), dimension(:), allocatable tair2_grids
real(kind(1d0)), dimension(5, 5) kwall_bldgs
real(kind(1d0)), dimension(5) rwall
real(kind(1d0)), dimension(:), allocatable t0_roof_grids
real(kind(1d0)), dimension(5) ch_iroof_bldgs
real(kind(1d0)), dimension(:, :), allocatable tw_4
real(kind(1d0)), dimension(5) pcoeff
real(kind(1d0)), dimension(5, 5) zwall_bldgs
real(kind(1d0)), dimension(5) estmsfr_bldgs
real(kind(1d0)) alb_roof_estm
real(kind(1d0)), dimension(5, 5) rsurf_bldgs
real(kind(1d0)) rvf_ground
real(kind(1d0)), dimension(:, :, :), allocatable tw_4_grids
real(kind(1d0)), dimension(:), allocatable lup_ground_grids
real(kind(1d0)), dimension(:, :), allocatable twall_grids
real(kind(1d0)), dimension(5) rroof
real(kind(1d0)), dimension(:), allocatable lup_wall_grids
real(kind(1d0)), dimension(5, 3) ksurf_paved
real(kind(1d0)) finternal
real(kind(1d0)), dimension(5, 5) ksurf_bldgs
real(kind(1d0)), dimension(:), allocatable tibld
real(kind(1d0)), dimension(:), allocatable tn_roof_grids
real(kind(1d0)), parameter alb_wall_fix
real(kind(1d0)), dimension(5) kibld
real(kind(1d0)) em_veg_estm
real(kind(1d0)) em_ground_estm
real(kind(1d0)), parameter em_wall_fix
real(kind(1d0)), dimension(5) zwall
real(kind(1d0)), dimension(:, :), allocatable tibld_grids
real(kind(1d0)), parameter conv
real(kind(1d0)), dimension(5, 5) zsurf_bldgs
real(kind(1d0)), dimension(3) estmsfr_paved
real(kind(1d0)), dimension(:, :), allocatable troof_grids
real(kind(1d0)), dimension(5) rground
real(kind(1d0)), dimension(:), allocatable tievolve_grids
real(kind(1d0)), dimension(5) nroom_bldgs
real(kind(1d0)) rvf_canyon
real(kind(1d0)), dimension(5) ribld
real(kind(1d0)), dimension(5) ch_ibld_bldgs
integer, parameter maxiter
real(kind(1d0)), dimension(5) zroof
logical, dimension(2) bctype
real(kind(1d0)) svf_ground
real(kind(1d0)), dimension(:, :), allocatable tground_grids
subroutine estm_ehc_finalise
subroutine suews_getestmdata(lunit)
elemental real(kind(1d0)) function set_nan(x)
subroutine estm_ehc_initialise
subroutine estm_translate(gridiv)
subroutine estm(gridiv, tstep, avkdn, avu1, temp_c, zenith_deg, avrh, press_hpa, ldown, bldgh, ts5mindata_ir, tair_av, dataoutlineestm, qs)
subroutine load_gridlayout(gridiv, multiplelayoutfiles, diagnose)
subroutine heatcond1d(t, qs, dx, dt, k, rhocp, bc, bctype)
recursive subroutine heatcond1d_ext(t, qs, tsfc, dx, dt, k, rhocp, bc, bctype, debug)
real(kind(1d0)), parameter dtr
real(kind(1d0)), parameter pi
real(kind(1d0)), parameter rtd
real(kind(1d0)) function heatcapacity_air(tk, rh, p)
elemental real(kind(1d0)) function interp1d(x1, x2, y1, y2, xi)
real(kind(1d0)) function newtonpolynomial(x0, pcoeff, conv, maxiter)
real(kind(1d0)) function min_zenith(lat, doy)
subroutine solar_times(lat, lng, timezone, dectime, sunrise, sunset, snoon)
real(kind(1d0)) function local_apparent_time(lng, dectime)
subroutine solar_angles(lat, lng, timezone, dectime, decl, zenith, azimuth)
real(kind(1d0)) function transmissivity_cd(p, td, g, zenith)
real(kind(1d0)) function solar_esdist(doy)
real(kind(1d0)) function kdown_surface(doy, zenith)
real(kind(1d0)), parameter c2k
real(kind(1d0)), parameter sbconst
real(kind(1d0)) tstep_real
subroutine errorhint(errh, problemfile, value, value2, valuei)