LimnoTech / HSPsquared

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

Merge develop_readWDM into develop to read time series by block & group #37

Closed ptomasula closed 3 years ago

ptomasula commented 3 years ago

This pull request replaces pull request #35. See below for additional details.

Purpose

This pull request directly addresses issue #21 Rewrite readWDM.py to read by data group & block. The update revises the readWDM function to processes timeseries in WDM files by explicitly looping over groups and processing each block. The logic implemented is based off a function in RESPEC's BASINS repository that provides similar functionality. These improvements enable the readWDM function to handle WDM files containing timeseries with irregular timesteps. The previous version of the function was unable to handle these files (see issue #40 in RESPEC's repo). The updated function also restored Numba support which dramatically decreases the processing time required for WDM files.

Testing

The testing was conducted manually by processing the test10.wdm and calleg.wdm files with both the develop and updated versions of the readWDM function. Timeseries from the resultant hdf files were then compared to ensure they matched. Additionally, the main function of the model was run to ensure the input files generated from the updated readWDM functions still allowed the model to execute.

Replacement of PR #35

During an initial merge of the develop branch into develop_readWDM a suspected clipboard error decremented all the numeric values in a section of code that was cut and pasted while resolving a merge conflict. See commit 16325d1 which attempted to revert the issue. Ultimately the reversion of the merge appeared unsuccessful because we could not then remerge in the develop branch. As a work around, we created a new branch based on commit 146036c and successfully completed the merge under the new branch.

Unaddressed Issues/Next Steps

Testing revealed that executing the main function of the model fails for timeseries with irregular timeseries. This issue was initially documented in issue #21 and will be addressed in a future updated. The readWDM function is working as intended and further discussion is needed on how to best handle timeseries with irregular timesteps within the rest of the project. This issue is now being tracked as issues #51 under RESPEC's repository.