Skip to content

Commit

Permalink
added test10specl.uci
Browse files Browse the repository at this point in the history
  • Loading branch information
Burgholzer authored and Burgholzer committed May 7, 2024
1 parent 2ff7f56 commit c571c9d
Show file tree
Hide file tree
Showing 22 changed files with 9,406 additions and 0 deletions.
3,198 changes: 3,198 additions & 0 deletions tests/test10specl/HSP2results/TEST10_hsp2_compare.ipynb

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions tests/test10specl/HSP2results/pytest10.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

import pytest
import os

def test_h5_file_exists():
assert os.path.exists('test10specl.h5')

# uncomment if you want to see how to break the test
#def test_that_should_fail():
# assert os.path.exists('test100000.h5')
Binary file added tests/test10specl/HSP2results/test10.wdm
Binary file not shown.
25 changes: 25 additions & 0 deletions tests/test10specl/HSP2results/test10specl.example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import sys
from numba import int8, float32, njit, types, typed # import the types

print("Loaded a set of HSP2 code!")

@njit
def state_step_hydr(state_info, state_paths, state_ix, dict_ix, ts_ix, hydr_ix, step):
if (step <= 1):
print("Custom state_step_hydr() called for ", state_info['segment'])
print("operation", state_info['operation'])
print("state at start", state_ix)
print("domain info", state_info)
print("state_paths", state_paths)
# Do a simple withdrawal of 10 MGGD from R001
if (state_info['segment'] == 'R001') and (state_info['activity'] == 'HYDR'):
state_ix[hydr_ix['O1']] = 10.0 * 1.547
# Route point source return from segment R001 demand to R005 inflow (IVOL)
# For demo purposes this will only use the last state_ix value for R001 demand
# Realistic approach would run all segments simultaneously or use value from ts_ix (ts_ix loading TBD)
if (state_info['segment'] == 'R005') and (state_info['activity'] == 'HYDR'):
state_ix[hydr_ix['IVOL']] += 0.85 * state_ix[state_paths['/STATE/RCHRES_R001/HYDR/O1']]
if (step <= 1):
print("IVOL after", state_ix[hydr_ix['IVOL']])
return

File renamed without changes.
75 changes: 75 additions & 0 deletions tests/test10specl/HSPFresults/ERROR.FIL
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
20:39:51.929 : LOG_MSG:ERROR.FIL OPENED
20:39:51.933 : HASS_ENT:F90_WDBOPNR:entr:WDMSFL,RWFLG: 100 1 c:\basins45\models\hspf\bin\hspfmsg.wdm
20:39:51.934 : HASS_ENT:F90_WDBOPNR:exit:WDMSFL,RETCOD 100 0
FILBLK RETCOD 16534
FILBLK RETCOD 0
wdmfl 0 0 0 0
FILBLK RETCOD 16534
FILBLK RETCOD 0
20:44:39.248 : LOG_MSG:ERROR.FIL OPENED
20:44:39.251 : HASS_ENT:F90_WDBOPNR:entr:WDMSFL,RWFLG: 100 1 c:\basins45\models\hspf\bin\hspfmsg.wdm
20:44:39.252 : HASS_ENT:F90_WDBOPNR:exit:WDMSFL,RETCOD 100 0
FILBLK RETCOD 16534
FILBLK RETCOD 0
wdmfl 0 0 0 0
FILBLK RETCOD 16534
FILBLK RETCOD 0
20:50:10.164 : LOG_MSG:ERROR.FIL OPENED
20:50:10.167 : HASS_ENT:F90_WDBOPNR:entr:WDMSFL,RWFLG: 100 1 c:\basins45\models\hspf\bin\hspfmsg.wdm
20:50:10.167 : HASS_ENT:F90_WDBOPNR:exit:WDMSFL,RETCOD 100 0
FILBLK RETCOD 0
wdmfl 0 0 0 0
FILBLK RETCOD 0
20:51:01.096 : LOG_MSG:ERROR.FIL OPENED
20:51:01.101 : HASS_ENT:F90_INQNAM: 0 F C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10\HSPFresults\test.wdm
20:51:01.102 : HASS_ENT:INQUIRE_NAME:BEG: 0 101 0 101 C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10\HSPFresults\test.wdm
20:51:01.102 : HASS_ENT:INQUIRE_NAME:INX: 0 101 0 F
20:51:01.102 : HASS_ENT:INQUIRE_NAME:INF: 0 101 0 F
20:51:01.102 : HASS_ENT:INQUIRE_NAME:DON: 0 101 0 F
20:51:01.102 : HASS_ENT:INQUIRE_NAME:ASN: 0 101 101 F
20:51:01.102 : HASS_ENT:F90_WDBOPNR:entr:WDMSFL,RWFLG: 101 0 C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10\HSPFresults\test.wdm
20:51:01.102 : HASS_ENT:F90_WDBOPNR:exit:WDMSFL,RETCOD 101 0
20:51:01.102 : atcWdmHandle:New:101:0:C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10\HSPFresults\test.wdm
20:51:01.138 : HASS_ENT:F90_WDFLCL:entry:WDMSFL: 101
20:51:01.138 : HASS_ENT:F90_WDFLCL:close:WDMSFL:RETCOD: 101 0
20:51:01.138 : HASS_ENT:F90_WDFLCL:opned:WDMSFL: 101 F
20:51:01.138 : HASS_ENT:F90_WDFLCL:final:WDMSFL: 0 F C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10\HSPFresults\test.wdm
20:51:27.018 : HASS_ENT:F90_INQNAM: 0 F C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10\HSPFresults\test.wdm
20:51:27.018 : HASS_ENT:INQUIRE_NAME:BEG: 0 101 0 101 C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10\HSPFresults\test.wdm
20:51:27.018 : HASS_ENT:INQUIRE_NAME:INX: 0 101 0 F
20:51:27.018 : HASS_ENT:INQUIRE_NAME:INF: 0 101 0 F
20:51:27.018 : HASS_ENT:INQUIRE_NAME:DON: 0 101 0 F
20:51:27.019 : HASS_ENT:INQUIRE_NAME:ASN: 0 101 101 F
20:51:27.019 : HASS_ENT:F90_WDBOPNR:entr:WDMSFL,RWFLG: 101 0 C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10\HSPFresults\test.wdm
20:51:27.019 : HASS_ENT:F90_WDBOPNR:exit:WDMSFL,RETCOD 101 0
20:51:27.019 : atcWdmHandle:New:101:0:C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10\HSPFresults\test.wdm
20:51:27.023 : HASS_ENT:F90_WDFLCL:entry:WDMSFL: 101
20:51:27.023 : HASS_ENT:F90_WDFLCL:close:WDMSFL:RETCOD: 101 0
20:51:27.023 : HASS_ENT:F90_WDFLCL:opned:WDMSFL: 101 F
20:51:27.023 : HASS_ENT:F90_WDFLCL:final:WDMSFL: 0 F C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10\HSPFresults\test.wdm
21:02:42.289 : HASS_ENT:F90_INQNAM: 0 F C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10b\test.wdm
21:02:42.290 : HASS_ENT:INQUIRE_NAME:BEG: 0 101 0 101 C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10b\test.wdm
21:02:42.290 : HASS_ENT:INQUIRE_NAME:INX: 0 101 0 F
21:02:42.290 : HASS_ENT:INQUIRE_NAME:INF: 0 101 0 F
21:02:42.290 : HASS_ENT:INQUIRE_NAME:DON: 0 101 0 F
21:02:42.290 : HASS_ENT:INQUIRE_NAME:ASN: 0 101 101 F
21:02:42.290 : HASS_ENT:F90_WDBOPNR:entr:WDMSFL,RWFLG: 101 0 C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10b\test.wdm
21:02:42.290 : HASS_ENT:F90_WDBOPNR:exit:WDMSFL,RETCOD 101 0
21:02:42.290 : atcWdmHandle:New:101:0:C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10b\test.wdm
21:02:42.294 : HASS_ENT:F90_WDFLCL:entry:WDMSFL: 101
21:02:42.294 : HASS_ENT:F90_WDFLCL:close:WDMSFL:RETCOD: 101 0
21:02:42.294 : HASS_ENT:F90_WDFLCL:opned:WDMSFL: 101 F
21:02:42.294 : HASS_ENT:F90_WDFLCL:final:WDMSFL: 0 F C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10b\test.wdm
21:02:53.338 : HASS_ENT:F90_INQNAM: 0 F C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10b\HSPFresults\test.wdm
21:02:53.338 : HASS_ENT:INQUIRE_NAME:BEG: 0 101 0 101 C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10b\HSPFresults\test.wdm
21:02:53.338 : HASS_ENT:INQUIRE_NAME:INX: 0 101 0 F
21:02:53.338 : HASS_ENT:INQUIRE_NAME:INF: 0 101 0 F
21:02:53.338 : HASS_ENT:INQUIRE_NAME:DON: 0 101 0 F
21:02:53.338 : HASS_ENT:INQUIRE_NAME:ASN: 0 101 101 F
21:02:53.338 : HASS_ENT:F90_WDBOPNR:entr:WDMSFL,RWFLG: 101 0 C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10b\HSPFresults\test.wdm
21:02:53.338 : HASS_ENT:F90_WDBOPNR:exit:WDMSFL,RETCOD 101 0
21:02:53.338 : atcWdmHandle:New:101:0:C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10b\HSPFresults\test.wdm
21:02:53.344 : HASS_ENT:F90_WDFLCL:entry:WDMSFL: 101
21:02:53.344 : HASS_ENT:F90_WDFLCL:close:WDMSFL:RETCOD: 101 0
21:02:53.344 : HASS_ENT:F90_WDFLCL:opned:WDMSFL: 101 F
21:02:53.344 : HASS_ENT:F90_WDFLCL:final:WDMSFL: 0 F C:\Users\sskripnik\Documents\GitHub\HSPsquared\tests\test10b\HSPFresults\test.wdm
391 changes: 391 additions & 0 deletions tests/test10specl/HSPFresults/Run_HSPF.ipynb

Large diffs are not rendered by default.

Empty file.
Loading

0 comments on commit c571c9d

Please sign in to comment.