Skip to content

Commit

Permalink
Support multiple declarations of same kw in step
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Feb 9, 2024
1 parent b81e63b commit 2b45485
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/InputParser/keywords/schedule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:COMPDAT})
for cd in compdat
swap_unit_system_axes!(cd, units, utypes)
end
data["COMPDAT"] = compdat
push_and_create!(data, "COMPDAT", compdat)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WELOPEN})
d = "Default"
defaults = [d, "OPEN", -1, -1, -1, -1, -1]
wells = get_wells(outer_data)
welopen = parse_defaulted_group_well(f, defaults, wells, 1)
parser_message(cfg, outer_data, "WELTARG", PARSER_JUTULDARCY_MISSING_SUPPORT)
data["WELOPEN"] = welopen
parser_message(cfg, outer_data, "WELOPEN", PARSER_JUTULDARCY_MISSING_SUPPORT)
push_and_create!(data, "WELOPEN", welopen)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WCONPROD})
Expand Down Expand Up @@ -107,7 +107,7 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WCONPROD})
for wp in wconprod
swap_unit_system_axes!(wp, units, utypes)
end
data["WCONPROD"] = wconprod
push_and_create!(data, "WCONPROD", wconprod)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WCONHIST})
Expand All @@ -125,7 +125,7 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WCONHIST})
for o in out
swap_unit_system_axes!(o, units, utypes)
end
data["WCONHIST"] = out
push_and_create!(data, "WCONHIST", out)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WCONINJ})
Expand All @@ -150,7 +150,7 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WCONINJ})
end
swap_unit_system_axes!(o, units, utypes)
end
data["WCONINJ"] = out
push_and_create!(data, "WCONINJ", out)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WCONINJE})
Expand Down Expand Up @@ -180,7 +180,7 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WCONINJE})
end
swap_unit_system_axes!(o, units, utypes)
end
data["WCONINJE"] = out
push_and_create!(data, "WCONINJE", out)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WCONINJH})
Expand All @@ -204,15 +204,15 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WCONINJH})
end
swap_unit_system_axes!(o, units, utypes)
end
data["WCONINJH"] = out
push_and_create!(data, "WCONINJH", out)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Union{Val{:WELLTARG}, Val{:WELTARG}})
defaults = ["Default", "ORAT", NaN]
wells = get_wells(outer_data)
out = parse_defaulted_group_well(f, defaults, wells, 1)
parser_message(cfg, outer_data, "WELTARG", PARSER_JUTULDARCY_MISSING_SUPPORT)
data["WELTARG"] = out
push_and_create!(data, "WELTARG", out)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WEFAC})
Expand Down

0 comments on commit 2b45485

Please sign in to comment.