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: UVQUAN (parser and code) #107

Open
1 of 10 tasks
rburghol opened this issue Oct 31, 2022 · 0 comments
Open
1 of 10 tasks

specl: UVQUAN (parser and code) #107

rburghol opened this issue Oct 31, 2022 · 0 comments

Comments

@rburghol
Copy link
Contributor

rburghol commented Oct 31, 2022

Tasks

  • Data Model
  • Parser: ParseTable.csv entry under way, not tested with code yet. See: https://github.com/HARPgroup/HSPsquared/blob/uvquan/HSP2tools/data/ParseTable.csv
  • class handler (turns table data into linked and integrated executable runtime)
  • Executable Code
  • Unit Tests
  • Performance Tests
  • See also SPEC-ACTIONS - UVQUAN as action value #173
  • Questions/concepts:
    • Differences between UVNAME and UVQUAN? Is UVNAME a variable applied/created in all segments, whereas UVQUAN is a single variable created for a specific segment?
    • Cross-domain UVQUAN, i.e., in example below, IF (precx1 > 6.000) THEN, can precx1 which is based on PERLND 1 be used by some other element, like RCHRES 1? (hypothetical to understand full life-cycle)

UCI

  • Note: Definitions in HSPF manual "Details of User-defined Variable Quantity line" gives a variable named ADDR, but:
    • This does not appear in the actual UCI. (not in example, or in test UCI from CBP)
    • Instead, it appears to be a meta-column, the "VNAME" + "CSUB1" ("vari" and ""s1" in manual and CBP examples)

UCI Data Structure

image

UCI Examples

Example from HSPF_v12.2_manual

*** User-Defined Variable Quantity Lines
***                           addr
***                        <------>
*** kwd  varnam optyp  opn  vari  s1 s2 s3 tp multiply  lc ls ac as agfn ***
  <****> <----> <----> <-> <----><-><-><-><-><--------> <><-> <><-> <--> ***
  UVQUAN prec   PERLND   1 PREC             3                 DY  1 SUM

TEST13.UCI

From fortran HSPF base tests:

Hurricane Isabel

***Iuvquan User-Defined Variable Quantity Line
*** kwd  varnam optyp  opn  vari  s1 s2 s3 tp multiply  lc ls ac as agfn ***
  <****> <----> <----> <-> <----><-><-><-><-><--------> <><-> <><-> <--> ***
  UVQUAN precx1 PERLND   1 PREC             3                 DY 14 SUM

***Action Lines for INFEXP
IF (precx1 >  6.000) THEN
  PERLND  1                            3  INFEXP          =  8.0000000
ELSE
  PERLND  1                            3  INFEXP          =  2.0000000
END IF

hdf5 Data Model

  • hdf5 Path: /SPEC_ACTIONS/UVQUAN/table
    • Column Names (see DEF below): UVQNAM, OPTYP, OPTNO, VNAME, CSUB1, CSUB2, CSUB3, ADDR, TYPCOD, UVQMUL, CTCODE1, TSTEP1, CTCODE2, TSTEP2, CTRAN

DEF: Table Definition

index UVQNAM OPTYP OPTNO VNAME CSUB1 CSUB2 CSUB3 TYPCOD UVQMUL CTCODE1 TSTEP1 CTCODE2 TSTEP2 CTRAN
0 prec PERLND 1 PREC 3 DY 1 SUM

Execution Code

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

1 participant