Skip to content

Commit

Permalink
Handle arbitrary grid keywords in GRID/REGIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Sep 16, 2024
1 parent 48030d7 commit f99a561
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/InputParser/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -422,15 +422,19 @@ function parse_keyword!(data, outer_data, units, cfg, f, v::Val{T}) where T
end

if !found
section = outer_data["CURRENT_SECTION"]
if startswith(kw_str, "TVDP")
parser_message(cfg, outer_data, kw_str, PARSER_MISSING_SUPPORT)
read_record(f)
elseif startswith(kw_str, "FIP")
elseif section == :REGIONS
data[kw_str] = parse_and_set_grid_data!(data, outer_data, units, cfg, f, T, T = Int)
elseif section == :GRID
data[kw_str] = parse_and_set_grid_data!(data, outer_data, units, cfg, f, T, T = Float64)
else
error("Unhandled keyword $T encountered.")
error("Unhandled keyword $T in $section encountered.")
end
end
return data
end

function failure_print_line_context(f; kw = nothing)
Expand Down

0 comments on commit f99a561

Please sign in to comment.