Skip to content

Commit

Permalink
Add a few keywords and adjust warning
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Apr 2, 2024
1 parent 425ef0e commit 5ca8cc2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/InputParser/keywords/grid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,20 @@ function unit_type(::Union{Val{:PORO}, Val{:NTG}})
return :id
end

function unit_type(::Val{:PORV})
return :volume
end

function parse_keyword!(data, outer_data, units, cfg, f, v::Union{Val{:DX}, Val{:DY}, Val{:DZ}})
k = unpack_val(v)
data["$k"] = parse_grid_vector(f, get_cartdims(outer_data), Float64)
end

function unit_type(::Union{Val{:DX}, Val{:DY}, Val{:DZ}})
return :length
end


function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:TOPS})
tops = parse_deck_vector(f, Float64)
data["TOPS"] = swap_unit_system!(tops, units, Val(:length))
Expand Down
12 changes: 12 additions & 0 deletions src/InputParser/keywords/props.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,18 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:VISCREF})
data["VISCREF"] = viscref
end

function parse_keyword!(data, outer_data, units, cfg, f, v::Val{:ROCKTAB})
nrock = outer_data["RUNSPEC"]["ROCKCOMP"][2]
tables = parse_region_matrix_table(f, nrock)
for tab in tables
for i in axes(tab, 1)
tab[i, 1] = swap_unit_system(tab[i, 1], units, :pressure)
end
end
parser_message(cfg, outer_data, "ROCKTAB", PARSER_JUTULDARCY_MISSING_SUPPORT)
data["ROCKTAB"] = tables
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:SPECHEAT})
nreg = number_of_tables(outer_data, :pvtnum)
speacheat = parse_region_matrix_table(f, nreg)
Expand Down
8 changes: 7 additions & 1 deletion src/InputParser/keywords/runspec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,15 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:GRIDOPTS})
data["GRIDOPTS"] = parse_defaulted_line(rec, tdims)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:ROCKCOMP})
rec = read_record(f)
tdims = ["REVERS", 1, "NO", "CZ", 0.0];
data["ROCKCOMP"] = parse_defaulted_line(rec, tdims)
end

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)
parser_message(cfg, outer_data, "ENDSCALE", PARSER_JUTULDARCY_PARTIAL_SUPPORT)
tdims = ["NODIR", "REVERS", 1, 20, 0];
props = get_section(outer_data, :PROPS, set_current = false)
if !haskey(props, "SCALECRS")
Expand Down

0 comments on commit 5ca8cc2

Please sign in to comment.