Skip to content
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(): Proposed function definition for SPEC-ACTIONS #13

Closed
rburghol opened this issue Jul 25, 2022 · 3 comments
Closed

specl(): Proposed function definition for SPEC-ACTIONS #13

rburghol opened this issue Jul 25, 2022 · 3 comments

Comments

@rburghol
Copy link

rburghol commented Jul 25, 2022

propose at respec#90

  • def specl(io_manager, siminfo, ui, ts, state, specl_actions):
    • io_manager: global facility to pull data. Minimize calls to io_manager within loops if possible for speed
    • siminfo: global info like start, end, timestep other?
    • ui: uci data for current block, ie rchres/hydr (verify this path in the Data Dictionary)
    • ts: timeseries/[block], ie timeseries/rchres
    • state: ts[step -1]; the state array for the domain (i.e. RCHRES variables), this is crucial as state variables in the code are simply named variables, not a member of an array, thus difficult to pass into a routine such as specl(), however, all values that are relevant should be set at the end of each timestep in the ts dictionary, so, passing the last state is both a reasonable way of insuring that only the values that should be public are passed, and that the expected state of the system at the last time step is what special actions are acting upon.
      • Question: does setting a value in the state dictionary propagate back to the variable in the calling loop that contains that state?
    • specl_actions: local reach SAs (could be global list of SAs), and objects
      • this can be acquired from io_manager in the calling routine prior to looping, so that we avoid redundant data retrievals.
      • propose get_specl() in the manner of get_timeseries() see def get_timeseries
  • Old version hspf used SUBROUTINE SPECL,
  • convention in new model is to code wrapper function python equivalents as [old hspf fn], which receives data at each time step then calls python equivalent to old function _[old hspf function name in lower case]_
@rburghol rburghol changed the title Function naming conventions, arguments and code - propose specl() which calls _specl_() as place for analog. Proposed function definition for specl() Aug 31, 2022
@rburghol rburghol changed the title Proposed function definition for specl() specl(): Proposed function definition for SPEC-ACTIONS Aug 31, 2022
@rburghol rburghol mentioned this issue Aug 31, 2022
23 tasks
@jdkleiner
Copy link
Member

jdkleiner commented Sep 12, 2022

work session 9/7/22

  • def _hydr_(ui, ts, COLIND, OUTDGT, rowsFT, funct, Olabels, OVOLlabels, specactions):
  • def specl(uci, ts, step, specactions):
  • def _specl_(uci, ts, step, specactions):

@jdkleiner
Copy link
Member

jdkleiner commented Sep 13, 2022

HSP2 flowchart (incomplete)

HSP2_flowchart_2

Questions:

  • I'm having trouble loading any modules on deq1 (deq3)
    • pandas, h5py etc.
    • spent time adjusting where python looks for the python/module installation
    • hsp2 was having no trouble loading them the last time I ran the model. Check the installation issue: Install HSP2 Python on Linux #9
  • Where do the different model objects come in to the sequence? Begin coding data model, object classes. #7
    • We don't know yet. Objects may be an enhancement to the specl facility from the original model, but it may be more appropriate to make them a separate module but we are using this issue to scope that out.
  • When does the demand() function come into play? (located in HYDR.py)
    • demand() appears to get arguments pertaining to OUTDGT, hence, I think that anything that alters OUTDGT will influence the processing of demand(), but a primary purpose of this scoping is to determine precisely how that works.
  • Is OUTDGT different from the withdrawal parameter that will be in the specactions dictionary?
    • OUTDGT will be set by specl entities.
  • Where will the parser come into the sequence?
    • The parser is at the very beginning when we run hsp2 import_uci. Check the parser issue for detail. specactions Parser readUCI & hdf5 Data Model respec/HSPsquared#99
    • it may be a good idea to merge the parser branch into your development branch. It doesn't work, but it dorsn't break anything and it does tie the different functions together.
  • Is the HARP hydr CSV the input to specactions = {}? HARP Weekly 9/12/2022 HARParchive#536 (comment)
  • Would be good to have an easy way to visualize model results of test runs (using one of the HARP scripts): Summer & Fall 2022, Winter 2023: Summary of Rscripts and their Arguments HARParchive#505
    • I project they will have the whole set of hydrology metrics integrated next week. :)

@rburghol
Copy link
Author

rburghol commented Sep 13, 2022

Answered some of your questions in line. Let's tackle these in tomorrow's work sesh!

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

No branches or pull requests

2 participants