Skip to content

UCI parser#225

Open
timcera wants to merge 7 commits intorespec:developfrom
timcera:uci_parser
Open

UCI parser#225
timcera wants to merge 7 commits intorespec:developfrom
timcera:uci_parser

Conversation

@timcera
Copy link
Copy Markdown
Contributor

@timcera timcera commented May 8, 2026

New UCI parser that parses all HSPF tables.

* Default and validation when for all parameters.
* Default and validation support metric or english units as appropriate.
* Parameter reading function for UCI returns dictionary of
  pandas DataFrames keyed to the HDF table names.
* Reads UCI supplemental files.
* Reads UCI and WDM files from local files or URIs.

src/hsp2/hsp2/ATEMP.py: if ELDAT=0 then can just return.
src/hsp2/hsp2/GENER.py: removed UCI parsing code, as it is not needed for the new implementation.
src/hsp2/hsp2/GQUAL.py: refactor
src/hsp2/hsp2/HYDR.py: remove unused hydr_load_om, fix DEWTEMP -> DEWTMP, refactor
src/hsp2/hsp2/PWATER.py: ui["ICEFG"] must be an integer not a float, refactor
src/hsp2/hsp2/RQUAL.py: PKCF1_ and PKCF2_ need to be PKCF1 and PKCF1 respectively, refactor
src/hsp2/hsp2/SEDTRN.py: expand_SEDTRN_metadata, refactor
src/hsp2/hsp2/SNOW.py: refactor
src/hsp2/hsp2/main.py: In one place OXFG -> OXRX, refactor
src/hsp2/hsp2/utilities.py
  added deprecated decorator function
  added _normalize_memsb function
src/hsp2/hsp2io/control_file_readers/read_uci_parameters.py
  parse both local and remote UCI files
src/hsp2/hsp2io/control_file_readers/utils.py
  fill defaults and validate the parameters
src/hsp2/hsp2io/hdf.py: for GENER there was partial processing of UCI files,
  but this is no longer needed, so removed/changed.
src/hsp2/hsp2io/time_series_readers/read_wdm_ts.py
  read both local and remote WDM files
src/hsp2/hsp2tools/readUCI.py
  internally shifted to use new functions, marked deprecated
src/hsp2/hsp2tools/readWDM.py
  internally shifted to use new functions, marked deprecated
src/hsp2/state/state.py
  Have to bypass DISPLY and PLTGEN since only used in HSPF

timcera added 7 commits April 20, 2026 19:02
* Default and validation when reading in all parameters.
* Default and validation support metric or english units as appropriate.
* Parameter reading function for UCI returns dictionary of
  pandas DataFrames keyed to the HDF table names.
* Reads UCI supplemental files.
* Reads UCI and WDM files from local files or URIs.

src/hsp2/hsp2/ATEMP.py: if ELDAT=0 then can just return.
src/hsp2/hsp2/GENER.py: removed UCI parsing code, as it is not needed for the new implementation.
src/hsp2/hsp2/GQUAL.py: refactor
src/hsp2/hsp2/HYDR.py: remove unused hydr_load_om, fix DEWTEMP -> DEWTMP, refactor
src/hsp2/hsp2/PWATER.py: ui["ICEFG"] must be an integer not a float, refactor
src/hsp2/hsp2/RQUAL.py: PKCF1_ and PKCF2_ need to be PKCF1 and PKCF1 respectively, refactor
src/hsp2/hsp2/SEDTRN.py: expand_SEDTRN_metadata, refactor
src/hsp2/hsp2/SNOW.py: refactor
src/hsp2/hsp2/main.py: In one place OXFG -> OXRX, refactor
src/hsp2/hsp2/utilities.py
  added deprecated decorator function
  added _normalize_memsb function
src/hsp2/hsp2io/control_file_readers/read_uci_parameters.py
  parse both local and remote UCI files
src/hsp2/hsp2io/control_file_readers/utils.py
  fill defaults and validate the parameters
src/hsp2/hsp2io/hdf.py: for GENER there was partial processing of UCI files,
  but this is no longer needed, so removed/changed.
src/hsp2/hsp2io/time_series_readers/read_wdm_ts.py
  read both local and remote WDM files
src/hsp2/hsp2tools/readUCI.py
  internally shifted to use new functions, marked deprecated
src/hsp2/hsp2tools/readWDM.py
  internally shifted to use new functions, marked deprecated
src/hsp2/state/state.py
  Have to bypass DISPLY and PLTGEN since only used in HSPF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant