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

Adapt to b2mn.dat parser to handle irregular files, with specific flags to each run #36

Closed
sbdepascuale opened this issue Feb 1, 2024 · 1 comment

Comments

@sbdepascuale
Copy link
Collaborator

sbdepascuale commented Feb 1, 2024

When reading KSTAR (PRad_2D_Scan) for EQ g019077.005000 with:

ids = SOLPS2IMAS.solps2imas(b2gmtry, b2output, gsdesc, b2mn)

Results in error:

BoundsError: attempt to access 0-element Vector{SubString{String}} at index [0]

Stacktrace:
[1] getindex
@ ./essentials.jl:13 [inlined]
[2] read_b2mn_output(filename::String)
@ SOLPS2IMAS ~/Dropbox/Home/Workspace/Github/ProjectTorreyPines/SOLPS2IMAS.jl/src/parser.jl:46
[3] solps2imas(b2gmtry::String, b2output::String, gsdesc::String, b2mn::String; load_bb::Bool)
@ SOLPS2IMAS ~/Dropbox/Home/Workspace/Github/ProjectTorreyPines/SOLPS2IMAS.jl/src/SOLPS2IMAS.jl:97
[4] solps2imas(b2gmtry::String, b2output::String, gsdesc::String, b2mn::String)
@ SOLPS2IMAS ~/Dropbox/Home/Workspace/Github/ProjectTorreyPines/SOLPS2IMAS.jl/src/SOLPS2IMAS.jl:88
[5] top-level scope
@ In[123]:1

The heading begins with:

label (lblmn: character60)
'template, 5.2 switches'
*b2cmpa basic parameters
*b2cmpb boundary conditions
*b2cmpt transport coefficients
*cflim cflme cflmi cflmv cflal cflab ... (not used)
' -1' 0.15 0.5 0.5 0.5 0.5 0. 0. 0.
*endphy

@anchal-physics
Copy link
Collaborator

This was fixed in ProjectTorreyPines/SOLPS2imas.jl#23

Please reopen if the issue persists.

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