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
Write a parser for basic SPECL (just setting variables till we decide on our final approach) #24
Comments
17 tasks
Hey @jdkleiner check this out when you get to a place where we want to start loading data. |
Testing: Find and load the h5 file
Look for the SPECL table
Test the EXT SOURCES table
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
RESPEC issue development here: respec#99
main.py
the variablespecactions
is populated, and can be viewed as:print(specactions['ACTIONS']['VALUE'])
Testing dataset:
How Parsing is Done in hsp2
HSP2tools/data/ParseTable.csv
has lines for each supported UCI blockname, type_, start, end, default
1479,RCHRES,HYDR-PARM1,HYDR,PARAMETERS,OPNID,C,0,11, 1480,RCHRES,HYDR-PARM1,HYDR,PARAMETERS,VCONFG,I,11,14,0
parseD
(andparseD2
andparseD3
) support different parse styles (hsp2 is not always consistent maybe?)rely on
field = line[start:end].strip(), where
start:endare in standar python array notation where start is the 0-based index and the end is the next non-used number. Ex:
"abcdefg"[0:3] = "abc", which is array entries
0,and 2
-- not including entry 3.The text was updated successfully, but these errors were encountered: