respec / HSPsquared

Hydrologic Simulation Program Python (HSPsquared)
GNU Affero General Public License v3.0
43 stars 17 forks source link

Update to packaging push plus fixes #158

Closed timcera closed 2 months ago

timcera commented 2 months ago

I was sitting on these changes because I couldn't find solutions to two problems. So thought to put this in a pull request for review and maybe someone will be able to figure them out.

Another reason to get this out there, is for the next two weeks or so I won't be able to work on this and I didn't want to slow progress down.

"pytest" works to test the new PWATER and IWATER tests. They both pass.

THE PROBLEMS:

  1. Right now, using python 3.10 and a "pip install ." with the code in this pull request, the "readUCI" function in tests/test05/HSP2results/CompareHSP2.ipynb will only bring in the PERLND operation. IMPLND and RCHRES are ignored. No errors. I can't figure it out.

  2. In tests/test10/HSP2results/TEST10_hsp2_compare.ipynb, when it is calculating RQUAL I get the error:

    
    ...
    File [~/anaconda3/envs/hsp2_310/lib/python3.10/site-packages/HSP2/RQUAL.py:225](http://localhost:8888/home/tim/anaconda3/envs/hsp2_310/lib/python3.10/site-packages/HSP2/RQUAL.py#line=224), in rqual(io_manager, siminfo, uci, uci_oxrx, uci_nutrx, uci_plank, uci_phcarb, ts, monthdata)
    218         ts['BINV'] = initm(siminfo, ui_plank, binvfg, 'MONTHLY[/BINV](http://localhost:8888/BINV)', binv_init)
    220 #---------------------------------------------------------------------
    221 # initialize & run integerated WQ simulation:
    222 #---------------------------------------------------------------------
    224 (err_oxrx, err_nutrx, err_plank, err_phcarb) \
    --> 225     = _rqual_run(siminfo_, ui, ui_oxrx, ui_nutrx, ui_plank, ui_phcarb, ts)
    227 #---------------------------------------------------------------------
    228 # compile errors & return:
    229 #---------------------------------------------------------------------
    231 (errors, ERRMSGS) = _compile_errors(NUTFG, PLKFG, PHFG, err_oxrx, err_nutrx, err_plank, err_phcarb)

SystemError: CPUDispatcher(<function _rqual_run at 0x7f67104b8ee0>) returned NULL without setting an exception

timcera commented 2 months ago

I messed up the pull request so I am withdrawing and looks like I need to rebase.