HydPy 6.2.dev1__cp313-cp313-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (890) hide show
  1. hydpy/__init__.py +275 -0
  2. hydpy/aliases.py +2554 -0
  3. hydpy/auxs/__init__.py +0 -0
  4. hydpy/auxs/anntools.py +1305 -0
  5. hydpy/auxs/armatools.py +883 -0
  6. hydpy/auxs/calibtools.py +3337 -0
  7. hydpy/auxs/interptools.py +1094 -0
  8. hydpy/auxs/iuhtools.py +543 -0
  9. hydpy/auxs/networktools.py +597 -0
  10. hydpy/auxs/ppolytools.py +809 -0
  11. hydpy/auxs/quadtools.py +61 -0
  12. hydpy/auxs/roottools.py +228 -0
  13. hydpy/auxs/smoothtools.py +273 -0
  14. hydpy/auxs/statstools.py +2125 -0
  15. hydpy/auxs/validtools.py +81 -0
  16. hydpy/conf/HydPyConfigBase.xsd +68637 -0
  17. hydpy/conf/HydPyConfigBase.xsdt +358 -0
  18. hydpy/conf/HydPyConfigMultipleRuns.xsd +25 -0
  19. hydpy/conf/HydPyConfigSingleRun.xsd +24 -0
  20. hydpy/conf/__init__.py +0 -0
  21. hydpy/conf/a_coefficients_explicit_lobatto_sequence.npy +0 -0
  22. hydpy/conf/support_points_for_smoothpar_logistic2.npy +0 -0
  23. hydpy/config.py +42 -0
  24. hydpy/core/__init__.py +0 -0
  25. hydpy/core/aliastools.py +214 -0
  26. hydpy/core/autodoctools.py +1947 -0
  27. hydpy/core/auxfiletools.py +1169 -0
  28. hydpy/core/devicetools.py +3810 -0
  29. hydpy/core/exceptiontools.py +269 -0
  30. hydpy/core/filetools.py +1985 -0
  31. hydpy/core/hydpytools.py +3089 -0
  32. hydpy/core/importtools.py +1398 -0
  33. hydpy/core/indextools.py +345 -0
  34. hydpy/core/itemtools.py +1849 -0
  35. hydpy/core/masktools.py +460 -0
  36. hydpy/core/modeltools.py +4868 -0
  37. hydpy/core/netcdftools.py +2683 -0
  38. hydpy/core/objecttools.py +2023 -0
  39. hydpy/core/optiontools.py +1045 -0
  40. hydpy/core/parametertools.py +4674 -0
  41. hydpy/core/printtools.py +222 -0
  42. hydpy/core/propertytools.py +643 -0
  43. hydpy/core/pubtools.py +254 -0
  44. hydpy/core/selectiontools.py +1571 -0
  45. hydpy/core/sequencetools.py +4476 -0
  46. hydpy/core/seriestools.py +339 -0
  47. hydpy/core/testtools.py +2483 -0
  48. hydpy/core/timetools.py +3567 -0
  49. hydpy/core/typingtools.py +333 -0
  50. hydpy/core/variabletools.py +2615 -0
  51. hydpy/cythons/__init__.py +24 -0
  52. hydpy/cythons/annutils.pxd +33 -0
  53. hydpy/cythons/annutils.pyi +25 -0
  54. hydpy/cythons/annutils.pyx +120 -0
  55. hydpy/cythons/autogen/__init__.py +0 -0
  56. hydpy/cythons/autogen/annutils.cp313-win_amd64.pyd +0 -0
  57. hydpy/cythons/autogen/annutils.pxd +42 -0
  58. hydpy/cythons/autogen/annutils.pyx +129 -0
  59. hydpy/cythons/autogen/c_arma.cp313-win_amd64.pyd +0 -0
  60. hydpy/cythons/autogen/c_arma.pxd +179 -0
  61. hydpy/cythons/autogen/c_arma.pyx +356 -0
  62. hydpy/cythons/autogen/c_arma_rimorido.cp313-win_amd64.pyd +0 -0
  63. hydpy/cythons/autogen/c_arma_rimorido.pxd +179 -0
  64. hydpy/cythons/autogen/c_arma_rimorido.pyx +356 -0
  65. hydpy/cythons/autogen/c_conv.cp313-win_amd64.pyd +0 -0
  66. hydpy/cythons/autogen/c_conv.pxd +198 -0
  67. hydpy/cythons/autogen/c_conv.pyx +491 -0
  68. hydpy/cythons/autogen/c_conv_idw.cp313-win_amd64.pyd +0 -0
  69. hydpy/cythons/autogen/c_conv_idw.pxd +124 -0
  70. hydpy/cythons/autogen/c_conv_idw.pyx +264 -0
  71. hydpy/cythons/autogen/c_conv_idw_ed.cp313-win_amd64.pyd +0 -0
  72. hydpy/cythons/autogen/c_conv_idw_ed.pxd +197 -0
  73. hydpy/cythons/autogen/c_conv_idw_ed.pyx +481 -0
  74. hydpy/cythons/autogen/c_conv_nn.cp313-win_amd64.pyd +0 -0
  75. hydpy/cythons/autogen/c_conv_nn.pxd +120 -0
  76. hydpy/cythons/autogen/c_conv_nn.pyx +224 -0
  77. hydpy/cythons/autogen/c_dam.cp313-win_amd64.pyd +0 -0
  78. hydpy/cythons/autogen/c_dam.pxd +805 -0
  79. hydpy/cythons/autogen/c_dam.pyx +1477 -0
  80. hydpy/cythons/autogen/c_dam_llake.cp313-win_amd64.pyd +0 -0
  81. hydpy/cythons/autogen/c_dam_llake.pxd +364 -0
  82. hydpy/cythons/autogen/c_dam_llake.pyx +705 -0
  83. hydpy/cythons/autogen/c_dam_lreservoir.cp313-win_amd64.pyd +0 -0
  84. hydpy/cythons/autogen/c_dam_lreservoir.pxd +365 -0
  85. hydpy/cythons/autogen/c_dam_lreservoir.pyx +708 -0
  86. hydpy/cythons/autogen/c_dam_lretention.cp313-win_amd64.pyd +0 -0
  87. hydpy/cythons/autogen/c_dam_lretention.pxd +340 -0
  88. hydpy/cythons/autogen/c_dam_lretention.pyx +625 -0
  89. hydpy/cythons/autogen/c_dam_pump.cp313-win_amd64.pyd +0 -0
  90. hydpy/cythons/autogen/c_dam_pump.pxd +402 -0
  91. hydpy/cythons/autogen/c_dam_pump.pyx +724 -0
  92. hydpy/cythons/autogen/c_dam_pump_sluice.cp313-win_amd64.pyd +0 -0
  93. hydpy/cythons/autogen/c_dam_pump_sluice.pxd +452 -0
  94. hydpy/cythons/autogen/c_dam_pump_sluice.pyx +829 -0
  95. hydpy/cythons/autogen/c_dam_sluice.cp313-win_amd64.pyd +0 -0
  96. hydpy/cythons/autogen/c_dam_sluice.pxd +404 -0
  97. hydpy/cythons/autogen/c_dam_sluice.pyx +726 -0
  98. hydpy/cythons/autogen/c_dam_v001.cp313-win_amd64.pyd +0 -0
  99. hydpy/cythons/autogen/c_dam_v001.pxd +452 -0
  100. hydpy/cythons/autogen/c_dam_v001.pyx +816 -0
  101. hydpy/cythons/autogen/c_dam_v002.cp313-win_amd64.pyd +0 -0
  102. hydpy/cythons/autogen/c_dam_v002.pxd +394 -0
  103. hydpy/cythons/autogen/c_dam_v002.pyx +703 -0
  104. hydpy/cythons/autogen/c_dam_v003.cp313-win_amd64.pyd +0 -0
  105. hydpy/cythons/autogen/c_dam_v003.pxd +417 -0
  106. hydpy/cythons/autogen/c_dam_v003.pyx +744 -0
  107. hydpy/cythons/autogen/c_dam_v004.cp313-win_amd64.pyd +0 -0
  108. hydpy/cythons/autogen/c_dam_v004.pxd +486 -0
  109. hydpy/cythons/autogen/c_dam_v004.pyx +891 -0
  110. hydpy/cythons/autogen/c_dam_v005.cp313-win_amd64.pyd +0 -0
  111. hydpy/cythons/autogen/c_dam_v005.pxd +524 -0
  112. hydpy/cythons/autogen/c_dam_v005.pyx +928 -0
  113. hydpy/cythons/autogen/c_dummy.cp313-win_amd64.pyd +0 -0
  114. hydpy/cythons/autogen/c_dummy.pxd +151 -0
  115. hydpy/cythons/autogen/c_dummy.pyx +263 -0
  116. hydpy/cythons/autogen/c_dummy_interceptedwater.cp313-win_amd64.pyd +0 -0
  117. hydpy/cythons/autogen/c_dummy_interceptedwater.pxd +69 -0
  118. hydpy/cythons/autogen/c_dummy_interceptedwater.pyx +104 -0
  119. hydpy/cythons/autogen/c_dummy_node2node.cp313-win_amd64.pyd +0 -0
  120. hydpy/cythons/autogen/c_dummy_node2node.pxd +89 -0
  121. hydpy/cythons/autogen/c_dummy_node2node.pyx +148 -0
  122. hydpy/cythons/autogen/c_dummy_snowalbedo.cp313-win_amd64.pyd +0 -0
  123. hydpy/cythons/autogen/c_dummy_snowalbedo.pxd +69 -0
  124. hydpy/cythons/autogen/c_dummy_snowalbedo.pyx +104 -0
  125. hydpy/cythons/autogen/c_dummy_snowcover.cp313-win_amd64.pyd +0 -0
  126. hydpy/cythons/autogen/c_dummy_snowcover.pxd +69 -0
  127. hydpy/cythons/autogen/c_dummy_snowcover.pyx +104 -0
  128. hydpy/cythons/autogen/c_dummy_snowycanopy.cp313-win_amd64.pyd +0 -0
  129. hydpy/cythons/autogen/c_dummy_snowycanopy.pxd +69 -0
  130. hydpy/cythons/autogen/c_dummy_snowycanopy.pyx +104 -0
  131. hydpy/cythons/autogen/c_dummy_soilwater.cp313-win_amd64.pyd +0 -0
  132. hydpy/cythons/autogen/c_dummy_soilwater.pxd +69 -0
  133. hydpy/cythons/autogen/c_dummy_soilwater.pyx +104 -0
  134. hydpy/cythons/autogen/c_evap.cp313-win_amd64.pyd +0 -0
  135. hydpy/cythons/autogen/c_evap.pxd +1029 -0
  136. hydpy/cythons/autogen/c_evap.pyx +2601 -0
  137. hydpy/cythons/autogen/c_evap_aet_hbv96.cp313-win_amd64.pyd +0 -0
  138. hydpy/cythons/autogen/c_evap_aet_hbv96.pxd +227 -0
  139. hydpy/cythons/autogen/c_evap_aet_hbv96.pyx +584 -0
  140. hydpy/cythons/autogen/c_evap_aet_minhas.cp313-win_amd64.pyd +0 -0
  141. hydpy/cythons/autogen/c_evap_aet_minhas.pxd +193 -0
  142. hydpy/cythons/autogen/c_evap_aet_minhas.pyx +478 -0
  143. hydpy/cythons/autogen/c_evap_aet_morsim.cp313-win_amd64.pyd +0 -0
  144. hydpy/cythons/autogen/c_evap_aet_morsim.pxd +681 -0
  145. hydpy/cythons/autogen/c_evap_aet_morsim.pyx +1642 -0
  146. hydpy/cythons/autogen/c_evap_pet_ambav1.cp313-win_amd64.pyd +0 -0
  147. hydpy/cythons/autogen/c_evap_pet_ambav1.pxd +532 -0
  148. hydpy/cythons/autogen/c_evap_pet_ambav1.pyx +1296 -0
  149. hydpy/cythons/autogen/c_evap_pet_hbv96.cp313-win_amd64.pyd +0 -0
  150. hydpy/cythons/autogen/c_evap_pet_hbv96.pxd +179 -0
  151. hydpy/cythons/autogen/c_evap_pet_hbv96.pyx +328 -0
  152. hydpy/cythons/autogen/c_evap_pet_m.cp313-win_amd64.pyd +0 -0
  153. hydpy/cythons/autogen/c_evap_pet_m.pxd +124 -0
  154. hydpy/cythons/autogen/c_evap_pet_m.pyx +214 -0
  155. hydpy/cythons/autogen/c_evap_pet_mlc.cp313-win_amd64.pyd +0 -0
  156. hydpy/cythons/autogen/c_evap_pet_mlc.pxd +126 -0
  157. hydpy/cythons/autogen/c_evap_pet_mlc.pyx +214 -0
  158. hydpy/cythons/autogen/c_evap_ret_fao56.cp313-win_amd64.pyd +0 -0
  159. hydpy/cythons/autogen/c_evap_ret_fao56.pxd +305 -0
  160. hydpy/cythons/autogen/c_evap_ret_fao56.pyx +624 -0
  161. hydpy/cythons/autogen/c_evap_ret_io.cp313-win_amd64.pyd +0 -0
  162. hydpy/cythons/autogen/c_evap_ret_io.pxd +112 -0
  163. hydpy/cythons/autogen/c_evap_ret_io.pyx +176 -0
  164. hydpy/cythons/autogen/c_evap_ret_tw2002.cp313-win_amd64.pyd +0 -0
  165. hydpy/cythons/autogen/c_evap_ret_tw2002.pxd +139 -0
  166. hydpy/cythons/autogen/c_evap_ret_tw2002.pyx +273 -0
  167. hydpy/cythons/autogen/c_exch.cp313-win_amd64.pyd +0 -0
  168. hydpy/cythons/autogen/c_exch.pxd +230 -0
  169. hydpy/cythons/autogen/c_exch.pyx +462 -0
  170. hydpy/cythons/autogen/c_exch_branch_hbv96.cp313-win_amd64.pyd +0 -0
  171. hydpy/cythons/autogen/c_exch_branch_hbv96.pxd +134 -0
  172. hydpy/cythons/autogen/c_exch_branch_hbv96.pyx +255 -0
  173. hydpy/cythons/autogen/c_exch_waterlevel.cp313-win_amd64.pyd +0 -0
  174. hydpy/cythons/autogen/c_exch_waterlevel.pxd +54 -0
  175. hydpy/cythons/autogen/c_exch_waterlevel.pyx +78 -0
  176. hydpy/cythons/autogen/c_exch_weir_hbv96.cp313-win_amd64.pyd +0 -0
  177. hydpy/cythons/autogen/c_exch_weir_hbv96.pxd +156 -0
  178. hydpy/cythons/autogen/c_exch_weir_hbv96.pyx +282 -0
  179. hydpy/cythons/autogen/c_ga.cp313-win_amd64.pyd +0 -0
  180. hydpy/cythons/autogen/c_ga.pxd +353 -0
  181. hydpy/cythons/autogen/c_ga.pyx +1204 -0
  182. hydpy/cythons/autogen/c_ga_garto.cp313-win_amd64.pyd +0 -0
  183. hydpy/cythons/autogen/c_ga_garto.pxd +330 -0
  184. hydpy/cythons/autogen/c_ga_garto.pyx +1105 -0
  185. hydpy/cythons/autogen/c_ga_garto_submodel1.cp313-win_amd64.pyd +0 -0
  186. hydpy/cythons/autogen/c_ga_garto_submodel1.pxd +236 -0
  187. hydpy/cythons/autogen/c_ga_garto_submodel1.pyx +944 -0
  188. hydpy/cythons/autogen/c_gland.cp313-win_amd64.pyd +0 -0
  189. hydpy/cythons/autogen/c_gland.pxd +437 -0
  190. hydpy/cythons/autogen/c_gland.pyx +726 -0
  191. hydpy/cythons/autogen/c_gland_gr4.cp313-win_amd64.pyd +0 -0
  192. hydpy/cythons/autogen/c_gland_gr4.pxd +382 -0
  193. hydpy/cythons/autogen/c_gland_gr4.pyx +605 -0
  194. hydpy/cythons/autogen/c_gland_gr5.cp313-win_amd64.pyd +0 -0
  195. hydpy/cythons/autogen/c_gland_gr5.pxd +368 -0
  196. hydpy/cythons/autogen/c_gland_gr5.pyx +568 -0
  197. hydpy/cythons/autogen/c_gland_gr6.cp313-win_amd64.pyd +0 -0
  198. hydpy/cythons/autogen/c_gland_gr6.pxd +420 -0
  199. hydpy/cythons/autogen/c_gland_gr6.pyx +673 -0
  200. hydpy/cythons/autogen/c_hland.cp313-win_amd64.pyd +0 -0
  201. hydpy/cythons/autogen/c_hland.pxd +855 -0
  202. hydpy/cythons/autogen/c_hland.pyx +2486 -0
  203. hydpy/cythons/autogen/c_hland_96.cp313-win_amd64.pyd +0 -0
  204. hydpy/cythons/autogen/c_hland_96.pxd +631 -0
  205. hydpy/cythons/autogen/c_hland_96.pyx +1724 -0
  206. hydpy/cythons/autogen/c_hland_96c.cp313-win_amd64.pyd +0 -0
  207. hydpy/cythons/autogen/c_hland_96c.pxd +621 -0
  208. hydpy/cythons/autogen/c_hland_96c.pyx +1822 -0
  209. hydpy/cythons/autogen/c_hland_96p.cp313-win_amd64.pyd +0 -0
  210. hydpy/cythons/autogen/c_hland_96p.pxd +683 -0
  211. hydpy/cythons/autogen/c_hland_96p.pyx +1911 -0
  212. hydpy/cythons/autogen/c_kinw.cp313-win_amd64.pyd +0 -0
  213. hydpy/cythons/autogen/c_kinw.pxd +509 -0
  214. hydpy/cythons/autogen/c_kinw.pyx +965 -0
  215. hydpy/cythons/autogen/c_kinw_williams.cp313-win_amd64.pyd +0 -0
  216. hydpy/cythons/autogen/c_kinw_williams.pxd +409 -0
  217. hydpy/cythons/autogen/c_kinw_williams.pyx +763 -0
  218. hydpy/cythons/autogen/c_kinw_williams_ext.cp313-win_amd64.pyd +0 -0
  219. hydpy/cythons/autogen/c_kinw_williams_ext.pxd +220 -0
  220. hydpy/cythons/autogen/c_kinw_williams_ext.pyx +440 -0
  221. hydpy/cythons/autogen/c_lland.cp313-win_amd64.pyd +0 -0
  222. hydpy/cythons/autogen/c_lland.pxd +1386 -0
  223. hydpy/cythons/autogen/c_lland.pyx +3679 -0
  224. hydpy/cythons/autogen/c_lland_dd.cp313-win_amd64.pyd +0 -0
  225. hydpy/cythons/autogen/c_lland_dd.pxd +679 -0
  226. hydpy/cythons/autogen/c_lland_dd.pyx +1719 -0
  227. hydpy/cythons/autogen/c_lland_knauf.cp313-win_amd64.pyd +0 -0
  228. hydpy/cythons/autogen/c_lland_knauf.pxd +1096 -0
  229. hydpy/cythons/autogen/c_lland_knauf.pyx +2784 -0
  230. hydpy/cythons/autogen/c_lland_knauf_ic.cp313-win_amd64.pyd +0 -0
  231. hydpy/cythons/autogen/c_lland_knauf_ic.pxd +1369 -0
  232. hydpy/cythons/autogen/c_lland_knauf_ic.pyx +3625 -0
  233. hydpy/cythons/autogen/c_meteo.cp313-win_amd64.pyd +0 -0
  234. hydpy/cythons/autogen/c_meteo.pxd +469 -0
  235. hydpy/cythons/autogen/c_meteo.pyx +879 -0
  236. hydpy/cythons/autogen/c_meteo_clear_glob_io.cp313-win_amd64.pyd +0 -0
  237. hydpy/cythons/autogen/c_meteo_clear_glob_io.pxd +75 -0
  238. hydpy/cythons/autogen/c_meteo_clear_glob_io.pyx +107 -0
  239. hydpy/cythons/autogen/c_meteo_glob_fao56.cp313-win_amd64.pyd +0 -0
  240. hydpy/cythons/autogen/c_meteo_glob_fao56.pxd +209 -0
  241. hydpy/cythons/autogen/c_meteo_glob_fao56.pyx +339 -0
  242. hydpy/cythons/autogen/c_meteo_glob_io.cp313-win_amd64.pyd +0 -0
  243. hydpy/cythons/autogen/c_meteo_glob_io.pxd +63 -0
  244. hydpy/cythons/autogen/c_meteo_glob_io.pyx +91 -0
  245. hydpy/cythons/autogen/c_meteo_glob_morsim.cp313-win_amd64.pyd +0 -0
  246. hydpy/cythons/autogen/c_meteo_glob_morsim.pxd +289 -0
  247. hydpy/cythons/autogen/c_meteo_glob_morsim.pyx +527 -0
  248. hydpy/cythons/autogen/c_meteo_precip_io.cp313-win_amd64.pyd +0 -0
  249. hydpy/cythons/autogen/c_meteo_precip_io.pxd +112 -0
  250. hydpy/cythons/autogen/c_meteo_precip_io.pyx +176 -0
  251. hydpy/cythons/autogen/c_meteo_psun_sun_glob_io.cp313-win_amd64.pyd +0 -0
  252. hydpy/cythons/autogen/c_meteo_psun_sun_glob_io.pxd +87 -0
  253. hydpy/cythons/autogen/c_meteo_psun_sun_glob_io.pyx +123 -0
  254. hydpy/cythons/autogen/c_meteo_sun_fao56.cp313-win_amd64.pyd +0 -0
  255. hydpy/cythons/autogen/c_meteo_sun_fao56.pxd +209 -0
  256. hydpy/cythons/autogen/c_meteo_sun_fao56.pyx +343 -0
  257. hydpy/cythons/autogen/c_meteo_sun_morsim.cp313-win_amd64.pyd +0 -0
  258. hydpy/cythons/autogen/c_meteo_sun_morsim.pxd +286 -0
  259. hydpy/cythons/autogen/c_meteo_sun_morsim.pyx +519 -0
  260. hydpy/cythons/autogen/c_meteo_temp_io.cp313-win_amd64.pyd +0 -0
  261. hydpy/cythons/autogen/c_meteo_temp_io.pxd +112 -0
  262. hydpy/cythons/autogen/c_meteo_temp_io.pyx +176 -0
  263. hydpy/cythons/autogen/c_musk.cp313-win_amd64.pyd +0 -0
  264. hydpy/cythons/autogen/c_musk.pxd +282 -0
  265. hydpy/cythons/autogen/c_musk.pyx +605 -0
  266. hydpy/cythons/autogen/c_musk_classic.cp313-win_amd64.pyd +0 -0
  267. hydpy/cythons/autogen/c_musk_classic.pxd +138 -0
  268. hydpy/cythons/autogen/c_musk_classic.pyx +226 -0
  269. hydpy/cythons/autogen/c_musk_mct.cp313-win_amd64.pyd +0 -0
  270. hydpy/cythons/autogen/c_musk_mct.pxd +282 -0
  271. hydpy/cythons/autogen/c_musk_mct.pyx +609 -0
  272. hydpy/cythons/autogen/c_rconc.cp313-win_amd64.pyd +0 -0
  273. hydpy/cythons/autogen/c_rconc.pxd +119 -0
  274. hydpy/cythons/autogen/c_rconc.pyx +174 -0
  275. hydpy/cythons/autogen/c_rconc_nash.cp313-win_amd64.pyd +0 -0
  276. hydpy/cythons/autogen/c_rconc_nash.pxd +111 -0
  277. hydpy/cythons/autogen/c_rconc_nash.pyx +185 -0
  278. hydpy/cythons/autogen/c_rconc_uh.cp313-win_amd64.pyd +0 -0
  279. hydpy/cythons/autogen/c_rconc_uh.pxd +92 -0
  280. hydpy/cythons/autogen/c_rconc_uh.pyx +125 -0
  281. hydpy/cythons/autogen/c_sw1d.cp313-win_amd64.pyd +0 -0
  282. hydpy/cythons/autogen/c_sw1d.pxd +511 -0
  283. hydpy/cythons/autogen/c_sw1d.pyx +1263 -0
  284. hydpy/cythons/autogen/c_sw1d_channel.cp313-win_amd64.pyd +0 -0
  285. hydpy/cythons/autogen/c_sw1d_channel.pxd +119 -0
  286. hydpy/cythons/autogen/c_sw1d_channel.pyx +300 -0
  287. hydpy/cythons/autogen/c_sw1d_gate_out.cp313-win_amd64.pyd +0 -0
  288. hydpy/cythons/autogen/c_sw1d_gate_out.pxd +240 -0
  289. hydpy/cythons/autogen/c_sw1d_gate_out.pyx +476 -0
  290. hydpy/cythons/autogen/c_sw1d_lias.cp313-win_amd64.pyd +0 -0
  291. hydpy/cythons/autogen/c_sw1d_lias.pxd +320 -0
  292. hydpy/cythons/autogen/c_sw1d_lias.pyx +619 -0
  293. hydpy/cythons/autogen/c_sw1d_lias_sluice.cp313-win_amd64.pyd +0 -0
  294. hydpy/cythons/autogen/c_sw1d_lias_sluice.pxd +325 -0
  295. hydpy/cythons/autogen/c_sw1d_lias_sluice.pyx +644 -0
  296. hydpy/cythons/autogen/c_sw1d_network.cp313-win_amd64.pyd +0 -0
  297. hydpy/cythons/autogen/c_sw1d_network.pxd +90 -0
  298. hydpy/cythons/autogen/c_sw1d_network.pyx +246 -0
  299. hydpy/cythons/autogen/c_sw1d_pump.cp313-win_amd64.pyd +0 -0
  300. hydpy/cythons/autogen/c_sw1d_pump.pxd +256 -0
  301. hydpy/cythons/autogen/c_sw1d_pump.pyx +502 -0
  302. hydpy/cythons/autogen/c_sw1d_q_in.cp313-win_amd64.pyd +0 -0
  303. hydpy/cythons/autogen/c_sw1d_q_in.pxd +224 -0
  304. hydpy/cythons/autogen/c_sw1d_q_in.pyx +383 -0
  305. hydpy/cythons/autogen/c_sw1d_q_out.cp313-win_amd64.pyd +0 -0
  306. hydpy/cythons/autogen/c_sw1d_q_out.pxd +224 -0
  307. hydpy/cythons/autogen/c_sw1d_q_out.pyx +383 -0
  308. hydpy/cythons/autogen/c_sw1d_storage.cp313-win_amd64.pyd +0 -0
  309. hydpy/cythons/autogen/c_sw1d_storage.pxd +193 -0
  310. hydpy/cythons/autogen/c_sw1d_storage.pyx +349 -0
  311. hydpy/cythons/autogen/c_sw1d_weir_out.cp313-win_amd64.pyd +0 -0
  312. hydpy/cythons/autogen/c_sw1d_weir_out.pxd +212 -0
  313. hydpy/cythons/autogen/c_sw1d_weir_out.pyx +404 -0
  314. hydpy/cythons/autogen/c_test.cp313-win_amd64.pyd +0 -0
  315. hydpy/cythons/autogen/c_test.pxd +175 -0
  316. hydpy/cythons/autogen/c_test.pyx +348 -0
  317. hydpy/cythons/autogen/c_test_discontinous.cp313-win_amd64.pyd +0 -0
  318. hydpy/cythons/autogen/c_test_discontinous.pxd +146 -0
  319. hydpy/cythons/autogen/c_test_discontinous.pyx +256 -0
  320. hydpy/cythons/autogen/c_test_stiff0d.cp313-win_amd64.pyd +0 -0
  321. hydpy/cythons/autogen/c_test_stiff0d.pxd +146 -0
  322. hydpy/cythons/autogen/c_test_stiff0d.pyx +250 -0
  323. hydpy/cythons/autogen/c_test_stiff1d.cp313-win_amd64.pyd +0 -0
  324. hydpy/cythons/autogen/c_test_stiff1d.pxd +145 -0
  325. hydpy/cythons/autogen/c_test_stiff1d.pyx +294 -0
  326. hydpy/cythons/autogen/c_whmod.cp313-win_amd64.pyd +0 -0
  327. hydpy/cythons/autogen/c_whmod.pxd +482 -0
  328. hydpy/cythons/autogen/c_whmod.pyx +1156 -0
  329. hydpy/cythons/autogen/c_whmod_rural.cp313-win_amd64.pyd +0 -0
  330. hydpy/cythons/autogen/c_whmod_rural.pxd +411 -0
  331. hydpy/cythons/autogen/c_whmod_rural.pyx +982 -0
  332. hydpy/cythons/autogen/c_whmod_urban.cp313-win_amd64.pyd +0 -0
  333. hydpy/cythons/autogen/c_whmod_urban.pxd +482 -0
  334. hydpy/cythons/autogen/c_whmod_urban.pyx +1155 -0
  335. hydpy/cythons/autogen/c_wland.cp313-win_amd64.pyd +0 -0
  336. hydpy/cythons/autogen/c_wland.pxd +842 -0
  337. hydpy/cythons/autogen/c_wland.pyx +1890 -0
  338. hydpy/cythons/autogen/c_wland_gd.cp313-win_amd64.pyd +0 -0
  339. hydpy/cythons/autogen/c_wland_gd.pxd +829 -0
  340. hydpy/cythons/autogen/c_wland_gd.pyx +1847 -0
  341. hydpy/cythons/autogen/c_wland_wag.cp313-win_amd64.pyd +0 -0
  342. hydpy/cythons/autogen/c_wland_wag.pxd +810 -0
  343. hydpy/cythons/autogen/c_wland_wag.pyx +1780 -0
  344. hydpy/cythons/autogen/c_wq.cp313-win_amd64.pyd +0 -0
  345. hydpy/cythons/autogen/c_wq.pxd +275 -0
  346. hydpy/cythons/autogen/c_wq.pyx +652 -0
  347. hydpy/cythons/autogen/c_wq_trapeze.cp313-win_amd64.pyd +0 -0
  348. hydpy/cythons/autogen/c_wq_trapeze.pxd +170 -0
  349. hydpy/cythons/autogen/c_wq_trapeze.pyx +400 -0
  350. hydpy/cythons/autogen/c_wq_trapeze_strickler.cp313-win_amd64.pyd +0 -0
  351. hydpy/cythons/autogen/c_wq_trapeze_strickler.pxd +243 -0
  352. hydpy/cythons/autogen/c_wq_trapeze_strickler.pyx +578 -0
  353. hydpy/cythons/autogen/c_wq_walrus.cp313-win_amd64.pyd +0 -0
  354. hydpy/cythons/autogen/c_wq_walrus.pxd +61 -0
  355. hydpy/cythons/autogen/c_wq_walrus.pyx +82 -0
  356. hydpy/cythons/autogen/configutils.cp313-win_amd64.pyd +0 -0
  357. hydpy/cythons/autogen/configutils.pxd +17 -0
  358. hydpy/cythons/autogen/configutils.pyx +119 -0
  359. hydpy/cythons/autogen/interfaceutils.cp313-win_amd64.pyd +0 -0
  360. hydpy/cythons/autogen/interfaceutils.pxd +31 -0
  361. hydpy/cythons/autogen/interfaceutils.pyx +82 -0
  362. hydpy/cythons/autogen/interputils.cp313-win_amd64.pyd +0 -0
  363. hydpy/cythons/autogen/interputils.pxd +42 -0
  364. hydpy/cythons/autogen/interputils.pyx +118 -0
  365. hydpy/cythons/autogen/masterinterface.cp313-win_amd64.pyd +0 -0
  366. hydpy/cythons/autogen/masterinterface.pxd +153 -0
  367. hydpy/cythons/autogen/masterinterface.pyx +222 -0
  368. hydpy/cythons/autogen/pointerutils.cp313-win_amd64.pyd +0 -0
  369. hydpy/cythons/autogen/pointerutils.pxd +31 -0
  370. hydpy/cythons/autogen/pointerutils.pyx +650 -0
  371. hydpy/cythons/autogen/ppolyutils.cp313-win_amd64.pyd +0 -0
  372. hydpy/cythons/autogen/ppolyutils.pxd +35 -0
  373. hydpy/cythons/autogen/ppolyutils.pyx +59 -0
  374. hydpy/cythons/autogen/quadutils.cp313-win_amd64.pyd +0 -0
  375. hydpy/cythons/autogen/quadutils.pxd +26 -0
  376. hydpy/cythons/autogen/quadutils.pyx +973 -0
  377. hydpy/cythons/autogen/rootutils.cp313-win_amd64.pyd +0 -0
  378. hydpy/cythons/autogen/rootutils.pxd +28 -0
  379. hydpy/cythons/autogen/rootutils.pyx +109 -0
  380. hydpy/cythons/autogen/sequenceutils.cp313-win_amd64.pyd +0 -0
  381. hydpy/cythons/autogen/sequenceutils.pxd +45 -0
  382. hydpy/cythons/autogen/sequenceutils.pyx +101 -0
  383. hydpy/cythons/autogen/smoothutils.cp313-win_amd64.pyd +0 -0
  384. hydpy/cythons/autogen/smoothutils.pxd +29 -0
  385. hydpy/cythons/autogen/smoothutils.pyx +833 -0
  386. hydpy/cythons/configutils.pxd +8 -0
  387. hydpy/cythons/configutils.pyi +5 -0
  388. hydpy/cythons/configutils.pyx +110 -0
  389. hydpy/cythons/interfaceutils.pxd +22 -0
  390. hydpy/cythons/interfaceutils.pyi +15 -0
  391. hydpy/cythons/interfaceutils.pyx +73 -0
  392. hydpy/cythons/interputils.pxd +33 -0
  393. hydpy/cythons/interputils.pyi +32 -0
  394. hydpy/cythons/interputils.pyx +109 -0
  395. hydpy/cythons/modelutils.py +2990 -0
  396. hydpy/cythons/pointerutils.pxd +22 -0
  397. hydpy/cythons/pointerutils.pyi +89 -0
  398. hydpy/cythons/pointerutils.pyx +641 -0
  399. hydpy/cythons/ppolyutils.pxd +26 -0
  400. hydpy/cythons/ppolyutils.pyi +21 -0
  401. hydpy/cythons/ppolyutils.pyx +50 -0
  402. hydpy/cythons/quadutils.pxd +17 -0
  403. hydpy/cythons/quadutils.pyi +13 -0
  404. hydpy/cythons/quadutils.pyx +964 -0
  405. hydpy/cythons/rootutils.pxd +19 -0
  406. hydpy/cythons/rootutils.pyi +21 -0
  407. hydpy/cythons/rootutils.pyx +100 -0
  408. hydpy/cythons/sequenceutils.pxd +36 -0
  409. hydpy/cythons/sequenceutils.pyi +7 -0
  410. hydpy/cythons/sequenceutils.pyx +92 -0
  411. hydpy/cythons/smoothutils.pxd +20 -0
  412. hydpy/cythons/smoothutils.pyi +15 -0
  413. hydpy/cythons/smoothutils.pyx +824 -0
  414. hydpy/data/HydPy-H-Lahn/conditions/init_1996_01_01_00_00_00/land_dill_assl.py +13 -0
  415. hydpy/data/HydPy-H-Lahn/conditions/init_1996_01_01_00_00_00/land_lahn_kalk.py +13 -0
  416. hydpy/data/HydPy-H-Lahn/conditions/init_1996_01_01_00_00_00/land_lahn_leun.py +14 -0
  417. hydpy/data/HydPy-H-Lahn/conditions/init_1996_01_01_00_00_00/land_lahn_marb.py +13 -0
  418. hydpy/data/HydPy-H-Lahn/conditions/init_1996_01_01_00_00_00/stream_dill_assl_lahn_leun.py +5 -0
  419. hydpy/data/HydPy-H-Lahn/conditions/init_1996_01_01_00_00_00/stream_lahn_leun_lahn_kalk.py +5 -0
  420. hydpy/data/HydPy-H-Lahn/conditions/init_1996_01_01_00_00_00/stream_lahn_marb_lahn_leun.py +5 -0
  421. hydpy/data/HydPy-H-Lahn/control/default/land.py +9 -0
  422. hydpy/data/HydPy-H-Lahn/control/default/land_dill_assl.py +57 -0
  423. hydpy/data/HydPy-H-Lahn/control/default/land_lahn_kalk.py +57 -0
  424. hydpy/data/HydPy-H-Lahn/control/default/land_lahn_leun.py +56 -0
  425. hydpy/data/HydPy-H-Lahn/control/default/land_lahn_marb.py +57 -0
  426. hydpy/data/HydPy-H-Lahn/control/default/stream_dill_assl_lahn_leun.py +7 -0
  427. hydpy/data/HydPy-H-Lahn/control/default/stream_lahn_leun_lahn_kalk.py +7 -0
  428. hydpy/data/HydPy-H-Lahn/control/default/stream_lahn_marb_lahn_leun.py +7 -0
  429. hydpy/data/HydPy-H-Lahn/multiple_runs.xml +309 -0
  430. hydpy/data/HydPy-H-Lahn/multiple_runs_alpha.xml +71 -0
  431. hydpy/data/HydPy-H-Lahn/network/default/headwaters.py +11 -0
  432. hydpy/data/HydPy-H-Lahn/network/default/nonheadwaters.py +11 -0
  433. hydpy/data/HydPy-H-Lahn/network/default/streams.py +8 -0
  434. hydpy/data/HydPy-H-Lahn/series/default/dill_assl_obs_q.asc +11387 -0
  435. hydpy/data/HydPy-H-Lahn/series/default/evap_pet_hbv96_input_normalairtemperature.nc +0 -0
  436. hydpy/data/HydPy-H-Lahn/series/default/evap_pet_hbv96_input_normalevapotranspiration.nc +0 -0
  437. hydpy/data/HydPy-H-Lahn/series/default/hland_96_input_p.nc +0 -0
  438. hydpy/data/HydPy-H-Lahn/series/default/hland_96_input_t.nc +0 -0
  439. hydpy/data/HydPy-H-Lahn/series/default/lahn_kalk_obs_q.asc +11387 -0
  440. hydpy/data/HydPy-H-Lahn/series/default/lahn_leun_obs_q.asc +11387 -0
  441. hydpy/data/HydPy-H-Lahn/series/default/lahn_marb_obs_q.asc +11387 -0
  442. hydpy/data/HydPy-H-Lahn/series/default/land_dill_assl_evap_pet_hbv96_input_normalairtemperature.asc +11387 -0
  443. hydpy/data/HydPy-H-Lahn/series/default/land_dill_assl_evap_pet_hbv96_input_normalevapotranspiration.asc +11387 -0
  444. hydpy/data/HydPy-H-Lahn/series/default/land_dill_assl_hland_96_input_p.asc +11387 -0
  445. hydpy/data/HydPy-H-Lahn/series/default/land_dill_assl_hland_96_input_t.asc +11387 -0
  446. hydpy/data/HydPy-H-Lahn/series/default/land_lahn_kalk_evap_pet_hbv96_input_normalairtemperature.asc +11387 -0
  447. hydpy/data/HydPy-H-Lahn/series/default/land_lahn_kalk_evap_pet_hbv96_input_normalevapotranspiration.asc +11387 -0
  448. hydpy/data/HydPy-H-Lahn/series/default/land_lahn_kalk_hland_96_input_p.asc +11387 -0
  449. hydpy/data/HydPy-H-Lahn/series/default/land_lahn_kalk_hland_96_input_t.asc +11387 -0
  450. hydpy/data/HydPy-H-Lahn/series/default/land_lahn_leun_evap_pet_hbv96_input_normalairtemperature.asc +11387 -0
  451. hydpy/data/HydPy-H-Lahn/series/default/land_lahn_leun_evap_pet_hbv96_input_normalevapotranspiration.asc +11387 -0
  452. hydpy/data/HydPy-H-Lahn/series/default/land_lahn_leun_hland_96_input_p.asc +11387 -0
  453. hydpy/data/HydPy-H-Lahn/series/default/land_lahn_leun_hland_96_input_t.asc +11387 -0
  454. hydpy/data/HydPy-H-Lahn/series/default/land_lahn_marb_evap_pet_hbv96_input_normalairtemperature.asc +11387 -0
  455. hydpy/data/HydPy-H-Lahn/series/default/land_lahn_marb_evap_pet_hbv96_input_normalevapotranspiration.asc +11387 -0
  456. hydpy/data/HydPy-H-Lahn/series/default/land_lahn_marb_hland_96_input_p.asc +11387 -0
  457. hydpy/data/HydPy-H-Lahn/series/default/land_lahn_marb_hland_96_input_t.asc +11387 -0
  458. hydpy/data/HydPy-H-Lahn/series/default/obs_q.nc +0 -0
  459. hydpy/data/HydPy-H-Lahn/single_run.xml +152 -0
  460. hydpy/data/HydPy-H-Lahn/single_run.xmlt +143 -0
  461. hydpy/data/__init__.py +17 -0
  462. hydpy/docs/__init__.py +0 -0
  463. hydpy/docs/autofigs/__init__.py +0 -0
  464. hydpy/docs/bib/__init__.py +0 -0
  465. hydpy/docs/bib/refs.bib +566 -0
  466. hydpy/docs/combine_docversions.py +133 -0
  467. hydpy/docs/draw_model_sketches.py +1301 -0
  468. hydpy/docs/enable_autodoc.py +7 -0
  469. hydpy/docs/figs/HydPy-G-GR4.png +0 -0
  470. hydpy/docs/figs/HydPy-G-GR5.png +0 -0
  471. hydpy/docs/figs/HydPy-G-GR6.png +0 -0
  472. hydpy/docs/figs/HydPy-H-HBV96-COSERO.png +0 -0
  473. hydpy/docs/figs/HydPy-H-HBV96-PREVAH.png +0 -0
  474. hydpy/docs/figs/HydPy-H-HBV96.png +0 -0
  475. hydpy/docs/figs/HydPy-H-Lahn.png +0 -0
  476. hydpy/docs/figs/HydPy-KinW-Williams.png +0 -0
  477. hydpy/docs/figs/HydPy-L-DD.png +0 -0
  478. hydpy/docs/figs/HydPy-W-Wag.png +0 -0
  479. hydpy/docs/figs/HydPy_Logo.png +0 -0
  480. hydpy/docs/figs/HydPy_Logo_Text.png +0 -0
  481. hydpy/docs/figs/IDLE-editor.png +0 -0
  482. hydpy/docs/figs/IDLE-shell.png +0 -0
  483. hydpy/docs/figs/LAWA_river-basin-bumbers.png +0 -0
  484. hydpy/docs/figs/__init__.py +0 -0
  485. hydpy/docs/html_/__init__.py +0 -0
  486. hydpy/docs/polish_html.py +57 -0
  487. hydpy/docs/prepare.py +224 -0
  488. hydpy/docs/publish_docs.py +53 -0
  489. hydpy/docs/rst/HydPy-ARMA.rst +27 -0
  490. hydpy/docs/rst/HydPy-Conv.rst +22 -0
  491. hydpy/docs/rst/HydPy-Dam.rst +79 -0
  492. hydpy/docs/rst/HydPy-Dummy.rst +21 -0
  493. hydpy/docs/rst/HydPy-Evap.rst +26 -0
  494. hydpy/docs/rst/HydPy-Exch.rst +36 -0
  495. hydpy/docs/rst/HydPy-G.rst +40 -0
  496. hydpy/docs/rst/HydPy-GA.rst +34 -0
  497. hydpy/docs/rst/HydPy-H.rst +24 -0
  498. hydpy/docs/rst/HydPy-KinW.rst +32 -0
  499. hydpy/docs/rst/HydPy-L.rst +42 -0
  500. hydpy/docs/rst/HydPy-Meteo.rst +28 -0
  501. hydpy/docs/rst/HydPy-Musk.rst +21 -0
  502. hydpy/docs/rst/HydPy-Rconc.rst +17 -0
  503. hydpy/docs/rst/HydPy-SW1D.rst +49 -0
  504. hydpy/docs/rst/HydPy-Test.rst +19 -0
  505. hydpy/docs/rst/HydPy-W.rst +20 -0
  506. hydpy/docs/rst/HydPy-WHMod.rst +19 -0
  507. hydpy/docs/rst/HydPy-WQ.rst +20 -0
  508. hydpy/docs/rst/__init__.py +0 -0
  509. hydpy/docs/rst/additional_repositories.rst +40 -0
  510. hydpy/docs/rst/auxiliaries.rst +31 -0
  511. hydpy/docs/rst/continuous_integration.rst +75 -0
  512. hydpy/docs/rst/core.rst +75 -0
  513. hydpy/docs/rst/cythons.rst +47 -0
  514. hydpy/docs/rst/definitions.rst +506 -0
  515. hydpy/docs/rst/developer_guide.rst +54 -0
  516. hydpy/docs/rst/example_projects.rst +40 -0
  517. hydpy/docs/rst/execution.rst +22 -0
  518. hydpy/docs/rst/framework_tools.rst +56 -0
  519. hydpy/docs/rst/how_to_read_the_reference_manual.rst +156 -0
  520. hydpy/docs/rst/hydpydependencies.rst +55 -0
  521. hydpy/docs/rst/index.rst +125 -0
  522. hydpy/docs/rst/installation.rst +155 -0
  523. hydpy/docs/rst/model_families.rst +79 -0
  524. hydpy/docs/rst/model_overview.rst +291 -0
  525. hydpy/docs/rst/modelimports.rst +10 -0
  526. hydpy/docs/rst/options.rst +119 -0
  527. hydpy/docs/rst/programming_style.rst +572 -0
  528. hydpy/docs/rst/project_structure.rst +520 -0
  529. hydpy/docs/rst/quickstart.rst +304 -0
  530. hydpy/docs/rst/reference_manual.rst +29 -0
  531. hydpy/docs/rst/required_tools.rst +50 -0
  532. hydpy/docs/rst/simulation.rst +514 -0
  533. hydpy/docs/rst/submodel_interfaces.rst +32 -0
  534. hydpy/docs/rst/tests_and_documentation.rst +85 -0
  535. hydpy/docs/rst/user_guide.rst +38 -0
  536. hydpy/docs/rst/version_control.rst +116 -0
  537. hydpy/docs/rst/zbibliography.rst +8 -0
  538. hydpy/docs/sphinx/__init__.py +0 -0
  539. hydpy/docs/sphinx/_themes/basic_hydpy/changes/frameset.html +11 -0
  540. hydpy/docs/sphinx/_themes/basic_hydpy/changes/rstsource.html +15 -0
  541. hydpy/docs/sphinx/_themes/basic_hydpy/changes/versionchanges.html +33 -0
  542. hydpy/docs/sphinx/_themes/basic_hydpy/defindex.html +35 -0
  543. hydpy/docs/sphinx/_themes/basic_hydpy/domainindex.html +56 -0
  544. hydpy/docs/sphinx/_themes/basic_hydpy/genindex-single.html +63 -0
  545. hydpy/docs/sphinx/_themes/basic_hydpy/genindex-split.html +41 -0
  546. hydpy/docs/sphinx/_themes/basic_hydpy/genindex.html +76 -0
  547. hydpy/docs/sphinx/_themes/basic_hydpy/globaltoc.html +11 -0
  548. hydpy/docs/sphinx/_themes/basic_hydpy/layout.html +221 -0
  549. hydpy/docs/sphinx/_themes/basic_hydpy/localtoc.html +15 -0
  550. hydpy/docs/sphinx/_themes/basic_hydpy/opensearch.xml +13 -0
  551. hydpy/docs/sphinx/_themes/basic_hydpy/page.html +13 -0
  552. hydpy/docs/sphinx/_themes/basic_hydpy/relations.html +23 -0
  553. hydpy/docs/sphinx/_themes/basic_hydpy/search.html +65 -0
  554. hydpy/docs/sphinx/_themes/basic_hydpy/searchbox.html +21 -0
  555. hydpy/docs/sphinx/_themes/basic_hydpy/searchfield.html +23 -0
  556. hydpy/docs/sphinx/_themes/basic_hydpy/sourcelink.html +18 -0
  557. hydpy/docs/sphinx/_themes/basic_hydpy/static/basic.css_t +925 -0
  558. hydpy/docs/sphinx/_themes/basic_hydpy/static/doctools.js +156 -0
  559. hydpy/docs/sphinx/_themes/basic_hydpy/static/documentation_options.js_t +13 -0
  560. hydpy/docs/sphinx/_themes/basic_hydpy/static/file.png +0 -0
  561. hydpy/docs/sphinx/_themes/basic_hydpy/static/language_data.js_t +26 -0
  562. hydpy/docs/sphinx/_themes/basic_hydpy/static/minus.png +0 -0
  563. hydpy/docs/sphinx/_themes/basic_hydpy/static/plus.png +0 -0
  564. hydpy/docs/sphinx/_themes/basic_hydpy/static/searchtools.js +574 -0
  565. hydpy/docs/sphinx/_themes/basic_hydpy/static/sphinx_highlight.js +154 -0
  566. hydpy/docs/sphinx/_themes/basic_hydpy/theme.conf +16 -0
  567. hydpy/docs/sphinx/_themes/classic_hydpy/layout.html +23 -0
  568. hydpy/docs/sphinx/_themes/classic_hydpy/static/classic.css_t +358 -0
  569. hydpy/docs/sphinx/_themes/classic_hydpy/static/sidebar.js_t +72 -0
  570. hydpy/docs/sphinx/_themes/classic_hydpy/theme.conf +32 -0
  571. hydpy/docs/sphinx/conf.py +398 -0
  572. hydpy/docs/sphinx/defaultlinks_extension.py +36 -0
  573. hydpy/docs/sphinx/integrationtest_extension.py +104 -0
  574. hydpy/docs/sphinx/projectstructure_extension.py +58 -0
  575. hydpy/docs/sphinx/submodelgraph_extension.py +53 -0
  576. hydpy/exe/__init__.py +0 -0
  577. hydpy/exe/commandtools.py +651 -0
  578. hydpy/exe/hyd.py +277 -0
  579. hydpy/exe/modelimports.py +41 -0
  580. hydpy/exe/replacetools.py +216 -0
  581. hydpy/exe/servertools.py +2348 -0
  582. hydpy/exe/xmltools.py +3280 -0
  583. hydpy/interfaces/__init__.py +0 -0
  584. hydpy/interfaces/aetinterfaces.py +94 -0
  585. hydpy/interfaces/dischargeinterfaces.py +45 -0
  586. hydpy/interfaces/petinterfaces.py +117 -0
  587. hydpy/interfaces/precipinterfaces.py +42 -0
  588. hydpy/interfaces/radiationinterfaces.py +79 -0
  589. hydpy/interfaces/rconcinterfaces.py +30 -0
  590. hydpy/interfaces/routinginterfaces.py +324 -0
  591. hydpy/interfaces/soilinterfaces.py +96 -0
  592. hydpy/interfaces/stateinterfaces.py +98 -0
  593. hydpy/interfaces/tempinterfaces.py +46 -0
  594. hydpy/models/__init__.py +0 -0
  595. hydpy/models/arma/__init__.py +14 -0
  596. hydpy/models/arma/arma_control.py +383 -0
  597. hydpy/models/arma/arma_derived.py +204 -0
  598. hydpy/models/arma/arma_fluxes.py +41 -0
  599. hydpy/models/arma/arma_inlets.py +11 -0
  600. hydpy/models/arma/arma_logs.py +19 -0
  601. hydpy/models/arma/arma_model.py +461 -0
  602. hydpy/models/arma/arma_outlets.py +11 -0
  603. hydpy/models/arma_rimorido.py +381 -0
  604. hydpy/models/conv/__init__.py +12 -0
  605. hydpy/models/conv/conv_control.py +303 -0
  606. hydpy/models/conv/conv_derived.py +271 -0
  607. hydpy/models/conv/conv_fluxes.py +54 -0
  608. hydpy/models/conv/conv_inlets.py +11 -0
  609. hydpy/models/conv/conv_model.py +687 -0
  610. hydpy/models/conv/conv_outlets.py +11 -0
  611. hydpy/models/conv_idw.py +120 -0
  612. hydpy/models/conv_idw_ed.py +184 -0
  613. hydpy/models/conv_nn.py +112 -0
  614. hydpy/models/dam/__init__.py +16 -0
  615. hydpy/models/dam/dam_aides.py +17 -0
  616. hydpy/models/dam/dam_control.py +346 -0
  617. hydpy/models/dam/dam_derived.py +559 -0
  618. hydpy/models/dam/dam_factors.py +46 -0
  619. hydpy/models/dam/dam_fluxes.py +179 -0
  620. hydpy/models/dam/dam_inlets.py +29 -0
  621. hydpy/models/dam/dam_logs.py +52 -0
  622. hydpy/models/dam/dam_model.py +5011 -0
  623. hydpy/models/dam/dam_outlets.py +23 -0
  624. hydpy/models/dam/dam_receivers.py +41 -0
  625. hydpy/models/dam/dam_senders.py +23 -0
  626. hydpy/models/dam/dam_solver.py +75 -0
  627. hydpy/models/dam/dam_states.py +11 -0
  628. hydpy/models/dam_llake.py +499 -0
  629. hydpy/models/dam_lreservoir.py +548 -0
  630. hydpy/models/dam_lretention.py +343 -0
  631. hydpy/models/dam_pump.py +278 -0
  632. hydpy/models/dam_pump_sluice.py +339 -0
  633. hydpy/models/dam_sluice.py +319 -0
  634. hydpy/models/dam_v001.py +1127 -0
  635. hydpy/models/dam_v002.py +381 -0
  636. hydpy/models/dam_v003.py +422 -0
  637. hydpy/models/dam_v004.py +665 -0
  638. hydpy/models/dam_v005.py +479 -0
  639. hydpy/models/dummy/__init__.py +15 -0
  640. hydpy/models/dummy/dummy_control.py +22 -0
  641. hydpy/models/dummy/dummy_fluxes.py +11 -0
  642. hydpy/models/dummy/dummy_inlets.py +11 -0
  643. hydpy/models/dummy/dummy_inputs.py +41 -0
  644. hydpy/models/dummy/dummy_model.py +196 -0
  645. hydpy/models/dummy/dummy_outlets.py +11 -0
  646. hydpy/models/dummy_interceptedwater.py +85 -0
  647. hydpy/models/dummy_node2node.py +83 -0
  648. hydpy/models/dummy_snowalbedo.py +84 -0
  649. hydpy/models/dummy_snowcover.py +84 -0
  650. hydpy/models/dummy_snowycanopy.py +86 -0
  651. hydpy/models/dummy_soilwater.py +85 -0
  652. hydpy/models/evap/__init__.py +13 -0
  653. hydpy/models/evap/evap_control.py +354 -0
  654. hydpy/models/evap/evap_derived.py +236 -0
  655. hydpy/models/evap/evap_factors.py +188 -0
  656. hydpy/models/evap/evap_fixed.py +68 -0
  657. hydpy/models/evap/evap_fluxes.py +150 -0
  658. hydpy/models/evap/evap_inputs.py +54 -0
  659. hydpy/models/evap/evap_logs.py +91 -0
  660. hydpy/models/evap/evap_masks.py +48 -0
  661. hydpy/models/evap/evap_model.py +9170 -0
  662. hydpy/models/evap/evap_parameters.py +149 -0
  663. hydpy/models/evap/evap_sequences.py +32 -0
  664. hydpy/models/evap/evap_states.py +18 -0
  665. hydpy/models/evap_aet_hbv96.py +372 -0
  666. hydpy/models/evap_aet_minhas.py +331 -0
  667. hydpy/models/evap_aet_morsim.py +627 -0
  668. hydpy/models/evap_pet_ambav1.py +483 -0
  669. hydpy/models/evap_pet_hbv96.py +147 -0
  670. hydpy/models/evap_pet_m.py +94 -0
  671. hydpy/models/evap_pet_mlc.py +107 -0
  672. hydpy/models/evap_ret_fao56.py +265 -0
  673. hydpy/models/evap_ret_io.py +74 -0
  674. hydpy/models/evap_ret_tw2002.py +165 -0
  675. hydpy/models/exch/__init__.py +14 -0
  676. hydpy/models/exch/exch_control.py +262 -0
  677. hydpy/models/exch/exch_derived.py +36 -0
  678. hydpy/models/exch/exch_factors.py +26 -0
  679. hydpy/models/exch/exch_fluxes.py +48 -0
  680. hydpy/models/exch/exch_inlets.py +11 -0
  681. hydpy/models/exch/exch_logs.py +12 -0
  682. hydpy/models/exch/exch_model.py +451 -0
  683. hydpy/models/exch/exch_outlets.py +17 -0
  684. hydpy/models/exch/exch_receivers.py +17 -0
  685. hydpy/models/exch_branch_hbv96.py +186 -0
  686. hydpy/models/exch_waterlevel.py +73 -0
  687. hydpy/models/exch_weir_hbv96.py +609 -0
  688. hydpy/models/ga/__init__.py +14 -0
  689. hydpy/models/ga/ga_aides.py +17 -0
  690. hydpy/models/ga/ga_control.py +208 -0
  691. hydpy/models/ga/ga_derived.py +77 -0
  692. hydpy/models/ga/ga_fluxes.py +83 -0
  693. hydpy/models/ga/ga_inputs.py +26 -0
  694. hydpy/models/ga/ga_logs.py +17 -0
  695. hydpy/models/ga/ga_model.py +2952 -0
  696. hydpy/models/ga/ga_states.py +87 -0
  697. hydpy/models/ga_garto.py +1001 -0
  698. hydpy/models/ga_garto_submodel1.py +79 -0
  699. hydpy/models/gland/__init__.py +14 -0
  700. hydpy/models/gland/gland_control.py +90 -0
  701. hydpy/models/gland/gland_derived.py +113 -0
  702. hydpy/models/gland/gland_fluxes.py +137 -0
  703. hydpy/models/gland/gland_inputs.py +12 -0
  704. hydpy/models/gland/gland_model.py +1439 -0
  705. hydpy/models/gland/gland_outlets.py +11 -0
  706. hydpy/models/gland/gland_states.py +90 -0
  707. hydpy/models/gland_gr4.py +501 -0
  708. hydpy/models/gland_gr5.py +463 -0
  709. hydpy/models/gland_gr6.py +487 -0
  710. hydpy/models/hland/__init__.py +20 -0
  711. hydpy/models/hland/hland_aides.py +19 -0
  712. hydpy/models/hland/hland_constants.py +37 -0
  713. hydpy/models/hland/hland_control.py +1530 -0
  714. hydpy/models/hland/hland_derived.py +683 -0
  715. hydpy/models/hland/hland_factors.py +57 -0
  716. hydpy/models/hland/hland_fixed.py +42 -0
  717. hydpy/models/hland/hland_fluxes.py +279 -0
  718. hydpy/models/hland/hland_inputs.py +19 -0
  719. hydpy/models/hland/hland_masks.py +107 -0
  720. hydpy/models/hland/hland_model.py +4664 -0
  721. hydpy/models/hland/hland_outlets.py +11 -0
  722. hydpy/models/hland/hland_parameters.py +227 -0
  723. hydpy/models/hland/hland_sequences.py +382 -0
  724. hydpy/models/hland/hland_states.py +236 -0
  725. hydpy/models/hland_96.py +1812 -0
  726. hydpy/models/hland_96c.py +1196 -0
  727. hydpy/models/hland_96p.py +1204 -0
  728. hydpy/models/kinw/__init__.py +18 -0
  729. hydpy/models/kinw/kinw_aides.py +306 -0
  730. hydpy/models/kinw/kinw_control.py +270 -0
  731. hydpy/models/kinw/kinw_derived.py +197 -0
  732. hydpy/models/kinw/kinw_fixed.py +33 -0
  733. hydpy/models/kinw/kinw_fluxes.py +37 -0
  734. hydpy/models/kinw/kinw_inlets.py +11 -0
  735. hydpy/models/kinw/kinw_model.py +3026 -0
  736. hydpy/models/kinw/kinw_outlets.py +11 -0
  737. hydpy/models/kinw/kinw_solver.py +45 -0
  738. hydpy/models/kinw/kinw_states.py +17 -0
  739. hydpy/models/kinw_williams.py +1299 -0
  740. hydpy/models/kinw_williams_ext.py +768 -0
  741. hydpy/models/lland/__init__.py +42 -0
  742. hydpy/models/lland/lland_aides.py +38 -0
  743. hydpy/models/lland/lland_constants.py +88 -0
  744. hydpy/models/lland/lland_control.py +1329 -0
  745. hydpy/models/lland/lland_derived.py +380 -0
  746. hydpy/models/lland/lland_factors.py +18 -0
  747. hydpy/models/lland/lland_fixed.py +128 -0
  748. hydpy/models/lland/lland_fluxes.py +626 -0
  749. hydpy/models/lland/lland_inlets.py +12 -0
  750. hydpy/models/lland/lland_inputs.py +33 -0
  751. hydpy/models/lland/lland_logs.py +17 -0
  752. hydpy/models/lland/lland_masks.py +212 -0
  753. hydpy/models/lland/lland_model.py +7690 -0
  754. hydpy/models/lland/lland_outlets.py +12 -0
  755. hydpy/models/lland/lland_parameters.py +195 -0
  756. hydpy/models/lland/lland_sequences.py +67 -0
  757. hydpy/models/lland/lland_states.py +280 -0
  758. hydpy/models/lland_dd.py +2270 -0
  759. hydpy/models/lland_knauf.py +2156 -0
  760. hydpy/models/lland_knauf_ic.py +1920 -0
  761. hydpy/models/meteo/__init__.py +12 -0
  762. hydpy/models/meteo/meteo_control.py +154 -0
  763. hydpy/models/meteo/meteo_derived.py +159 -0
  764. hydpy/models/meteo/meteo_factors.py +88 -0
  765. hydpy/models/meteo/meteo_fixed.py +19 -0
  766. hydpy/models/meteo/meteo_fluxes.py +46 -0
  767. hydpy/models/meteo/meteo_inputs.py +47 -0
  768. hydpy/models/meteo/meteo_logs.py +30 -0
  769. hydpy/models/meteo/meteo_model.py +2904 -0
  770. hydpy/models/meteo/meteo_parameters.py +14 -0
  771. hydpy/models/meteo/meteo_sequences.py +22 -0
  772. hydpy/models/meteo_clear_glob_io.py +77 -0
  773. hydpy/models/meteo_glob_fao56.py +217 -0
  774. hydpy/models/meteo_glob_io.py +68 -0
  775. hydpy/models/meteo_glob_morsim.py +444 -0
  776. hydpy/models/meteo_precip_io.py +76 -0
  777. hydpy/models/meteo_psun_sun_glob_io.py +83 -0
  778. hydpy/models/meteo_sun_fao56.py +188 -0
  779. hydpy/models/meteo_sun_morsim.py +466 -0
  780. hydpy/models/meteo_temp_io.py +76 -0
  781. hydpy/models/musk/__init__.py +15 -0
  782. hydpy/models/musk/musk_control.py +328 -0
  783. hydpy/models/musk/musk_derived.py +32 -0
  784. hydpy/models/musk/musk_factors.py +53 -0
  785. hydpy/models/musk/musk_fluxes.py +24 -0
  786. hydpy/models/musk/musk_inlets.py +11 -0
  787. hydpy/models/musk/musk_masks.py +15 -0
  788. hydpy/models/musk/musk_model.py +838 -0
  789. hydpy/models/musk/musk_outlets.py +11 -0
  790. hydpy/models/musk/musk_sequences.py +88 -0
  791. hydpy/models/musk/musk_solver.py +68 -0
  792. hydpy/models/musk/musk_states.py +64 -0
  793. hydpy/models/musk_classic.py +228 -0
  794. hydpy/models/musk_mct.py +1247 -0
  795. hydpy/models/rconc/__init__.py +12 -0
  796. hydpy/models/rconc/rconc_control.py +473 -0
  797. hydpy/models/rconc/rconc_derived.py +76 -0
  798. hydpy/models/rconc/rconc_fluxes.py +19 -0
  799. hydpy/models/rconc/rconc_logs.py +74 -0
  800. hydpy/models/rconc/rconc_model.py +260 -0
  801. hydpy/models/rconc/rconc_states.py +11 -0
  802. hydpy/models/rconc_nash.py +48 -0
  803. hydpy/models/rconc_uh.py +53 -0
  804. hydpy/models/sw1d/__init__.py +17 -0
  805. hydpy/models/sw1d/sw1d_control.py +356 -0
  806. hydpy/models/sw1d/sw1d_derived.py +85 -0
  807. hydpy/models/sw1d/sw1d_factors.py +78 -0
  808. hydpy/models/sw1d/sw1d_fixed.py +12 -0
  809. hydpy/models/sw1d/sw1d_fluxes.py +55 -0
  810. hydpy/models/sw1d/sw1d_inlets.py +17 -0
  811. hydpy/models/sw1d/sw1d_model.py +3385 -0
  812. hydpy/models/sw1d/sw1d_outlets.py +11 -0
  813. hydpy/models/sw1d/sw1d_receivers.py +11 -0
  814. hydpy/models/sw1d/sw1d_senders.py +11 -0
  815. hydpy/models/sw1d/sw1d_states.py +23 -0
  816. hydpy/models/sw1d_channel.py +2051 -0
  817. hydpy/models/sw1d_gate_out.py +599 -0
  818. hydpy/models/sw1d_lias.py +105 -0
  819. hydpy/models/sw1d_lias_sluice.py +531 -0
  820. hydpy/models/sw1d_network.py +1219 -0
  821. hydpy/models/sw1d_pump.py +448 -0
  822. hydpy/models/sw1d_q_in.py +79 -0
  823. hydpy/models/sw1d_q_out.py +81 -0
  824. hydpy/models/sw1d_storage.py +78 -0
  825. hydpy/models/sw1d_weir_out.py +75 -0
  826. hydpy/models/test/__init__.py +14 -0
  827. hydpy/models/test/test_control.py +28 -0
  828. hydpy/models/test/test_fluxes.py +17 -0
  829. hydpy/models/test/test_model.py +201 -0
  830. hydpy/models/test/test_solver.py +48 -0
  831. hydpy/models/test/test_states.py +17 -0
  832. hydpy/models/test_discontinous.py +46 -0
  833. hydpy/models/test_stiff0d.py +47 -0
  834. hydpy/models/test_stiff1d.py +42 -0
  835. hydpy/models/whmod/__init__.py +21 -0
  836. hydpy/models/whmod/whmod_constants.py +77 -0
  837. hydpy/models/whmod/whmod_control.py +333 -0
  838. hydpy/models/whmod/whmod_derived.py +210 -0
  839. hydpy/models/whmod/whmod_factors.py +9 -0
  840. hydpy/models/whmod/whmod_fluxes.py +105 -0
  841. hydpy/models/whmod/whmod_inputs.py +15 -0
  842. hydpy/models/whmod/whmod_masks.py +178 -0
  843. hydpy/models/whmod/whmod_model.py +2091 -0
  844. hydpy/models/whmod/whmod_parameters.py +155 -0
  845. hydpy/models/whmod/whmod_sequences.py +193 -0
  846. hydpy/models/whmod/whmod_states.py +73 -0
  847. hydpy/models/whmod_rural.py +794 -0
  848. hydpy/models/whmod_urban.py +1011 -0
  849. hydpy/models/wland/__init__.py +43 -0
  850. hydpy/models/wland/wland_aides.py +55 -0
  851. hydpy/models/wland/wland_constants.py +103 -0
  852. hydpy/models/wland/wland_control.py +508 -0
  853. hydpy/models/wland/wland_derived.py +330 -0
  854. hydpy/models/wland/wland_factors.py +11 -0
  855. hydpy/models/wland/wland_fixed.py +12 -0
  856. hydpy/models/wland/wland_fluxes.py +166 -0
  857. hydpy/models/wland/wland_inputs.py +33 -0
  858. hydpy/models/wland/wland_masks.py +54 -0
  859. hydpy/models/wland/wland_model.py +3755 -0
  860. hydpy/models/wland/wland_outlets.py +11 -0
  861. hydpy/models/wland/wland_parameters.py +214 -0
  862. hydpy/models/wland/wland_sequences.py +108 -0
  863. hydpy/models/wland/wland_solver.py +45 -0
  864. hydpy/models/wland/wland_states.py +56 -0
  865. hydpy/models/wland_gd.py +888 -0
  866. hydpy/models/wland_wag.py +1244 -0
  867. hydpy/models/wq/__init__.py +14 -0
  868. hydpy/models/wq/wq_control.py +117 -0
  869. hydpy/models/wq/wq_derived.py +182 -0
  870. hydpy/models/wq/wq_factors.py +79 -0
  871. hydpy/models/wq/wq_fluxes.py +17 -0
  872. hydpy/models/wq/wq_model.py +1889 -0
  873. hydpy/models/wq_trapeze.py +168 -0
  874. hydpy/models/wq_trapeze_strickler.py +101 -0
  875. hydpy/models/wq_walrus.py +57 -0
  876. hydpy/py.typed +0 -0
  877. hydpy/tests/.coveragerc +22 -0
  878. hydpy/tests/__init__.py +0 -0
  879. hydpy/tests/check_consistency.py +32 -0
  880. hydpy/tests/hydpydoctestcustomize.pth +1 -0
  881. hydpy/tests/hydpydoctestcustomize.py +15 -0
  882. hydpy/tests/iotesting/__init__.py +0 -0
  883. hydpy/tests/run_doctests.py +233 -0
  884. hydpy-6.2.dev1.data/scripts/hyd.py +277 -0
  885. hydpy-6.2.dev1.dist-info/LICENSE +165 -0
  886. hydpy-6.2.dev1.dist-info/METADATA +163 -0
  887. hydpy-6.2.dev1.dist-info/RECORD +890 -0
  888. hydpy-6.2.dev1.dist-info/WHEEL +5 -0
  889. hydpy-6.2.dev1.dist-info/licenses_hydpy_installer.txt +42 -0
  890. hydpy-6.2.dev1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2601 @@
1
+ #!python
2
+ # distutils: define_macros=NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION
3
+ # cython: language_level=3
4
+ # cython: cpow=True
5
+ # cython: boundscheck=False
6
+ # cython: wraparound=False
7
+ # cython: initializedcheck=False
8
+ # cython: cdivision=True
9
+ from typing import Optional
10
+ import numpy
11
+ cimport numpy
12
+ from libc.math cimport exp, fabs, log, sin, cos, tan, tanh, asin, acos, atan, isnan, isinf
13
+ from libc.math cimport NAN as nan
14
+ from libc.math cimport INFINITY as inf
15
+ import cython
16
+ from cpython.mem cimport PyMem_Malloc
17
+ from cpython.mem cimport PyMem_Realloc
18
+ from cpython.mem cimport PyMem_Free
19
+ from hydpy.cythons.autogen cimport configutils
20
+ from hydpy.cythons.autogen cimport interfaceutils
21
+ from hydpy.cythons.autogen cimport interputils
22
+ from hydpy.cythons.autogen import pointerutils
23
+ from hydpy.cythons.autogen cimport pointerutils
24
+ from hydpy.cythons.autogen cimport quadutils
25
+ from hydpy.cythons.autogen cimport rootutils
26
+ from hydpy.cythons.autogen cimport smoothutils
27
+ from hydpy.cythons.autogen cimport masterinterface
28
+
29
+
30
+ cdef void do_nothing(Model model) noexcept nogil:
31
+ pass
32
+
33
+ cpdef get_wrapper():
34
+ cdef CallbackWrapper wrapper = CallbackWrapper()
35
+ wrapper.callback = do_nothing
36
+ return wrapper
37
+
38
+ @cython.final
39
+ cdef class Parameters:
40
+ pass
41
+ @cython.final
42
+ cdef class ControlParameters:
43
+ pass
44
+ @cython.final
45
+ cdef class DerivedParameters:
46
+ pass
47
+ @cython.final
48
+ cdef class FixedParameters:
49
+ pass
50
+ @cython.final
51
+ cdef class Sequences:
52
+ pass
53
+ @cython.final
54
+ cdef class InputSequences:
55
+ cpdef inline void load_data(self, numpy.int64_t idx) noexcept nogil:
56
+ cdef numpy.int64_t k
57
+ if self._referenceevapotranspiration_inputflag:
58
+ self.referenceevapotranspiration = self._referenceevapotranspiration_inputpointer[0]
59
+ elif self._referenceevapotranspiration_diskflag_reading:
60
+ self.referenceevapotranspiration = self._referenceevapotranspiration_ncarray[0]
61
+ elif self._referenceevapotranspiration_ramflag:
62
+ self.referenceevapotranspiration = self._referenceevapotranspiration_array[idx]
63
+ if self._relativehumidity_inputflag:
64
+ self.relativehumidity = self._relativehumidity_inputpointer[0]
65
+ elif self._relativehumidity_diskflag_reading:
66
+ self.relativehumidity = self._relativehumidity_ncarray[0]
67
+ elif self._relativehumidity_ramflag:
68
+ self.relativehumidity = self._relativehumidity_array[idx]
69
+ if self._windspeed_inputflag:
70
+ self.windspeed = self._windspeed_inputpointer[0]
71
+ elif self._windspeed_diskflag_reading:
72
+ self.windspeed = self._windspeed_ncarray[0]
73
+ elif self._windspeed_ramflag:
74
+ self.windspeed = self._windspeed_array[idx]
75
+ if self._atmosphericpressure_inputflag:
76
+ self.atmosphericpressure = self._atmosphericpressure_inputpointer[0]
77
+ elif self._atmosphericpressure_diskflag_reading:
78
+ self.atmosphericpressure = self._atmosphericpressure_ncarray[0]
79
+ elif self._atmosphericpressure_ramflag:
80
+ self.atmosphericpressure = self._atmosphericpressure_array[idx]
81
+ if self._normalairtemperature_inputflag:
82
+ self.normalairtemperature = self._normalairtemperature_inputpointer[0]
83
+ elif self._normalairtemperature_diskflag_reading:
84
+ self.normalairtemperature = self._normalairtemperature_ncarray[0]
85
+ elif self._normalairtemperature_ramflag:
86
+ self.normalairtemperature = self._normalairtemperature_array[idx]
87
+ if self._normalevapotranspiration_inputflag:
88
+ self.normalevapotranspiration = self._normalevapotranspiration_inputpointer[0]
89
+ elif self._normalevapotranspiration_diskflag_reading:
90
+ self.normalevapotranspiration = self._normalevapotranspiration_ncarray[0]
91
+ elif self._normalevapotranspiration_ramflag:
92
+ self.normalevapotranspiration = self._normalevapotranspiration_array[idx]
93
+ cpdef inline void save_data(self, numpy.int64_t idx) noexcept nogil:
94
+ cdef numpy.int64_t k
95
+ if self._referenceevapotranspiration_diskflag_writing:
96
+ self._referenceevapotranspiration_ncarray[0] = self.referenceevapotranspiration
97
+ if self._referenceevapotranspiration_ramflag:
98
+ self._referenceevapotranspiration_array[idx] = self.referenceevapotranspiration
99
+ if self._relativehumidity_diskflag_writing:
100
+ self._relativehumidity_ncarray[0] = self.relativehumidity
101
+ if self._relativehumidity_ramflag:
102
+ self._relativehumidity_array[idx] = self.relativehumidity
103
+ if self._windspeed_diskflag_writing:
104
+ self._windspeed_ncarray[0] = self.windspeed
105
+ if self._windspeed_ramflag:
106
+ self._windspeed_array[idx] = self.windspeed
107
+ if self._atmosphericpressure_diskflag_writing:
108
+ self._atmosphericpressure_ncarray[0] = self.atmosphericpressure
109
+ if self._atmosphericpressure_ramflag:
110
+ self._atmosphericpressure_array[idx] = self.atmosphericpressure
111
+ if self._normalairtemperature_diskflag_writing:
112
+ self._normalairtemperature_ncarray[0] = self.normalairtemperature
113
+ if self._normalairtemperature_ramflag:
114
+ self._normalairtemperature_array[idx] = self.normalairtemperature
115
+ if self._normalevapotranspiration_diskflag_writing:
116
+ self._normalevapotranspiration_ncarray[0] = self.normalevapotranspiration
117
+ if self._normalevapotranspiration_ramflag:
118
+ self._normalevapotranspiration_array[idx] = self.normalevapotranspiration
119
+ cpdef inline set_pointerinput(self, str name, pointerutils.PDouble value):
120
+ if name == "referenceevapotranspiration":
121
+ self._referenceevapotranspiration_inputpointer = value.p_value
122
+ if name == "relativehumidity":
123
+ self._relativehumidity_inputpointer = value.p_value
124
+ if name == "windspeed":
125
+ self._windspeed_inputpointer = value.p_value
126
+ if name == "atmosphericpressure":
127
+ self._atmosphericpressure_inputpointer = value.p_value
128
+ if name == "normalairtemperature":
129
+ self._normalairtemperature_inputpointer = value.p_value
130
+ if name == "normalevapotranspiration":
131
+ self._normalevapotranspiration_inputpointer = value.p_value
132
+ @cython.final
133
+ cdef class FactorSequences:
134
+ cpdef inline void load_data(self, numpy.int64_t idx) noexcept nogil:
135
+ cdef numpy.int64_t jdx0
136
+ cdef numpy.int64_t k
137
+ if self._meanairtemperature_diskflag_reading:
138
+ self.meanairtemperature = self._meanairtemperature_ncarray[0]
139
+ elif self._meanairtemperature_ramflag:
140
+ self.meanairtemperature = self._meanairtemperature_array[idx]
141
+ if self._airtemperature_diskflag_reading:
142
+ k = 0
143
+ for jdx0 in range(self._airtemperature_length_0):
144
+ self.airtemperature[jdx0] = self._airtemperature_ncarray[k]
145
+ k += 1
146
+ elif self._airtemperature_ramflag:
147
+ for jdx0 in range(self._airtemperature_length_0):
148
+ self.airtemperature[jdx0] = self._airtemperature_array[idx, jdx0]
149
+ if self._dailyairtemperature_diskflag_reading:
150
+ k = 0
151
+ for jdx0 in range(self._dailyairtemperature_length_0):
152
+ self.dailyairtemperature[jdx0] = self._dailyairtemperature_ncarray[k]
153
+ k += 1
154
+ elif self._dailyairtemperature_ramflag:
155
+ for jdx0 in range(self._dailyairtemperature_length_0):
156
+ self.dailyairtemperature[jdx0] = self._dailyairtemperature_array[idx, jdx0]
157
+ if self._windspeed2m_diskflag_reading:
158
+ self.windspeed2m = self._windspeed2m_ncarray[0]
159
+ elif self._windspeed2m_ramflag:
160
+ self.windspeed2m = self._windspeed2m_array[idx]
161
+ if self._dailywindspeed2m_diskflag_reading:
162
+ self.dailywindspeed2m = self._dailywindspeed2m_ncarray[0]
163
+ elif self._dailywindspeed2m_ramflag:
164
+ self.dailywindspeed2m = self._dailywindspeed2m_array[idx]
165
+ if self._windspeed10m_diskflag_reading:
166
+ self.windspeed10m = self._windspeed10m_ncarray[0]
167
+ elif self._windspeed10m_ramflag:
168
+ self.windspeed10m = self._windspeed10m_array[idx]
169
+ if self._dailyrelativehumidity_diskflag_reading:
170
+ self.dailyrelativehumidity = self._dailyrelativehumidity_ncarray[0]
171
+ elif self._dailyrelativehumidity_ramflag:
172
+ self.dailyrelativehumidity = self._dailyrelativehumidity_array[idx]
173
+ if self._sunshineduration_diskflag_reading:
174
+ self.sunshineduration = self._sunshineduration_ncarray[0]
175
+ elif self._sunshineduration_ramflag:
176
+ self.sunshineduration = self._sunshineduration_array[idx]
177
+ if self._possiblesunshineduration_diskflag_reading:
178
+ self.possiblesunshineduration = self._possiblesunshineduration_ncarray[0]
179
+ elif self._possiblesunshineduration_ramflag:
180
+ self.possiblesunshineduration = self._possiblesunshineduration_array[idx]
181
+ if self._dailysunshineduration_diskflag_reading:
182
+ self.dailysunshineduration = self._dailysunshineduration_ncarray[0]
183
+ elif self._dailysunshineduration_ramflag:
184
+ self.dailysunshineduration = self._dailysunshineduration_array[idx]
185
+ if self._dailypossiblesunshineduration_diskflag_reading:
186
+ self.dailypossiblesunshineduration = self._dailypossiblesunshineduration_ncarray[0]
187
+ elif self._dailypossiblesunshineduration_ramflag:
188
+ self.dailypossiblesunshineduration = self._dailypossiblesunshineduration_array[idx]
189
+ if self._saturationvapourpressure_diskflag_reading:
190
+ k = 0
191
+ for jdx0 in range(self._saturationvapourpressure_length_0):
192
+ self.saturationvapourpressure[jdx0] = self._saturationvapourpressure_ncarray[k]
193
+ k += 1
194
+ elif self._saturationvapourpressure_ramflag:
195
+ for jdx0 in range(self._saturationvapourpressure_length_0):
196
+ self.saturationvapourpressure[jdx0] = self._saturationvapourpressure_array[idx, jdx0]
197
+ if self._dailysaturationvapourpressure_diskflag_reading:
198
+ k = 0
199
+ for jdx0 in range(self._dailysaturationvapourpressure_length_0):
200
+ self.dailysaturationvapourpressure[jdx0] = self._dailysaturationvapourpressure_ncarray[k]
201
+ k += 1
202
+ elif self._dailysaturationvapourpressure_ramflag:
203
+ for jdx0 in range(self._dailysaturationvapourpressure_length_0):
204
+ self.dailysaturationvapourpressure[jdx0] = self._dailysaturationvapourpressure_array[idx, jdx0]
205
+ if self._saturationvapourpressureslope_diskflag_reading:
206
+ k = 0
207
+ for jdx0 in range(self._saturationvapourpressureslope_length_0):
208
+ self.saturationvapourpressureslope[jdx0] = self._saturationvapourpressureslope_ncarray[k]
209
+ k += 1
210
+ elif self._saturationvapourpressureslope_ramflag:
211
+ for jdx0 in range(self._saturationvapourpressureslope_length_0):
212
+ self.saturationvapourpressureslope[jdx0] = self._saturationvapourpressureslope_array[idx, jdx0]
213
+ if self._dailysaturationvapourpressureslope_diskflag_reading:
214
+ k = 0
215
+ for jdx0 in range(self._dailysaturationvapourpressureslope_length_0):
216
+ self.dailysaturationvapourpressureslope[jdx0] = self._dailysaturationvapourpressureslope_ncarray[k]
217
+ k += 1
218
+ elif self._dailysaturationvapourpressureslope_ramflag:
219
+ for jdx0 in range(self._dailysaturationvapourpressureslope_length_0):
220
+ self.dailysaturationvapourpressureslope[jdx0] = self._dailysaturationvapourpressureslope_array[idx, jdx0]
221
+ if self._actualvapourpressure_diskflag_reading:
222
+ k = 0
223
+ for jdx0 in range(self._actualvapourpressure_length_0):
224
+ self.actualvapourpressure[jdx0] = self._actualvapourpressure_ncarray[k]
225
+ k += 1
226
+ elif self._actualvapourpressure_ramflag:
227
+ for jdx0 in range(self._actualvapourpressure_length_0):
228
+ self.actualvapourpressure[jdx0] = self._actualvapourpressure_array[idx, jdx0]
229
+ if self._dailyactualvapourpressure_diskflag_reading:
230
+ k = 0
231
+ for jdx0 in range(self._dailyactualvapourpressure_length_0):
232
+ self.dailyactualvapourpressure[jdx0] = self._dailyactualvapourpressure_ncarray[k]
233
+ k += 1
234
+ elif self._dailyactualvapourpressure_ramflag:
235
+ for jdx0 in range(self._dailyactualvapourpressure_length_0):
236
+ self.dailyactualvapourpressure[jdx0] = self._dailyactualvapourpressure_array[idx, jdx0]
237
+ if self._dryairpressure_diskflag_reading:
238
+ k = 0
239
+ for jdx0 in range(self._dryairpressure_length_0):
240
+ self.dryairpressure[jdx0] = self._dryairpressure_ncarray[k]
241
+ k += 1
242
+ elif self._dryairpressure_ramflag:
243
+ for jdx0 in range(self._dryairpressure_length_0):
244
+ self.dryairpressure[jdx0] = self._dryairpressure_array[idx, jdx0]
245
+ if self._airdensity_diskflag_reading:
246
+ k = 0
247
+ for jdx0 in range(self._airdensity_length_0):
248
+ self.airdensity[jdx0] = self._airdensity_ncarray[k]
249
+ k += 1
250
+ elif self._airdensity_ramflag:
251
+ for jdx0 in range(self._airdensity_length_0):
252
+ self.airdensity[jdx0] = self._airdensity_array[idx, jdx0]
253
+ if self._psychrometricconstant_diskflag_reading:
254
+ self.psychrometricconstant = self._psychrometricconstant_ncarray[0]
255
+ elif self._psychrometricconstant_ramflag:
256
+ self.psychrometricconstant = self._psychrometricconstant_array[idx]
257
+ if self._currentalbedo_diskflag_reading:
258
+ k = 0
259
+ for jdx0 in range(self._currentalbedo_length_0):
260
+ self.currentalbedo[jdx0] = self._currentalbedo_ncarray[k]
261
+ k += 1
262
+ elif self._currentalbedo_ramflag:
263
+ for jdx0 in range(self._currentalbedo_length_0):
264
+ self.currentalbedo[jdx0] = self._currentalbedo_array[idx, jdx0]
265
+ if self._adjustedcloudcoverage_diskflag_reading:
266
+ self.adjustedcloudcoverage = self._adjustedcloudcoverage_ncarray[0]
267
+ elif self._adjustedcloudcoverage_ramflag:
268
+ self.adjustedcloudcoverage = self._adjustedcloudcoverage_array[idx]
269
+ if self._aerodynamicresistance_diskflag_reading:
270
+ k = 0
271
+ for jdx0 in range(self._aerodynamicresistance_length_0):
272
+ self.aerodynamicresistance[jdx0] = self._aerodynamicresistance_ncarray[k]
273
+ k += 1
274
+ elif self._aerodynamicresistance_ramflag:
275
+ for jdx0 in range(self._aerodynamicresistance_length_0):
276
+ self.aerodynamicresistance[jdx0] = self._aerodynamicresistance_array[idx, jdx0]
277
+ if self._soilsurfaceresistance_diskflag_reading:
278
+ k = 0
279
+ for jdx0 in range(self._soilsurfaceresistance_length_0):
280
+ self.soilsurfaceresistance[jdx0] = self._soilsurfaceresistance_ncarray[k]
281
+ k += 1
282
+ elif self._soilsurfaceresistance_ramflag:
283
+ for jdx0 in range(self._soilsurfaceresistance_length_0):
284
+ self.soilsurfaceresistance[jdx0] = self._soilsurfaceresistance_array[idx, jdx0]
285
+ if self._landusesurfaceresistance_diskflag_reading:
286
+ k = 0
287
+ for jdx0 in range(self._landusesurfaceresistance_length_0):
288
+ self.landusesurfaceresistance[jdx0] = self._landusesurfaceresistance_ncarray[k]
289
+ k += 1
290
+ elif self._landusesurfaceresistance_ramflag:
291
+ for jdx0 in range(self._landusesurfaceresistance_length_0):
292
+ self.landusesurfaceresistance[jdx0] = self._landusesurfaceresistance_array[idx, jdx0]
293
+ if self._actualsurfaceresistance_diskflag_reading:
294
+ k = 0
295
+ for jdx0 in range(self._actualsurfaceresistance_length_0):
296
+ self.actualsurfaceresistance[jdx0] = self._actualsurfaceresistance_ncarray[k]
297
+ k += 1
298
+ elif self._actualsurfaceresistance_ramflag:
299
+ for jdx0 in range(self._actualsurfaceresistance_length_0):
300
+ self.actualsurfaceresistance[jdx0] = self._actualsurfaceresistance_array[idx, jdx0]
301
+ if self._interceptedwater_diskflag_reading:
302
+ k = 0
303
+ for jdx0 in range(self._interceptedwater_length_0):
304
+ self.interceptedwater[jdx0] = self._interceptedwater_ncarray[k]
305
+ k += 1
306
+ elif self._interceptedwater_ramflag:
307
+ for jdx0 in range(self._interceptedwater_length_0):
308
+ self.interceptedwater[jdx0] = self._interceptedwater_array[idx, jdx0]
309
+ if self._soilwater_diskflag_reading:
310
+ k = 0
311
+ for jdx0 in range(self._soilwater_length_0):
312
+ self.soilwater[jdx0] = self._soilwater_ncarray[k]
313
+ k += 1
314
+ elif self._soilwater_ramflag:
315
+ for jdx0 in range(self._soilwater_length_0):
316
+ self.soilwater[jdx0] = self._soilwater_array[idx, jdx0]
317
+ if self._snowcover_diskflag_reading:
318
+ k = 0
319
+ for jdx0 in range(self._snowcover_length_0):
320
+ self.snowcover[jdx0] = self._snowcover_ncarray[k]
321
+ k += 1
322
+ elif self._snowcover_ramflag:
323
+ for jdx0 in range(self._snowcover_length_0):
324
+ self.snowcover[jdx0] = self._snowcover_array[idx, jdx0]
325
+ if self._snowycanopy_diskflag_reading:
326
+ k = 0
327
+ for jdx0 in range(self._snowycanopy_length_0):
328
+ self.snowycanopy[jdx0] = self._snowycanopy_ncarray[k]
329
+ k += 1
330
+ elif self._snowycanopy_ramflag:
331
+ for jdx0 in range(self._snowycanopy_length_0):
332
+ self.snowycanopy[jdx0] = self._snowycanopy_array[idx, jdx0]
333
+ cpdef inline void save_data(self, numpy.int64_t idx) noexcept nogil:
334
+ cdef numpy.int64_t jdx0
335
+ cdef numpy.int64_t k
336
+ if self._meanairtemperature_diskflag_writing:
337
+ self._meanairtemperature_ncarray[0] = self.meanairtemperature
338
+ if self._meanairtemperature_ramflag:
339
+ self._meanairtemperature_array[idx] = self.meanairtemperature
340
+ if self._airtemperature_diskflag_writing:
341
+ k = 0
342
+ for jdx0 in range(self._airtemperature_length_0):
343
+ self._airtemperature_ncarray[k] = self.airtemperature[jdx0]
344
+ k += 1
345
+ if self._airtemperature_ramflag:
346
+ for jdx0 in range(self._airtemperature_length_0):
347
+ self._airtemperature_array[idx, jdx0] = self.airtemperature[jdx0]
348
+ if self._dailyairtemperature_diskflag_writing:
349
+ k = 0
350
+ for jdx0 in range(self._dailyairtemperature_length_0):
351
+ self._dailyairtemperature_ncarray[k] = self.dailyairtemperature[jdx0]
352
+ k += 1
353
+ if self._dailyairtemperature_ramflag:
354
+ for jdx0 in range(self._dailyairtemperature_length_0):
355
+ self._dailyairtemperature_array[idx, jdx0] = self.dailyairtemperature[jdx0]
356
+ if self._windspeed2m_diskflag_writing:
357
+ self._windspeed2m_ncarray[0] = self.windspeed2m
358
+ if self._windspeed2m_ramflag:
359
+ self._windspeed2m_array[idx] = self.windspeed2m
360
+ if self._dailywindspeed2m_diskflag_writing:
361
+ self._dailywindspeed2m_ncarray[0] = self.dailywindspeed2m
362
+ if self._dailywindspeed2m_ramflag:
363
+ self._dailywindspeed2m_array[idx] = self.dailywindspeed2m
364
+ if self._windspeed10m_diskflag_writing:
365
+ self._windspeed10m_ncarray[0] = self.windspeed10m
366
+ if self._windspeed10m_ramflag:
367
+ self._windspeed10m_array[idx] = self.windspeed10m
368
+ if self._dailyrelativehumidity_diskflag_writing:
369
+ self._dailyrelativehumidity_ncarray[0] = self.dailyrelativehumidity
370
+ if self._dailyrelativehumidity_ramflag:
371
+ self._dailyrelativehumidity_array[idx] = self.dailyrelativehumidity
372
+ if self._sunshineduration_diskflag_writing:
373
+ self._sunshineduration_ncarray[0] = self.sunshineduration
374
+ if self._sunshineduration_ramflag:
375
+ self._sunshineduration_array[idx] = self.sunshineduration
376
+ if self._possiblesunshineduration_diskflag_writing:
377
+ self._possiblesunshineduration_ncarray[0] = self.possiblesunshineduration
378
+ if self._possiblesunshineduration_ramflag:
379
+ self._possiblesunshineduration_array[idx] = self.possiblesunshineduration
380
+ if self._dailysunshineduration_diskflag_writing:
381
+ self._dailysunshineduration_ncarray[0] = self.dailysunshineduration
382
+ if self._dailysunshineduration_ramflag:
383
+ self._dailysunshineduration_array[idx] = self.dailysunshineduration
384
+ if self._dailypossiblesunshineduration_diskflag_writing:
385
+ self._dailypossiblesunshineduration_ncarray[0] = self.dailypossiblesunshineduration
386
+ if self._dailypossiblesunshineduration_ramflag:
387
+ self._dailypossiblesunshineduration_array[idx] = self.dailypossiblesunshineduration
388
+ if self._saturationvapourpressure_diskflag_writing:
389
+ k = 0
390
+ for jdx0 in range(self._saturationvapourpressure_length_0):
391
+ self._saturationvapourpressure_ncarray[k] = self.saturationvapourpressure[jdx0]
392
+ k += 1
393
+ if self._saturationvapourpressure_ramflag:
394
+ for jdx0 in range(self._saturationvapourpressure_length_0):
395
+ self._saturationvapourpressure_array[idx, jdx0] = self.saturationvapourpressure[jdx0]
396
+ if self._dailysaturationvapourpressure_diskflag_writing:
397
+ k = 0
398
+ for jdx0 in range(self._dailysaturationvapourpressure_length_0):
399
+ self._dailysaturationvapourpressure_ncarray[k] = self.dailysaturationvapourpressure[jdx0]
400
+ k += 1
401
+ if self._dailysaturationvapourpressure_ramflag:
402
+ for jdx0 in range(self._dailysaturationvapourpressure_length_0):
403
+ self._dailysaturationvapourpressure_array[idx, jdx0] = self.dailysaturationvapourpressure[jdx0]
404
+ if self._saturationvapourpressureslope_diskflag_writing:
405
+ k = 0
406
+ for jdx0 in range(self._saturationvapourpressureslope_length_0):
407
+ self._saturationvapourpressureslope_ncarray[k] = self.saturationvapourpressureslope[jdx0]
408
+ k += 1
409
+ if self._saturationvapourpressureslope_ramflag:
410
+ for jdx0 in range(self._saturationvapourpressureslope_length_0):
411
+ self._saturationvapourpressureslope_array[idx, jdx0] = self.saturationvapourpressureslope[jdx0]
412
+ if self._dailysaturationvapourpressureslope_diskflag_writing:
413
+ k = 0
414
+ for jdx0 in range(self._dailysaturationvapourpressureslope_length_0):
415
+ self._dailysaturationvapourpressureslope_ncarray[k] = self.dailysaturationvapourpressureslope[jdx0]
416
+ k += 1
417
+ if self._dailysaturationvapourpressureslope_ramflag:
418
+ for jdx0 in range(self._dailysaturationvapourpressureslope_length_0):
419
+ self._dailysaturationvapourpressureslope_array[idx, jdx0] = self.dailysaturationvapourpressureslope[jdx0]
420
+ if self._actualvapourpressure_diskflag_writing:
421
+ k = 0
422
+ for jdx0 in range(self._actualvapourpressure_length_0):
423
+ self._actualvapourpressure_ncarray[k] = self.actualvapourpressure[jdx0]
424
+ k += 1
425
+ if self._actualvapourpressure_ramflag:
426
+ for jdx0 in range(self._actualvapourpressure_length_0):
427
+ self._actualvapourpressure_array[idx, jdx0] = self.actualvapourpressure[jdx0]
428
+ if self._dailyactualvapourpressure_diskflag_writing:
429
+ k = 0
430
+ for jdx0 in range(self._dailyactualvapourpressure_length_0):
431
+ self._dailyactualvapourpressure_ncarray[k] = self.dailyactualvapourpressure[jdx0]
432
+ k += 1
433
+ if self._dailyactualvapourpressure_ramflag:
434
+ for jdx0 in range(self._dailyactualvapourpressure_length_0):
435
+ self._dailyactualvapourpressure_array[idx, jdx0] = self.dailyactualvapourpressure[jdx0]
436
+ if self._dryairpressure_diskflag_writing:
437
+ k = 0
438
+ for jdx0 in range(self._dryairpressure_length_0):
439
+ self._dryairpressure_ncarray[k] = self.dryairpressure[jdx0]
440
+ k += 1
441
+ if self._dryairpressure_ramflag:
442
+ for jdx0 in range(self._dryairpressure_length_0):
443
+ self._dryairpressure_array[idx, jdx0] = self.dryairpressure[jdx0]
444
+ if self._airdensity_diskflag_writing:
445
+ k = 0
446
+ for jdx0 in range(self._airdensity_length_0):
447
+ self._airdensity_ncarray[k] = self.airdensity[jdx0]
448
+ k += 1
449
+ if self._airdensity_ramflag:
450
+ for jdx0 in range(self._airdensity_length_0):
451
+ self._airdensity_array[idx, jdx0] = self.airdensity[jdx0]
452
+ if self._psychrometricconstant_diskflag_writing:
453
+ self._psychrometricconstant_ncarray[0] = self.psychrometricconstant
454
+ if self._psychrometricconstant_ramflag:
455
+ self._psychrometricconstant_array[idx] = self.psychrometricconstant
456
+ if self._currentalbedo_diskflag_writing:
457
+ k = 0
458
+ for jdx0 in range(self._currentalbedo_length_0):
459
+ self._currentalbedo_ncarray[k] = self.currentalbedo[jdx0]
460
+ k += 1
461
+ if self._currentalbedo_ramflag:
462
+ for jdx0 in range(self._currentalbedo_length_0):
463
+ self._currentalbedo_array[idx, jdx0] = self.currentalbedo[jdx0]
464
+ if self._adjustedcloudcoverage_diskflag_writing:
465
+ self._adjustedcloudcoverage_ncarray[0] = self.adjustedcloudcoverage
466
+ if self._adjustedcloudcoverage_ramflag:
467
+ self._adjustedcloudcoverage_array[idx] = self.adjustedcloudcoverage
468
+ if self._aerodynamicresistance_diskflag_writing:
469
+ k = 0
470
+ for jdx0 in range(self._aerodynamicresistance_length_0):
471
+ self._aerodynamicresistance_ncarray[k] = self.aerodynamicresistance[jdx0]
472
+ k += 1
473
+ if self._aerodynamicresistance_ramflag:
474
+ for jdx0 in range(self._aerodynamicresistance_length_0):
475
+ self._aerodynamicresistance_array[idx, jdx0] = self.aerodynamicresistance[jdx0]
476
+ if self._soilsurfaceresistance_diskflag_writing:
477
+ k = 0
478
+ for jdx0 in range(self._soilsurfaceresistance_length_0):
479
+ self._soilsurfaceresistance_ncarray[k] = self.soilsurfaceresistance[jdx0]
480
+ k += 1
481
+ if self._soilsurfaceresistance_ramflag:
482
+ for jdx0 in range(self._soilsurfaceresistance_length_0):
483
+ self._soilsurfaceresistance_array[idx, jdx0] = self.soilsurfaceresistance[jdx0]
484
+ if self._landusesurfaceresistance_diskflag_writing:
485
+ k = 0
486
+ for jdx0 in range(self._landusesurfaceresistance_length_0):
487
+ self._landusesurfaceresistance_ncarray[k] = self.landusesurfaceresistance[jdx0]
488
+ k += 1
489
+ if self._landusesurfaceresistance_ramflag:
490
+ for jdx0 in range(self._landusesurfaceresistance_length_0):
491
+ self._landusesurfaceresistance_array[idx, jdx0] = self.landusesurfaceresistance[jdx0]
492
+ if self._actualsurfaceresistance_diskflag_writing:
493
+ k = 0
494
+ for jdx0 in range(self._actualsurfaceresistance_length_0):
495
+ self._actualsurfaceresistance_ncarray[k] = self.actualsurfaceresistance[jdx0]
496
+ k += 1
497
+ if self._actualsurfaceresistance_ramflag:
498
+ for jdx0 in range(self._actualsurfaceresistance_length_0):
499
+ self._actualsurfaceresistance_array[idx, jdx0] = self.actualsurfaceresistance[jdx0]
500
+ if self._interceptedwater_diskflag_writing:
501
+ k = 0
502
+ for jdx0 in range(self._interceptedwater_length_0):
503
+ self._interceptedwater_ncarray[k] = self.interceptedwater[jdx0]
504
+ k += 1
505
+ if self._interceptedwater_ramflag:
506
+ for jdx0 in range(self._interceptedwater_length_0):
507
+ self._interceptedwater_array[idx, jdx0] = self.interceptedwater[jdx0]
508
+ if self._soilwater_diskflag_writing:
509
+ k = 0
510
+ for jdx0 in range(self._soilwater_length_0):
511
+ self._soilwater_ncarray[k] = self.soilwater[jdx0]
512
+ k += 1
513
+ if self._soilwater_ramflag:
514
+ for jdx0 in range(self._soilwater_length_0):
515
+ self._soilwater_array[idx, jdx0] = self.soilwater[jdx0]
516
+ if self._snowcover_diskflag_writing:
517
+ k = 0
518
+ for jdx0 in range(self._snowcover_length_0):
519
+ self._snowcover_ncarray[k] = self.snowcover[jdx0]
520
+ k += 1
521
+ if self._snowcover_ramflag:
522
+ for jdx0 in range(self._snowcover_length_0):
523
+ self._snowcover_array[idx, jdx0] = self.snowcover[jdx0]
524
+ if self._snowycanopy_diskflag_writing:
525
+ k = 0
526
+ for jdx0 in range(self._snowycanopy_length_0):
527
+ self._snowycanopy_ncarray[k] = self.snowycanopy[jdx0]
528
+ k += 1
529
+ if self._snowycanopy_ramflag:
530
+ for jdx0 in range(self._snowycanopy_length_0):
531
+ self._snowycanopy_array[idx, jdx0] = self.snowycanopy[jdx0]
532
+ cpdef inline set_pointeroutput(self, str name, pointerutils.PDouble value):
533
+ if name == "meanairtemperature":
534
+ self._meanairtemperature_outputpointer = value.p_value
535
+ if name == "windspeed2m":
536
+ self._windspeed2m_outputpointer = value.p_value
537
+ if name == "dailywindspeed2m":
538
+ self._dailywindspeed2m_outputpointer = value.p_value
539
+ if name == "windspeed10m":
540
+ self._windspeed10m_outputpointer = value.p_value
541
+ if name == "dailyrelativehumidity":
542
+ self._dailyrelativehumidity_outputpointer = value.p_value
543
+ if name == "sunshineduration":
544
+ self._sunshineduration_outputpointer = value.p_value
545
+ if name == "possiblesunshineduration":
546
+ self._possiblesunshineduration_outputpointer = value.p_value
547
+ if name == "dailysunshineduration":
548
+ self._dailysunshineduration_outputpointer = value.p_value
549
+ if name == "dailypossiblesunshineduration":
550
+ self._dailypossiblesunshineduration_outputpointer = value.p_value
551
+ if name == "psychrometricconstant":
552
+ self._psychrometricconstant_outputpointer = value.p_value
553
+ if name == "adjustedcloudcoverage":
554
+ self._adjustedcloudcoverage_outputpointer = value.p_value
555
+ cpdef inline void update_outputs(self) noexcept nogil:
556
+ if self._meanairtemperature_outputflag:
557
+ self._meanairtemperature_outputpointer[0] = self.meanairtemperature
558
+ if self._windspeed2m_outputflag:
559
+ self._windspeed2m_outputpointer[0] = self.windspeed2m
560
+ if self._dailywindspeed2m_outputflag:
561
+ self._dailywindspeed2m_outputpointer[0] = self.dailywindspeed2m
562
+ if self._windspeed10m_outputflag:
563
+ self._windspeed10m_outputpointer[0] = self.windspeed10m
564
+ if self._dailyrelativehumidity_outputflag:
565
+ self._dailyrelativehumidity_outputpointer[0] = self.dailyrelativehumidity
566
+ if self._sunshineduration_outputflag:
567
+ self._sunshineduration_outputpointer[0] = self.sunshineduration
568
+ if self._possiblesunshineduration_outputflag:
569
+ self._possiblesunshineduration_outputpointer[0] = self.possiblesunshineduration
570
+ if self._dailysunshineduration_outputflag:
571
+ self._dailysunshineduration_outputpointer[0] = self.dailysunshineduration
572
+ if self._dailypossiblesunshineduration_outputflag:
573
+ self._dailypossiblesunshineduration_outputpointer[0] = self.dailypossiblesunshineduration
574
+ if self._psychrometricconstant_outputflag:
575
+ self._psychrometricconstant_outputpointer[0] = self.psychrometricconstant
576
+ if self._adjustedcloudcoverage_outputflag:
577
+ self._adjustedcloudcoverage_outputpointer[0] = self.adjustedcloudcoverage
578
+ @cython.final
579
+ cdef class FluxSequences:
580
+ cpdef inline void load_data(self, numpy.int64_t idx) noexcept nogil:
581
+ cdef numpy.int64_t jdx0
582
+ cdef numpy.int64_t k
583
+ if self._precipitation_diskflag_reading:
584
+ k = 0
585
+ for jdx0 in range(self._precipitation_length_0):
586
+ self.precipitation[jdx0] = self._precipitation_ncarray[k]
587
+ k += 1
588
+ elif self._precipitation_ramflag:
589
+ for jdx0 in range(self._precipitation_length_0):
590
+ self.precipitation[jdx0] = self._precipitation_array[idx, jdx0]
591
+ if self._dailyprecipitation_diskflag_reading:
592
+ k = 0
593
+ for jdx0 in range(self._dailyprecipitation_length_0):
594
+ self.dailyprecipitation[jdx0] = self._dailyprecipitation_ncarray[k]
595
+ k += 1
596
+ elif self._dailyprecipitation_ramflag:
597
+ for jdx0 in range(self._dailyprecipitation_length_0):
598
+ self.dailyprecipitation[jdx0] = self._dailyprecipitation_array[idx, jdx0]
599
+ if self._globalradiation_diskflag_reading:
600
+ self.globalradiation = self._globalradiation_ncarray[0]
601
+ elif self._globalradiation_ramflag:
602
+ self.globalradiation = self._globalradiation_array[idx]
603
+ if self._clearskysolarradiation_diskflag_reading:
604
+ self.clearskysolarradiation = self._clearskysolarradiation_ncarray[0]
605
+ elif self._clearskysolarradiation_ramflag:
606
+ self.clearskysolarradiation = self._clearskysolarradiation_array[idx]
607
+ if self._dailyglobalradiation_diskflag_reading:
608
+ self.dailyglobalradiation = self._dailyglobalradiation_ncarray[0]
609
+ elif self._dailyglobalradiation_ramflag:
610
+ self.dailyglobalradiation = self._dailyglobalradiation_array[idx]
611
+ if self._netshortwaveradiation_diskflag_reading:
612
+ k = 0
613
+ for jdx0 in range(self._netshortwaveradiation_length_0):
614
+ self.netshortwaveradiation[jdx0] = self._netshortwaveradiation_ncarray[k]
615
+ k += 1
616
+ elif self._netshortwaveradiation_ramflag:
617
+ for jdx0 in range(self._netshortwaveradiation_length_0):
618
+ self.netshortwaveradiation[jdx0] = self._netshortwaveradiation_array[idx, jdx0]
619
+ if self._dailynetshortwaveradiation_diskflag_reading:
620
+ k = 0
621
+ for jdx0 in range(self._dailynetshortwaveradiation_length_0):
622
+ self.dailynetshortwaveradiation[jdx0] = self._dailynetshortwaveradiation_ncarray[k]
623
+ k += 1
624
+ elif self._dailynetshortwaveradiation_ramflag:
625
+ for jdx0 in range(self._dailynetshortwaveradiation_length_0):
626
+ self.dailynetshortwaveradiation[jdx0] = self._dailynetshortwaveradiation_array[idx, jdx0]
627
+ if self._netlongwaveradiation_diskflag_reading:
628
+ k = 0
629
+ for jdx0 in range(self._netlongwaveradiation_length_0):
630
+ self.netlongwaveradiation[jdx0] = self._netlongwaveradiation_ncarray[k]
631
+ k += 1
632
+ elif self._netlongwaveradiation_ramflag:
633
+ for jdx0 in range(self._netlongwaveradiation_length_0):
634
+ self.netlongwaveradiation[jdx0] = self._netlongwaveradiation_array[idx, jdx0]
635
+ if self._dailynetlongwaveradiation_diskflag_reading:
636
+ k = 0
637
+ for jdx0 in range(self._dailynetlongwaveradiation_length_0):
638
+ self.dailynetlongwaveradiation[jdx0] = self._dailynetlongwaveradiation_ncarray[k]
639
+ k += 1
640
+ elif self._dailynetlongwaveradiation_ramflag:
641
+ for jdx0 in range(self._dailynetlongwaveradiation_length_0):
642
+ self.dailynetlongwaveradiation[jdx0] = self._dailynetlongwaveradiation_array[idx, jdx0]
643
+ if self._netradiation_diskflag_reading:
644
+ k = 0
645
+ for jdx0 in range(self._netradiation_length_0):
646
+ self.netradiation[jdx0] = self._netradiation_ncarray[k]
647
+ k += 1
648
+ elif self._netradiation_ramflag:
649
+ for jdx0 in range(self._netradiation_length_0):
650
+ self.netradiation[jdx0] = self._netradiation_array[idx, jdx0]
651
+ if self._dailynetradiation_diskflag_reading:
652
+ k = 0
653
+ for jdx0 in range(self._dailynetradiation_length_0):
654
+ self.dailynetradiation[jdx0] = self._dailynetradiation_ncarray[k]
655
+ k += 1
656
+ elif self._dailynetradiation_ramflag:
657
+ for jdx0 in range(self._dailynetradiation_length_0):
658
+ self.dailynetradiation[jdx0] = self._dailynetradiation_array[idx, jdx0]
659
+ if self._soilheatflux_diskflag_reading:
660
+ k = 0
661
+ for jdx0 in range(self._soilheatflux_length_0):
662
+ self.soilheatflux[jdx0] = self._soilheatflux_ncarray[k]
663
+ k += 1
664
+ elif self._soilheatflux_ramflag:
665
+ for jdx0 in range(self._soilheatflux_length_0):
666
+ self.soilheatflux[jdx0] = self._soilheatflux_array[idx, jdx0]
667
+ if self._referenceevapotranspiration_diskflag_reading:
668
+ k = 0
669
+ for jdx0 in range(self._referenceevapotranspiration_length_0):
670
+ self.referenceevapotranspiration[jdx0] = self._referenceevapotranspiration_ncarray[k]
671
+ k += 1
672
+ elif self._referenceevapotranspiration_ramflag:
673
+ for jdx0 in range(self._referenceevapotranspiration_length_0):
674
+ self.referenceevapotranspiration[jdx0] = self._referenceevapotranspiration_array[idx, jdx0]
675
+ if self._potentialinterceptionevaporation_diskflag_reading:
676
+ k = 0
677
+ for jdx0 in range(self._potentialinterceptionevaporation_length_0):
678
+ self.potentialinterceptionevaporation[jdx0] = self._potentialinterceptionevaporation_ncarray[k]
679
+ k += 1
680
+ elif self._potentialinterceptionevaporation_ramflag:
681
+ for jdx0 in range(self._potentialinterceptionevaporation_length_0):
682
+ self.potentialinterceptionevaporation[jdx0] = self._potentialinterceptionevaporation_array[idx, jdx0]
683
+ if self._potentialsoilevapotranspiration_diskflag_reading:
684
+ k = 0
685
+ for jdx0 in range(self._potentialsoilevapotranspiration_length_0):
686
+ self.potentialsoilevapotranspiration[jdx0] = self._potentialsoilevapotranspiration_ncarray[k]
687
+ k += 1
688
+ elif self._potentialsoilevapotranspiration_ramflag:
689
+ for jdx0 in range(self._potentialsoilevapotranspiration_length_0):
690
+ self.potentialsoilevapotranspiration[jdx0] = self._potentialsoilevapotranspiration_array[idx, jdx0]
691
+ if self._potentialevapotranspiration_diskflag_reading:
692
+ k = 0
693
+ for jdx0 in range(self._potentialevapotranspiration_length_0):
694
+ self.potentialevapotranspiration[jdx0] = self._potentialevapotranspiration_ncarray[k]
695
+ k += 1
696
+ elif self._potentialevapotranspiration_ramflag:
697
+ for jdx0 in range(self._potentialevapotranspiration_length_0):
698
+ self.potentialevapotranspiration[jdx0] = self._potentialevapotranspiration_array[idx, jdx0]
699
+ if self._dailypotentialsoilevapotranspiration_diskflag_reading:
700
+ k = 0
701
+ for jdx0 in range(self._dailypotentialsoilevapotranspiration_length_0):
702
+ self.dailypotentialsoilevapotranspiration[jdx0] = self._dailypotentialsoilevapotranspiration_ncarray[k]
703
+ k += 1
704
+ elif self._dailypotentialsoilevapotranspiration_ramflag:
705
+ for jdx0 in range(self._dailypotentialsoilevapotranspiration_length_0):
706
+ self.dailypotentialsoilevapotranspiration[jdx0] = self._dailypotentialsoilevapotranspiration_array[idx, jdx0]
707
+ if self._meanreferenceevapotranspiration_diskflag_reading:
708
+ self.meanreferenceevapotranspiration = self._meanreferenceevapotranspiration_ncarray[0]
709
+ elif self._meanreferenceevapotranspiration_ramflag:
710
+ self.meanreferenceevapotranspiration = self._meanreferenceevapotranspiration_array[idx]
711
+ if self._meanpotentialevapotranspiration_diskflag_reading:
712
+ self.meanpotentialevapotranspiration = self._meanpotentialevapotranspiration_ncarray[0]
713
+ elif self._meanpotentialevapotranspiration_ramflag:
714
+ self.meanpotentialevapotranspiration = self._meanpotentialevapotranspiration_array[idx]
715
+ if self._potentialwaterevaporation_diskflag_reading:
716
+ k = 0
717
+ for jdx0 in range(self._potentialwaterevaporation_length_0):
718
+ self.potentialwaterevaporation[jdx0] = self._potentialwaterevaporation_ncarray[k]
719
+ k += 1
720
+ elif self._potentialwaterevaporation_ramflag:
721
+ for jdx0 in range(self._potentialwaterevaporation_length_0):
722
+ self.potentialwaterevaporation[jdx0] = self._potentialwaterevaporation_array[idx, jdx0]
723
+ if self._waterevaporation_diskflag_reading:
724
+ k = 0
725
+ for jdx0 in range(self._waterevaporation_length_0):
726
+ self.waterevaporation[jdx0] = self._waterevaporation_ncarray[k]
727
+ k += 1
728
+ elif self._waterevaporation_ramflag:
729
+ for jdx0 in range(self._waterevaporation_length_0):
730
+ self.waterevaporation[jdx0] = self._waterevaporation_array[idx, jdx0]
731
+ if self._dailywaterevaporation_diskflag_reading:
732
+ k = 0
733
+ for jdx0 in range(self._dailywaterevaporation_length_0):
734
+ self.dailywaterevaporation[jdx0] = self._dailywaterevaporation_ncarray[k]
735
+ k += 1
736
+ elif self._dailywaterevaporation_ramflag:
737
+ for jdx0 in range(self._dailywaterevaporation_length_0):
738
+ self.dailywaterevaporation[jdx0] = self._dailywaterevaporation_array[idx, jdx0]
739
+ if self._interceptionevaporation_diskflag_reading:
740
+ k = 0
741
+ for jdx0 in range(self._interceptionevaporation_length_0):
742
+ self.interceptionevaporation[jdx0] = self._interceptionevaporation_ncarray[k]
743
+ k += 1
744
+ elif self._interceptionevaporation_ramflag:
745
+ for jdx0 in range(self._interceptionevaporation_length_0):
746
+ self.interceptionevaporation[jdx0] = self._interceptionevaporation_array[idx, jdx0]
747
+ if self._soilevapotranspiration_diskflag_reading:
748
+ k = 0
749
+ for jdx0 in range(self._soilevapotranspiration_length_0):
750
+ self.soilevapotranspiration[jdx0] = self._soilevapotranspiration_ncarray[k]
751
+ k += 1
752
+ elif self._soilevapotranspiration_ramflag:
753
+ for jdx0 in range(self._soilevapotranspiration_length_0):
754
+ self.soilevapotranspiration[jdx0] = self._soilevapotranspiration_array[idx, jdx0]
755
+ cpdef inline void save_data(self, numpy.int64_t idx) noexcept nogil:
756
+ cdef numpy.int64_t jdx0
757
+ cdef numpy.int64_t k
758
+ if self._precipitation_diskflag_writing:
759
+ k = 0
760
+ for jdx0 in range(self._precipitation_length_0):
761
+ self._precipitation_ncarray[k] = self.precipitation[jdx0]
762
+ k += 1
763
+ if self._precipitation_ramflag:
764
+ for jdx0 in range(self._precipitation_length_0):
765
+ self._precipitation_array[idx, jdx0] = self.precipitation[jdx0]
766
+ if self._dailyprecipitation_diskflag_writing:
767
+ k = 0
768
+ for jdx0 in range(self._dailyprecipitation_length_0):
769
+ self._dailyprecipitation_ncarray[k] = self.dailyprecipitation[jdx0]
770
+ k += 1
771
+ if self._dailyprecipitation_ramflag:
772
+ for jdx0 in range(self._dailyprecipitation_length_0):
773
+ self._dailyprecipitation_array[idx, jdx0] = self.dailyprecipitation[jdx0]
774
+ if self._globalradiation_diskflag_writing:
775
+ self._globalradiation_ncarray[0] = self.globalradiation
776
+ if self._globalradiation_ramflag:
777
+ self._globalradiation_array[idx] = self.globalradiation
778
+ if self._clearskysolarradiation_diskflag_writing:
779
+ self._clearskysolarradiation_ncarray[0] = self.clearskysolarradiation
780
+ if self._clearskysolarradiation_ramflag:
781
+ self._clearskysolarradiation_array[idx] = self.clearskysolarradiation
782
+ if self._dailyglobalradiation_diskflag_writing:
783
+ self._dailyglobalradiation_ncarray[0] = self.dailyglobalradiation
784
+ if self._dailyglobalradiation_ramflag:
785
+ self._dailyglobalradiation_array[idx] = self.dailyglobalradiation
786
+ if self._netshortwaveradiation_diskflag_writing:
787
+ k = 0
788
+ for jdx0 in range(self._netshortwaveradiation_length_0):
789
+ self._netshortwaveradiation_ncarray[k] = self.netshortwaveradiation[jdx0]
790
+ k += 1
791
+ if self._netshortwaveradiation_ramflag:
792
+ for jdx0 in range(self._netshortwaveradiation_length_0):
793
+ self._netshortwaveradiation_array[idx, jdx0] = self.netshortwaveradiation[jdx0]
794
+ if self._dailynetshortwaveradiation_diskflag_writing:
795
+ k = 0
796
+ for jdx0 in range(self._dailynetshortwaveradiation_length_0):
797
+ self._dailynetshortwaveradiation_ncarray[k] = self.dailynetshortwaveradiation[jdx0]
798
+ k += 1
799
+ if self._dailynetshortwaveradiation_ramflag:
800
+ for jdx0 in range(self._dailynetshortwaveradiation_length_0):
801
+ self._dailynetshortwaveradiation_array[idx, jdx0] = self.dailynetshortwaveradiation[jdx0]
802
+ if self._netlongwaveradiation_diskflag_writing:
803
+ k = 0
804
+ for jdx0 in range(self._netlongwaveradiation_length_0):
805
+ self._netlongwaveradiation_ncarray[k] = self.netlongwaveradiation[jdx0]
806
+ k += 1
807
+ if self._netlongwaveradiation_ramflag:
808
+ for jdx0 in range(self._netlongwaveradiation_length_0):
809
+ self._netlongwaveradiation_array[idx, jdx0] = self.netlongwaveradiation[jdx0]
810
+ if self._dailynetlongwaveradiation_diskflag_writing:
811
+ k = 0
812
+ for jdx0 in range(self._dailynetlongwaveradiation_length_0):
813
+ self._dailynetlongwaveradiation_ncarray[k] = self.dailynetlongwaveradiation[jdx0]
814
+ k += 1
815
+ if self._dailynetlongwaveradiation_ramflag:
816
+ for jdx0 in range(self._dailynetlongwaveradiation_length_0):
817
+ self._dailynetlongwaveradiation_array[idx, jdx0] = self.dailynetlongwaveradiation[jdx0]
818
+ if self._netradiation_diskflag_writing:
819
+ k = 0
820
+ for jdx0 in range(self._netradiation_length_0):
821
+ self._netradiation_ncarray[k] = self.netradiation[jdx0]
822
+ k += 1
823
+ if self._netradiation_ramflag:
824
+ for jdx0 in range(self._netradiation_length_0):
825
+ self._netradiation_array[idx, jdx0] = self.netradiation[jdx0]
826
+ if self._dailynetradiation_diskflag_writing:
827
+ k = 0
828
+ for jdx0 in range(self._dailynetradiation_length_0):
829
+ self._dailynetradiation_ncarray[k] = self.dailynetradiation[jdx0]
830
+ k += 1
831
+ if self._dailynetradiation_ramflag:
832
+ for jdx0 in range(self._dailynetradiation_length_0):
833
+ self._dailynetradiation_array[idx, jdx0] = self.dailynetradiation[jdx0]
834
+ if self._soilheatflux_diskflag_writing:
835
+ k = 0
836
+ for jdx0 in range(self._soilheatflux_length_0):
837
+ self._soilheatflux_ncarray[k] = self.soilheatflux[jdx0]
838
+ k += 1
839
+ if self._soilheatflux_ramflag:
840
+ for jdx0 in range(self._soilheatflux_length_0):
841
+ self._soilheatflux_array[idx, jdx0] = self.soilheatflux[jdx0]
842
+ if self._referenceevapotranspiration_diskflag_writing:
843
+ k = 0
844
+ for jdx0 in range(self._referenceevapotranspiration_length_0):
845
+ self._referenceevapotranspiration_ncarray[k] = self.referenceevapotranspiration[jdx0]
846
+ k += 1
847
+ if self._referenceevapotranspiration_ramflag:
848
+ for jdx0 in range(self._referenceevapotranspiration_length_0):
849
+ self._referenceevapotranspiration_array[idx, jdx0] = self.referenceevapotranspiration[jdx0]
850
+ if self._potentialinterceptionevaporation_diskflag_writing:
851
+ k = 0
852
+ for jdx0 in range(self._potentialinterceptionevaporation_length_0):
853
+ self._potentialinterceptionevaporation_ncarray[k] = self.potentialinterceptionevaporation[jdx0]
854
+ k += 1
855
+ if self._potentialinterceptionevaporation_ramflag:
856
+ for jdx0 in range(self._potentialinterceptionevaporation_length_0):
857
+ self._potentialinterceptionevaporation_array[idx, jdx0] = self.potentialinterceptionevaporation[jdx0]
858
+ if self._potentialsoilevapotranspiration_diskflag_writing:
859
+ k = 0
860
+ for jdx0 in range(self._potentialsoilevapotranspiration_length_0):
861
+ self._potentialsoilevapotranspiration_ncarray[k] = self.potentialsoilevapotranspiration[jdx0]
862
+ k += 1
863
+ if self._potentialsoilevapotranspiration_ramflag:
864
+ for jdx0 in range(self._potentialsoilevapotranspiration_length_0):
865
+ self._potentialsoilevapotranspiration_array[idx, jdx0] = self.potentialsoilevapotranspiration[jdx0]
866
+ if self._potentialevapotranspiration_diskflag_writing:
867
+ k = 0
868
+ for jdx0 in range(self._potentialevapotranspiration_length_0):
869
+ self._potentialevapotranspiration_ncarray[k] = self.potentialevapotranspiration[jdx0]
870
+ k += 1
871
+ if self._potentialevapotranspiration_ramflag:
872
+ for jdx0 in range(self._potentialevapotranspiration_length_0):
873
+ self._potentialevapotranspiration_array[idx, jdx0] = self.potentialevapotranspiration[jdx0]
874
+ if self._dailypotentialsoilevapotranspiration_diskflag_writing:
875
+ k = 0
876
+ for jdx0 in range(self._dailypotentialsoilevapotranspiration_length_0):
877
+ self._dailypotentialsoilevapotranspiration_ncarray[k] = self.dailypotentialsoilevapotranspiration[jdx0]
878
+ k += 1
879
+ if self._dailypotentialsoilevapotranspiration_ramflag:
880
+ for jdx0 in range(self._dailypotentialsoilevapotranspiration_length_0):
881
+ self._dailypotentialsoilevapotranspiration_array[idx, jdx0] = self.dailypotentialsoilevapotranspiration[jdx0]
882
+ if self._meanreferenceevapotranspiration_diskflag_writing:
883
+ self._meanreferenceevapotranspiration_ncarray[0] = self.meanreferenceevapotranspiration
884
+ if self._meanreferenceevapotranspiration_ramflag:
885
+ self._meanreferenceevapotranspiration_array[idx] = self.meanreferenceevapotranspiration
886
+ if self._meanpotentialevapotranspiration_diskflag_writing:
887
+ self._meanpotentialevapotranspiration_ncarray[0] = self.meanpotentialevapotranspiration
888
+ if self._meanpotentialevapotranspiration_ramflag:
889
+ self._meanpotentialevapotranspiration_array[idx] = self.meanpotentialevapotranspiration
890
+ if self._potentialwaterevaporation_diskflag_writing:
891
+ k = 0
892
+ for jdx0 in range(self._potentialwaterevaporation_length_0):
893
+ self._potentialwaterevaporation_ncarray[k] = self.potentialwaterevaporation[jdx0]
894
+ k += 1
895
+ if self._potentialwaterevaporation_ramflag:
896
+ for jdx0 in range(self._potentialwaterevaporation_length_0):
897
+ self._potentialwaterevaporation_array[idx, jdx0] = self.potentialwaterevaporation[jdx0]
898
+ if self._waterevaporation_diskflag_writing:
899
+ k = 0
900
+ for jdx0 in range(self._waterevaporation_length_0):
901
+ self._waterevaporation_ncarray[k] = self.waterevaporation[jdx0]
902
+ k += 1
903
+ if self._waterevaporation_ramflag:
904
+ for jdx0 in range(self._waterevaporation_length_0):
905
+ self._waterevaporation_array[idx, jdx0] = self.waterevaporation[jdx0]
906
+ if self._dailywaterevaporation_diskflag_writing:
907
+ k = 0
908
+ for jdx0 in range(self._dailywaterevaporation_length_0):
909
+ self._dailywaterevaporation_ncarray[k] = self.dailywaterevaporation[jdx0]
910
+ k += 1
911
+ if self._dailywaterevaporation_ramflag:
912
+ for jdx0 in range(self._dailywaterevaporation_length_0):
913
+ self._dailywaterevaporation_array[idx, jdx0] = self.dailywaterevaporation[jdx0]
914
+ if self._interceptionevaporation_diskflag_writing:
915
+ k = 0
916
+ for jdx0 in range(self._interceptionevaporation_length_0):
917
+ self._interceptionevaporation_ncarray[k] = self.interceptionevaporation[jdx0]
918
+ k += 1
919
+ if self._interceptionevaporation_ramflag:
920
+ for jdx0 in range(self._interceptionevaporation_length_0):
921
+ self._interceptionevaporation_array[idx, jdx0] = self.interceptionevaporation[jdx0]
922
+ if self._soilevapotranspiration_diskflag_writing:
923
+ k = 0
924
+ for jdx0 in range(self._soilevapotranspiration_length_0):
925
+ self._soilevapotranspiration_ncarray[k] = self.soilevapotranspiration[jdx0]
926
+ k += 1
927
+ if self._soilevapotranspiration_ramflag:
928
+ for jdx0 in range(self._soilevapotranspiration_length_0):
929
+ self._soilevapotranspiration_array[idx, jdx0] = self.soilevapotranspiration[jdx0]
930
+ cpdef inline set_pointeroutput(self, str name, pointerutils.PDouble value):
931
+ if name == "globalradiation":
932
+ self._globalradiation_outputpointer = value.p_value
933
+ if name == "clearskysolarradiation":
934
+ self._clearskysolarradiation_outputpointer = value.p_value
935
+ if name == "dailyglobalradiation":
936
+ self._dailyglobalradiation_outputpointer = value.p_value
937
+ if name == "meanreferenceevapotranspiration":
938
+ self._meanreferenceevapotranspiration_outputpointer = value.p_value
939
+ if name == "meanpotentialevapotranspiration":
940
+ self._meanpotentialevapotranspiration_outputpointer = value.p_value
941
+ cpdef inline void update_outputs(self) noexcept nogil:
942
+ if self._globalradiation_outputflag:
943
+ self._globalradiation_outputpointer[0] = self.globalradiation
944
+ if self._clearskysolarradiation_outputflag:
945
+ self._clearskysolarradiation_outputpointer[0] = self.clearskysolarradiation
946
+ if self._dailyglobalradiation_outputflag:
947
+ self._dailyglobalradiation_outputpointer[0] = self.dailyglobalradiation
948
+ if self._meanreferenceevapotranspiration_outputflag:
949
+ self._meanreferenceevapotranspiration_outputpointer[0] = self.meanreferenceevapotranspiration
950
+ if self._meanpotentialevapotranspiration_outputflag:
951
+ self._meanpotentialevapotranspiration_outputpointer[0] = self.meanpotentialevapotranspiration
952
+ @cython.final
953
+ cdef class StateSequences:
954
+ cpdef inline void load_data(self, numpy.int64_t idx) noexcept nogil:
955
+ cdef numpy.int64_t jdx0
956
+ cdef numpy.int64_t k
957
+ if self._cloudcoverage_diskflag_reading:
958
+ self.cloudcoverage = self._cloudcoverage_ncarray[0]
959
+ elif self._cloudcoverage_ramflag:
960
+ self.cloudcoverage = self._cloudcoverage_array[idx]
961
+ if self._soilresistance_diskflag_reading:
962
+ k = 0
963
+ for jdx0 in range(self._soilresistance_length_0):
964
+ self.soilresistance[jdx0] = self._soilresistance_ncarray[k]
965
+ k += 1
966
+ elif self._soilresistance_ramflag:
967
+ for jdx0 in range(self._soilresistance_length_0):
968
+ self.soilresistance[jdx0] = self._soilresistance_array[idx, jdx0]
969
+ cpdef inline void save_data(self, numpy.int64_t idx) noexcept nogil:
970
+ cdef numpy.int64_t jdx0
971
+ cdef numpy.int64_t k
972
+ if self._cloudcoverage_diskflag_writing:
973
+ self._cloudcoverage_ncarray[0] = self.cloudcoverage
974
+ if self._cloudcoverage_ramflag:
975
+ self._cloudcoverage_array[idx] = self.cloudcoverage
976
+ if self._soilresistance_diskflag_writing:
977
+ k = 0
978
+ for jdx0 in range(self._soilresistance_length_0):
979
+ self._soilresistance_ncarray[k] = self.soilresistance[jdx0]
980
+ k += 1
981
+ if self._soilresistance_ramflag:
982
+ for jdx0 in range(self._soilresistance_length_0):
983
+ self._soilresistance_array[idx, jdx0] = self.soilresistance[jdx0]
984
+ cpdef inline set_pointeroutput(self, str name, pointerutils.PDouble value):
985
+ if name == "cloudcoverage":
986
+ self._cloudcoverage_outputpointer = value.p_value
987
+ cpdef inline void update_outputs(self) noexcept nogil:
988
+ if self._cloudcoverage_outputflag:
989
+ self._cloudcoverage_outputpointer[0] = self.cloudcoverage
990
+ @cython.final
991
+ cdef class LogSequences:
992
+ pass
993
+ @cython.final
994
+ cdef class Model:
995
+ def __init__(self):
996
+ super().__init__()
997
+ self.intercmodel = None
998
+ self.intercmodel_is_mainmodel = False
999
+ self.petmodel = None
1000
+ self.petmodel_is_mainmodel = False
1001
+ self.precipmodel = None
1002
+ self.precipmodel_is_mainmodel = False
1003
+ self.radiationmodel = None
1004
+ self.radiationmodel_is_mainmodel = False
1005
+ self.retmodel = None
1006
+ self.retmodel_is_mainmodel = False
1007
+ self.snowalbedomodel = None
1008
+ self.snowalbedomodel_is_mainmodel = False
1009
+ self.snowcovermodel = None
1010
+ self.snowcovermodel_is_mainmodel = False
1011
+ self.snowycanopymodel = None
1012
+ self.snowycanopymodel_is_mainmodel = False
1013
+ self.soilwatermodel = None
1014
+ self.soilwatermodel_is_mainmodel = False
1015
+ self.tempmodel = None
1016
+ self.tempmodel_is_mainmodel = False
1017
+ def get_intercmodel(self) -> masterinterface.MasterInterface | None:
1018
+ return self.intercmodel
1019
+ def set_intercmodel(self, intercmodel: masterinterface.MasterInterface | None) -> None:
1020
+ self.intercmodel = intercmodel
1021
+ def get_petmodel(self) -> masterinterface.MasterInterface | None:
1022
+ return self.petmodel
1023
+ def set_petmodel(self, petmodel: masterinterface.MasterInterface | None) -> None:
1024
+ self.petmodel = petmodel
1025
+ def get_precipmodel(self) -> masterinterface.MasterInterface | None:
1026
+ return self.precipmodel
1027
+ def set_precipmodel(self, precipmodel: masterinterface.MasterInterface | None) -> None:
1028
+ self.precipmodel = precipmodel
1029
+ def get_radiationmodel(self) -> masterinterface.MasterInterface | None:
1030
+ return self.radiationmodel
1031
+ def set_radiationmodel(self, radiationmodel: masterinterface.MasterInterface | None) -> None:
1032
+ self.radiationmodel = radiationmodel
1033
+ def get_retmodel(self) -> masterinterface.MasterInterface | None:
1034
+ return self.retmodel
1035
+ def set_retmodel(self, retmodel: masterinterface.MasterInterface | None) -> None:
1036
+ self.retmodel = retmodel
1037
+ def get_snowalbedomodel(self) -> masterinterface.MasterInterface | None:
1038
+ return self.snowalbedomodel
1039
+ def set_snowalbedomodel(self, snowalbedomodel: masterinterface.MasterInterface | None) -> None:
1040
+ self.snowalbedomodel = snowalbedomodel
1041
+ def get_snowcovermodel(self) -> masterinterface.MasterInterface | None:
1042
+ return self.snowcovermodel
1043
+ def set_snowcovermodel(self, snowcovermodel: masterinterface.MasterInterface | None) -> None:
1044
+ self.snowcovermodel = snowcovermodel
1045
+ def get_snowycanopymodel(self) -> masterinterface.MasterInterface | None:
1046
+ return self.snowycanopymodel
1047
+ def set_snowycanopymodel(self, snowycanopymodel: masterinterface.MasterInterface | None) -> None:
1048
+ self.snowycanopymodel = snowycanopymodel
1049
+ def get_soilwatermodel(self) -> masterinterface.MasterInterface | None:
1050
+ return self.soilwatermodel
1051
+ def set_soilwatermodel(self, soilwatermodel: masterinterface.MasterInterface | None) -> None:
1052
+ self.soilwatermodel = soilwatermodel
1053
+ def get_tempmodel(self) -> masterinterface.MasterInterface | None:
1054
+ return self.tempmodel
1055
+ def set_tempmodel(self, tempmodel: masterinterface.MasterInterface | None) -> None:
1056
+ self.tempmodel = tempmodel
1057
+ cpdef inline void simulate(self, numpy.int64_t idx) noexcept nogil:
1058
+ self.idx_sim = idx
1059
+ self.reset_reuseflags()
1060
+ self.load_data(idx)
1061
+ self.run()
1062
+ self.new2old()
1063
+ self.update_outputs()
1064
+ cpdef void reset_reuseflags(self) noexcept nogil:
1065
+ if (self.intercmodel is not None) and not self.intercmodel_is_mainmodel:
1066
+ self.intercmodel.reset_reuseflags()
1067
+ if (self.petmodel is not None) and not self.petmodel_is_mainmodel:
1068
+ self.petmodel.reset_reuseflags()
1069
+ if (self.precipmodel is not None) and not self.precipmodel_is_mainmodel:
1070
+ self.precipmodel.reset_reuseflags()
1071
+ if (self.radiationmodel is not None) and not self.radiationmodel_is_mainmodel:
1072
+ self.radiationmodel.reset_reuseflags()
1073
+ if (self.retmodel is not None) and not self.retmodel_is_mainmodel:
1074
+ self.retmodel.reset_reuseflags()
1075
+ if (self.snowalbedomodel is not None) and not self.snowalbedomodel_is_mainmodel:
1076
+ self.snowalbedomodel.reset_reuseflags()
1077
+ if (self.snowcovermodel is not None) and not self.snowcovermodel_is_mainmodel:
1078
+ self.snowcovermodel.reset_reuseflags()
1079
+ if (self.snowycanopymodel is not None) and not self.snowycanopymodel_is_mainmodel:
1080
+ self.snowycanopymodel.reset_reuseflags()
1081
+ if (self.soilwatermodel is not None) and not self.soilwatermodel_is_mainmodel:
1082
+ self.soilwatermodel.reset_reuseflags()
1083
+ if (self.tempmodel is not None) and not self.tempmodel_is_mainmodel:
1084
+ self.tempmodel.reset_reuseflags()
1085
+ cpdef void load_data(self, numpy.int64_t idx) noexcept nogil:
1086
+ self.idx_sim = idx
1087
+ self.sequences.inputs.load_data(idx)
1088
+ if (self.intercmodel is not None) and not self.intercmodel_is_mainmodel:
1089
+ self.intercmodel.load_data(idx)
1090
+ if (self.petmodel is not None) and not self.petmodel_is_mainmodel:
1091
+ self.petmodel.load_data(idx)
1092
+ if (self.precipmodel is not None) and not self.precipmodel_is_mainmodel:
1093
+ self.precipmodel.load_data(idx)
1094
+ if (self.radiationmodel is not None) and not self.radiationmodel_is_mainmodel:
1095
+ self.radiationmodel.load_data(idx)
1096
+ if (self.retmodel is not None) and not self.retmodel_is_mainmodel:
1097
+ self.retmodel.load_data(idx)
1098
+ if (self.snowalbedomodel is not None) and not self.snowalbedomodel_is_mainmodel:
1099
+ self.snowalbedomodel.load_data(idx)
1100
+ if (self.snowcovermodel is not None) and not self.snowcovermodel_is_mainmodel:
1101
+ self.snowcovermodel.load_data(idx)
1102
+ if (self.snowycanopymodel is not None) and not self.snowycanopymodel_is_mainmodel:
1103
+ self.snowycanopymodel.load_data(idx)
1104
+ if (self.soilwatermodel is not None) and not self.soilwatermodel_is_mainmodel:
1105
+ self.soilwatermodel.load_data(idx)
1106
+ if (self.tempmodel is not None) and not self.tempmodel_is_mainmodel:
1107
+ self.tempmodel.load_data(idx)
1108
+ cpdef void save_data(self, numpy.int64_t idx) noexcept nogil:
1109
+ self.idx_sim = idx
1110
+ self.sequences.inputs.save_data(idx)
1111
+ self.sequences.factors.save_data(idx)
1112
+ self.sequences.fluxes.save_data(idx)
1113
+ self.sequences.states.save_data(idx)
1114
+ if (self.intercmodel is not None) and not self.intercmodel_is_mainmodel:
1115
+ self.intercmodel.save_data(idx)
1116
+ if (self.petmodel is not None) and not self.petmodel_is_mainmodel:
1117
+ self.petmodel.save_data(idx)
1118
+ if (self.precipmodel is not None) and not self.precipmodel_is_mainmodel:
1119
+ self.precipmodel.save_data(idx)
1120
+ if (self.radiationmodel is not None) and not self.radiationmodel_is_mainmodel:
1121
+ self.radiationmodel.save_data(idx)
1122
+ if (self.retmodel is not None) and not self.retmodel_is_mainmodel:
1123
+ self.retmodel.save_data(idx)
1124
+ if (self.snowalbedomodel is not None) and not self.snowalbedomodel_is_mainmodel:
1125
+ self.snowalbedomodel.save_data(idx)
1126
+ if (self.snowcovermodel is not None) and not self.snowcovermodel_is_mainmodel:
1127
+ self.snowcovermodel.save_data(idx)
1128
+ if (self.snowycanopymodel is not None) and not self.snowycanopymodel_is_mainmodel:
1129
+ self.snowycanopymodel.save_data(idx)
1130
+ if (self.soilwatermodel is not None) and not self.soilwatermodel_is_mainmodel:
1131
+ self.soilwatermodel.save_data(idx)
1132
+ if (self.tempmodel is not None) and not self.tempmodel_is_mainmodel:
1133
+ self.tempmodel.save_data(idx)
1134
+ cpdef void new2old(self) noexcept nogil:
1135
+ cdef numpy.int64_t jdx0
1136
+ self.sequences.old_states.cloudcoverage = self.sequences.new_states.cloudcoverage
1137
+ for jdx0 in range(self.sequences.states._soilresistance_length_0):
1138
+ self.sequences.old_states.soilresistance[jdx0] = self.sequences.new_states.soilresistance[jdx0]
1139
+ if (self.intercmodel is not None) and not self.intercmodel_is_mainmodel:
1140
+ self.intercmodel.new2old()
1141
+ if (self.petmodel is not None) and not self.petmodel_is_mainmodel:
1142
+ self.petmodel.new2old()
1143
+ if (self.precipmodel is not None) and not self.precipmodel_is_mainmodel:
1144
+ self.precipmodel.new2old()
1145
+ if (self.radiationmodel is not None) and not self.radiationmodel_is_mainmodel:
1146
+ self.radiationmodel.new2old()
1147
+ if (self.retmodel is not None) and not self.retmodel_is_mainmodel:
1148
+ self.retmodel.new2old()
1149
+ if (self.snowalbedomodel is not None) and not self.snowalbedomodel_is_mainmodel:
1150
+ self.snowalbedomodel.new2old()
1151
+ if (self.snowcovermodel is not None) and not self.snowcovermodel_is_mainmodel:
1152
+ self.snowcovermodel.new2old()
1153
+ if (self.snowycanopymodel is not None) and not self.snowycanopymodel_is_mainmodel:
1154
+ self.snowycanopymodel.new2old()
1155
+ if (self.soilwatermodel is not None) and not self.soilwatermodel_is_mainmodel:
1156
+ self.soilwatermodel.new2old()
1157
+ if (self.tempmodel is not None) and not self.tempmodel_is_mainmodel:
1158
+ self.tempmodel.new2old()
1159
+ cpdef inline void run(self) noexcept nogil:
1160
+ self.calc_airtemperature_v1()
1161
+ self.update_loggedairtemperature_v1()
1162
+ self.calc_dailyairtemperature_v1()
1163
+ self.calc_windspeed2m_v1()
1164
+ self.calc_windspeed2m_v2()
1165
+ self.update_loggedwindspeed2m_v1()
1166
+ self.calc_dailywindspeed2m_v1()
1167
+ self.calc_windspeed10m_v1()
1168
+ self.update_loggedrelativehumidity_v1()
1169
+ self.calc_dailyrelativehumidity_v1()
1170
+ self.calc_saturationvapourpressure_v1()
1171
+ self.calc_saturationvapourpressure_v2()
1172
+ self.calc_dailysaturationvapourpressure_v1()
1173
+ self.calc_saturationvapourpressureslope_v1()
1174
+ self.calc_saturationvapourpressureslope_v2()
1175
+ self.calc_dailysaturationvapourpressureslope_v1()
1176
+ self.calc_actualvapourpressure_v1()
1177
+ self.calc_dailyactualvapourpressure_v1()
1178
+ self.calc_dryairpressure_v1()
1179
+ self.calc_airdensity_v1()
1180
+ self.process_radiationmodel_v1()
1181
+ self.calc_possiblesunshineduration_v1()
1182
+ self.calc_sunshineduration_v1()
1183
+ self.calc_clearskysolarradiation_v1()
1184
+ self.calc_globalradiation_v1()
1185
+ self.update_loggedsunshineduration_v1()
1186
+ self.calc_dailysunshineduration_v1()
1187
+ self.update_loggedpossiblesunshineduration_v1()
1188
+ self.calc_dailypossiblesunshineduration_v1()
1189
+ self.update_loggedclearskysolarradiation_v1()
1190
+ self.update_loggedglobalradiation_v1()
1191
+ self.calc_currentalbedo_v1()
1192
+ self.calc_currentalbedo_v2()
1193
+ self.calc_dailyglobalradiation_v1()
1194
+ self.calc_netshortwaveradiation_v1()
1195
+ self.calc_netshortwaveradiation_v2()
1196
+ self.calc_dailynetshortwaveradiation_v1()
1197
+ self.update_cloudcoverage_v1()
1198
+ self.calc_adjustedcloudcoverage_v1()
1199
+ self.calc_netlongwaveradiation_v1()
1200
+ self.calc_netlongwaveradiation_v2()
1201
+ self.calc_dailynetlongwaveradiation_v1()
1202
+ self.calc_netradiation_v1()
1203
+ self.calc_netradiation_v2()
1204
+ self.calc_dailynetradiation_v1()
1205
+ self.calc_soilheatflux_v1()
1206
+ self.calc_soilheatflux_v2()
1207
+ self.calc_soilheatflux_v3()
1208
+ self.calc_soilheatflux_v4()
1209
+ self.calc_psychrometricconstant_v1()
1210
+ self.calc_aerodynamicresistance_v1()
1211
+ self.calc_aerodynamicresistance_v2()
1212
+ self.calc_soilsurfaceresistance_v1()
1213
+ self.calc_dailyprecipitation_v1()
1214
+ self.calc_dailypotentialsoilevapotranspiration_v1()
1215
+ self.update_soilresistance_v1()
1216
+ self.calc_landusesurfaceresistance_v1()
1217
+ self.calc_actualsurfaceresistance_v1()
1218
+ self.calc_actualsurfaceresistance_v2()
1219
+ self.calc_referenceevapotranspiration_v1()
1220
+ self.calc_referenceevapotranspiration_v2()
1221
+ self.calc_referenceevapotranspiration_v3()
1222
+ self.calc_referenceevapotranspiration_v4()
1223
+ self.calc_referenceevapotranspiration_v5()
1224
+ self.adjust_referenceevapotranspiration_v1()
1225
+ self.calc_potentialevapotranspiration_v1()
1226
+ self.calc_potentialevapotranspiration_v2()
1227
+ self.calc_potentialevapotranspiration_v3()
1228
+ self.update_potentialevapotranspiration_v1()
1229
+ self.calc_meanreferenceevapotranspiration_v1()
1230
+ self.calc_meanpotentialevapotranspiration_v1()
1231
+ self.calc_interceptedwater_v1()
1232
+ self.calc_soilwater_v1()
1233
+ self.calc_snowcover_v1()
1234
+ self.calc_snowycanopy_v1()
1235
+ self.calc_potentialwaterevaporation_v1()
1236
+ self.calc_waterevaporation_v1()
1237
+ self.calc_waterevaporation_v2()
1238
+ self.calc_waterevaporation_v3()
1239
+ self.calc_waterevaporation_v4()
1240
+ self.update_loggedwaterevaporation_v1()
1241
+ self.calc_dailywaterevaporation_v1()
1242
+ self.calc_interceptionevaporation_v1()
1243
+ self.calc_potentialinterceptionevaporation_v1()
1244
+ self.calc_potentialinterceptionevaporation_v2()
1245
+ self.calc_potentialinterceptionevaporation_v3()
1246
+ self.calc_interceptionevaporation_v2()
1247
+ self.calc_potentialsoilevapotranspiration_v1()
1248
+ self.calc_potentialsoilevapotranspiration_v2()
1249
+ self.calc_soilevapotranspiration_v1()
1250
+ self.calc_soilevapotranspiration_v2()
1251
+ self.calc_soilevapotranspiration_v3()
1252
+ self.update_soilevapotranspiration_v1()
1253
+ self.update_soilevapotranspiration_v2()
1254
+ self.update_soilevapotranspiration_v3()
1255
+ self.update_loggedprecipitation_v1()
1256
+ self.update_loggedpotentialsoilevapotranspiration_v1()
1257
+ cpdef inline void update_inlets(self) noexcept nogil:
1258
+ pass
1259
+ cpdef inline void update_outlets(self) noexcept nogil:
1260
+ pass
1261
+ cpdef inline void update_receivers(self, numpy.int64_t idx) noexcept nogil:
1262
+ self.idx_sim = idx
1263
+ pass
1264
+ cpdef inline void update_senders(self, numpy.int64_t idx) noexcept nogil:
1265
+ self.idx_sim = idx
1266
+ pass
1267
+ cpdef inline void update_outputs(self) noexcept nogil:
1268
+ self.sequences.factors.update_outputs()
1269
+ self.sequences.fluxes.update_outputs()
1270
+ self.sequences.states.update_outputs()
1271
+ cpdef inline void calc_airtemperature_v1(self) noexcept nogil:
1272
+ if self.tempmodel_typeid == 1:
1273
+ self.calc_airtemperature_tempmodel_v1( (<masterinterface.MasterInterface>self.tempmodel) )
1274
+ elif self.tempmodel_typeid == 2:
1275
+ self.calc_airtemperature_tempmodel_v2( (<masterinterface.MasterInterface>self.tempmodel) )
1276
+ cpdef inline void update_loggedairtemperature_v1(self) noexcept nogil:
1277
+ cdef numpy.int64_t k
1278
+ cdef numpy.int64_t idx
1279
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
1280
+ for k in range(self.parameters.control.nmbhru):
1281
+ self.sequences.logs.loggedairtemperature[idx, k] = self.sequences.logs.loggedairtemperature[idx - 1, k]
1282
+ for k in range(self.parameters.control.nmbhru):
1283
+ self.sequences.logs.loggedairtemperature[0, k] = self.sequences.factors.airtemperature[k]
1284
+ cpdef inline void calc_dailyairtemperature_v1(self) noexcept nogil:
1285
+ cdef numpy.int64_t idx
1286
+ cdef numpy.int64_t k
1287
+ for k in range(self.parameters.control.nmbhru):
1288
+ self.sequences.factors.dailyairtemperature[k] = 0.0
1289
+ for idx in range(self.parameters.derived.nmblogentries):
1290
+ for k in range(self.parameters.control.nmbhru):
1291
+ self.sequences.factors.dailyairtemperature[k] = self.sequences.factors.dailyairtemperature[k] + (self.sequences.logs.loggedairtemperature[idx, k])
1292
+ for k in range(self.parameters.control.nmbhru):
1293
+ self.sequences.factors.dailyairtemperature[k] = self.sequences.factors.dailyairtemperature[k] / (self.parameters.derived.nmblogentries)
1294
+ cpdef inline void calc_windspeed2m_v1(self) noexcept nogil:
1295
+ cdef double z0
1296
+ cdef double d
1297
+ d = 2.0 / 3.0 * 0.12
1298
+ z0 = 0.123 * 0.12
1299
+ self.sequences.factors.windspeed2m = self.sequences.inputs.windspeed * ( log((2.0 - d) / z0) / log((self.parameters.control.measuringheightwindspeed - d) / z0) )
1300
+ cpdef inline void calc_windspeed2m_v2(self) noexcept nogil:
1301
+ self.sequences.factors.windspeed2m = self.return_adjustedwindspeed_v1(2.0)
1302
+ cpdef inline void update_loggedwindspeed2m_v1(self) noexcept nogil:
1303
+ cdef numpy.int64_t idx
1304
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
1305
+ self.sequences.logs.loggedwindspeed2m[idx] = self.sequences.logs.loggedwindspeed2m[idx - 1]
1306
+ self.sequences.logs.loggedwindspeed2m[0] = self.sequences.factors.windspeed2m
1307
+ cpdef inline void calc_dailywindspeed2m_v1(self) noexcept nogil:
1308
+ cdef numpy.int64_t idx
1309
+ self.sequences.factors.dailywindspeed2m = 0.0
1310
+ for idx in range(self.parameters.derived.nmblogentries):
1311
+ self.sequences.factors.dailywindspeed2m = self.sequences.factors.dailywindspeed2m + (self.sequences.logs.loggedwindspeed2m[idx])
1312
+ self.sequences.factors.dailywindspeed2m = self.sequences.factors.dailywindspeed2m / (self.parameters.derived.nmblogentries)
1313
+ cpdef inline void calc_windspeed10m_v1(self) noexcept nogil:
1314
+ self.sequences.factors.windspeed10m = self.return_adjustedwindspeed_v1(10.0)
1315
+ cpdef inline void update_loggedrelativehumidity_v1(self) noexcept nogil:
1316
+ cdef numpy.int64_t idx
1317
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
1318
+ self.sequences.logs.loggedrelativehumidity[idx] = self.sequences.logs.loggedrelativehumidity[idx - 1]
1319
+ self.sequences.logs.loggedrelativehumidity[0] = self.sequences.inputs.relativehumidity
1320
+ cpdef inline void calc_dailyrelativehumidity_v1(self) noexcept nogil:
1321
+ cdef numpy.int64_t idx
1322
+ self.sequences.factors.dailyrelativehumidity = 0.0
1323
+ for idx in range(self.parameters.derived.nmblogentries):
1324
+ self.sequences.factors.dailyrelativehumidity = self.sequences.factors.dailyrelativehumidity + (self.sequences.logs.loggedrelativehumidity[idx])
1325
+ self.sequences.factors.dailyrelativehumidity = self.sequences.factors.dailyrelativehumidity / (self.parameters.derived.nmblogentries)
1326
+ cpdef inline void calc_saturationvapourpressure_v1(self) noexcept nogil:
1327
+ cdef numpy.int64_t k
1328
+ for k in range(self.parameters.control.nmbhru):
1329
+ self.sequences.factors.saturationvapourpressure[k] = 6.108 * exp( 17.27 * self.sequences.factors.airtemperature[k] / (self.sequences.factors.airtemperature[k] + 237.3) )
1330
+ cpdef inline void calc_saturationvapourpressure_v2(self) noexcept nogil:
1331
+ cdef numpy.int64_t k
1332
+ for k in range(self.parameters.control.nmbhru):
1333
+ self.sequences.factors.saturationvapourpressure[k] = self.return_saturationvapourpressure_v1( self.sequences.factors.airtemperature[k] )
1334
+ cpdef inline void calc_dailysaturationvapourpressure_v1(self) noexcept nogil:
1335
+ cdef numpy.int64_t k
1336
+ for k in range(self.parameters.control.nmbhru):
1337
+ self.sequences.factors.dailysaturationvapourpressure[k] = ( self.return_saturationvapourpressure_v1(self.sequences.factors.dailyairtemperature[k]) )
1338
+ cpdef inline void calc_saturationvapourpressureslope_v1(self) noexcept nogil:
1339
+ cdef numpy.int64_t k
1340
+ for k in range(self.parameters.control.nmbhru):
1341
+ self.sequences.factors.saturationvapourpressureslope[k] = ( 4098.0 * self.sequences.factors.saturationvapourpressure[k] / (self.sequences.factors.airtemperature[k] + 237.3) ** 2 )
1342
+ cpdef inline void calc_saturationvapourpressureslope_v2(self) noexcept nogil:
1343
+ cdef numpy.int64_t k
1344
+ for k in range(self.parameters.control.nmbhru):
1345
+ self.sequences.factors.saturationvapourpressureslope[k] = ( self.return_saturationvapourpressureslope_v1(self.sequences.factors.airtemperature[k]) )
1346
+ cpdef inline void calc_dailysaturationvapourpressureslope_v1(self) noexcept nogil:
1347
+ cdef numpy.int64_t k
1348
+ for k in range(self.parameters.control.nmbhru):
1349
+ self.sequences.factors.dailysaturationvapourpressureslope[k] = ( self.return_saturationvapourpressureslope_v1( self.sequences.factors.dailyairtemperature[k] ) )
1350
+ cpdef inline void calc_actualvapourpressure_v1(self) noexcept nogil:
1351
+ cdef numpy.int64_t k
1352
+ for k in range(self.parameters.control.nmbhru):
1353
+ self.sequences.factors.actualvapourpressure[k] = ( self.sequences.factors.saturationvapourpressure[k] * self.sequences.inputs.relativehumidity / 100.0 )
1354
+ cpdef inline void calc_dailyactualvapourpressure_v1(self) noexcept nogil:
1355
+ cdef numpy.int64_t k
1356
+ for k in range(self.parameters.control.nmbhru):
1357
+ self.sequences.factors.dailyactualvapourpressure[k] = ( self.sequences.factors.dailysaturationvapourpressure[k] * self.sequences.factors.dailyrelativehumidity / 100.0 )
1358
+ cpdef inline void calc_dryairpressure_v1(self) noexcept nogil:
1359
+ cdef numpy.int64_t k
1360
+ for k in range(self.parameters.control.nmbhru):
1361
+ self.sequences.factors.dryairpressure[k] = ( self.sequences.inputs.atmosphericpressure - self.sequences.factors.actualvapourpressure[k] )
1362
+ cpdef inline void calc_airdensity_v1(self) noexcept nogil:
1363
+ cdef numpy.int64_t k
1364
+ for k in range(self.parameters.control.nmbhru):
1365
+ self.sequences.factors.airdensity[k] = (100.0 / (self.sequences.factors.airtemperature[k] + 273.15)) * ( self.sequences.factors.dryairpressure[k] / self.parameters.fixed.gasconstantdryair + self.sequences.factors.actualvapourpressure[k] / self.parameters.fixed.gasconstantwatervapour )
1366
+ cpdef inline void process_radiationmodel_v1(self) noexcept nogil:
1367
+ if self.radiationmodel_typeid == 1:
1368
+ (<masterinterface.MasterInterface>self.radiationmodel).process_radiation()
1369
+ cpdef inline void calc_possiblesunshineduration_v1(self) noexcept nogil:
1370
+ if self.radiationmodel_typeid == 1:
1371
+ self.sequences.factors.possiblesunshineduration = (<masterinterface.MasterInterface>self.radiationmodel).get_possiblesunshineduration()
1372
+ elif self.radiationmodel_typeid == 4:
1373
+ self.sequences.factors.possiblesunshineduration = (<masterinterface.MasterInterface>self.radiationmodel).get_possiblesunshineduration()
1374
+ cpdef inline void calc_sunshineduration_v1(self) noexcept nogil:
1375
+ if self.radiationmodel_typeid == 1:
1376
+ self.sequences.factors.sunshineduration = (<masterinterface.MasterInterface>self.radiationmodel).get_sunshineduration()
1377
+ elif self.radiationmodel_typeid == 4:
1378
+ self.sequences.factors.sunshineduration = (<masterinterface.MasterInterface>self.radiationmodel).get_sunshineduration()
1379
+ cpdef inline void calc_clearskysolarradiation_v1(self) noexcept nogil:
1380
+ if self.radiationmodel_typeid == 1:
1381
+ self.sequences.fluxes.clearskysolarradiation = (<masterinterface.MasterInterface>self.radiationmodel).get_clearskysolarradiation()
1382
+ elif self.radiationmodel_typeid == 3:
1383
+ self.sequences.fluxes.clearskysolarradiation = (<masterinterface.MasterInterface>self.radiationmodel).get_clearskysolarradiation()
1384
+ cpdef inline void calc_globalradiation_v1(self) noexcept nogil:
1385
+ if self.radiationmodel_typeid == 1:
1386
+ self.sequences.fluxes.globalradiation = (<masterinterface.MasterInterface>self.radiationmodel).get_globalradiation()
1387
+ elif self.radiationmodel_typeid == 2:
1388
+ self.sequences.fluxes.globalradiation = (<masterinterface.MasterInterface>self.radiationmodel).get_globalradiation()
1389
+ elif self.radiationmodel_typeid == 3:
1390
+ self.sequences.fluxes.globalradiation = (<masterinterface.MasterInterface>self.radiationmodel).get_globalradiation()
1391
+ elif self.radiationmodel_typeid == 4:
1392
+ self.sequences.fluxes.globalradiation = (<masterinterface.MasterInterface>self.radiationmodel).get_globalradiation()
1393
+ cpdef inline void update_loggedsunshineduration_v1(self) noexcept nogil:
1394
+ cdef numpy.int64_t idx
1395
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
1396
+ self.sequences.logs.loggedsunshineduration[idx] = self.sequences.logs.loggedsunshineduration[idx - 1]
1397
+ self.sequences.logs.loggedsunshineduration[0] = self.sequences.factors.sunshineduration
1398
+ cpdef inline void calc_dailysunshineduration_v1(self) noexcept nogil:
1399
+ cdef numpy.int64_t idx
1400
+ self.sequences.factors.dailysunshineduration = 0.0
1401
+ for idx in range(self.parameters.derived.nmblogentries):
1402
+ self.sequences.factors.dailysunshineduration = self.sequences.factors.dailysunshineduration + (self.sequences.logs.loggedsunshineduration[idx])
1403
+ cpdef inline void update_loggedpossiblesunshineduration_v1(self) noexcept nogil:
1404
+ cdef numpy.int64_t idx
1405
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
1406
+ self.sequences.logs.loggedpossiblesunshineduration[idx] = ( self.sequences.logs.loggedpossiblesunshineduration[idx - 1] )
1407
+ self.sequences.logs.loggedpossiblesunshineduration[0] = self.sequences.factors.possiblesunshineduration
1408
+ cpdef inline void calc_dailypossiblesunshineduration_v1(self) noexcept nogil:
1409
+ cdef numpy.int64_t idx
1410
+ self.sequences.factors.dailypossiblesunshineduration = 0.0
1411
+ for idx in range(self.parameters.derived.nmblogentries):
1412
+ self.sequences.factors.dailypossiblesunshineduration = self.sequences.factors.dailypossiblesunshineduration + (self.sequences.logs.loggedpossiblesunshineduration[idx])
1413
+ cpdef inline void update_loggedclearskysolarradiation_v1(self) noexcept nogil:
1414
+ cdef numpy.int64_t idx
1415
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
1416
+ self.sequences.logs.loggedclearskysolarradiation[idx] = self.sequences.logs.loggedclearskysolarradiation[ idx - 1 ]
1417
+ self.sequences.logs.loggedclearskysolarradiation[0] = self.sequences.fluxes.clearskysolarradiation
1418
+ cpdef inline void update_loggedglobalradiation_v1(self) noexcept nogil:
1419
+ cdef numpy.int64_t idx
1420
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
1421
+ self.sequences.logs.loggedglobalradiation[idx] = self.sequences.logs.loggedglobalradiation[idx - 1]
1422
+ self.sequences.logs.loggedglobalradiation[0] = self.sequences.fluxes.globalradiation
1423
+ cpdef inline void calc_currentalbedo_v1(self) noexcept nogil:
1424
+ cdef numpy.int64_t k
1425
+ if self.snowalbedomodel is None:
1426
+ for k in range(self.parameters.control.nmbhru):
1427
+ self.sequences.factors.currentalbedo[k] = self.parameters.control.albedo[ self.parameters.control.hrutype[k] - self.parameters.control._albedo_rowmin, self.parameters.derived.moy[self.idx_sim] - self.parameters.control._albedo_columnmin, ]
1428
+ elif self.snowalbedomodel_typeid == 1:
1429
+ self.calc_currentalbedo_snowalbedomodel_v1( (<masterinterface.MasterInterface>self.snowalbedomodel) )
1430
+ for k in range(self.parameters.control.nmbhru):
1431
+ if isnan(self.sequences.factors.currentalbedo[k]):
1432
+ self.sequences.factors.currentalbedo[k] = self.parameters.control.albedo[ self.parameters.control.hrutype[k] - self.parameters.control._albedo_rowmin, self.parameters.derived.moy[self.idx_sim] - self.parameters.control._albedo_columnmin, ]
1433
+ cpdef inline void calc_currentalbedo_v2(self) noexcept nogil:
1434
+ cdef double lai
1435
+ cdef double a_l
1436
+ cdef double a_g
1437
+ cdef double wetness
1438
+ cdef double a_s
1439
+ cdef double w
1440
+ cdef numpy.int64_t k
1441
+ for k in range(self.parameters.control.nmbhru):
1442
+ w = self.sequences.factors.snowcover[k]
1443
+ a_s = self.parameters.control.groundalbedo[k]
1444
+ if self.parameters.control.soil[k]:
1445
+ wetness = self.sequences.fluxes.dailyprecipitation[k] / self.parameters.control.wetnessthreshold[k]
1446
+ if wetness >= self.sequences.fluxes.dailypotentialsoilevapotranspiration[k]:
1447
+ a_s = a_s / (2.0)
1448
+ a_g = w * self.parameters.control.groundalbedosnow[k] + (1.0 - w) * a_s
1449
+ a_l = w * self.parameters.control.leafalbedosnow[k] + (1.0 - w) * self.parameters.control.leafalbedo[k]
1450
+ if self.parameters.control.plant[k]:
1451
+ lai = self.parameters.control.leafareaindex[ self.parameters.control.hrutype[k] - self.parameters.control._leafareaindex_rowmin, self.parameters.derived.moy[self.idx_sim] - self.parameters.control._leafareaindex_columnmin, ]
1452
+ if lai < 4.0:
1453
+ self.sequences.factors.currentalbedo[k] = a_g + 0.25 * (a_l - a_g) * lai
1454
+ else:
1455
+ self.sequences.factors.currentalbedo[k] = a_l
1456
+ else:
1457
+ self.sequences.factors.currentalbedo[k] = a_g
1458
+ cpdef inline void calc_dailyglobalradiation_v1(self) noexcept nogil:
1459
+ cdef numpy.int64_t idx
1460
+ self.sequences.fluxes.dailyglobalradiation = 0.0
1461
+ for idx in range(self.parameters.derived.nmblogentries):
1462
+ self.sequences.fluxes.dailyglobalradiation = self.sequences.fluxes.dailyglobalradiation + (self.sequences.logs.loggedglobalradiation[idx])
1463
+ self.sequences.fluxes.dailyglobalradiation = self.sequences.fluxes.dailyglobalradiation / (self.parameters.derived.nmblogentries)
1464
+ cpdef inline void calc_netshortwaveradiation_v1(self) noexcept nogil:
1465
+ cdef numpy.int64_t k
1466
+ cdef double netshortwaveradiation
1467
+ netshortwaveradiation = (1.0 - 0.23) * self.sequences.fluxes.globalradiation
1468
+ for k in range(self.parameters.control.nmbhru):
1469
+ self.sequences.fluxes.netshortwaveradiation[k] = netshortwaveradiation
1470
+ cpdef inline void calc_netshortwaveradiation_v2(self) noexcept nogil:
1471
+ cdef numpy.int64_t k
1472
+ for k in range(self.parameters.control.nmbhru):
1473
+ self.sequences.fluxes.netshortwaveradiation[k] = self.sequences.fluxes.globalradiation * ( 1.0 - self.sequences.factors.currentalbedo[k] )
1474
+ cpdef inline void calc_dailynetshortwaveradiation_v1(self) noexcept nogil:
1475
+ cdef numpy.int64_t k
1476
+ for k in range(self.parameters.control.nmbhru):
1477
+ self.sequences.fluxes.dailynetshortwaveradiation[k] = ( 1.0 - self.sequences.factors.currentalbedo[k] ) * self.sequences.fluxes.dailyglobalradiation
1478
+ cpdef inline void update_cloudcoverage_v1(self) noexcept nogil:
1479
+ cdef double p0
1480
+ p0 = self.sequences.factors.possiblesunshineduration
1481
+ if (self.parameters.derived.days >= 1.0) or (p0 >= self.parameters.derived.hours):
1482
+ self.sequences.states.cloudcoverage = min(self.sequences.factors.sunshineduration / p0, 1.0)
1483
+ cpdef inline void calc_adjustedcloudcoverage_v1(self) noexcept nogil:
1484
+ cdef double n
1485
+ cdef double c
1486
+ cdef double w
1487
+ w = self.sequences.factors.possiblesunshineduration / self.parameters.derived.hours
1488
+ c = self.sequences.states.cloudcoverage
1489
+ n = self.parameters.control.nightcloudfactor
1490
+ self.sequences.factors.adjustedcloudcoverage = w * c + (1.0 - w) * min(n * c, 1.0)
1491
+ cpdef inline void calc_netlongwaveradiation_v1(self) noexcept nogil:
1492
+ cdef numpy.int64_t k
1493
+ cdef numpy.int64_t idx
1494
+ cdef double clearskysolarradiation
1495
+ cdef double globalradiation
1496
+ if self.sequences.fluxes.clearskysolarradiation > 0.0:
1497
+ globalradiation = self.sequences.fluxes.globalradiation
1498
+ clearskysolarradiation = self.sequences.fluxes.clearskysolarradiation
1499
+ else:
1500
+ globalradiation = 0.0
1501
+ clearskysolarradiation = 0.0
1502
+ for idx in range(self.parameters.derived.nmblogentries):
1503
+ clearskysolarradiation = clearskysolarradiation + (self.sequences.logs.loggedclearskysolarradiation[idx])
1504
+ globalradiation = globalradiation + (self.sequences.logs.loggedglobalradiation[idx])
1505
+ for k in range(self.parameters.control.nmbhru):
1506
+ self.sequences.fluxes.netlongwaveradiation[k] = ( 5.674768518518519e-08 * (self.sequences.factors.airtemperature[k] + 273.16) ** 4 * (0.34 - 0.14 * (self.sequences.factors.actualvapourpressure[k] / 10.0) ** 0.5) * (1.35 * min(globalradiation / clearskysolarradiation, 1.0) - 0.35) )
1507
+ cpdef inline void calc_netlongwaveradiation_v2(self) noexcept nogil:
1508
+ cdef double ra
1509
+ cdef double rs
1510
+ cdef double a
1511
+ cdef double t
1512
+ cdef numpy.int64_t k
1513
+ cdef double f
1514
+ cdef double g
1515
+ cdef double s
1516
+ s = self.parameters.fixed.stefanboltzmannconstant
1517
+ g = self.sequences.fluxes.globalradiation
1518
+ f = 1.0 + self.parameters.control.cloudtypefactor * self.sequences.factors.adjustedcloudcoverage**2.0
1519
+ for k in range(self.parameters.control.nmbhru):
1520
+ t = self.sequences.factors.airtemperature[k]
1521
+ a = self.sequences.factors.currentalbedo[k]
1522
+ rs = 0.97 * s * (t + 273.1) ** 4.0 + 0.07 * (1.0 - a) * g
1523
+ ra = f * ( (1.0 - 0.261 * exp(-0.000777 * t**2.0)) * (s * (t + 273.1) ** 4.0) )
1524
+ self.sequences.fluxes.netlongwaveradiation[k] = rs - ra
1525
+ cpdef inline void calc_dailynetlongwaveradiation_v1(self) noexcept nogil:
1526
+ cdef double t
1527
+ cdef numpy.int64_t k
1528
+ cdef double rel_sunshine
1529
+ rel_sunshine = min( self.sequences.factors.dailysunshineduration / self.sequences.factors.dailypossiblesunshineduration, 1.0 )
1530
+ for k in range(self.parameters.control.nmbhru):
1531
+ t = self.sequences.factors.dailyairtemperature[k] + 273.15
1532
+ self.sequences.fluxes.dailynetlongwaveradiation[k] = ( (0.2 + 0.8 * rel_sunshine) * (self.parameters.fixed.stefanboltzmannconstant * t**4) * ( self.parameters.control.emissivity - self.parameters.fixed.factorcounterradiation * (self.sequences.factors.dailyactualvapourpressure[k] / t) ** (1.0 / 7.0) ) )
1533
+ cpdef inline void calc_netradiation_v1(self) noexcept nogil:
1534
+ cdef numpy.int64_t k
1535
+ for k in range(self.parameters.control.nmbhru):
1536
+ self.sequences.fluxes.netradiation[k] = ( self.sequences.fluxes.netshortwaveradiation[k] - self.sequences.fluxes.netlongwaveradiation[k] )
1537
+ cpdef inline void calc_netradiation_v2(self) noexcept nogil:
1538
+ cdef numpy.int64_t k
1539
+ for k in range(self.parameters.control.nmbhru):
1540
+ self.sequences.fluxes.netradiation[k] = ( self.sequences.fluxes.netshortwaveradiation[k] - self.sequences.fluxes.dailynetlongwaveradiation[k] )
1541
+ cpdef inline void calc_dailynetradiation_v1(self) noexcept nogil:
1542
+ cdef numpy.int64_t k
1543
+ for k in range(self.parameters.control.nmbhru):
1544
+ self.sequences.fluxes.dailynetradiation[k] = ( self.sequences.fluxes.dailynetshortwaveradiation[k] - self.sequences.fluxes.dailynetlongwaveradiation[k] )
1545
+ cpdef inline void calc_soilheatflux_v1(self) noexcept nogil:
1546
+ cdef numpy.int64_t k
1547
+ if self.parameters.derived.days < 1.0:
1548
+ for k in range(self.parameters.control.nmbhru):
1549
+ if self.sequences.fluxes.netradiation[k] >= 0.0:
1550
+ self.sequences.fluxes.soilheatflux[k] = 0.1 * self.sequences.fluxes.netradiation[k]
1551
+ else:
1552
+ self.sequences.fluxes.soilheatflux[k] = 0.5 * self.sequences.fluxes.netradiation[k]
1553
+ else:
1554
+ for k in range(self.parameters.control.nmbhru):
1555
+ self.sequences.fluxes.soilheatflux[k] = 0.0
1556
+ cpdef inline void calc_soilheatflux_v2(self) noexcept nogil:
1557
+ cdef double ps
1558
+ cdef double gn_h
1559
+ cdef double gd_h
1560
+ cdef double gn
1561
+ cdef double gd
1562
+ cdef double cr
1563
+ cdef double lai
1564
+ cdef numpy.int64_t k
1565
+ for k in range(self.parameters.control.nmbhru):
1566
+ if self.parameters.control.water[k]:
1567
+ self.sequences.fluxes.soilheatflux[k] = 0.0
1568
+ else:
1569
+ lai = self.parameters.control.leafareaindex[ self.parameters.control.hrutype[k] - self.parameters.control._leafareaindex_rowmin, self.parameters.derived.moy[self.idx_sim] - self.parameters.control._leafareaindex_columnmin, ]
1570
+ cr = 0.3 - 0.03 * lai
1571
+ gd = -cr * self.sequences.fluxes.dailynetradiation[k]
1572
+ gn = self.parameters.control.averagesoilheatflux[self.parameters.derived.moy[self.idx_sim]] - gd
1573
+ gd_h = gd / self.sequences.factors.dailypossiblesunshineduration
1574
+ gn_h = gn / (24.0 - self.sequences.factors.dailypossiblesunshineduration)
1575
+ ps = self.sequences.factors.possiblesunshineduration
1576
+ self.sequences.fluxes.soilheatflux[k] = ps * gd_h + (self.parameters.derived.hours - ps) * gn_h
1577
+ cpdef inline void calc_soilheatflux_v3(self) noexcept nogil:
1578
+ cdef numpy.int64_t k
1579
+ for k in range(self.parameters.control.nmbhru):
1580
+ if self.parameters.control.water[k]:
1581
+ self.sequences.fluxes.soilheatflux[k] = 0.0
1582
+ else:
1583
+ self.sequences.fluxes.soilheatflux[k] = self.parameters.control.averagesoilheatflux[self.parameters.derived.moy[self.idx_sim]]
1584
+ cpdef inline void calc_soilheatflux_v4(self) noexcept nogil:
1585
+ cdef double lai
1586
+ cdef numpy.int64_t k
1587
+ cdef double b
1588
+ cdef double a
1589
+ cdef double w
1590
+ w = self.sequences.factors.possiblesunshineduration / self.parameters.derived.hours
1591
+ a = w * 0.2 + (1.0 - w) * 0.5
1592
+ b = a * 0.03 / 0.2
1593
+ for k in range(self.parameters.control.nmbhru):
1594
+ if self.parameters.control.water[k]:
1595
+ self.sequences.fluxes.soilheatflux[k] = 0.0
1596
+ else:
1597
+ lai = self.parameters.control.leafareaindex[ self.parameters.control.hrutype[k] - self.parameters.control._leafareaindex_rowmin, self.parameters.derived.moy[self.idx_sim] - self.parameters.control._leafareaindex_columnmin, ]
1598
+ self.sequences.fluxes.soilheatflux[k] = max(a - b * lai, 0.0) * self.sequences.fluxes.netradiation[k]
1599
+ cpdef inline void calc_psychrometricconstant_v1(self) noexcept nogil:
1600
+ self.sequences.factors.psychrometricconstant = 6.65e-4 * self.sequences.inputs.atmosphericpressure
1601
+ cpdef inline void calc_aerodynamicresistance_v1(self) noexcept nogil:
1602
+ cdef double z0
1603
+ cdef double ch
1604
+ cdef numpy.int64_t k
1605
+ if self.sequences.factors.windspeed10m > 0.0:
1606
+ for k in range(self.parameters.control.nmbhru):
1607
+ ch = self.parameters.control.cropheight[ self.parameters.control.hrutype[k] - self.parameters.control._cropheight_rowmin, self.parameters.derived.moy[self.idx_sim] - self.parameters.control._cropheight_columnmin, ]
1608
+ if ch < 10.0:
1609
+ z0 = 0.021 + 0.163 * ch
1610
+ self.sequences.factors.aerodynamicresistance[k] = ( 6.25 / self.sequences.factors.windspeed10m * log(10.0 / z0) ** 2 )
1611
+ else:
1612
+ self.sequences.factors.aerodynamicresistance[k] = 94.0 / self.sequences.factors.windspeed10m
1613
+ else:
1614
+ for k in range(self.parameters.control.nmbhru):
1615
+ self.sequences.factors.aerodynamicresistance[k] = inf
1616
+ cpdef inline void calc_aerodynamicresistance_v2(self) noexcept nogil:
1617
+ cdef double f
1618
+ cdef numpy.int64_t k
1619
+ if self.sequences.factors.windspeed10m > 0.0:
1620
+ for k in range(self.parameters.control.nmbhru):
1621
+ f = self.parameters.derived.aerodynamicresistancefactor[ self.parameters.control.hrutype[k] - self.parameters.derived._aerodynamicresistancefactor_rowmin, self.parameters.derived.moy[self.idx_sim] - self.parameters.derived._aerodynamicresistancefactor_columnmin, ]
1622
+ self.sequences.factors.aerodynamicresistance[k] = f / self.sequences.factors.windspeed10m
1623
+ else:
1624
+ for k in range(self.parameters.control.nmbhru):
1625
+ self.sequences.factors.aerodynamicresistance[k] = inf
1626
+ cpdef inline void calc_soilsurfaceresistance_v1(self) noexcept nogil:
1627
+ cdef double sw_act
1628
+ cdef double sw_max
1629
+ cdef numpy.int64_t k
1630
+ for k in range(self.parameters.control.nmbhru):
1631
+ sw_max = self.parameters.control.maxsoilwater[k]
1632
+ if not self.parameters.control.soil[k]:
1633
+ self.sequences.factors.soilsurfaceresistance[k] = nan
1634
+ elif sw_max > 20.0:
1635
+ self.sequences.factors.soilsurfaceresistance[k] = 100.0
1636
+ elif sw_max > 0.0:
1637
+ sw_act = min(max(self.sequences.factors.soilwater[k], 0.0), sw_max)
1638
+ self.sequences.factors.soilsurfaceresistance[k] = 100.0 * sw_max / (sw_act + 0.01 * sw_max)
1639
+ else:
1640
+ self.sequences.factors.soilsurfaceresistance[k] = inf
1641
+ cpdef inline void calc_dailyprecipitation_v1(self) noexcept nogil:
1642
+ cdef numpy.int64_t idx
1643
+ cdef numpy.int64_t k
1644
+ for k in range(self.parameters.control.nmbhru):
1645
+ self.sequences.fluxes.dailyprecipitation[k] = 0.0
1646
+ for idx in range(self.parameters.derived.nmblogentries):
1647
+ for k in range(self.parameters.control.nmbhru):
1648
+ self.sequences.fluxes.dailyprecipitation[k] = self.sequences.fluxes.dailyprecipitation[k] + (self.sequences.logs.loggedprecipitation[idx, k])
1649
+ cpdef inline void calc_dailypotentialsoilevapotranspiration_v1(self) noexcept nogil:
1650
+ cdef numpy.int64_t idx
1651
+ cdef numpy.int64_t k
1652
+ for k in range(self.parameters.control.nmbhru):
1653
+ self.sequences.fluxes.dailypotentialsoilevapotranspiration[k] = 0.0
1654
+ for idx in range(self.parameters.derived.nmblogentries):
1655
+ for k in range(self.parameters.control.nmbhru):
1656
+ self.sequences.fluxes.dailypotentialsoilevapotranspiration[ k ] = self.sequences.fluxes.dailypotentialsoilevapotranspiration[ k ] + (self.sequences.logs.loggedpotentialsoilevapotranspiration[idx, k])
1657
+ cpdef inline void update_soilresistance_v1(self) noexcept nogil:
1658
+ cdef double wetness
1659
+ cdef numpy.int64_t k
1660
+ for k in range(self.parameters.control.nmbhru):
1661
+ if self.parameters.control.soil[k]:
1662
+ wetness = self.sequences.fluxes.dailyprecipitation[k] / self.parameters.control.wetnessthreshold[k]
1663
+ if wetness < self.sequences.fluxes.dailypotentialsoilevapotranspiration[k]:
1664
+ self.sequences.states.soilresistance[k] = self.sequences.states.soilresistance[k] + (self.parameters.control.soilresistanceincrease[k])
1665
+ else:
1666
+ self.sequences.states.soilresistance[k] = self.parameters.control.wetsoilresistance[k]
1667
+ else:
1668
+ self.sequences.states.soilresistance[k] = nan
1669
+ cpdef inline void calc_landusesurfaceresistance_v1(self) noexcept nogil:
1670
+ cdef double thresh
1671
+ cdef double sw
1672
+ cdef double d
1673
+ cdef double r
1674
+ cdef numpy.int64_t k
1675
+ for k in range(self.parameters.control.nmbhru):
1676
+ r = self.parameters.control.surfaceresistance[ self.parameters.control.hrutype[k] - self.parameters.control._surfaceresistance_rowmin, self.parameters.derived.moy[self.idx_sim] - self.parameters.control._surfaceresistance_columnmin, ]
1677
+ if self.parameters.control.conifer[k]:
1678
+ d = self.sequences.factors.saturationvapourpressure[k] - self.sequences.factors.actualvapourpressure[k]
1679
+ if (self.sequences.factors.airtemperature[k] <= -5.0) or (d >= 20.0):
1680
+ self.sequences.factors.landusesurfaceresistance[k] = 10000.0
1681
+ elif self.sequences.factors.airtemperature[k] < 20.0:
1682
+ self.sequences.factors.landusesurfaceresistance[k] = min( (25.0 * r) / (self.sequences.factors.airtemperature[k] + 5.0) / (1.0 - 0.05 * d), 10000.0, )
1683
+ else:
1684
+ self.sequences.factors.landusesurfaceresistance[k] = min(r / (1.0 - 0.05 * d), 10000.0)
1685
+ else:
1686
+ self.sequences.factors.landusesurfaceresistance[k] = r
1687
+ if self.parameters.control.soil[k]:
1688
+ sw = self.sequences.factors.soilwater[k]
1689
+ if sw <= 0.0:
1690
+ self.sequences.factors.landusesurfaceresistance[k] = inf
1691
+ else:
1692
+ thresh = self.parameters.control.soilmoisturelimit[k] * self.parameters.control.maxsoilwater[k]
1693
+ if sw < thresh:
1694
+ self.sequences.factors.landusesurfaceresistance[k] = self.sequences.factors.landusesurfaceresistance[k] * (3.5 * ( 1.0 - sw / thresh ) + exp(0.2 * thresh / sw))
1695
+ else:
1696
+ self.sequences.factors.landusesurfaceresistance[k] = self.sequences.factors.landusesurfaceresistance[k] * (exp(0.2))
1697
+ cpdef inline void calc_actualsurfaceresistance_v1(self) noexcept nogil:
1698
+ cdef double w
1699
+ cdef double invsrnight
1700
+ cdef double invsrday
1701
+ cdef double lai
1702
+ cdef numpy.int64_t k
1703
+ for k in range(self.parameters.control.nmbhru):
1704
+ if self.parameters.control.soil[k]:
1705
+ lai = self.parameters.control.leafareaindex[ self.parameters.control.hrutype[k] - self.parameters.control._leafareaindex_rowmin, self.parameters.derived.moy[self.idx_sim] - self.parameters.control._leafareaindex_columnmin, ]
1706
+ invsrday = ( (1.0 - 0.7**lai) / self.sequences.factors.landusesurfaceresistance[k] ) + 0.7**lai / self.sequences.factors.soilsurfaceresistance[k]
1707
+ invsrnight = lai / 2500.0 + 1.0 / self.sequences.factors.soilsurfaceresistance[k]
1708
+ w = self.sequences.factors.possiblesunshineduration / self.parameters.derived.hours
1709
+ self.sequences.factors.actualsurfaceresistance[k] = 1.0 / ( w * invsrday + (1.0 - w) * invsrnight )
1710
+ else:
1711
+ self.sequences.factors.actualsurfaceresistance[k] = self.sequences.factors.landusesurfaceresistance[k]
1712
+ cpdef inline void calc_actualsurfaceresistance_v2(self) noexcept nogil:
1713
+ cdef double w_day
1714
+ cdef double r_night_inv
1715
+ cdef double r_leaf_night
1716
+ cdef double r_day_inv
1717
+ cdef double r_leaf_day
1718
+ cdef double r_soil
1719
+ cdef double w_soil
1720
+ cdef double lai
1721
+ cdef numpy.int64_t k
1722
+ for k in range(self.parameters.control.nmbhru):
1723
+ if self.parameters.control.plant[k]:
1724
+ lai = self.parameters.control.leafareaindex[ self.parameters.control.hrutype[k] - self.parameters.control._leafareaindex_rowmin, self.parameters.derived.moy[self.idx_sim] - self.parameters.control._leafareaindex_columnmin, ]
1725
+ w_soil = (0.8 if lai < 1.0 else 0.7) ** lai
1726
+ r_soil = self.sequences.states.soilresistance[k]
1727
+ r_leaf_day = self.parameters.control.leafresistance[k]
1728
+ r_day_inv = w_soil / r_soil + (1.0 - w_soil) / r_leaf_day
1729
+ r_leaf_night = 2800.0
1730
+ r_night_inv = 1.0 / r_soil + lai / r_leaf_night
1731
+ w_day = self.sequences.factors.possiblesunshineduration / self.parameters.derived.hours
1732
+ self.sequences.factors.actualsurfaceresistance[k] = 1.0 / ( w_day * r_day_inv + (1.0 - w_day) * r_night_inv )
1733
+ elif self.parameters.control.soil[k]:
1734
+ self.sequences.factors.actualsurfaceresistance[k] = self.sequences.states.soilresistance[k]
1735
+ else:
1736
+ self.sequences.factors.actualsurfaceresistance[k] = 0.0
1737
+ cpdef inline void calc_referenceevapotranspiration_v1(self) noexcept nogil:
1738
+ cdef numpy.int64_t k
1739
+ for k in range(self.parameters.control.nmbhru):
1740
+ self.sequences.fluxes.referenceevapotranspiration[k] = ( 0.0352512 * self.parameters.derived.days * self.sequences.factors.saturationvapourpressureslope[k] * (self.sequences.fluxes.netradiation[k] - self.sequences.fluxes.soilheatflux[k]) + (self.sequences.factors.psychrometricconstant * 3.75 * self.parameters.derived.hours) / (self.sequences.factors.airtemperature[k] + 273.0) * self.sequences.factors.windspeed2m * (self.sequences.factors.saturationvapourpressure[k] - self.sequences.factors.actualvapourpressure[k]) ) / ( self.sequences.factors.saturationvapourpressureslope[k] + self.sequences.factors.psychrometricconstant * (1.0 + 0.34 * self.sequences.factors.windspeed2m) )
1741
+ cpdef inline void calc_referenceevapotranspiration_v2(self) noexcept nogil:
1742
+ cdef numpy.int64_t k
1743
+ for k in range(self.parameters.control.nmbhru):
1744
+ self.sequences.fluxes.referenceevapotranspiration[k] = ( (8.64 * self.sequences.fluxes.globalradiation + 93.0 * self.parameters.control.coastfactor[k]) * (self.sequences.factors.airtemperature[k] + 22.0) ) / ( 165.0 * (self.sequences.factors.airtemperature[k] + 123.0) * (1.0 + 0.00019 * min(self.parameters.control.hrualtitude[k], 600.0)) )
1745
+ cpdef inline void calc_referenceevapotranspiration_v3(self) noexcept nogil:
1746
+ cdef numpy.int64_t k
1747
+ for k in range(self.parameters.control.nmbhru):
1748
+ self.sequences.fluxes.referenceevapotranspiration[k] = self.sequences.inputs.referenceevapotranspiration
1749
+ cpdef inline void calc_referenceevapotranspiration_v4(self) noexcept nogil:
1750
+ if self.retmodel_typeid == 1:
1751
+ self.calc_referenceevapotranspiration_petmodel_v1( (<masterinterface.MasterInterface>self.retmodel) )
1752
+ cpdef inline void calc_referenceevapotranspiration_v5(self) noexcept nogil:
1753
+ cdef numpy.int64_t k
1754
+ for k in range(self.parameters.control.nmbhru):
1755
+ self.sequences.fluxes.referenceevapotranspiration[k] = self.sequences.inputs.normalevapotranspiration * ( 1.0 + self.parameters.control.airtemperaturefactor[k] * (self.sequences.factors.meanairtemperature - self.sequences.inputs.normalairtemperature) )
1756
+ self.sequences.fluxes.referenceevapotranspiration[k] = min( max(self.sequences.fluxes.referenceevapotranspiration[k], 0.0), 2.0 * self.sequences.inputs.normalevapotranspiration, )
1757
+ cpdef inline void adjust_referenceevapotranspiration_v1(self) noexcept nogil:
1758
+ cdef numpy.int64_t k
1759
+ for k in range(self.parameters.control.nmbhru):
1760
+ self.sequences.fluxes.referenceevapotranspiration[k] = self.sequences.fluxes.referenceevapotranspiration[k] * (self.parameters.control.evapotranspirationfactor[k])
1761
+ cpdef inline void calc_potentialevapotranspiration_v1(self) noexcept nogil:
1762
+ cdef double factor
1763
+ cdef numpy.int64_t k
1764
+ for k in range(self.parameters.control.nmbhru):
1765
+ factor = self.parameters.control.monthfactor[ self.parameters.derived.moy[self.idx_sim] - self.parameters.control._monthfactor_entrymin ]
1766
+ self.sequences.fluxes.potentialevapotranspiration[k] = ( factor * self.sequences.fluxes.referenceevapotranspiration[k] )
1767
+ cpdef inline void calc_potentialevapotranspiration_v2(self) noexcept nogil:
1768
+ cdef double factor
1769
+ cdef numpy.int64_t k
1770
+ for k in range(self.parameters.control.nmbhru):
1771
+ factor = self.parameters.control.landmonthfactor[ self.parameters.control.hrutype[k] - self.parameters.control._landmonthfactor_rowmin, self.parameters.derived.moy[self.idx_sim] - self.parameters.control._landmonthfactor_columnmin, ]
1772
+ self.sequences.fluxes.potentialevapotranspiration[k] = ( factor * self.sequences.fluxes.referenceevapotranspiration[k] )
1773
+ cpdef inline void calc_potentialevapotranspiration_v3(self) noexcept nogil:
1774
+ cdef numpy.int64_t k
1775
+ for k in range(self.parameters.control.nmbhru):
1776
+ self.sequences.fluxes.potentialevapotranspiration[k] = self.sequences.fluxes.referenceevapotranspiration[k] * ( 1.0 - self.parameters.control.altitudefactor[k] / 100.0 * (self.parameters.control.hrualtitude[k] - self.parameters.derived.altitude) )
1777
+ if self.sequences.fluxes.potentialevapotranspiration[k] <= 0.0:
1778
+ self.sequences.fluxes.potentialevapotranspiration[k] = 0.0
1779
+ else:
1780
+ self.sequences.fluxes.potentialevapotranspiration[k] = self.sequences.fluxes.potentialevapotranspiration[k] * (exp( -self.parameters.control.precipitationfactor[k] * self.sequences.fluxes.precipitation[k] ))
1781
+ cpdef inline void update_potentialevapotranspiration_v1(self) noexcept nogil:
1782
+ cdef numpy.int64_t k
1783
+ for k in range(self.parameters.control.nmbhru):
1784
+ self.sequences.fluxes.potentialevapotranspiration[k] = ( self.parameters.control.dampingfactor[k] * self.sequences.fluxes.potentialevapotranspiration[k] + (1.0 - self.parameters.control.dampingfactor[k]) * self.sequences.logs.loggedpotentialevapotranspiration[0, k] )
1785
+ self.sequences.logs.loggedpotentialevapotranspiration[0, k] = ( self.sequences.fluxes.potentialevapotranspiration[k] )
1786
+ cpdef inline void calc_meanreferenceevapotranspiration_v1(self) noexcept nogil:
1787
+ cdef numpy.int64_t s
1788
+ self.sequences.fluxes.meanreferenceevapotranspiration = 0.0
1789
+ for s in range(self.parameters.control.nmbhru):
1790
+ self.sequences.fluxes.meanreferenceevapotranspiration = self.sequences.fluxes.meanreferenceevapotranspiration + (( self.parameters.derived.hruareafraction[s] * self.sequences.fluxes.referenceevapotranspiration[s] ))
1791
+ cpdef inline void calc_meanpotentialevapotranspiration_v1(self) noexcept nogil:
1792
+ cdef numpy.int64_t s
1793
+ self.sequences.fluxes.meanpotentialevapotranspiration = 0.0
1794
+ for s in range(self.parameters.control.nmbhru):
1795
+ self.sequences.fluxes.meanpotentialevapotranspiration = self.sequences.fluxes.meanpotentialevapotranspiration + (( self.parameters.derived.hruareafraction[s] * self.sequences.fluxes.potentialevapotranspiration[s] ))
1796
+ cpdef inline void calc_interceptedwater_v1(self) noexcept nogil:
1797
+ if self.intercmodel_typeid == 1:
1798
+ self.calc_interceptedwater_intercmodel_v1( (<masterinterface.MasterInterface>self.intercmodel) )
1799
+ cpdef inline void calc_soilwater_v1(self) noexcept nogil:
1800
+ if self.soilwatermodel_typeid == 1:
1801
+ self.calc_soilwater_soilwatermodel_v1( (<masterinterface.MasterInterface>self.soilwatermodel) )
1802
+ cpdef inline void calc_snowcover_v1(self) noexcept nogil:
1803
+ if self.snowcovermodel_typeid == 1:
1804
+ self.calc_snowcover_snowcovermodel_v1( (<masterinterface.MasterInterface>self.snowcovermodel) )
1805
+ cpdef inline void calc_snowycanopy_v1(self) noexcept nogil:
1806
+ cdef numpy.int64_t k
1807
+ if self.snowycanopymodel is None:
1808
+ for k in range(self.parameters.control.nmbhru):
1809
+ self.sequences.factors.snowycanopy[k] = nan
1810
+ elif self.snowycanopymodel_typeid == 1:
1811
+ self.calc_snowycanopy_snowycanopymodel_v1( (<masterinterface.MasterInterface>self.snowycanopymodel) )
1812
+ cpdef inline void calc_potentialwaterevaporation_v1(self) noexcept nogil:
1813
+ if self.petmodel_typeid == 1:
1814
+ self.calc_potentialwaterevaporation_petmodel_v1( (<masterinterface.MasterInterface>self.petmodel) )
1815
+ elif self.petmodel_typeid == 2:
1816
+ self.calc_potentialwaterevaporation_petmodel_v2( (<masterinterface.MasterInterface>self.petmodel) )
1817
+ cpdef inline void calc_waterevaporation_v1(self) noexcept nogil:
1818
+ cdef numpy.int64_t k
1819
+ for k in range(self.parameters.control.nmbhru):
1820
+ if self.parameters.control.water[k] and self.sequences.factors.airtemperature[k] > self.parameters.control.temperaturethresholdice[k]:
1821
+ self.sequences.fluxes.waterevaporation[k] = self.sequences.fluxes.potentialwaterevaporation[k]
1822
+ else:
1823
+ self.sequences.fluxes.waterevaporation[k] = 0.0
1824
+ cpdef inline void calc_waterevaporation_v2(self) noexcept nogil:
1825
+ cdef numpy.int64_t k
1826
+ for k in range(self.parameters.control.nmbhru):
1827
+ if self.parameters.control.water[k]:
1828
+ self.sequences.fluxes.waterevaporation[k] = self.sequences.fluxes.potentialwaterevaporation[k]
1829
+ else:
1830
+ self.sequences.fluxes.waterevaporation[k] = 0.0
1831
+ cpdef inline void calc_waterevaporation_v3(self) noexcept nogil:
1832
+ cdef numpy.int64_t k
1833
+ for k in range(self.parameters.control.nmbhru):
1834
+ if self.parameters.control.water[k]:
1835
+ self.sequences.fluxes.waterevaporation[k] = ( self.sequences.factors.dailysaturationvapourpressureslope[k] * self.sequences.fluxes.dailynetradiation[k] / self.parameters.fixed.heatofcondensation + self.parameters.fixed.psychrometricconstant * self.parameters.derived.days * (0.13 + 0.094 * self.sequences.factors.dailywindspeed2m) * ( self.sequences.factors.dailysaturationvapourpressure[k] - self.sequences.factors.dailyactualvapourpressure[k] ) ) / ( self.sequences.factors.dailysaturationvapourpressureslope[k] + self.parameters.fixed.psychrometricconstant )
1836
+ else:
1837
+ self.sequences.fluxes.waterevaporation[k] = 0.0
1838
+ cpdef inline void calc_waterevaporation_v4(self) noexcept nogil:
1839
+ cdef double evap
1840
+ cdef numpy.int64_t k
1841
+ for k in range(self.parameters.control.nmbhru):
1842
+ if self.parameters.control.water[k]:
1843
+ evap = self.return_evaporation_penmanmonteith_v2(k, 0.0)
1844
+ self.sequences.fluxes.waterevaporation[k] = evap
1845
+ else:
1846
+ self.sequences.fluxes.waterevaporation[k] = 0.0
1847
+ cpdef inline void update_loggedwaterevaporation_v1(self) noexcept nogil:
1848
+ cdef numpy.int64_t k
1849
+ cdef numpy.int64_t idx
1850
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
1851
+ for k in range(self.parameters.control.nmbhru):
1852
+ self.sequences.logs.loggedwaterevaporation[idx, k] = self.sequences.logs.loggedwaterevaporation[ idx - 1, k ]
1853
+ for k in range(self.parameters.control.nmbhru):
1854
+ self.sequences.logs.loggedwaterevaporation[0, k] = self.sequences.fluxes.waterevaporation[k]
1855
+ cpdef inline void calc_dailywaterevaporation_v1(self) noexcept nogil:
1856
+ cdef numpy.int64_t idx
1857
+ cdef numpy.int64_t k
1858
+ for k in range(self.parameters.control.nmbhru):
1859
+ self.sequences.fluxes.dailywaterevaporation[k] = 0.0
1860
+ for idx in range(self.parameters.derived.nmblogentries):
1861
+ for k in range(self.parameters.control.nmbhru):
1862
+ self.sequences.fluxes.dailywaterevaporation[k] = self.sequences.fluxes.dailywaterevaporation[k] + (self.sequences.logs.loggedwaterevaporation[idx, k])
1863
+ cpdef inline void calc_interceptionevaporation_v1(self) noexcept nogil:
1864
+ cdef numpy.int64_t k
1865
+ for k in range(self.parameters.control.nmbhru):
1866
+ if self.parameters.control.interception[k]:
1867
+ self.sequences.fluxes.interceptionevaporation[k] = min( self.sequences.fluxes.potentialinterceptionevaporation[k], self.sequences.factors.interceptedwater[k] )
1868
+ else:
1869
+ self.sequences.fluxes.interceptionevaporation[k] = 0.0
1870
+ cpdef inline void calc_potentialinterceptionevaporation_v1(self) noexcept nogil:
1871
+ cdef numpy.int64_t k
1872
+ for k in range(self.parameters.control.nmbhru):
1873
+ if self.parameters.control.interception[k]:
1874
+ self.sequences.fluxes.potentialinterceptionevaporation[k] = ( self.return_evaporation_penmanmonteith_v1(k, 0.0) )
1875
+ else:
1876
+ self.sequences.fluxes.potentialinterceptionevaporation[k] = 0.0
1877
+ cpdef inline void calc_potentialinterceptionevaporation_v2(self) noexcept nogil:
1878
+ cdef double evap
1879
+ cdef numpy.int64_t k
1880
+ for k in range(self.parameters.control.nmbhru):
1881
+ if self.parameters.control.interception[k]:
1882
+ evap = self.return_evaporation_penmanmonteith_v2(k, 0.0)
1883
+ self.sequences.fluxes.potentialinterceptionevaporation[k] = evap
1884
+ else:
1885
+ self.sequences.fluxes.potentialinterceptionevaporation[k] = 0.0
1886
+ cpdef inline void calc_potentialinterceptionevaporation_v3(self) noexcept nogil:
1887
+ if self.petmodel_typeid == 1:
1888
+ self.calc_potentialinterceptionevaporation_petmodel_v1( (<masterinterface.MasterInterface>self.petmodel) )
1889
+ elif self.petmodel_typeid == 2:
1890
+ self.calc_potentialinterceptionevaporation_petmodel_v2( (<masterinterface.MasterInterface>self.petmodel) )
1891
+ cpdef inline void calc_interceptionevaporation_v2(self) noexcept nogil:
1892
+ cdef numpy.int64_t k
1893
+ for k in range(self.parameters.control.nmbhru):
1894
+ if ( self.parameters.control.interception[k] and (self.parameters.control.tree[k] or (self.sequences.factors.snowcover[k] == 0.0)) and not (self.parameters.control.tree[k] and (self.sequences.factors.snowycanopy[k] > 0.0)) ):
1895
+ self.sequences.fluxes.interceptionevaporation[k] = min( self.sequences.fluxes.potentialinterceptionevaporation[k], self.sequences.factors.interceptedwater[k] )
1896
+ else:
1897
+ self.sequences.fluxes.interceptionevaporation[k] = 0.0
1898
+ cpdef inline void calc_potentialsoilevapotranspiration_v1(self) noexcept nogil:
1899
+ cdef double pet
1900
+ cdef double r
1901
+ cdef numpy.int64_t k
1902
+ for k in range(self.parameters.control.nmbhru):
1903
+ if self.parameters.control.soil[k]:
1904
+ r = self.sequences.factors.actualsurfaceresistance[k]
1905
+ pet = self.return_evaporation_penmanmonteith_v2(k, r)
1906
+ self.sequences.fluxes.potentialsoilevapotranspiration[k] = pet
1907
+ else:
1908
+ self.sequences.fluxes.potentialsoilevapotranspiration[k] = 0.0
1909
+ cpdef inline void calc_potentialsoilevapotranspiration_v2(self) noexcept nogil:
1910
+ if self.petmodel_typeid == 1:
1911
+ self.calc_potentialsoilevapotranspiration_petmodel_v1( (<masterinterface.MasterInterface>self.petmodel) )
1912
+ elif self.petmodel_typeid == 2:
1913
+ self.calc_potentialsoilevapotranspiration_petmodel_v2( (<masterinterface.MasterInterface>self.petmodel) )
1914
+ cpdef inline void calc_soilevapotranspiration_v1(self) noexcept nogil:
1915
+ cdef double thresh
1916
+ cdef numpy.int64_t k
1917
+ for k in range(self.parameters.control.nmbhru):
1918
+ if self.parameters.control.soil[k]:
1919
+ self.sequences.fluxes.soilevapotranspiration[k] = self.sequences.fluxes.potentialsoilevapotranspiration[k]
1920
+ if self.sequences.fluxes.soilevapotranspiration[k] > 0.0:
1921
+ if self.sequences.factors.soilwater[k] < 0.0:
1922
+ self.sequences.fluxes.soilevapotranspiration[k] = 0.0
1923
+ else:
1924
+ thresh = self.parameters.control.soilmoisturelimit[k] * self.parameters.control.maxsoilwater[k]
1925
+ if self.sequences.factors.soilwater[k] < thresh:
1926
+ self.sequences.fluxes.soilevapotranspiration[k] = self.sequences.fluxes.soilevapotranspiration[k] * (self.sequences.factors.soilwater[k] / thresh)
1927
+ else:
1928
+ self.sequences.fluxes.soilevapotranspiration[k] = 0.0
1929
+ cpdef inline void calc_soilevapotranspiration_v2(self) noexcept nogil:
1930
+ cdef double temp
1931
+ cdef double moisture
1932
+ cdef numpy.int64_t k
1933
+ for k in range(self.parameters.control.nmbhru):
1934
+ if self.parameters.control.soil[k]:
1935
+ self.sequences.fluxes.soilevapotranspiration[k] = self.sequences.fluxes.potentialsoilevapotranspiration[k]
1936
+ if self.sequences.fluxes.soilevapotranspiration[k] > 0.0:
1937
+ moisture = self.sequences.factors.soilwater[k] / self.parameters.control.maxsoilwater[k]
1938
+ if moisture <= 0.0:
1939
+ self.sequences.fluxes.soilevapotranspiration[k] = 0.0
1940
+ elif moisture <= 1.0:
1941
+ temp = exp(-self.parameters.control.dissefactor[k] * moisture)
1942
+ self.sequences.fluxes.soilevapotranspiration[k] = self.sequences.fluxes.soilevapotranspiration[k] * ((1.0 - temp) / ( 1.0 + temp - 2.0 * exp(-self.parameters.control.dissefactor[k]) ))
1943
+ else:
1944
+ self.sequences.fluxes.soilevapotranspiration[k] = 0.0
1945
+ cpdef inline void calc_soilevapotranspiration_v3(self) noexcept nogil:
1946
+ cdef numpy.int64_t k
1947
+ for k in range(self.parameters.control.nmbhru):
1948
+ if self.parameters.control.soil[k] and (self.parameters.control.tree[k] or self.sequences.factors.snowcover[k] == 0.0):
1949
+ self.sequences.fluxes.soilevapotranspiration[k] = ( self.return_evaporation_penmanmonteith_v1( k, self.sequences.factors.actualsurfaceresistance[k] ) )
1950
+ else:
1951
+ self.sequences.fluxes.soilevapotranspiration[k] = 0.0
1952
+ cpdef inline void update_soilevapotranspiration_v1(self) noexcept nogil:
1953
+ cdef double excess
1954
+ cdef double ei
1955
+ cdef double ets
1956
+ cdef double pet
1957
+ cdef double pets
1958
+ cdef double pei
1959
+ cdef double r
1960
+ cdef numpy.int64_t k
1961
+ for k in range(self.parameters.control.nmbhru):
1962
+ if self.parameters.control.soil[k]:
1963
+ r = self.parameters.control.excessreduction[k]
1964
+ pei = self.sequences.fluxes.potentialinterceptionevaporation[k]
1965
+ pets = self.sequences.fluxes.potentialsoilevapotranspiration[k]
1966
+ pet = r * pei + (1.0 - r) * (pei + pets) / 2.0
1967
+ ets = self.sequences.fluxes.soilevapotranspiration[k]
1968
+ ei = self.sequences.fluxes.interceptionevaporation[k]
1969
+ excess = ets + ei - pet
1970
+ if (pet >= 0.0) and (excess > 0.0):
1971
+ self.sequences.fluxes.soilevapotranspiration[k] = self.sequences.fluxes.soilevapotranspiration[k] - (r * excess)
1972
+ elif (pet < 0.0) and (excess < 0.0):
1973
+ self.sequences.fluxes.soilevapotranspiration[k] = self.sequences.fluxes.soilevapotranspiration[k] - (r * excess)
1974
+ else:
1975
+ self.sequences.fluxes.soilevapotranspiration[k] = 0.0
1976
+ cpdef inline void update_soilevapotranspiration_v2(self) noexcept nogil:
1977
+ cdef numpy.int64_t k
1978
+ for k in range(self.parameters.control.nmbhru):
1979
+ if self.parameters.control.soil[k] and (self.sequences.factors.snowcover[k] < 1.0):
1980
+ self.sequences.fluxes.soilevapotranspiration[k] = self.sequences.fluxes.soilevapotranspiration[k] * (1.0 - self.sequences.factors.snowcover[k])
1981
+ else:
1982
+ self.sequences.fluxes.soilevapotranspiration[k] = 0.0
1983
+ cpdef inline void update_soilevapotranspiration_v3(self) noexcept nogil:
1984
+ cdef numpy.int64_t k
1985
+ for k in range(self.parameters.control.nmbhru):
1986
+ if self.parameters.control.soil[k]:
1987
+ if self.parameters.control.interception[k]:
1988
+ if self.sequences.fluxes.potentialinterceptionevaporation[k] == 0.0:
1989
+ self.sequences.fluxes.soilevapotranspiration[k] = 0.0
1990
+ else:
1991
+ self.sequences.fluxes.soilevapotranspiration[k] = self.sequences.fluxes.soilevapotranspiration[k] * (( self.sequences.fluxes.potentialinterceptionevaporation[k] - self.sequences.fluxes.interceptionevaporation[k] ) / self.sequences.fluxes.potentialinterceptionevaporation[k])
1992
+ else:
1993
+ self.sequences.fluxes.soilevapotranspiration[k] = 0.0
1994
+ cpdef inline void update_loggedprecipitation_v1(self) noexcept nogil:
1995
+ cdef numpy.int64_t k
1996
+ cdef numpy.int64_t idx
1997
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
1998
+ for k in range(self.parameters.control.nmbhru):
1999
+ self.sequences.logs.loggedprecipitation[idx, k] = self.sequences.logs.loggedprecipitation[idx - 1, k]
2000
+ for k in range(self.parameters.control.nmbhru):
2001
+ self.sequences.logs.loggedprecipitation[0, k] = self.sequences.fluxes.precipitation[k]
2002
+ cpdef inline void update_loggedpotentialsoilevapotranspiration_v1(self) noexcept nogil:
2003
+ cdef numpy.int64_t k
2004
+ cdef numpy.int64_t idx
2005
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
2006
+ for k in range(self.parameters.control.nmbhru):
2007
+ self.sequences.logs.loggedpotentialsoilevapotranspiration[idx, k] = ( self.sequences.logs.loggedpotentialsoilevapotranspiration[idx - 1, k] )
2008
+ for k in range(self.parameters.control.nmbhru):
2009
+ self.sequences.logs.loggedpotentialsoilevapotranspiration[0, k] = ( self.sequences.fluxes.potentialsoilevapotranspiration[k] )
2010
+ cpdef void determine_potentialevapotranspiration_v1(self) noexcept nogil:
2011
+ self.run()
2012
+ cpdef double get_potentialevapotranspiration_v1(self, numpy.int64_t k) noexcept nogil:
2013
+ return self.sequences.fluxes.referenceevapotranspiration[k]
2014
+ cpdef double get_potentialevapotranspiration_v2(self, numpy.int64_t k) noexcept nogil:
2015
+ return self.sequences.fluxes.potentialevapotranspiration[k]
2016
+ cpdef double get_meanpotentialevapotranspiration_v1(self) noexcept nogil:
2017
+ return self.sequences.fluxes.meanreferenceevapotranspiration
2018
+ cpdef double get_meanpotentialevapotranspiration_v2(self) noexcept nogil:
2019
+ return self.sequences.fluxes.meanpotentialevapotranspiration
2020
+ cpdef double get_waterevaporation_v1(self, numpy.int64_t k) noexcept nogil:
2021
+ return self.sequences.fluxes.waterevaporation[k]
2022
+ cpdef double get_potentialwaterevaporation_v1(self, numpy.int64_t k) noexcept nogil:
2023
+ return self.parameters.derived.days * self.sequences.fluxes.dailywaterevaporation[k]
2024
+ cpdef double get_potentialinterceptionevaporation_v1(self, numpy.int64_t k) noexcept nogil:
2025
+ return self.sequences.fluxes.potentialinterceptionevaporation[k]
2026
+ cpdef double get_interceptionevaporation_v1(self, numpy.int64_t k) noexcept nogil:
2027
+ return self.sequences.fluxes.interceptionevaporation[k]
2028
+ cpdef double get_potentialsoilevapotranspiration_v1(self, numpy.int64_t k) noexcept nogil:
2029
+ return self.sequences.fluxes.potentialsoilevapotranspiration[k]
2030
+ cpdef double get_soilevapotranspiration_v1(self, numpy.int64_t k) noexcept nogil:
2031
+ return self.sequences.fluxes.soilevapotranspiration[k]
2032
+ cpdef inline double return_adjustedwindspeed_v1(self, double h) noexcept nogil:
2033
+ if h == self.parameters.control.measuringheightwindspeed:
2034
+ return self.sequences.inputs.windspeed
2035
+ return self.sequences.inputs.windspeed * ( log(h / self.parameters.fixed.roughnesslengthgrass) / log(self.parameters.control.measuringheightwindspeed / self.parameters.fixed.roughnesslengthgrass) )
2036
+ cpdef inline double return_saturationvapourpressure_v1(self, double airtemperature) noexcept nogil:
2037
+ return 6.1078 * 2.71828 ** ( 17.08085 * airtemperature / (airtemperature + 234.175) )
2038
+ cpdef inline double return_saturationvapourpressureslope_v1(self, double t) noexcept nogil:
2039
+ return ( 24430.6 * exp(17.08085 * t / (t + 234.175)) / (t + 234.175) ** 2 )
2040
+ cpdef inline double return_evaporation_penmanmonteith_v1(self, numpy.int64_t k, double actualsurfaceresistance) noexcept nogil:
2041
+ cdef double c
2042
+ cdef double b
2043
+ cdef double t
2044
+ cdef double ar
2045
+ ar = min(max(self.sequences.factors.aerodynamicresistance[k], 1e-6), 1e6)
2046
+ t = 273.15 + self.sequences.factors.airtemperature[k]
2047
+ b = (4.0 * self.parameters.control.emissivity * self.parameters.fixed.stefanboltzmannconstant) * t**3
2048
+ c = 1.0 + b * ar / self.sequences.factors.airdensity[k] / self.parameters.fixed.heatcapacityair
2049
+ return ( ( self.sequences.factors.saturationvapourpressureslope[k] * (self.sequences.fluxes.netradiation[k] - self.sequences.fluxes.soilheatflux[k]) + (c * self.sequences.factors.airdensity[k] * self.parameters.fixed.heatcapacityair) * (self.sequences.factors.saturationvapourpressure[k] - self.sequences.factors.actualvapourpressure[k]) / ar ) / ( self.sequences.factors.saturationvapourpressureslope[k] + self.parameters.fixed.psychrometricconstant * c * (1.0 + actualsurfaceresistance / ar) ) / self.parameters.fixed.heatofcondensation )
2050
+ cpdef inline double return_evaporation_penmanmonteith_v2(self, numpy.int64_t k, double actualsurfaceresistance) noexcept nogil:
2051
+ cdef double ar
2052
+ ar = min(max(self.sequences.factors.aerodynamicresistance[k], 1e-6), 1e6)
2053
+ return ( ( self.sequences.factors.saturationvapourpressureslope[k] * (self.sequences.fluxes.netradiation[k] - self.sequences.fluxes.soilheatflux[k]) + (self.sequences.factors.airdensity[k] * self.parameters.fixed.heatcapacityair) * (self.sequences.factors.saturationvapourpressure[k] - self.sequences.factors.actualvapourpressure[k]) / ar ) / ( self.sequences.factors.saturationvapourpressureslope[k] + self.parameters.fixed.psychrometricconstant * (1.0 + actualsurfaceresistance / ar) ) ) / self.parameters.fixed.heatofcondensation
2054
+ cpdef inline void calc_referenceevapotranspiration_petmodel_v1(self, masterinterface.MasterInterface submodel) noexcept nogil:
2055
+ cdef numpy.int64_t k
2056
+ submodel.determine_potentialevapotranspiration()
2057
+ for k in range(self.parameters.control.nmbhru):
2058
+ self.sequences.fluxes.referenceevapotranspiration[k] = ( submodel.get_potentialevapotranspiration(k) )
2059
+ cpdef inline void calc_airtemperature_tempmodel_v1(self, masterinterface.MasterInterface submodel) noexcept nogil:
2060
+ cdef numpy.int64_t k
2061
+ for k in range(self.parameters.control.nmbhru):
2062
+ self.sequences.factors.airtemperature[k] = submodel.get_temperature(k)
2063
+ cpdef inline void calc_airtemperature_tempmodel_v2(self, masterinterface.MasterInterface submodel) noexcept nogil:
2064
+ cdef numpy.int64_t k
2065
+ submodel.determine_temperature()
2066
+ for k in range(self.parameters.control.nmbhru):
2067
+ self.sequences.factors.airtemperature[k] = submodel.get_temperature(k)
2068
+ cpdef inline void calc_precipitation_precipmodel_v1(self, masterinterface.MasterInterface submodel) noexcept nogil:
2069
+ cdef numpy.int64_t k
2070
+ for k in range(self.parameters.control.nmbhru):
2071
+ self.sequences.fluxes.precipitation[k] = submodel.get_precipitation(k)
2072
+ cpdef inline void calc_precipitation_precipmodel_v2(self, masterinterface.MasterInterface submodel) noexcept nogil:
2073
+ cdef numpy.int64_t k
2074
+ submodel.determine_precipitation()
2075
+ for k in range(self.parameters.control.nmbhru):
2076
+ self.sequences.fluxes.precipitation[k] = submodel.get_precipitation(k)
2077
+ cpdef inline void calc_interceptedwater_intercmodel_v1(self, masterinterface.MasterInterface submodel) noexcept nogil:
2078
+ cdef numpy.int64_t k
2079
+ for k in range(self.parameters.control.nmbhru):
2080
+ self.sequences.factors.interceptedwater[k] = submodel.get_interceptedwater(k)
2081
+ cpdef inline void calc_soilwater_soilwatermodel_v1(self, masterinterface.MasterInterface submodel) noexcept nogil:
2082
+ cdef numpy.int64_t k
2083
+ for k in range(self.parameters.control.nmbhru):
2084
+ self.sequences.factors.soilwater[k] = submodel.get_soilwater(k)
2085
+ cpdef inline void calc_snowcover_snowcovermodel_v1(self, masterinterface.MasterInterface submodel) noexcept nogil:
2086
+ cdef numpy.int64_t k
2087
+ for k in range(self.parameters.control.nmbhru):
2088
+ self.sequences.factors.snowcover[k] = submodel.get_snowcover(k)
2089
+ cpdef inline void calc_snowycanopy_snowycanopymodel_v1(self, masterinterface.MasterInterface submodel) noexcept nogil:
2090
+ cdef numpy.int64_t k
2091
+ for k in range(self.parameters.control.nmbhru):
2092
+ self.sequences.factors.snowycanopy[k] = submodel.get_snowycanopy(k)
2093
+ cpdef inline void calc_potentialinterceptionevaporation_petmodel_v1(self, masterinterface.MasterInterface submodel) noexcept nogil:
2094
+ cdef numpy.int64_t k
2095
+ submodel.determine_potentialevapotranspiration()
2096
+ for k in range(self.parameters.control.nmbhru):
2097
+ self.sequences.fluxes.potentialinterceptionevaporation[k] = ( submodel.get_potentialevapotranspiration(k) )
2098
+ cpdef inline void calc_potentialinterceptionevaporation_petmodel_v2(self, masterinterface.MasterInterface submodel) noexcept nogil:
2099
+ cdef numpy.int64_t k
2100
+ submodel.determine_potentialinterceptionevaporation()
2101
+ for k in range(self.parameters.control.nmbhru):
2102
+ self.sequences.fluxes.potentialinterceptionevaporation[k] = ( submodel.get_potentialinterceptionevaporation(k) )
2103
+ cpdef inline void calc_potentialsoilevapotranspiration_petmodel_v1(self, masterinterface.MasterInterface submodel) noexcept nogil:
2104
+ cdef numpy.int64_t k
2105
+ for k in range(self.parameters.control.nmbhru):
2106
+ self.sequences.fluxes.potentialsoilevapotranspiration[k] = ( submodel.get_potentialevapotranspiration(k) )
2107
+ cpdef inline void calc_potentialsoilevapotranspiration_petmodel_v2(self, masterinterface.MasterInterface submodel) noexcept nogil:
2108
+ cdef numpy.int64_t k
2109
+ submodel.determine_potentialsoilevapotranspiration()
2110
+ for k in range(self.parameters.control.nmbhru):
2111
+ self.sequences.fluxes.potentialsoilevapotranspiration[k] = ( submodel.get_potentialsoilevapotranspiration(k) )
2112
+ cpdef inline void calc_potentialwaterevaporation_petmodel_v1(self, masterinterface.MasterInterface submodel) noexcept nogil:
2113
+ cdef numpy.int64_t k
2114
+ for k in range(self.parameters.control.nmbhru):
2115
+ self.sequences.fluxes.potentialwaterevaporation[k] = submodel.get_potentialevapotranspiration( k )
2116
+ cpdef inline void calc_potentialwaterevaporation_petmodel_v2(self, masterinterface.MasterInterface submodel) noexcept nogil:
2117
+ cdef numpy.int64_t k
2118
+ submodel.determine_potentialwaterevaporation()
2119
+ for k in range(self.parameters.control.nmbhru):
2120
+ self.sequences.fluxes.potentialwaterevaporation[k] = submodel.get_potentialwaterevaporation(k)
2121
+ cpdef inline void calc_currentalbedo_snowalbedomodel_v1(self, masterinterface.MasterInterface submodel) noexcept nogil:
2122
+ cdef numpy.int64_t k
2123
+ for k in range(self.parameters.control.nmbhru):
2124
+ self.sequences.factors.currentalbedo[k] = submodel.get_snowalbedo(k)
2125
+ cpdef inline void calc_airtemperature(self) noexcept nogil:
2126
+ if self.tempmodel_typeid == 1:
2127
+ self.calc_airtemperature_tempmodel_v1( (<masterinterface.MasterInterface>self.tempmodel) )
2128
+ elif self.tempmodel_typeid == 2:
2129
+ self.calc_airtemperature_tempmodel_v2( (<masterinterface.MasterInterface>self.tempmodel) )
2130
+ cpdef inline void update_loggedairtemperature(self) noexcept nogil:
2131
+ cdef numpy.int64_t k
2132
+ cdef numpy.int64_t idx
2133
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
2134
+ for k in range(self.parameters.control.nmbhru):
2135
+ self.sequences.logs.loggedairtemperature[idx, k] = self.sequences.logs.loggedairtemperature[idx - 1, k]
2136
+ for k in range(self.parameters.control.nmbhru):
2137
+ self.sequences.logs.loggedairtemperature[0, k] = self.sequences.factors.airtemperature[k]
2138
+ cpdef inline void calc_dailyairtemperature(self) noexcept nogil:
2139
+ cdef numpy.int64_t idx
2140
+ cdef numpy.int64_t k
2141
+ for k in range(self.parameters.control.nmbhru):
2142
+ self.sequences.factors.dailyairtemperature[k] = 0.0
2143
+ for idx in range(self.parameters.derived.nmblogentries):
2144
+ for k in range(self.parameters.control.nmbhru):
2145
+ self.sequences.factors.dailyairtemperature[k] = self.sequences.factors.dailyairtemperature[k] + (self.sequences.logs.loggedairtemperature[idx, k])
2146
+ for k in range(self.parameters.control.nmbhru):
2147
+ self.sequences.factors.dailyairtemperature[k] = self.sequences.factors.dailyairtemperature[k] / (self.parameters.derived.nmblogentries)
2148
+ cpdef inline void update_loggedwindspeed2m(self) noexcept nogil:
2149
+ cdef numpy.int64_t idx
2150
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
2151
+ self.sequences.logs.loggedwindspeed2m[idx] = self.sequences.logs.loggedwindspeed2m[idx - 1]
2152
+ self.sequences.logs.loggedwindspeed2m[0] = self.sequences.factors.windspeed2m
2153
+ cpdef inline void calc_dailywindspeed2m(self) noexcept nogil:
2154
+ cdef numpy.int64_t idx
2155
+ self.sequences.factors.dailywindspeed2m = 0.0
2156
+ for idx in range(self.parameters.derived.nmblogentries):
2157
+ self.sequences.factors.dailywindspeed2m = self.sequences.factors.dailywindspeed2m + (self.sequences.logs.loggedwindspeed2m[idx])
2158
+ self.sequences.factors.dailywindspeed2m = self.sequences.factors.dailywindspeed2m / (self.parameters.derived.nmblogentries)
2159
+ cpdef inline void calc_windspeed10m(self) noexcept nogil:
2160
+ self.sequences.factors.windspeed10m = self.return_adjustedwindspeed_v1(10.0)
2161
+ cpdef inline void update_loggedrelativehumidity(self) noexcept nogil:
2162
+ cdef numpy.int64_t idx
2163
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
2164
+ self.sequences.logs.loggedrelativehumidity[idx] = self.sequences.logs.loggedrelativehumidity[idx - 1]
2165
+ self.sequences.logs.loggedrelativehumidity[0] = self.sequences.inputs.relativehumidity
2166
+ cpdef inline void calc_dailyrelativehumidity(self) noexcept nogil:
2167
+ cdef numpy.int64_t idx
2168
+ self.sequences.factors.dailyrelativehumidity = 0.0
2169
+ for idx in range(self.parameters.derived.nmblogentries):
2170
+ self.sequences.factors.dailyrelativehumidity = self.sequences.factors.dailyrelativehumidity + (self.sequences.logs.loggedrelativehumidity[idx])
2171
+ self.sequences.factors.dailyrelativehumidity = self.sequences.factors.dailyrelativehumidity / (self.parameters.derived.nmblogentries)
2172
+ cpdef inline void calc_dailysaturationvapourpressure(self) noexcept nogil:
2173
+ cdef numpy.int64_t k
2174
+ for k in range(self.parameters.control.nmbhru):
2175
+ self.sequences.factors.dailysaturationvapourpressure[k] = ( self.return_saturationvapourpressure_v1(self.sequences.factors.dailyairtemperature[k]) )
2176
+ cpdef inline void calc_dailysaturationvapourpressureslope(self) noexcept nogil:
2177
+ cdef numpy.int64_t k
2178
+ for k in range(self.parameters.control.nmbhru):
2179
+ self.sequences.factors.dailysaturationvapourpressureslope[k] = ( self.return_saturationvapourpressureslope_v1( self.sequences.factors.dailyairtemperature[k] ) )
2180
+ cpdef inline void calc_actualvapourpressure(self) noexcept nogil:
2181
+ cdef numpy.int64_t k
2182
+ for k in range(self.parameters.control.nmbhru):
2183
+ self.sequences.factors.actualvapourpressure[k] = ( self.sequences.factors.saturationvapourpressure[k] * self.sequences.inputs.relativehumidity / 100.0 )
2184
+ cpdef inline void calc_dailyactualvapourpressure(self) noexcept nogil:
2185
+ cdef numpy.int64_t k
2186
+ for k in range(self.parameters.control.nmbhru):
2187
+ self.sequences.factors.dailyactualvapourpressure[k] = ( self.sequences.factors.dailysaturationvapourpressure[k] * self.sequences.factors.dailyrelativehumidity / 100.0 )
2188
+ cpdef inline void calc_dryairpressure(self) noexcept nogil:
2189
+ cdef numpy.int64_t k
2190
+ for k in range(self.parameters.control.nmbhru):
2191
+ self.sequences.factors.dryairpressure[k] = ( self.sequences.inputs.atmosphericpressure - self.sequences.factors.actualvapourpressure[k] )
2192
+ cpdef inline void calc_airdensity(self) noexcept nogil:
2193
+ cdef numpy.int64_t k
2194
+ for k in range(self.parameters.control.nmbhru):
2195
+ self.sequences.factors.airdensity[k] = (100.0 / (self.sequences.factors.airtemperature[k] + 273.15)) * ( self.sequences.factors.dryairpressure[k] / self.parameters.fixed.gasconstantdryair + self.sequences.factors.actualvapourpressure[k] / self.parameters.fixed.gasconstantwatervapour )
2196
+ cpdef inline void process_radiationmodel(self) noexcept nogil:
2197
+ if self.radiationmodel_typeid == 1:
2198
+ (<masterinterface.MasterInterface>self.radiationmodel).process_radiation()
2199
+ cpdef inline void calc_possiblesunshineduration(self) noexcept nogil:
2200
+ if self.radiationmodel_typeid == 1:
2201
+ self.sequences.factors.possiblesunshineduration = (<masterinterface.MasterInterface>self.radiationmodel).get_possiblesunshineduration()
2202
+ elif self.radiationmodel_typeid == 4:
2203
+ self.sequences.factors.possiblesunshineduration = (<masterinterface.MasterInterface>self.radiationmodel).get_possiblesunshineduration()
2204
+ cpdef inline void calc_sunshineduration(self) noexcept nogil:
2205
+ if self.radiationmodel_typeid == 1:
2206
+ self.sequences.factors.sunshineduration = (<masterinterface.MasterInterface>self.radiationmodel).get_sunshineduration()
2207
+ elif self.radiationmodel_typeid == 4:
2208
+ self.sequences.factors.sunshineduration = (<masterinterface.MasterInterface>self.radiationmodel).get_sunshineduration()
2209
+ cpdef inline void calc_clearskysolarradiation(self) noexcept nogil:
2210
+ if self.radiationmodel_typeid == 1:
2211
+ self.sequences.fluxes.clearskysolarradiation = (<masterinterface.MasterInterface>self.radiationmodel).get_clearskysolarradiation()
2212
+ elif self.radiationmodel_typeid == 3:
2213
+ self.sequences.fluxes.clearskysolarradiation = (<masterinterface.MasterInterface>self.radiationmodel).get_clearskysolarradiation()
2214
+ cpdef inline void calc_globalradiation(self) noexcept nogil:
2215
+ if self.radiationmodel_typeid == 1:
2216
+ self.sequences.fluxes.globalradiation = (<masterinterface.MasterInterface>self.radiationmodel).get_globalradiation()
2217
+ elif self.radiationmodel_typeid == 2:
2218
+ self.sequences.fluxes.globalradiation = (<masterinterface.MasterInterface>self.radiationmodel).get_globalradiation()
2219
+ elif self.radiationmodel_typeid == 3:
2220
+ self.sequences.fluxes.globalradiation = (<masterinterface.MasterInterface>self.radiationmodel).get_globalradiation()
2221
+ elif self.radiationmodel_typeid == 4:
2222
+ self.sequences.fluxes.globalradiation = (<masterinterface.MasterInterface>self.radiationmodel).get_globalradiation()
2223
+ cpdef inline void update_loggedsunshineduration(self) noexcept nogil:
2224
+ cdef numpy.int64_t idx
2225
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
2226
+ self.sequences.logs.loggedsunshineduration[idx] = self.sequences.logs.loggedsunshineduration[idx - 1]
2227
+ self.sequences.logs.loggedsunshineduration[0] = self.sequences.factors.sunshineduration
2228
+ cpdef inline void calc_dailysunshineduration(self) noexcept nogil:
2229
+ cdef numpy.int64_t idx
2230
+ self.sequences.factors.dailysunshineduration = 0.0
2231
+ for idx in range(self.parameters.derived.nmblogentries):
2232
+ self.sequences.factors.dailysunshineduration = self.sequences.factors.dailysunshineduration + (self.sequences.logs.loggedsunshineduration[idx])
2233
+ cpdef inline void update_loggedpossiblesunshineduration(self) noexcept nogil:
2234
+ cdef numpy.int64_t idx
2235
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
2236
+ self.sequences.logs.loggedpossiblesunshineduration[idx] = ( self.sequences.logs.loggedpossiblesunshineduration[idx - 1] )
2237
+ self.sequences.logs.loggedpossiblesunshineduration[0] = self.sequences.factors.possiblesunshineduration
2238
+ cpdef inline void calc_dailypossiblesunshineduration(self) noexcept nogil:
2239
+ cdef numpy.int64_t idx
2240
+ self.sequences.factors.dailypossiblesunshineduration = 0.0
2241
+ for idx in range(self.parameters.derived.nmblogentries):
2242
+ self.sequences.factors.dailypossiblesunshineduration = self.sequences.factors.dailypossiblesunshineduration + (self.sequences.logs.loggedpossiblesunshineduration[idx])
2243
+ cpdef inline void update_loggedclearskysolarradiation(self) noexcept nogil:
2244
+ cdef numpy.int64_t idx
2245
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
2246
+ self.sequences.logs.loggedclearskysolarradiation[idx] = self.sequences.logs.loggedclearskysolarradiation[ idx - 1 ]
2247
+ self.sequences.logs.loggedclearskysolarradiation[0] = self.sequences.fluxes.clearskysolarradiation
2248
+ cpdef inline void update_loggedglobalradiation(self) noexcept nogil:
2249
+ cdef numpy.int64_t idx
2250
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
2251
+ self.sequences.logs.loggedglobalradiation[idx] = self.sequences.logs.loggedglobalradiation[idx - 1]
2252
+ self.sequences.logs.loggedglobalradiation[0] = self.sequences.fluxes.globalradiation
2253
+ cpdef inline void calc_dailyglobalradiation(self) noexcept nogil:
2254
+ cdef numpy.int64_t idx
2255
+ self.sequences.fluxes.dailyglobalradiation = 0.0
2256
+ for idx in range(self.parameters.derived.nmblogentries):
2257
+ self.sequences.fluxes.dailyglobalradiation = self.sequences.fluxes.dailyglobalradiation + (self.sequences.logs.loggedglobalradiation[idx])
2258
+ self.sequences.fluxes.dailyglobalradiation = self.sequences.fluxes.dailyglobalradiation / (self.parameters.derived.nmblogentries)
2259
+ cpdef inline void calc_dailynetshortwaveradiation(self) noexcept nogil:
2260
+ cdef numpy.int64_t k
2261
+ for k in range(self.parameters.control.nmbhru):
2262
+ self.sequences.fluxes.dailynetshortwaveradiation[k] = ( 1.0 - self.sequences.factors.currentalbedo[k] ) * self.sequences.fluxes.dailyglobalradiation
2263
+ cpdef inline void update_cloudcoverage(self) noexcept nogil:
2264
+ cdef double p0
2265
+ p0 = self.sequences.factors.possiblesunshineduration
2266
+ if (self.parameters.derived.days >= 1.0) or (p0 >= self.parameters.derived.hours):
2267
+ self.sequences.states.cloudcoverage = min(self.sequences.factors.sunshineduration / p0, 1.0)
2268
+ cpdef inline void calc_adjustedcloudcoverage(self) noexcept nogil:
2269
+ cdef double n
2270
+ cdef double c
2271
+ cdef double w
2272
+ w = self.sequences.factors.possiblesunshineduration / self.parameters.derived.hours
2273
+ c = self.sequences.states.cloudcoverage
2274
+ n = self.parameters.control.nightcloudfactor
2275
+ self.sequences.factors.adjustedcloudcoverage = w * c + (1.0 - w) * min(n * c, 1.0)
2276
+ cpdef inline void calc_dailynetlongwaveradiation(self) noexcept nogil:
2277
+ cdef double t
2278
+ cdef numpy.int64_t k
2279
+ cdef double rel_sunshine
2280
+ rel_sunshine = min( self.sequences.factors.dailysunshineduration / self.sequences.factors.dailypossiblesunshineduration, 1.0 )
2281
+ for k in range(self.parameters.control.nmbhru):
2282
+ t = self.sequences.factors.dailyairtemperature[k] + 273.15
2283
+ self.sequences.fluxes.dailynetlongwaveradiation[k] = ( (0.2 + 0.8 * rel_sunshine) * (self.parameters.fixed.stefanboltzmannconstant * t**4) * ( self.parameters.control.emissivity - self.parameters.fixed.factorcounterradiation * (self.sequences.factors.dailyactualvapourpressure[k] / t) ** (1.0 / 7.0) ) )
2284
+ cpdef inline void calc_dailynetradiation(self) noexcept nogil:
2285
+ cdef numpy.int64_t k
2286
+ for k in range(self.parameters.control.nmbhru):
2287
+ self.sequences.fluxes.dailynetradiation[k] = ( self.sequences.fluxes.dailynetshortwaveradiation[k] - self.sequences.fluxes.dailynetlongwaveradiation[k] )
2288
+ cpdef inline void calc_psychrometricconstant(self) noexcept nogil:
2289
+ self.sequences.factors.psychrometricconstant = 6.65e-4 * self.sequences.inputs.atmosphericpressure
2290
+ cpdef inline void calc_soilsurfaceresistance(self) noexcept nogil:
2291
+ cdef double sw_act
2292
+ cdef double sw_max
2293
+ cdef numpy.int64_t k
2294
+ for k in range(self.parameters.control.nmbhru):
2295
+ sw_max = self.parameters.control.maxsoilwater[k]
2296
+ if not self.parameters.control.soil[k]:
2297
+ self.sequences.factors.soilsurfaceresistance[k] = nan
2298
+ elif sw_max > 20.0:
2299
+ self.sequences.factors.soilsurfaceresistance[k] = 100.0
2300
+ elif sw_max > 0.0:
2301
+ sw_act = min(max(self.sequences.factors.soilwater[k], 0.0), sw_max)
2302
+ self.sequences.factors.soilsurfaceresistance[k] = 100.0 * sw_max / (sw_act + 0.01 * sw_max)
2303
+ else:
2304
+ self.sequences.factors.soilsurfaceresistance[k] = inf
2305
+ cpdef inline void calc_dailyprecipitation(self) noexcept nogil:
2306
+ cdef numpy.int64_t idx
2307
+ cdef numpy.int64_t k
2308
+ for k in range(self.parameters.control.nmbhru):
2309
+ self.sequences.fluxes.dailyprecipitation[k] = 0.0
2310
+ for idx in range(self.parameters.derived.nmblogentries):
2311
+ for k in range(self.parameters.control.nmbhru):
2312
+ self.sequences.fluxes.dailyprecipitation[k] = self.sequences.fluxes.dailyprecipitation[k] + (self.sequences.logs.loggedprecipitation[idx, k])
2313
+ cpdef inline void calc_dailypotentialsoilevapotranspiration(self) noexcept nogil:
2314
+ cdef numpy.int64_t idx
2315
+ cdef numpy.int64_t k
2316
+ for k in range(self.parameters.control.nmbhru):
2317
+ self.sequences.fluxes.dailypotentialsoilevapotranspiration[k] = 0.0
2318
+ for idx in range(self.parameters.derived.nmblogentries):
2319
+ for k in range(self.parameters.control.nmbhru):
2320
+ self.sequences.fluxes.dailypotentialsoilevapotranspiration[ k ] = self.sequences.fluxes.dailypotentialsoilevapotranspiration[ k ] + (self.sequences.logs.loggedpotentialsoilevapotranspiration[idx, k])
2321
+ cpdef inline void update_soilresistance(self) noexcept nogil:
2322
+ cdef double wetness
2323
+ cdef numpy.int64_t k
2324
+ for k in range(self.parameters.control.nmbhru):
2325
+ if self.parameters.control.soil[k]:
2326
+ wetness = self.sequences.fluxes.dailyprecipitation[k] / self.parameters.control.wetnessthreshold[k]
2327
+ if wetness < self.sequences.fluxes.dailypotentialsoilevapotranspiration[k]:
2328
+ self.sequences.states.soilresistance[k] = self.sequences.states.soilresistance[k] + (self.parameters.control.soilresistanceincrease[k])
2329
+ else:
2330
+ self.sequences.states.soilresistance[k] = self.parameters.control.wetsoilresistance[k]
2331
+ else:
2332
+ self.sequences.states.soilresistance[k] = nan
2333
+ cpdef inline void calc_landusesurfaceresistance(self) noexcept nogil:
2334
+ cdef double thresh
2335
+ cdef double sw
2336
+ cdef double d
2337
+ cdef double r
2338
+ cdef numpy.int64_t k
2339
+ for k in range(self.parameters.control.nmbhru):
2340
+ r = self.parameters.control.surfaceresistance[ self.parameters.control.hrutype[k] - self.parameters.control._surfaceresistance_rowmin, self.parameters.derived.moy[self.idx_sim] - self.parameters.control._surfaceresistance_columnmin, ]
2341
+ if self.parameters.control.conifer[k]:
2342
+ d = self.sequences.factors.saturationvapourpressure[k] - self.sequences.factors.actualvapourpressure[k]
2343
+ if (self.sequences.factors.airtemperature[k] <= -5.0) or (d >= 20.0):
2344
+ self.sequences.factors.landusesurfaceresistance[k] = 10000.0
2345
+ elif self.sequences.factors.airtemperature[k] < 20.0:
2346
+ self.sequences.factors.landusesurfaceresistance[k] = min( (25.0 * r) / (self.sequences.factors.airtemperature[k] + 5.0) / (1.0 - 0.05 * d), 10000.0, )
2347
+ else:
2348
+ self.sequences.factors.landusesurfaceresistance[k] = min(r / (1.0 - 0.05 * d), 10000.0)
2349
+ else:
2350
+ self.sequences.factors.landusesurfaceresistance[k] = r
2351
+ if self.parameters.control.soil[k]:
2352
+ sw = self.sequences.factors.soilwater[k]
2353
+ if sw <= 0.0:
2354
+ self.sequences.factors.landusesurfaceresistance[k] = inf
2355
+ else:
2356
+ thresh = self.parameters.control.soilmoisturelimit[k] * self.parameters.control.maxsoilwater[k]
2357
+ if sw < thresh:
2358
+ self.sequences.factors.landusesurfaceresistance[k] = self.sequences.factors.landusesurfaceresistance[k] * (3.5 * ( 1.0 - sw / thresh ) + exp(0.2 * thresh / sw))
2359
+ else:
2360
+ self.sequences.factors.landusesurfaceresistance[k] = self.sequences.factors.landusesurfaceresistance[k] * (exp(0.2))
2361
+ cpdef inline void adjust_referenceevapotranspiration(self) noexcept nogil:
2362
+ cdef numpy.int64_t k
2363
+ for k in range(self.parameters.control.nmbhru):
2364
+ self.sequences.fluxes.referenceevapotranspiration[k] = self.sequences.fluxes.referenceevapotranspiration[k] * (self.parameters.control.evapotranspirationfactor[k])
2365
+ cpdef inline void update_potentialevapotranspiration(self) noexcept nogil:
2366
+ cdef numpy.int64_t k
2367
+ for k in range(self.parameters.control.nmbhru):
2368
+ self.sequences.fluxes.potentialevapotranspiration[k] = ( self.parameters.control.dampingfactor[k] * self.sequences.fluxes.potentialevapotranspiration[k] + (1.0 - self.parameters.control.dampingfactor[k]) * self.sequences.logs.loggedpotentialevapotranspiration[0, k] )
2369
+ self.sequences.logs.loggedpotentialevapotranspiration[0, k] = ( self.sequences.fluxes.potentialevapotranspiration[k] )
2370
+ cpdef inline void calc_meanreferenceevapotranspiration(self) noexcept nogil:
2371
+ cdef numpy.int64_t s
2372
+ self.sequences.fluxes.meanreferenceevapotranspiration = 0.0
2373
+ for s in range(self.parameters.control.nmbhru):
2374
+ self.sequences.fluxes.meanreferenceevapotranspiration = self.sequences.fluxes.meanreferenceevapotranspiration + (( self.parameters.derived.hruareafraction[s] * self.sequences.fluxes.referenceevapotranspiration[s] ))
2375
+ cpdef inline void calc_meanpotentialevapotranspiration(self) noexcept nogil:
2376
+ cdef numpy.int64_t s
2377
+ self.sequences.fluxes.meanpotentialevapotranspiration = 0.0
2378
+ for s in range(self.parameters.control.nmbhru):
2379
+ self.sequences.fluxes.meanpotentialevapotranspiration = self.sequences.fluxes.meanpotentialevapotranspiration + (( self.parameters.derived.hruareafraction[s] * self.sequences.fluxes.potentialevapotranspiration[s] ))
2380
+ cpdef inline void calc_interceptedwater(self) noexcept nogil:
2381
+ if self.intercmodel_typeid == 1:
2382
+ self.calc_interceptedwater_intercmodel_v1( (<masterinterface.MasterInterface>self.intercmodel) )
2383
+ cpdef inline void calc_soilwater(self) noexcept nogil:
2384
+ if self.soilwatermodel_typeid == 1:
2385
+ self.calc_soilwater_soilwatermodel_v1( (<masterinterface.MasterInterface>self.soilwatermodel) )
2386
+ cpdef inline void calc_snowcover(self) noexcept nogil:
2387
+ if self.snowcovermodel_typeid == 1:
2388
+ self.calc_snowcover_snowcovermodel_v1( (<masterinterface.MasterInterface>self.snowcovermodel) )
2389
+ cpdef inline void calc_snowycanopy(self) noexcept nogil:
2390
+ cdef numpy.int64_t k
2391
+ if self.snowycanopymodel is None:
2392
+ for k in range(self.parameters.control.nmbhru):
2393
+ self.sequences.factors.snowycanopy[k] = nan
2394
+ elif self.snowycanopymodel_typeid == 1:
2395
+ self.calc_snowycanopy_snowycanopymodel_v1( (<masterinterface.MasterInterface>self.snowycanopymodel) )
2396
+ cpdef inline void calc_potentialwaterevaporation(self) noexcept nogil:
2397
+ if self.petmodel_typeid == 1:
2398
+ self.calc_potentialwaterevaporation_petmodel_v1( (<masterinterface.MasterInterface>self.petmodel) )
2399
+ elif self.petmodel_typeid == 2:
2400
+ self.calc_potentialwaterevaporation_petmodel_v2( (<masterinterface.MasterInterface>self.petmodel) )
2401
+ cpdef inline void update_loggedwaterevaporation(self) noexcept nogil:
2402
+ cdef numpy.int64_t k
2403
+ cdef numpy.int64_t idx
2404
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
2405
+ for k in range(self.parameters.control.nmbhru):
2406
+ self.sequences.logs.loggedwaterevaporation[idx, k] = self.sequences.logs.loggedwaterevaporation[ idx - 1, k ]
2407
+ for k in range(self.parameters.control.nmbhru):
2408
+ self.sequences.logs.loggedwaterevaporation[0, k] = self.sequences.fluxes.waterevaporation[k]
2409
+ cpdef inline void calc_dailywaterevaporation(self) noexcept nogil:
2410
+ cdef numpy.int64_t idx
2411
+ cdef numpy.int64_t k
2412
+ for k in range(self.parameters.control.nmbhru):
2413
+ self.sequences.fluxes.dailywaterevaporation[k] = 0.0
2414
+ for idx in range(self.parameters.derived.nmblogentries):
2415
+ for k in range(self.parameters.control.nmbhru):
2416
+ self.sequences.fluxes.dailywaterevaporation[k] = self.sequences.fluxes.dailywaterevaporation[k] + (self.sequences.logs.loggedwaterevaporation[idx, k])
2417
+ cpdef inline void update_loggedprecipitation(self) noexcept nogil:
2418
+ cdef numpy.int64_t k
2419
+ cdef numpy.int64_t idx
2420
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
2421
+ for k in range(self.parameters.control.nmbhru):
2422
+ self.sequences.logs.loggedprecipitation[idx, k] = self.sequences.logs.loggedprecipitation[idx - 1, k]
2423
+ for k in range(self.parameters.control.nmbhru):
2424
+ self.sequences.logs.loggedprecipitation[0, k] = self.sequences.fluxes.precipitation[k]
2425
+ cpdef inline void update_loggedpotentialsoilevapotranspiration(self) noexcept nogil:
2426
+ cdef numpy.int64_t k
2427
+ cdef numpy.int64_t idx
2428
+ for idx in range(self.parameters.derived.nmblogentries - 1, 0, -1):
2429
+ for k in range(self.parameters.control.nmbhru):
2430
+ self.sequences.logs.loggedpotentialsoilevapotranspiration[idx, k] = ( self.sequences.logs.loggedpotentialsoilevapotranspiration[idx - 1, k] )
2431
+ for k in range(self.parameters.control.nmbhru):
2432
+ self.sequences.logs.loggedpotentialsoilevapotranspiration[0, k] = ( self.sequences.fluxes.potentialsoilevapotranspiration[k] )
2433
+ cpdef void determine_potentialevapotranspiration(self) noexcept nogil:
2434
+ self.run()
2435
+ cpdef double get_waterevaporation(self, numpy.int64_t k) noexcept nogil:
2436
+ return self.sequences.fluxes.waterevaporation[k]
2437
+ cpdef double get_potentialwaterevaporation(self, numpy.int64_t k) noexcept nogil:
2438
+ return self.parameters.derived.days * self.sequences.fluxes.dailywaterevaporation[k]
2439
+ cpdef double get_potentialinterceptionevaporation(self, numpy.int64_t k) noexcept nogil:
2440
+ return self.sequences.fluxes.potentialinterceptionevaporation[k]
2441
+ cpdef double get_interceptionevaporation(self, numpy.int64_t k) noexcept nogil:
2442
+ return self.sequences.fluxes.interceptionevaporation[k]
2443
+ cpdef double get_potentialsoilevapotranspiration(self, numpy.int64_t k) noexcept nogil:
2444
+ return self.sequences.fluxes.potentialsoilevapotranspiration[k]
2445
+ cpdef double get_soilevapotranspiration(self, numpy.int64_t k) noexcept nogil:
2446
+ return self.sequences.fluxes.soilevapotranspiration[k]
2447
+ cpdef inline double return_adjustedwindspeed(self, double h) noexcept nogil:
2448
+ if h == self.parameters.control.measuringheightwindspeed:
2449
+ return self.sequences.inputs.windspeed
2450
+ return self.sequences.inputs.windspeed * ( log(h / self.parameters.fixed.roughnesslengthgrass) / log(self.parameters.control.measuringheightwindspeed / self.parameters.fixed.roughnesslengthgrass) )
2451
+ cpdef inline double return_saturationvapourpressure(self, double airtemperature) noexcept nogil:
2452
+ return 6.1078 * 2.71828 ** ( 17.08085 * airtemperature / (airtemperature + 234.175) )
2453
+ cpdef inline double return_saturationvapourpressureslope(self, double t) noexcept nogil:
2454
+ return ( 24430.6 * exp(17.08085 * t / (t + 234.175)) / (t + 234.175) ** 2 )
2455
+ cpdef inline void calc_referenceevapotranspiration_petmodel(self, masterinterface.MasterInterface submodel) noexcept nogil:
2456
+ cdef numpy.int64_t k
2457
+ submodel.determine_potentialevapotranspiration()
2458
+ for k in range(self.parameters.control.nmbhru):
2459
+ self.sequences.fluxes.referenceevapotranspiration[k] = ( submodel.get_potentialevapotranspiration(k) )
2460
+ cpdef inline void calc_interceptedwater_intercmodel(self, masterinterface.MasterInterface submodel) noexcept nogil:
2461
+ cdef numpy.int64_t k
2462
+ for k in range(self.parameters.control.nmbhru):
2463
+ self.sequences.factors.interceptedwater[k] = submodel.get_interceptedwater(k)
2464
+ cpdef inline void calc_soilwater_soilwatermodel(self, masterinterface.MasterInterface submodel) noexcept nogil:
2465
+ cdef numpy.int64_t k
2466
+ for k in range(self.parameters.control.nmbhru):
2467
+ self.sequences.factors.soilwater[k] = submodel.get_soilwater(k)
2468
+ cpdef inline void calc_snowcover_snowcovermodel(self, masterinterface.MasterInterface submodel) noexcept nogil:
2469
+ cdef numpy.int64_t k
2470
+ for k in range(self.parameters.control.nmbhru):
2471
+ self.sequences.factors.snowcover[k] = submodel.get_snowcover(k)
2472
+ cpdef inline void calc_snowycanopy_snowycanopymodel(self, masterinterface.MasterInterface submodel) noexcept nogil:
2473
+ cdef numpy.int64_t k
2474
+ for k in range(self.parameters.control.nmbhru):
2475
+ self.sequences.factors.snowycanopy[k] = submodel.get_snowycanopy(k)
2476
+ cpdef inline void calc_currentalbedo_snowalbedomodel(self, masterinterface.MasterInterface submodel) noexcept nogil:
2477
+ cdef numpy.int64_t k
2478
+ for k in range(self.parameters.control.nmbhru):
2479
+ self.sequences.factors.currentalbedo[k] = submodel.get_snowalbedo(k)
2480
+ cpdef void determine_interceptionevaporation_v1(self) noexcept nogil:
2481
+ self.calc_potentialinterceptionevaporation_v3()
2482
+ self.calc_interceptedwater_v1()
2483
+ self.calc_interceptionevaporation_v1()
2484
+ cpdef void determine_interceptionevaporation_v2(self) noexcept nogil:
2485
+ self.process_radiationmodel_v1()
2486
+ self.calc_possiblesunshineduration_v1()
2487
+ self.calc_sunshineduration_v1()
2488
+ self.calc_globalradiation_v1()
2489
+ self.calc_airtemperature_v1()
2490
+ self.update_loggedairtemperature_v1()
2491
+ self.calc_dailyairtemperature_v1()
2492
+ self.calc_windspeed10m_v1()
2493
+ self.update_loggedrelativehumidity_v1()
2494
+ self.calc_dailyrelativehumidity_v1()
2495
+ self.calc_saturationvapourpressure_v2()
2496
+ self.calc_dailysaturationvapourpressure_v1()
2497
+ self.calc_saturationvapourpressureslope_v2()
2498
+ self.calc_dailysaturationvapourpressureslope_v1()
2499
+ self.calc_actualvapourpressure_v1()
2500
+ self.calc_dailyactualvapourpressure_v1()
2501
+ self.calc_dryairpressure_v1()
2502
+ self.calc_airdensity_v1()
2503
+ self.calc_aerodynamicresistance_v1()
2504
+ self.calc_snowcover_v1()
2505
+ self.calc_snowycanopy_v1()
2506
+ self.update_loggedsunshineduration_v1()
2507
+ self.calc_dailysunshineduration_v1()
2508
+ self.update_loggedpossiblesunshineduration_v1()
2509
+ self.calc_dailypossiblesunshineduration_v1()
2510
+ self.calc_currentalbedo_v1()
2511
+ self.calc_netshortwaveradiation_v2()
2512
+ self.calc_dailynetlongwaveradiation_v1()
2513
+ self.calc_netradiation_v2()
2514
+ self.calc_soilheatflux_v3()
2515
+ self.calc_potentialinterceptionevaporation_v1()
2516
+ self.calc_interceptedwater_v1()
2517
+ self.calc_interceptionevaporation_v2()
2518
+ cpdef void determine_potentialinterceptionevaporation_v1(self) noexcept nogil:
2519
+ self.process_radiationmodel_v1()
2520
+ self.calc_possiblesunshineduration_v1()
2521
+ self.calc_sunshineduration_v1()
2522
+ self.calc_globalradiation_v1()
2523
+ self.calc_airtemperature_v1()
2524
+ self.calc_windspeed10m_v1()
2525
+ self.calc_saturationvapourpressure_v1()
2526
+ self.calc_saturationvapourpressureslope_v1()
2527
+ self.calc_actualvapourpressure_v1()
2528
+ self.calc_dryairpressure_v1()
2529
+ self.calc_airdensity_v1()
2530
+ self.calc_aerodynamicresistance_v2()
2531
+ self.calc_snowcover_v1()
2532
+ self.calc_dailyprecipitation_v1()
2533
+ self.calc_dailypotentialsoilevapotranspiration_v1()
2534
+ self.calc_currentalbedo_v2()
2535
+ self.calc_netshortwaveradiation_v2()
2536
+ self.update_cloudcoverage_v1()
2537
+ self.calc_adjustedcloudcoverage_v1()
2538
+ self.calc_netlongwaveradiation_v2()
2539
+ self.calc_netradiation_v1()
2540
+ self.calc_soilheatflux_v4()
2541
+ self.calc_potentialinterceptionevaporation_v2()
2542
+ cpdef void determine_soilevapotranspiration_v1(self) noexcept nogil:
2543
+ self.calc_soilwater_v1()
2544
+ self.calc_snowcover_v1()
2545
+ self.calc_potentialsoilevapotranspiration_v2()
2546
+ self.calc_soilevapotranspiration_v1()
2547
+ self.update_soilevapotranspiration_v1()
2548
+ self.update_soilevapotranspiration_v2()
2549
+ cpdef void determine_soilevapotranspiration_v2(self) noexcept nogil:
2550
+ self.calc_soilwater_v1()
2551
+ self.calc_potentialsoilevapotranspiration_v2()
2552
+ self.calc_soilevapotranspiration_v2()
2553
+ self.update_soilevapotranspiration_v3()
2554
+ cpdef void determine_soilevapotranspiration_v3(self) noexcept nogil:
2555
+ self.calc_soilwater_v1()
2556
+ self.calc_snowcover_v1()
2557
+ self.calc_soilsurfaceresistance_v1()
2558
+ self.calc_landusesurfaceresistance_v1()
2559
+ self.calc_actualsurfaceresistance_v1()
2560
+ self.calc_soilevapotranspiration_v3()
2561
+ self.update_soilevapotranspiration_v3()
2562
+ cpdef void determine_waterevaporation_v1(self) noexcept nogil:
2563
+ self.calc_airtemperature_v1()
2564
+ self.calc_potentialwaterevaporation_v1()
2565
+ self.calc_waterevaporation_v1()
2566
+ cpdef void determine_waterevaporation_v2(self) noexcept nogil:
2567
+ self.calc_potentialwaterevaporation_v1()
2568
+ self.calc_waterevaporation_v2()
2569
+ cpdef void determine_waterevaporation_v3(self) noexcept nogil:
2570
+ self.calc_windspeed2m_v2()
2571
+ self.update_loggedwindspeed2m_v1()
2572
+ self.calc_dailywindspeed2m_v1()
2573
+ self.update_loggedglobalradiation_v1()
2574
+ self.calc_dailyglobalradiation_v1()
2575
+ self.calc_dailynetshortwaveradiation_v1()
2576
+ self.calc_dailynetradiation_v1()
2577
+ self.calc_waterevaporation_v3()
2578
+ cpdef void determine_potentialinterceptionevaporation(self) noexcept nogil:
2579
+ self.process_radiationmodel_v1()
2580
+ self.calc_possiblesunshineduration_v1()
2581
+ self.calc_sunshineduration_v1()
2582
+ self.calc_globalradiation_v1()
2583
+ self.calc_airtemperature_v1()
2584
+ self.calc_windspeed10m_v1()
2585
+ self.calc_saturationvapourpressure_v1()
2586
+ self.calc_saturationvapourpressureslope_v1()
2587
+ self.calc_actualvapourpressure_v1()
2588
+ self.calc_dryairpressure_v1()
2589
+ self.calc_airdensity_v1()
2590
+ self.calc_aerodynamicresistance_v2()
2591
+ self.calc_snowcover_v1()
2592
+ self.calc_dailyprecipitation_v1()
2593
+ self.calc_dailypotentialsoilevapotranspiration_v1()
2594
+ self.calc_currentalbedo_v2()
2595
+ self.calc_netshortwaveradiation_v2()
2596
+ self.update_cloudcoverage_v1()
2597
+ self.calc_adjustedcloudcoverage_v1()
2598
+ self.calc_netlongwaveradiation_v2()
2599
+ self.calc_netradiation_v1()
2600
+ self.calc_soilheatflux_v4()
2601
+ self.calc_potentialinterceptionevaporation_v2()