SUEWS API Site
Documentation of SUEWS source code
Functions/Subroutines
sumin_module Module Reference

Functions/Subroutines

subroutine sumin (snowuse, emissionsmethod, netradiationmethod, roughlenheatmethod, roughlenmommethod, storageheatmethod, aerodynamicresistancemethod, laitype, snowpacklimit, ohm_threshsw, ohm_threshwd, th, tl, kmax, g1, g2, g3, g4, g5, g6, s1, s2, laipower, crwmax, crwmin, preciplimit, preciplimitalb, radmeltfact, snowalbmax, snowalbmin, snowdensmax, snowdensmin, snowlimbldg, snowlimpaved, tau_a, tau_f, tau_r, tempmeltfact, ohmincqf, iy, id, it, imin, isec, dt_since_start, tstep, tstep_prev, startdls, enddls, alt, lat, lng, z, timezone, surfacearea, sfr_surf, z0m_in, zdm_in, alb, emis, snowalb, ohm_coef, waterdist, ahprof_24hr, humactivity_24hr, popprof_24hr, traffprof_24hr, wuprofa_24hr, wuprofm_24hr, snowprof_24hr, qn_av, dqndt, qn_s_av, dqnsdt, surf_var_id, decidcap_id, albdectr_id, albevetr_id, albgrass_id, numcapita_id, baset_id, basete_id, gddfull_id, sddfull_id, laimin_id, laimax_id, maxconductance_id, faibldg_id, faievetree_id, faidectree_id, bldgh_id, evetreeh_id, dectreeh_id, ah_min_id, ah_slope_cooling_id, ah_slope_heating_id, qf0_beu_id, qf_a_id, qf_b_id, qf_c_id, t_critic_cooling_id, t_critic_heating_id, trafficrate_id, surf_attr_minstorcap_id, surf_attr_drainequat_id, surf_attr_draincoef1_id, surf_attr_draincoef2_id, surf_attr_maxstorcap_id, soilstorecap_id, soildepth_id, sathydraulicconduct_id, albmin_dectr_id, albmax_dectr_id, albmin_evetr_id, albmax_evetr_id, albmin_grass_id, albmax_grass_id, capmin_dec_id, capmax_dec_id, pormin_dec_id, pormax_dec_id, drainrt_id, raincover_id, rainmaxres_id, flowchange_id, pipecapacity_id, runofftowater_id, statelimit_id, wetthresh_id, baset_hc_id, faut_id, irrfracconif_id, irrfracdecid_id, irrfracgrass_id, daywat_id, daywatper_id, popdensdaytime_id, popdensnighttime_id, porosity_id, gdd_id, hdd_id, lai_id, wuday_id, soilstore_id, state_id, snowwater, avkdn, avrh, avu1, press_hpa, temp_c, precip, qn, qf, qs, qh, qe, qsfc, tsk, chklowq, kdown_o, kup_o, ldown_o, lup_o, tsurf_o, smd_o, glw1d, cldfra1d)
 

Function/Subroutine Documentation

◆ sumin()

subroutine sumin_module::sumin ( integer, intent(in) snowuse,
integer, intent(in) emissionsmethod,
integer, intent(in) netradiationmethod,
integer, intent(in) roughlenheatmethod,
integer, intent(in) roughlenmommethod,
integer, intent(in) storageheatmethod,
integer, intent(in) aerodynamicresistancemethod,
integer, dimension(3), intent(in) laitype,
real(kind(1d0)), dimension(7 + 1), intent(in) snowpacklimit,
real(kind(1d0)), dimension(7 + 1), intent(in) ohm_threshsw,
real(kind(1d0)), dimension(7 + 1), intent(in) ohm_threshwd,
real(kind(1d0)), intent(in) th,
real(kind(1d0)), intent(in) tl,
real(kind(1d0)), intent(in) kmax,
real(kind(1d0)), intent(in) g1,
real(kind(1d0)), intent(in) g2,
real(kind(1d0)), intent(in) g3,
real(kind(1d0)), intent(in) g4,
real(kind(1d0)), intent(in) g5,
real(kind(1d0)), intent(in) g6,
real(kind(1d0)), intent(in) s1,
real(kind(1d0)), intent(in) s2,
real(kind(1d0)), dimension(4, 3), intent(in) laipower,
real(kind(1d0)), intent(in) crwmax,
real(kind(1d0)), intent(in) crwmin,
real(kind(1d0)), intent(in) preciplimit,
real(kind(1d0)), intent(in) preciplimitalb,
real(kind(1d0)), intent(in) radmeltfact,
real(kind(1d0)), intent(in) snowalbmax,
real(kind(1d0)), intent(in) snowalbmin,
real(kind(1d0)), intent(in) snowdensmax,
real(kind(1d0)), intent(in) snowdensmin,
real(kind(1d0)), intent(in) snowlimbldg,
real(kind(1d0)), intent(in) snowlimpaved,
real(kind(1d0)), intent(in) tau_a,
real(kind(1d0)), intent(in) tau_f,
real(kind(1d0)), intent(in) tau_r,
real(kind(1d0)), intent(in) tempmeltfact,
integer, intent(in) ohmincqf,
integer, intent(in) iy,
integer, intent(in) id,
integer, intent(in) it,
integer, intent(in) imin,
integer, intent(in) isec,
integer, intent(in) dt_since_start,
integer, intent(in) tstep,
integer, intent(in) tstep_prev,
integer, intent(in) startdls,
integer, intent(in) enddls,
real(kind(1d0)), intent(in) alt,
real(kind(1d0)), intent(in) lat,
real(kind(1d0)), intent(in) lng,
real(kind(1d0)), intent(in) z,
real(kind(1d0)), intent(in) timezone,
real(kind(1d0)), intent(in) surfacearea,
real(kind(1d0)), dimension(7), intent(in) sfr_surf,
real(kind(1d0)), intent(in) z0m_in,
real(kind(1d0)), intent(in) zdm_in,
real(kind(1d0)), dimension(7), intent(inout) alb,
real(kind(1d0)), dimension(7), intent(in) emis,
real(kind(1d0)), intent(inout) snowalb,
real(kind(1d0)), dimension(7 + 1, 4, 3), intent(in) ohm_coef,
real(kind(1d0)), dimension(7 + 1, 7 - 1), intent(in) waterdist,
real(kind(1d0)), dimension(0:23, 2), intent(in) ahprof_24hr,
real(kind(1d0)), dimension(0:23, 2), intent(in) humactivity_24hr,
real(kind(1d0)), dimension(0:23, 2), intent(in) popprof_24hr,
real(kind(1d0)), dimension(0:23, 2), intent(in) traffprof_24hr,
real(kind(1d0)), dimension(0:23, 2), intent(in) wuprofa_24hr,
real(kind(1d0)), dimension(0:23, 2), intent(in) wuprofm_24hr,
real(kind(1d0)), dimension(0:23, 2), intent(in) snowprof_24hr,
real(kind(1d0)), intent(inout) qn_av,
real(kind(1d0)), intent(inout) dqndt,
real(kind(1d0)), intent(inout) qn_s_av,
real(kind(1d0)), intent(inout) dqnsdt,
real(kind(1d0)), dimension(7), intent(inout) surf_var_id,
real(kind(1d0)), intent(inout) decidcap_id,
real(kind(1d0)), intent(inout) albdectr_id,
real(kind(1d0)), intent(inout) albevetr_id,
real(kind(1d0)), intent(inout) albgrass_id,
real(kind(1d0)), intent(inout) numcapita_id,
real(kind(1d0)), dimension(3), intent(inout) baset_id,
real(kind(1d0)), dimension(3), intent(inout) basete_id,
real(kind(1d0)), dimension(3), intent(inout) gddfull_id,
real(kind(1d0)), dimension(3), intent(inout) sddfull_id,
real(kind(1d0)), dimension(3), intent(inout) laimin_id,
real(kind(1d0)), dimension(3), intent(inout) laimax_id,
real(kind(1d0)), dimension(3), intent(inout) maxconductance_id,
real(kind(1d0)), intent(inout) faibldg_id,
real(kind(1d0)), intent(inout) faievetree_id,
real(kind(1d0)), intent(inout) faidectree_id,
real(kind(1d0)), intent(inout) bldgh_id,
real(kind(1d0)), intent(inout) evetreeh_id,
real(kind(1d0)), intent(inout) dectreeh_id,
real(kind(1d0)), dimension(2), intent(inout) ah_min_id,
real(kind(1d0)), dimension(2), intent(inout) ah_slope_cooling_id,
real(kind(1d0)), dimension(2), intent(inout) ah_slope_heating_id,
real(kind(1d0)), dimension(2), intent(inout) qf0_beu_id,
real(kind(1d0)), dimension(2), intent(inout) qf_a_id,
real(kind(1d0)), dimension(2), intent(inout) qf_b_id,
real(kind(1d0)), dimension(2), intent(inout) qf_c_id,
real(kind(1d0)), dimension(2), intent(inout) t_critic_cooling_id,
real(kind(1d0)), dimension(2), intent(inout) t_critic_heating_id,
real(kind(1d0)), dimension(2), intent(inout) trafficrate_id,
real(kind(1d0)), dimension(7), intent(inout) surf_attr_minstorcap_id,
real(kind(1d0)), dimension(7), intent(inout) surf_attr_drainequat_id,
real(kind(1d0)), dimension(7), intent(inout) surf_attr_draincoef1_id,
real(kind(1d0)), dimension(7), intent(inout) surf_attr_draincoef2_id,
real(kind(1d0)), dimension(7), intent(inout) surf_attr_maxstorcap_id,
real(kind(1d0)), dimension(7), intent(inout) soilstorecap_id,
real(kind(1d0)), dimension(7), intent(inout) soildepth_id,
real(kind(1d0)), dimension(7), intent(inout) sathydraulicconduct_id,
real(kind(1d0)), intent(inout) albmin_dectr_id,
real(kind(1d0)), intent(inout) albmax_dectr_id,
real(kind(1d0)), intent(inout) albmin_evetr_id,
real(kind(1d0)), intent(inout) albmax_evetr_id,
real(kind(1d0)), intent(inout) albmin_grass_id,
real(kind(1d0)), intent(inout) albmax_grass_id,
real(kind(1d0)), intent(inout) capmin_dec_id,
real(kind(1d0)), intent(inout) capmax_dec_id,
real(kind(1d0)), intent(inout) pormin_dec_id,
real(kind(1d0)), intent(inout) pormax_dec_id,
real(kind(1d0)), intent(inout) drainrt_id,
real(kind(1d0)), intent(inout) raincover_id,
real(kind(1d0)), intent(inout) rainmaxres_id,
real(kind(1d0)), intent(inout) flowchange_id,
real(kind(1d0)), intent(inout) pipecapacity_id,
real(kind(1d0)), intent(inout) runofftowater_id,
real(kind(1d0)), dimension(7), intent(inout) statelimit_id,
real(kind(1d0)), dimension(7), intent(inout) wetthresh_id,
real(kind(1d0)), intent(inout) baset_hc_id,
real(kind(1d0)), intent(inout) faut_id,
real(kind(1d0)), intent(inout) irrfracconif_id,
real(kind(1d0)), intent(inout) irrfracdecid_id,
real(kind(1d0)), intent(inout) irrfracgrass_id,
real(kind(1d0)), dimension(7), intent(inout) daywat_id,
real(kind(1d0)), dimension(7), intent(inout) daywatper_id,
real(kind(1d0)), intent(inout) popdensdaytime_id,
real(kind(1d0)), intent(inout) popdensnighttime_id,
real(kind(1d0)), intent(inout) porosity_id,
real(kind(1d0)), dimension(5), intent(inout) gdd_id,
real(kind(1d0)), dimension(12), intent(inout) hdd_id,
real(kind(1d0)), dimension(3), intent(inout) lai_id,
real(kind(1d0)), dimension(9), intent(inout) wuday_id,
real(kind(1d0)), dimension(7), intent(inout) soilstore_id,
real(kind(1d0)), dimension(7), intent(inout) state_id,
real(kind(1d0)), dimension(7), intent(inout) snowwater,
real(kind(1d0)), intent(in) avkdn,
real(kind(1d0)), intent(in) avrh,
real(kind(1d0)), intent(in) avu1,
real(kind(1d0)), intent(in) press_hpa,
real(kind(1d0)), intent(in) temp_c,
real(kind(1d0)), intent(in) precip,
real(kind(1d0)), intent(out) qn,
real(kind(1d0)), intent(out) qf,
real(kind(1d0)), intent(out) qs,
real(kind(1d0)), intent(out) qh,
real(kind(1d0)), intent(out) qe,
real(kind(1d0)), intent(out) qsfc,
real(kind(1d0)), intent(out) tsk,
real(kind(1d0)), intent(out) chklowq,
real(kind(1d0)), intent(out) kdown_o,
real(kind(1d0)), intent(out) kup_o,
real(kind(1d0)), intent(out) ldown_o,
real(kind(1d0)), intent(out) lup_o,
real(kind(1d0)), intent(out) tsurf_o,
real(kind(1d0)), intent(out) smd_o,
real(kind(1d0)), intent(in) glw1d,
real(kind(1d0)), intent(in) cldfra1d )

Definition at line 18 of file suews_ctrl_sumin.f95.

112
113 ! model configurations
114 INTEGER, INTENT(in) :: SnowUse
115 INTEGER, INTENT(in) :: EmissionsMethod
116 INTEGER, INTENT(in) :: NetRadiationMethod
117 INTEGER, INTENT(IN) :: RoughLenHeatMethod
118 INTEGER, INTENT(IN) :: RoughLenMomMethod
119 INTEGER, INTENT(IN) :: StorageHeatMethod
120 INTEGER, INTENT(IN) :: AerodynamicResistanceMethod
121 INTEGER, DIMENSION(3), INTENT(IN) :: LAIType
122 REAL(KIND(1D0)), DIMENSION(7 + 1), INTENT(IN) :: SnowPackLimit
123 REAL(KIND(1D0)), DIMENSION(7 + 1), INTENT(IN) :: OHM_threshSW
124 REAL(KIND(1D0)), DIMENSION(7 + 1), INTENT(IN) :: OHM_threshWD
125 REAL(KIND(1D0)), INTENT(IN) :: th
126 REAL(KIND(1D0)), INTENT(IN) :: tl
127 REAL(KIND(1D0)), INTENT(IN) :: Kmax
128 REAL(KIND(1D0)), INTENT(IN) :: g1
129 REAL(KIND(1D0)), INTENT(IN) :: g2
130 REAL(KIND(1D0)), INTENT(IN) :: g3
131 REAL(KIND(1D0)), INTENT(IN) :: g4
132 REAL(KIND(1D0)), INTENT(IN) :: g5
133 REAL(KIND(1D0)), INTENT(IN) :: g6
134 REAL(KIND(1D0)), INTENT(IN) :: s1
135 REAL(KIND(1D0)), INTENT(IN) :: s2
136 REAL(KIND(1D0)), DIMENSION(4, 3), INTENT(IN) :: LaiPower
137 REAL(KIND(1D0)), INTENT(IN) :: CRWmax
138 REAL(KIND(1D0)), INTENT(IN) :: CRWmin
139 REAL(KIND(1D0)), INTENT(IN) :: PrecipLimit
140 REAL(KIND(1D0)), INTENT(IN) :: PrecipLimitAlb
141 REAL(KIND(1D0)), INTENT(IN) :: RadMeltFact
142 REAL(KIND(1D0)), INTENT(IN) :: SnowAlbMax
143 REAL(KIND(1D0)), INTENT(IN) :: SnowAlbMin
144 REAL(KIND(1D0)), INTENT(IN) :: SnowDensMax
145 REAL(KIND(1D0)), INTENT(IN) :: SnowDensMin
146 REAL(KIND(1D0)), INTENT(IN) :: SnowLimBldg
147 REAL(KIND(1D0)), INTENT(IN) :: SnowLimPaved
148 REAL(KIND(1D0)), INTENT(IN) :: tau_a
149 REAL(KIND(1D0)), INTENT(IN) :: tau_f
150 REAL(KIND(1D0)), INTENT(IN) :: tau_r
151 REAL(KIND(1D0)), INTENT(IN) :: TempMeltFact
152
153 INTEGER, INTENT(IN) :: OHMIncQF !OHM calculation uses Q* only (0) or Q*+QF (1)
154
155 ! time-related input
156 INTEGER, INTENT(IN) :: iy
157 INTEGER, INTENT(IN) :: id
158 INTEGER, INTENT(IN) :: it
159 INTEGER, INTENT(IN) :: imin
160 INTEGER, INTENT(in) :: isec
161 INTEGER, INTENT(in) :: dt_since_start ! time since simulation starts [s]
162 INTEGER, INTENT(IN) :: tstep
163 INTEGER, INTENT(IN) :: tstep_prev ! tstep size of the previous step
164 INTEGER, INTENT(IN) :: startDLS ! start of daylight saving (inclusive)
165 INTEGER, INTENT(IN) :: endDLS ! end of daylight saving (inclusive)
166
167 ! site-specific geographical settings
168 REAL(KIND(1D0)), INTENT(IN) :: alt
169 REAL(KIND(1D0)), INTENT(IN) :: lat
170 REAL(KIND(1D0)), INTENT(IN) :: lng
171 REAL(KIND(1D0)), INTENT(IN) :: Z
172 REAL(KIND(1D0)), INTENT(IN) :: timezone
173 REAL(KIND(1D0)), INTENT(IN) :: SurfaceArea
174 REAL(KIND(1D0)), DIMENSION(7), INTENT(IN) :: sfr_surf
175
176 ! roughness related settings
177 REAL(KIND(1D0)), INTENT(in) :: z0m_in
178 REAL(KIND(1D0)), INTENT(in) :: zdm_in
179
180 ! radiation related settings:
181 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: alb
182 REAL(KIND(1D0)), DIMENSION(7), INTENT(IN) :: emis
183 REAL(KIND(1D0)), INTENT(INOUT) :: SnowAlb
184
185 ! OHM coeffcients
186 REAL(KIND(1D0)), DIMENSION(7 + 1, 4, 3), INTENT(IN) :: OHM_coef
187
188 ! hydrology related settings
189 REAL(KIND(1D0)), DIMENSION(7 + 1, 7 - 1), INTENT(IN) :: WaterDist
190
191 ! profiles at 24 hours
192 REAL(KIND(1D0)), DIMENSION(0:23, 2), INTENT(in) :: AHProf_24hr
193 REAL(KIND(1D0)), DIMENSION(0:23, 2), INTENT(in) :: HumActivity_24hr
194 REAL(KIND(1D0)), DIMENSION(0:23, 2), INTENT(in) :: PopProf_24hr
195 REAL(KIND(1D0)), DIMENSION(0:23, 2), INTENT(in) :: TraffProf_24hr
196 REAL(KIND(1D0)), DIMENSION(0:23, 2), INTENT(in) :: WUProfA_24hr
197 REAL(KIND(1D0)), DIMENSION(0:23, 2), INTENT(in) :: WUProfM_24hr
198 REAL(KIND(1D0)), DIMENSION(0:23, 2), INTENT(in) :: snowProf_24hr
199 ! daily states, also initial conditions
200
201 REAL(KIND(1D0)), INTENT(INOUT) :: qn_av
202 REAL(KIND(1D0)), INTENT(INOUT) :: dqndt
203 REAL(KIND(1D0)), INTENT(INOUT) :: qn_s_av !qn_av for snow
204 REAL(KIND(1D0)), INTENT(INOUT) :: dqnsdt !dqndt for snow
205 REAL(KIND(1D0)), INTENT(INOUT) :: DecidCap_id
206 REAL(KIND(1D0)), INTENT(INOUT) :: albDecTr_id
207 REAL(KIND(1D0)), INTENT(INOUT) :: albEveTr_id
208 REAL(KIND(1D0)), INTENT(INOUT) :: albGrass_id
209 REAL(KIND(1D0)), INTENT(INOUT) :: NumCapita_id
210
211 REAL(KIND(1D0)), DIMENSION(3), INTENT(INOUT) :: BaseT_id
212 REAL(KIND(1D0)), DIMENSION(3), INTENT(INOUT) :: BaseTe_id
213 REAL(KIND(1D0)), DIMENSION(3), INTENT(INOUT) :: GDDFull_id
214 REAL(KIND(1D0)), DIMENSION(3), INTENT(INOUT) :: SDDFull_id
215 REAL(KIND(1D0)), DIMENSION(3), INTENT(INOUT) :: LaiMin_id
216 REAL(KIND(1D0)), DIMENSION(3), INTENT(INOUT) :: LaiMax_id
217 REAL(KIND(1D0)), DIMENSION(3), INTENT(INOUT) :: MaxConductance_id
218 REAL(KIND(1D0)), INTENT(INOUT) :: FAIbldg_id
219 REAL(KIND(1D0)), INTENT(INOUT) :: FAIEveTree_id
220 REAL(KIND(1D0)), INTENT(INOUT) :: FAIDecTree_id
221 REAL(KIND(1D0)), INTENT(INOUT) :: bldgH_id
222 REAL(KIND(1D0)), INTENT(INOUT) :: EveTreeH_id
223 REAL(KIND(1D0)), INTENT(INOUT) :: DecTreeH_id
224 REAL(KIND(1D0)), DIMENSION(2), INTENT(INOUT) :: AH_MIN_id
225 REAL(KIND(1D0)), DIMENSION(2), INTENT(INOUT) :: AH_SLOPE_Cooling_id
226 REAL(KIND(1D0)), DIMENSION(2), INTENT(INOUT) :: AH_SLOPE_Heating_id
227 REAL(KIND(1D0)), DIMENSION(2), INTENT(INOUT) :: QF0_BEU_id
228 REAL(KIND(1D0)), DIMENSION(2), INTENT(INOUT) :: Qf_A_id
229 REAL(KIND(1D0)), DIMENSION(2), INTENT(INOUT) :: Qf_B_id
230 REAL(KIND(1D0)), DIMENSION(2), INTENT(INOUT) :: Qf_C_id
231 REAL(KIND(1D0)), DIMENSION(2), INTENT(INOUT) :: T_CRITIC_Cooling_id
232 REAL(KIND(1D0)), DIMENSION(2), INTENT(INOUT) :: T_CRITIC_Heating_id
233 REAL(KIND(1D0)), DIMENSION(2), INTENT(INOUT) :: TrafficRate_id
234 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: surf_attr_MinStorCap_id
235 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: surf_attr_DrainEquat_id
236 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: surf_attr_DrainCoef1_id
237 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: surf_attr_DrainCoef2_id
238 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: surf_attr_MaxStorCap_id
239
240 REAL(KIND(1D0)), INTENT(INOUT) :: PopDensDaytime_id
241 REAL(KIND(1D0)), INTENT(INOUT) :: PopDensNighttime_id
242 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: SoilStoreCap_id
243 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: SoilDepth_id
244 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: SatHydraulicConduct_id
245 REAL(KIND(1D0)), INTENT(INOUT) :: AlbMin_DecTr_id
246 REAL(KIND(1D0)), INTENT(INOUT) :: AlbMax_DecTr_id
247 REAL(KIND(1D0)), INTENT(INOUT) :: AlbMin_EveTr_id
248 REAL(KIND(1D0)), INTENT(INOUT) :: AlbMax_EveTr_id
249 REAL(KIND(1D0)), INTENT(INOUT) :: AlbMin_Grass_id
250 REAL(KIND(1D0)), INTENT(INOUT) :: AlbMax_Grass_id
251 REAL(KIND(1D0)), INTENT(INOUT) :: CapMin_dec_id
252 REAL(KIND(1D0)), INTENT(INOUT) :: CapMax_dec_id
253 REAL(KIND(1D0)), INTENT(INOUT) :: PorMin_dec_id
254 REAL(KIND(1D0)), INTENT(INOUT) :: PorMax_dec_id
255 REAL(KIND(1D0)), INTENT(INOUT) :: DRAINRT_id
256 REAL(KIND(1D0)), INTENT(INOUT) :: RAINCOVER_id
257 REAL(KIND(1D0)), INTENT(INOUT) :: RAINMAXRES_id
258 REAL(KIND(1D0)), INTENT(INOUT) :: FlowChange_id
259 REAL(KIND(1D0)), INTENT(INOUT) :: PipeCapacity_id
260 REAL(KIND(1D0)), INTENT(INOUT) :: RunoffToWater_id
261 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: StateLimit_id
262 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: WetThresh_id
263 REAL(KIND(1D0)), INTENT(INOUT) :: BaseT_HC_id
264 REAL(KIND(1D0)), INTENT(INOUT) :: Faut_id
265 REAL(KIND(1D0)), INTENT(INOUT) :: IrrFracConif_id
266 REAL(KIND(1D0)), INTENT(INOUT) :: IrrFracDecid_id
267 REAL(KIND(1D0)), INTENT(INOUT) :: IrrFracGrass_id
268 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: DayWat_id
269 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: DayWatPer_id
270 REAL(KIND(1D0)), INTENT(INOUT) :: porosity_id
271 REAL(KIND(1D0)), DIMENSION(5), INTENT(INOUT) :: GDD_id !Growing Degree Days (see SUEWS_DailyState.f95)
272 REAL(KIND(1D0)), DIMENSION(12), INTENT(INOUT) :: HDD_id !Heating/Cooling Degree Days (see SUEWS_DailyState.f95)
273 REAL(KIND(1D0)), DIMENSION(3), INTENT(INOUT) :: LAI_id !LAI for each veg surface [m2 m-2]
274 REAL(KIND(1D0)), DIMENSION(9), INTENT(INOUT) :: WUDay_id
275 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: soilstore_id
276 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: state_id
277 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: surf_var_id !variable to store the current states
278 REAL(KIND(1D0)), DIMENSION(7), INTENT(INOUT) :: SnowWater
279
280 ! forcing variables
281 REAL(KIND(1D0)), INTENT(IN) :: avkdn
282 REAL(KIND(1D0)), INTENT(IN) :: glw1d
283 REAL(KIND(1D0)), INTENT(IN) :: avRh
284 REAL(KIND(1D0)), INTENT(IN) :: avU1
285 REAL(KIND(1D0)), INTENT(IN) :: Press_hPa
286 REAL(KIND(1D0)), INTENT(IN) :: Temp_C
287 REAL(KIND(1D0)), INTENT(IN) :: Precip
288 REAL(KIND(1D0)), INTENT(IN) :: cldfra1d
289 ! output for WRF
290 REAL(KIND(1D0)), INTENT(out) :: kdown_o
291 REAL(KIND(1D0)), INTENT(out) :: kup_o
292 REAL(KIND(1D0)), INTENT(out) :: ldown_o
293 REAL(KIND(1D0)), INTENT(out) :: lup_o
294 REAL(KIND(1D0)), INTENT(out) :: tsurf_o
295 REAL(KIND(1D0)), INTENT(out) :: smd_o
296
297 REAL(KIND(1D0)), INTENT(out) :: qn
298 REAL(KIND(1D0)), INTENT(out) :: qf
299 REAL(KIND(1D0)), INTENT(out) :: qs
300 REAL(KIND(1D0)), INTENT(out) :: qh
301 REAL(KIND(1D0)), INTENT(out) :: qe
302 REAL(KIND(1D0)), INTENT(out) :: qsfc
303 REAL(KIND(1D0)), INTENT(out) :: tsk
304 REAL(KIND(1D0)), INTENT(out) :: CHKLOWQ
305
306 ! fixed settings in SuMin
307 INTEGER, PARAMETER :: veg_type = 1
308 INTEGER, PARAMETER :: gsModel = 2
309 INTEGER, PARAMETER :: StabilityMethod = 3
310 INTEGER, PARAMETER :: SMDMethod = 0
311 INTEGER, PARAMETER :: DiagQN = 0
312 INTEGER, PARAMETER :: DiagQS = 0
313 INTEGER, PARAMETER :: Diagnose = 0
314 INTEGER, PARAMETER :: EvapMethod = 2
315 INTEGER, PARAMETER :: LAICalcYes = 1
316 INTEGER, PARAMETER :: WaterUseMethod = 0
317
318 REAL(KIND(1D0)), PARAMETER :: LAI_obs = 0
319 REAL(KIND(1D0)) :: ldown_obs
320 REAL(KIND(1D0)) :: fcld_obs
321 REAL(KIND(1D0)), PARAMETER :: snowFrac_obs = 0
322 REAL(KIND(1D0)), PARAMETER :: qn1_obs = 0
323 REAL(KIND(1D0)), PARAMETER :: qh_obs = 0
324 REAL(KIND(1D0)), PARAMETER :: qf_obs = 0
325 REAL(KIND(1D0)), PARAMETER :: qs_obs = 0
326
327 ! local variables not used for WRF coupling
328 INTEGER :: Gridiv
329 INTEGER :: Ie_end
330 INTEGER :: Ie_start
331#ifdef wrf
332 CHARACTER(len=1024) :: message ! Used to pass through function wrf_debug() by Zhenkun Li, 10/08/2018
333#endif
334
335 ! parameters used in SUEWS for now:
336 !REAL(KIND(1d0)), DIMENSION(7), PARAMETER ::SoilStoreCap = [150., 150., 150., 150., 150., 150., 0.] !Capacity of soil store for each surface [mm]
337 !REAL(KIND(1D0)), DIMENSION(7), PARAMETER ::SoilDepth = 350 !Depth of sub-surface soil store for each surface [mm]
338 !REAL(KIND(1D0)), DIMENSION(7), PARAMETER ::SatHydraulicConduct = 5E-4 !Saturated hydraulic conductivity for each soil subsurface [mm s-1]
339
340 !REAL(KIND(1d0)), PARAMETER:: AlbMin_DecTr = 0.12 !Min albedo for deciduous trees [-]
341 !REAL(KIND(1d0)), PARAMETER:: AlbMax_DecTr = 0.18 !Max albedo for deciduous trees [-]
342 !REAL(KIND(1d0)), PARAMETER:: AlbMin_EveTr = 0.11 !Min albedo for evergreen trees [-]
343 !REAL(KIND(1d0)), PARAMETER:: AlbMax_EveTr = 0.12 !Max albedo for evergreen trees [-]
344 !REAL(KIND(1d0)), PARAMETER:: AlbMin_Grass = 0.18 !Min albedo for grass [-]
345 !REAL(KIND(1d0)), PARAMETER:: AlbMax_Grass = 0.21 !Max albedo for grass [-]
346
347 !REAL(KIND(1d0)), PARAMETER:: CapMin_dec = 0.3 !Min storage capacity for deciduous trees [mm] (from input information)
348 !REAL(KIND(1d0)), PARAMETER:: CapMax_dec = 0.8 !Max storage capacity for deciduous trees [mm] (from input information)
349 !REAL(KIND(1d0)), PARAMETER:: PorMin_dec = 0.2 !Min porosity for deciduous trees
350 !REAL(KIND(1d0)), PARAMETER:: PorMax_dec = 0.6 !Max porosity for deciduous trees
351
352 !REAL(KIND(1d0)), PARAMETER:: FAIbldg = 0. !Frontal area fraction of buildings
353 !REAL(KIND(1d0)), PARAMETER:: FAIEveTree = 0. !Frontal area fraction of evergreen trees
354 !REAL(KIND(1d0)), PARAMETER:: FAIDecTree = 0. !Frontal area fraction of deciduous trees
355
356 !REAL(KIND(1d0)), PARAMETER :: bldgH = 10 !Mean building height
357 !REAL(KIND(1d0)), PARAMETER :: EveTreeH = 10 !Height of evergreen trees
358 !REAL(KIND(1d0)), PARAMETER :: DecTreeH = 10 !Height of deciduous trees
359 !grid base
360 !REAL(KIND(1d0)), DIMENSION(3), PARAMETER:: BaseT = [5, 5, 5] !Base temperature for growing degree days [degC]
361 !REAL(KIND(1d0)), DIMENSION(3), PARAMETER:: BaseTe = [11, 11, 11] !Base temperature for senescence degree days [degC]
362 !REAL(KIND(1d0)), DIMENSION(3), PARAMETER:: GDDFull = [300, 300, 300] !Growing degree days needed for full capacity [degC]
363 !REAL(KIND(1d0)), DIMENSION(3), PARAMETER:: SDDFull = [-450, -450, -450] !Senescence degree days needed to initiate leaf off [degC]
364 !REAL(KIND(1d0)), DIMENSION(3), PARAMETER:: LaiMin = [4., 1., 1.6] !Min LAI [m2 m-2]
365 !REAL(KIND(1d0)), DIMENSION(3), PARAMETER:: LaiMax = [5.1, 5.5, 5.9] !Max LAI [m2 m-2]
366 !REAL(KIND(1d0)), DIMENSION(3), PARAMETER:: MaxConductance = [7.4, 11.7, 30.1] !Max conductance [mm s-1]
367 !namelist
368 ! REAL(KIND(1d0)), DIMENSION(4, 3), PARAMETER:: LaiPower = RESHAPE( & !Coeffs for LAI equation: 1,2 - leaf growth; 3,4 - leaf off
369 ! [[0.03, 0.03, 0.03], &
370 ! [0.0005, 0.0005, 0.0005], &
371 ! [0.03, 0.03, 0.03], &
372 ! [0.0005, 0.0005, 0.0005]], &
373 ! [4, 3], order=[2, 1])
374 !namelist
375 !INTEGER, DIMENSION(3), PARAMETER:: LAIType = 0 !LAI equation to use: original (0) or new (1)
376
377 !REAL(KIND(1D0)), PARAMETER ::DRAINRT = 0.25 !Drainage rate of the water bucket [mm hr-1]
378 !REAL(KIND(1D0)), PARAMETER ::RAINCOVER = 1
379 !REAL(KIND(1D0)), PARAMETER ::RAINMAXRES = 10 !Maximum water bucket reservoir [mm]
380 !REAL(KIND(1d0)), PARAMETER ::FlowChange = 0 !Difference between the input and output flow in the water body
381 !REAL(KIND(1d0)), PARAMETER ::PipeCapacity = 100 !Capacity of pipes to transfer water
382 !REAL(KIND(1d0)), PARAMETER ::RunoffToWater = 0.1 !Fraction of surface runoff going to water body
383
384 !REAL(KIND(1d0)), DIMENSION(7), PARAMETER:: StateLimit = [0.48, 0.25, 1.3, 0.8, 1.9, 1.0, 30000.] !Limit for state of each surface type [mm] (specified in input files)
385 !REAL(KIND(1d0)), DIMENSION(7), PARAMETER:: WetThresh = [0.48, 0.25, 1.3, 0.8, 1.9, 1., 0.5] !When State > WetThresh, rs=0 limit in SUEWS_evap [mm] (specified in input files)
386
387 ! ---- Drainage characteristics ----------------------------------------------------------------
388 ! 1 - min storage capacity [mm]
389 ! 2 - Drainage equation to use
390 ! 3 - Drainage coeff 1 [units depend on choice of eqn]
391 ! 4 - Drainage coeff 2 [units depend on choice of eqn]
392 ! 5 - max storage capacity [mm]
393 !REAL(KIND(1d0)), DIMENSION(5, 7), PARAMETER:: surf_attr = RESHAPE( & ! variable to store the above five properties
394 ! [[0.48, 0.25, 1.3, 0.3, 1.9, 0.8, 0.5], &
395 ! [3., 3., 2., 2., 2., 3., 0.], &
396 ! [10., 10., 0.013, 0.013, 0.013, 10., 0.], &
397 ! [3., 3., 1.71, 1.71, 1.71, 3., 0.], &
398 ! [0.48, 0.25, 1.3, 0.8, 1.9, 0.8, 0.5]], &
399 ! [5, 7], order=[2, 1])
400
401 !REAL(KIND(1d0)), DIMENSION(1, 7), PARAMETER:: surf_attr_MinStorCap = [ 0.48, 0.25, 1.3, 0.3, 1.9, 0.8, 0.5]
402 !REAL(KIND(1d0)), DIMENSION(1, 7), PARAMETER:: surf_attr_DrainEquat = [3., 3., 2., 2., 2., 3., 0.]
403 !REAL(KIND(1d0)), DIMENSION(1, 7), PARAMETER:: surf_attr_DrainCoef1 = [10., 10., 0.013, 0.013, 0.013, 10., 0.]
404 !REAL(KIND(1d0)), DIMENSION(1, 7), PARAMETER:: surf_attr_DrainCoef2 = [3., 3., 1.71, 1.71, 1.71, 3., 0.]
405 !REAL(KIND(1d0)), DIMENSION(1, 7), PARAMETER:: surf_attr_MaxStorCap = [0.48, 0.25, 1.3, 0.8, 1.9, 0.8, 0.5]
406
407 !namelist
408 ! these will be assigned locally as data
409 ! use gsModel=2 as in Ward et al. (2016)
410 !REAL(KIND(1d0)), PARAMETER::th = 55 !Maximum temperature limit
411 !REAL(KIND(1d0)), PARAMETER::tl = -10 !Minimum temperature limit
412 !REAL(KIND(1d0)), PARAMETER::Kmax = 1200 !Annual maximum hourly solar radiation
413 !REAL(KIND(1d0)), PARAMETER::g1 = 3.5 !Fitted parameter
414 !REAL(KIND(1d0)), PARAMETER::g2 = 200 !Fitted parameter
415 !REAL(KIND(1d0)), PARAMETER::g3 = 0.13 !Fitted parameter
416 !REAL(KIND(1d0)), PARAMETER::g4 = 0.7 !Fitted parameter
417 !REAL(KIND(1d0)), PARAMETER::g5 = 30 !Fitted parameter
418 !REAL(KIND(1d0)), PARAMETER::g6 = 0.05 !Fitted parameter
419 !REAL(KIND(1d0)), PARAMETER::s1 = 5.56 !Fitted parameter
420 !REAL(KIND(1d0)), PARAMETER::s2 = 0 !surface res. calculations
421 !namelist
422 !REAL(KIND(1d0)), DIMENSION(7 + 1), PARAMETER:: OHM_threshSW = [10, 10, 10, 10, 10, 10, 10, 10] !Arrays for OHM thresholds
423 !REAL(KIND(1d0)), DIMENSION(7 + 1), PARAMETER:: OHM_threshWD = [0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9] !Arrays for OHM thresholds
424
425 !REAL(KIND(1d0)), PARAMETER:: BaseT_HC = 18.9 !Base temperature for QF
426 !not used
427 REAL(KIND(1D0)), PARAMETER :: xsmd = 0. !Measured soil moisture deficit
428 !Todo
429 REAL(KIND(1D0)), PARAMETER :: wu_m3 = 0 !External water use
430 !REAL(KIND(1D0)), PARAMETER::Faut = 0 !Fraction of irrigated area using automatic irrigation
431 REAL(KIND(1D0)), PARAMETER :: InternalWaterUse_h = 0 !Internal water use [mm h-1]
432 !REAL(KIND(1D0)), PARAMETER::IrrFracEveTr = 0 !Fraction of evergreen trees which are irrigated
433 !REAL(KIND(1D0)), PARAMETER::IrrFracDecTr = 0 !Fraction of deciduous trees which are irrigated
434 !REAL(KIND(1D0)), PARAMETER::IrrFracGrass = 0 !Fraction of grass which is irrigated
435 !Todo
436 !REAL(KIND(1D0)), DIMENSION(7), PARAMETER ::DayWat = 0 !Days of watering allowed
437 !REAL(KIND(1D0)), DIMENSION(7), PARAMETER ::DayWatPer = 0 !% of houses following daily water
438 REAL(KIND(1D0)), DIMENSION(3), PARAMETER :: Ie_a = [-84.535, 9.959, 3.674] !Coefficients for automatic irrigation models
439 REAL(KIND(1D0)), DIMENSION(3), PARAMETER :: Ie_m = [-25.36, 2.988, 1.102] !Coefficients for manual irrigation models
440
441 ! local variables
442 REAL(KIND(1D0)), PARAMETER :: NARP_EMIS_SNOW = 0.9 !NARP-specific parameters
443 REAL(KIND(1D0)) :: NARP_TRANS_SITE !NARP-specific parameters QUESTION: not used by SUEWS?
444
445 !REAL(KIND(1D0)), PARAMETER::NumCapita = 0 !Number of people in the study area per hectare [ha-1]
446 !REAL(KIND(1D0)), PARAMETER::PopDensDaytime = 0 ! Daytime population density [ha-1] (i.e. workers)
447 !REAL(KIND(1D0)), PARAMETER::PopDensNighttime = 0 ! Nighttime population density [ha-1] (i.e. residents)
448
449 ! snow related local variables
450 ! REAL(KIND(1D0)), PARAMETER ::CRWmax = 0.2 !Free water holding capacity of shallow SnowPack
451 ! REAL(KIND(1D0)), PARAMETER ::CRWmin = 0.05 !Free water holding capacity of deep SnowPack
452 ! REAL(KIND(1D0)), PARAMETER ::PrecipLimit = 2.2 !Temperature limit when precipitation occurs as snow
453 ! REAL(KIND(1D0)), PARAMETER ::PrecipLimitAlb = 2 !Precipitation limit for albedo change (in mm)
454 ! REAL(KIND(1D0)), PARAMETER ::RadMeltFact = 0.001 !Radiation melt factor
455 ! REAL(KIND(1D0)), PARAMETER ::SnowAlbMax = 0.8 !Maximum snow albedo
456 ! REAL(KIND(1D0)), PARAMETER ::SnowAlbMin = 0.18 !Minimum snow albedo
457 ! REAL(KIND(1D0)), PARAMETER ::SnowDensMax = 450 !Minimum density of snow
458 ! REAL(KIND(1D0)), PARAMETER ::SnowDensMin = 100 !Maximum density of snow
459 ! REAL(KIND(1D0)), PARAMETER ::SnowLimBldg = 100 !Snow removal limits for roofs in mm)
460 ! REAL(KIND(1D0)), PARAMETER ::SnowLimPaved = 100 !Snow removal limits for paved surfaces in mm)
461 ! REAL(KIND(1D0)), PARAMETER ::tau_a = 0.01 !Time constans related to albedo change
462 ! REAL(KIND(1D0)), PARAMETER ::tau_f = 0.1 !Time constans related to albedo change
463 ! REAL(KIND(1D0)), PARAMETER ::tau_r = 0.02 !Time constans related to albedo change
464 ! REAL(KIND(1D0)), PARAMETER ::TempMeltFact = 0.12 !Temperature melt factor
465 ! REAL(KIND(1D0)), DIMENSION(7), PARAMETER ::SnowPackLimit = 0
466 ! REAL(KIND(1D0)), DIMENSION(0:23, 2), PARAMETER::snowProf_24hr = 0 ! Timing of snow removal (0 or 1) Hourly, WD/WE
467
468 !grid level
469 ! Anthropogenic heat related variables
470 !REAL(KIND(1D0)), DIMENSION(2), PARAMETER ::AH_MIN = 10!Minimum anthropogenic heat flux (AnthropHeatMethod = 1)
471 !REAL(KIND(1D0)), DIMENSION(2), PARAMETER ::AH_SLOPE_Cooling = [2.7, 2.7]!Slope of the antrhropogenic heat flux calculation (AnthropHeatMethod = 1)
472 !REAL(KIND(1D0)), DIMENSION(2), PARAMETER ::AH_SLOPE_Heating = [2.7, 2.7]!Slope of the antrhropogenic heat flux calculation (AnthropHeatMethod = 1)
473 !REAL(KIND(1D0)), DIMENSION(2), PARAMETER ::QF0_BEU = [0.7442, 0.7955]
474 !REAL(KIND(1D0)), DIMENSION(2), PARAMETER ::Qf_A = [0.1, 0.1]!Qf coefficients
475 !REAL(KIND(1D0)), DIMENSION(2), PARAMETER ::Qf_B = [0.00986, 0.00986]!Qf coefficients
476 !REAL(KIND(1D0)), DIMENSION(2), PARAMETER ::Qf_C = [0.0102, 0.0102]!Qf coefficients
477 !REAL(KIND(1D0)), DIMENSION(2), PARAMETER ::BaseT_Cooling = [7, 7] !Critical temperature
478 !REAL(KIND(1D0)), DIMENSION(2), PARAMETER ::BaseT_Heating = [7, 7] !Critical temperature
479 !REAL(KIND(1D0)), DIMENSION(2), PARAMETER ::TrafficRate = [0.0134, 0.0095]
480 !keep them here
481 REAL(KIND(1D0)), PARAMETER :: EF_umolCO2perJ = 1.159
482 REAL(KIND(1D0)), PARAMETER :: EnEF_v_Jkm = 4e6
483 REAL(KIND(1D0)), PARAMETER :: FcEF_v_kgkm = 0.285
484 REAL(KIND(1D0)), PARAMETER :: FrFossilFuel_Heat = 0.05
485 REAL(KIND(1D0)), PARAMETER :: FrFossilFuel_NonHeat = 0
486 REAL(KIND(1D0)), PARAMETER :: TrafficUnits = 1
487 REAL(KIND(1D0)), PARAMETER :: MaxQFMetab = 175
488 REAL(KIND(1D0)), PARAMETER :: MinQFMetab = 75
489
490 ! AnOHM related: not used
491 REAL(KIND(1D0)), DIMENSION(7), PARAMETER :: chAnOHM = 3 ! bulk transfer coef., added by TS AnOHM
492 REAL(KIND(1D0)), DIMENSION(7), PARAMETER :: cpAnOHM = 2e6 ! heat capacity, added by TS AnOHM
493 REAL(KIND(1D0)), DIMENSION(7), PARAMETER :: kkAnOHM = 1.2 ! heat conductivity, added by TS AnOHM
494 REAL(KIND(1D0)), DIMENSION(:, :), ALLOCATABLE :: MetForcingData_grid
495
496 !Biogenic CO2 related parameters
497 REAL(KIND(1D0)), DIMENSION(3), PARAMETER :: alpha_bioCO2 = 0.005
498 REAL(KIND(1D0)), DIMENSION(3), PARAMETER :: alpha_enh_bioCO2 = 0.016
499 REAL(KIND(1D0)), DIMENSION(3), PARAMETER :: beta_bioCO2 = 8.747
500 REAL(KIND(1D0)), DIMENSION(3), PARAMETER :: beta_enh_bioCO2 = 33.454
501 REAL(KIND(1D0)), DIMENSION(3), PARAMETER :: min_res_bioCO2 = 0.6
502 REAL(KIND(1D0)), DIMENSION(3), PARAMETER :: resp_a = 2.43
503 REAL(KIND(1D0)), DIMENSION(3), PARAMETER :: resp_b = 0
504 REAL(KIND(1D0)), DIMENSION(3), PARAMETER :: theta_bioCO2 = 0.96
505
506 ! ESTM related variables, not used
507 REAL(KIND(1D0)), DIMENSION(24*3600/tstep) :: Tair24HR
508 REAL(KIND(1D0)), DIMENSION(:), ALLOCATABLE :: Ts5mindata_ir !TODO:allocatable array can't serve as argument?
509
510 REAL(KIND(1D0)) :: SnowfallCum = 0 !Cumulative snowfall
511 REAL(KIND(1D0)), DIMENSION(7) :: IceFrac = 0.2 !Estimated fraction of ice. Should be improved in the future
512 REAL(KIND(1D0)), DIMENSION(7) :: SnowDens = 300 !Density of snow
513 REAL(KIND(1D0)), DIMENSION(7) :: SnowFrac = 0 !!Surface fraction of snow cover
514 REAL(KIND(1D0)), DIMENSION(7) :: SnowPack = 0 !Amount of snow on each surface in mm
515
516 REAL(KIND(1D0)), DIMENSION(5) :: datetimeLine
517 REAL(KIND(1D0)), DIMENSION(ncolumnsDataOutSUEWS - 5) :: dataOutLineSUEWS
518 REAL(KIND(1D0)), DIMENSION(ncolumnsDataOutSnow - 5) :: dataOutLineSnow
519 REAL(KIND(1D0)), DIMENSION(ncolumnsDataOutESTM - 5) :: dataOutLineESTM
520 REAL(KIND(1D0)), DIMENSION(ncolumnsDataOutDailyState - 5) :: DailyStateLine
521
522 ! drainage related parameters
523 REAL(KIND(1D0)), DIMENSION(6, 7) :: StoreDrainPrm
524 storedrainprm(1, :) = surf_attr_minstorcap_id
525 storedrainprm(2, :) = surf_attr_drainequat_id
526 storedrainprm(3, :) = surf_attr_draincoef1_id
527 storedrainprm(4, :) = surf_attr_draincoef2_id
528 storedrainprm(5, :) = surf_attr_maxstorcap_id
529
530 storedrainprm(6, :) = surf_var_id
531 ldown_obs = glw1d
532 fcld_obs = cldfra1d
533 ! PRINT*,''
534 ! PRINT*, 'soilstore_id',soilstore_id
535 ! soilstore_id=MERGE(soilstore_id,soilstore_id*0,soilstore_id>0)
536 ! print*, 'soilstore_id modified',soilstore_id
537 ! PRINT*, 'state_id',state_id
538#ifdef wrf
539 WRITE (message, *) 'in SuMin, before calculation, OHM_coef:', ohm_coef(1, :, :)
540 CALL wrf_debug(100, message)
541#endif
542
543 CALL suews_cal_main( &
544 aerodynamicresistancemethod, ah_min_id, ahprof_24hr, ah_slope_cooling_id, & ! input&inout in alphabetical order
545 ah_slope_heating_id, &
546 alb, albmax_dectr_id, albmax_evetr_id, albmax_grass_id, &
547 albmin_dectr_id, albmin_evetr_id, albmin_grass_id, &
548 alpha_bioco2, alpha_enh_bioco2, alt, avkdn, avrh, avu1, baset_id, basete_id, &
549 baset_hc_id, beta_bioco2, beta_enh_bioco2, bldgh_id, capmax_dec_id, capmin_dec_id, &
550 chanohm, cpanohm, crwmax, crwmin, daywat_id, daywatper_id, &
551 dectreeh_id, diagnose, diagqn, diagqs, drainrt_id, &
552 dt_since_start, dqndt, qn_av, dqnsdt, qn_s_av, &
553 ef_umolco2perj, emis, emissionsmethod, enef_v_jkm, enddls, evetreeh_id, faibldg_id, &
554 faidectree_id, faievetree_id, faut_id, fcef_v_kgkm, fcld_obs, flowchange_id, &
555 frfossilfuel_heat, frfossilfuel_nonheat, g1, g2, g3, g4, g5, g6, gdd_id, &
556 gddfull_id, gridiv, gsmodel, hdd_id, humactivity_24hr, &
557 icefrac, id, ie_a, ie_end, ie_m, ie_start, imin, &
558 internalwateruse_h, irrfracconif_id, irrfracdecid_id, irrfracgrass_id, isec, it, evapmethod, &
559 iy, kkanohm, kmax, lai_id, laicalcyes, laimax_id, laimin_id, lai_obs, &
560 laipower, laitype, lat, ldown_obs, lng, maxconductance_id, maxqfmetab, &
561 snowwater, metforcingdata_grid, minqfmetab, min_res_bioco2, &
562 narp_emis_snow, narp_trans_site, netradiationmethod, &
563 numcapita_id, ohm_coef, ohmincqf, ohm_threshsw, &
564 ohm_threshwd, pipecapacity_id, popdensdaytime_id, &
565 popdensnighttime_id, popprof_24hr, pormax_dec_id, pormin_dec_id, &
566 precip, preciplimit, preciplimitalb, press_hpa, &
567 qf0_beu_id, qf_a_id, qf_b_id, qf_c_id, &
568 qn1_obs, qh_obs, qs_obs, qf_obs, &
569 radmeltfact, raincover_id, rainmaxres_id, resp_a, resp_b, &
570 roughlenheatmethod, roughlenmommethod, runofftowater_id, s1, s2, &
571 sathydraulicconduct_id, sddfull_id, sfr_surf, smdmethod, snowalb, snowalbmax, &
572 snowalbmin, snowpacklimit, snowdens, snowdensmax, snowdensmin, snowfallcum, snowfrac, &
573 snowlimbldg, snowlimpaved, snowfrac_obs, snowpack, snowprof_24hr, snowuse, soildepth_id, &
574 soilstore_id, soilstorecap_id, stabilitymethod, startdls, state_id, statelimit_id, &
575 storageheatmethod, storedrainprm, surfacearea, tair24hr, tau_a, tau_f, tau_r, &
576 t_critic_cooling_id, t_critic_heating_id, temp_c, tempmeltfact, th, &
577 theta_bioco2, timezone, tl, trafficrate_id, trafficunits, &
578 traffprof_24hr, ts5mindata_ir, tstep, tstep_prev, veg_type, &
579 waterdist, waterusemethod, wetthresh_id, wu_m3, &
580 wuday_id, decidcap_id, albdectr_id, albevetr_id, albgrass_id, porosity_id, &
581 wuprofa_24hr, wuprofm_24hr, xsmd, z, z0m_in, zdm_in, &
582 datetimeline, dataoutlinesuews, dataoutlinesnow, dataoutlineestm, & !output
583 dailystateline) !output
584
585 surf_var_id = storedrainprm(6, :) ! update surf_var_id
586
587 kdown_o = dataoutlinesuews(1)
588 kup_o = dataoutlinesuews(2)
589 ldown_o = dataoutlinesuews(3)
590 lup_o = dataoutlinesuews(4)
591 tsurf_o = dataoutlinesuews(5)
592 smd_o = dataoutlinesuews(23)
593
594 qn = dataoutlinesuews(6)
595 qf = dataoutlinesuews(7)
596 qs = dataoutlinesuews(8)
597 qh = dataoutlinesuews(9)
598 qe = dataoutlinesuews(10)
599 qsfc = dataoutlinesuews(16)
600 tsk = dataoutlinesuews(77) + 273.15
601 chklowq = 1
602
603 ! PRINT*,''
604 ! PRINT*, 'avkdn,kup,ldown,lup,tsurf'
605 ! PRINT*, dataOutLineSUEWS(1:5)
606 ! PRINT*, 'qn1,qf,qs,qh,qe'
607 ! PRINT*, dataOutLineSUEWS(6:10)
608 ! PRINT*,''
609 ! IF ( ABS(qe)>1000 ) THEN
610 ! zdm_in=0.
611 ! PRINT*, 10./zdm_in
612 ! END IF
613#ifdef wrf
614 WRITE (message, *) ' in SuMin, after calculation, OHM_coef:', ohm_coef(1, :, :)
615 CALL wrf_debug(100, message)
616
617 WRITE (message, *) ' in SuMin, qn,qf,qs,qh,qe:', dataoutlinesuews(6:10)
618 CALL wrf_debug(100, message)
619#endif
620

References suews_driver::suews_cal_main().

Here is the call graph for this function: