Skip to content

Commit

Permalink
Ensure that SCALECRS is set when ENDSCALE is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Feb 16, 2024
1 parent 788e109 commit 7339b0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/InputParser/keywords/runspec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:ENDSCALE})
rec = read_record(f)
parser_message(cfg, outer_data, "ENDSCALE", PARSER_JUTULDARCY_MISSING_SUPPORT)
tdims = ["NODIR", "REVERS", 1, 20, 0];
props = get_section(outer_data, :PROPS, set_current = false)
if !haskey(props, "SCALECRS")
props["SCALECRS"] = "NO"
end
data["ENDSCALE"] = parse_defaulted_line(rec, tdims)
end

Expand Down
6 changes: 4 additions & 2 deletions src/InputParser/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,12 @@ function clean_include_path(basedir, include_file_name)
return include_path
end

function get_section(outer_data, name::Symbol)
function get_section(outer_data, name::Symbol; set_current = true)
s = "$name"
is_sched = name == :SCHEDULE
outer_data["CURRENT_SECTION"] = name
if set_current
outer_data["CURRENT_SECTION"] = name
end
T = OrderedDict{String, Any}
if is_sched
if !haskey(outer_data, s)
Expand Down

0 comments on commit 7339b0f

Please sign in to comment.