forked from respec/HSPsquared
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specl and Objects hdf5 data model #20
Comments
This was referenced Aug 26, 2022
Closed
Note. np array slices are views (pass by references), but a simple extract of a value is NOT.
|
@jdkleiner -- just tagged you in this so we can review at least some of this in todays work session. |
@rburghol Below works as well, so it might not be just slicing that does it, setting b = a and then setting a value in the b array updates the a array
|
rburghol
changed the title
Test flexibility of hdf5 data model
Specl and Objects hdf5 data model
Oct 18, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
All data paths are to be added to hdf5 structure.
/SPECL
: holds old-style special action definitions from parser/OBJECTS
: holds new styled dynamic object simulation (may be used to replicate or provide backend for specl)/STATE
: Use to store state, facilitates cross-domain (like RCHRES_001 to RCHRES_002) data transfer, and for storing the last state in the event of an exception that halts model execution.Dict
with namestate_ix
(see below, In Memory Runtime Variables)/STATE/RCHRES_R001/HYDR/IVOL
- Holds state ofIVOL
variable from river reach with ID 1 in model.See also:
python/hsp2
Data Passing/Inputs in hsp2/python #18In Memory Runtime Variables
As it stands, it appears that the entirety of the
hsp2
simulation state data is stored in thehdf5
table, meaning there are no persistentobject
of any sort, but rather, functions that operate on the data that is present in thehdf5
, passed in to the given function in the form of theui
andts
variables. SPECL or other dynamic objects may need to be stored in the hdf5 table? Or do we deviate from the standard process?entity_type
andentity_id
/objects/equation/eq0001/
has columnsentity_type
,entity_id
,equation
, 'default`, .../objects/datamatrix/dm0001/
has columnsentity_type
,entity_id
,matrix
,lucol1
,lutype1
, 'default`, ...hsp2 import_uci
step, then use them to log during simulation?/timeseries/facility001/specl/Qintake
hasobject_class
,equation
,default
/timeseries/facility001/specl/base_demand_pstatus_mgd
hasobject_class
,matrix
,default
,lucol1
,lucol2
,intmethod1
,...hdf5
state storage only (if we have objects that use the state variables, does instantiating them each time come at a cost?)numpy
https://jakevdp.github.io/PythonDataScienceHandbook/02.00-introduction-to-numpy.htmlnumba
which "... is a just-in-time compiler for Python that works best on code that uses NumPy arrays and functions, and loops."numpy
array slicesNote: np array slices are views (pass by references), but a simple extract of a value is NOT.
The text was updated successfully, but these errors were encountered: