Skip to content

Conversation

@rburghol
Copy link
Contributor

@rburghol rburghol commented Mar 8, 2025

Notes: @PaulDudaRESPEC @timcera
This is mostly an information PR. There are no major changes to the STATE data model or specl/ops framework. There are 2 code introductions building on that framework, however, the introduction of the ops component type Equation, and a prototype main loop in the file demo_step_specl_state.py. A summary of the files follow:

  • Updated the examples folder to contain state_specl_ops, which is a folder of code demos that can be run by pasting into a command line python window.
    • These demos show examples of special actions, run within the prototype state environment.
    • They include special actions (classic style), and also show an example of the new ops model component Equation which is built on the same engine as specl
    • compare_eq_to_specl.py loads h5 files and hbn files from various hsp2 and hspf variants of test10, and does a quick comparison of sedtrn output data for RCHRES5. You must first run the hsp2 version of test10specl and test10eq to generate the h5 files for those model runs since the large h5 files are deliberately omitted by .gitignore.
      • Run test10specl: cd tests/test10specl/HSP2results; hsp2 import_uci test10spec.uci test10specl.h5; hsp2 run test10specl.h5
      • Run test10eq: cd tests/test10eq/HSP2results; hsp2 import_uci test10eq.uci test10eq.h5; hsp2 run test10eq.h5
  • The file src/hsp2/hsp2/sedtrn_step.py shows a rough prototype of a tightly-coupled main execution loop, to replace the loosely coupled current hsp2 implementation.
    • The file examples/state_specl_ops/demo_step_specl_state.pycalls this loop. You must first run the code indemo_specl_initialize.py` to run this.
    • This file could be temporary, or, it could represent a new more modularized approach to storing the jit'ed executables in tidy self-contained files, rather than as part of a larger SEDTRN.py file.
    • At the bottom there are some code examples to allow one to peer into STATE and the object-oriented handlers for state data.
  • More info on STATE here: Data Model for Shared STATE (supports model modularity) RFC #112

Burgholzer and others added 30 commits September 2, 2022 13:07
This Python 3.9 environment is basically the same I used for demos and testing in Jan. 2022.
incorrect timeseries key assignment for inorganic nutrient species
test passing the TS and modifying the last step value
…g to make an impact till we figure out how to call the parser properly
Burgholzer and others added 27 commits May 7, 2024 12:52
…ch, added domain specific specl filter in HYDR
…special case of ModelVariable, and then ModelVariable can form the base class for simple numerical data holders like UVQUAN
* Moved the HSP2, HSP2IO, and HSP2tools top level packages to
  hsp2.hsp2, hsp2.hsp2io, and hsp2.hsp2tools respectively.
* Corrected the imports in python and Jupyter notebooks to use
  the new locations.
* HSP2 can be run in all of the CompareHSP2.ipynb in tests/,
  however some do not have the HSPF results to compare to.
* The Jupyter notebooks in examples/ need some work to find
  input data and where to write output.
Move to single python package "hsp2"
Nice work, thanks @timcera !
…me print statements related to new om implementation
Merge Develop in Main in preparation for new release
Rebase against master to include package changes
Reformatted the files in the repository according to rules in a new
file ".pre-commit-config.yaml".  Have to install pre-commit either
through pip or conda and then "pre-commit install" to install the
git hooks.

The pre-commit lints or reformats many file types by using
separate linters and autoformaters that are installed as part of
pre-commit.

Uses "ruff" for Python files, but presently configured only for
autoformatting.  Turned off "ruff" linting because it found over
300 problems, some of which there weren't easy answers for.
Added .pre-commit-config.yaml with coding standard rules enforced at each commit
@PaulDudaRESPEC PaulDudaRESPEC merged commit fd78867 into respec:develop Mar 12, 2025
11 checks passed
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.

7 participants