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

Remove hard-coded observation uncertainties #120

Closed
anders-kiaer opened this issue Aug 14, 2020 · 1 comment · Fixed by #132
Closed

Remove hard-coded observation uncertainties #120

anders-kiaer opened this issue Aug 14, 2020 · 1 comment · Fixed by #132
Assignees
Labels
enhancement New feature or request invalid This doesn't seem right

Comments

@anders-kiaer
Copy link
Collaborator

anders-kiaer commented Aug 14, 2020

Observation uncertainties are currently hard-coded:

{%- if not isnan(kw.oil_rate): -%}
SUMMARY_OBSERVATION WOPR_{{ kw.well_name }}_{{ index_name }} { VALUE = {{ kw.oil_rate }}; ERROR = {{ [0.1 * kw.oil_rate, 50] | max }}; DATE = {{ date_formatted }}; KEY = WOPR:{{ kw.well_name }}; };
{%- endif %}
{%- if not isnan(kw.gas_rate): %}
SUMMARY_OBSERVATION WGPR_{{ kw.well_name }}_{{ index_name }} { VALUE = {{ kw.gas_rate }}; ERROR = {{ [0.1 * kw.gas_rate, 100000] | max }}; DATE = {{ date_formatted }}; KEY = WGPR:{{ kw.well_name }}; };
{%- endif %}
{%- if not isnan(kw.bhp): %}
SUMMARY_OBSERVATION WBHP_{{ kw.well_name }}_{{ index_name }} { VALUE = {{ kw.bhp }}; ERROR = {{ [0.05 * kw.bhp, 10] | max }}; DATE = {{ date_formatted }}; KEY = WBHP:{{ kw.well_name }}; };
{%- endif %}
{%- if not isnan(kw.thp): %}
SUMMARY_OBSERVATION WTHP_{{ kw.well_name }}_{{ index_name }} { VALUE = {{ kw.thp }}; ERROR = {{ [0.05 * kw.thp, 5] | max }}; DATE = {{ date_formatted }}; KEY = WTHP:{{ kw.well_name }}; };
{%- endif %}
{%- endif %}
{% endfor %}
{%- endif %}
{%- if schedule.get_keywords(date=date, kw_class="WCONINJH"): %}
{%- for kw in schedule.get_keywords(date=date, kw_class="WCONINJH"): -%}
{%- if not schedule.get_well_start_date(kw.well_name) == date: %}
{%- set index_name = date.strftime('%d_%m_%Y') -%}
{%- set date_formatted = date.strftime('%d/%m/%Y') %}
{%- if not isnan(kw.bhp): %}
SUMMARY_OBSERVATION WBHP_{{ kw.well_name }}_{{ index_name }} { VALUE = {{ kw.bhp }}; ERROR = {{ [0.05 * kw.bhp, 10] | max }}; DATE = {{ date_formatted }}; KEY = WBHP:{{ kw.well_name }}; };
{%- endif %}
{%- if not isnan(kw.thp): %}
SUMMARY_OBSERVATION WTHP_{{ kw.well_name }}_{{ index_name }} { VALUE = {{ kw.thp }}; ERROR = {{ [0.05 * kw.thp, 5] | max }}; DATE = {{ date_formatted }}; KEY = WTHP:{{ kw.well_name }}; };
{%- endif %}

error: {{ [0.1 * kw.oil_rate, 50] | max }}
{%- endif -%}
{%- endfor %}
{%- for kw in schedule.get_keywords(kw_class="WCONHIST", well_name=well_name, ignore_nan="gas_rate") -%}
{% if loop.first and not loop.last: %}
- key: WGPR:{{ well_name }}
observations:
{%- elif not loop.first: %}
- date: {{ kw.date.strftime('%Y-%m-%d') }}
value: {{ kw.gas_rate }}
error: {{ [0.1 * kw.gas_rate, 100000] | max }}
{%- endif -%}
{%- endfor %}
{%- for kw in schedule.get_keywords(kw_class="WCONHIST", well_name=well_name, ignore_nan="water_rate") -%}
{% if loop.first and not loop.last: %}
- key: WWPR:{{ well_name }}
observations:
{%- elif not loop.first: %}
- date: {{ kw.date.strftime('%Y-%m-%d') }}
value: {{ kw.water_rate }}
error: {{ [0.1 * kw.water_rate, 50] | max }}
{%- endif -%}
{%- endfor %}
{%- for kw in schedule.get_keywords(kw_class="WCONHIST", well_name=well_name, ignore_nan="bhp") -%}
{% if loop.first and not loop.last: %}
- key: WBHP:{{ well_name }}
observations:
{%- elif not loop.first: %}
- date: {{ kw.date.strftime('%Y-%m-%d') }}
value: {{ kw.bhp }}
error: {{ [0.05 * kw.bhp, 10] | max }}
{%- endif -%}
{%- endfor %}
{%- for kw in schedule.get_keywords(kw_class="WCONHIST", well_name=well_name, ignore_nan="thp") -%}
{% if loop.first and not loop.last: %}
- key: WTHP:{{ well_name }}
observations:
{%- elif not loop.first: %}
- date: {{ kw.date.strftime('%Y-%m-%d') }}
value: {{ kw.thp }}
error: {{ [0.05 * kw.thp, 5] | max }}
{%- endif -%}
{%- endfor %}
{%- endfor -%}
{% for well_name in schedule.get_wells(kw_class="WCONINJH") %}
{%- for kw in schedule.get_keywords(kw_class="WCONINJH", well_name=well_name, ignore_nan="bhp") -%}
{% if loop.first and not loop.last: %}
- key: WBHP:{{ well_name }}
observations:
{%- elif not loop.first: %}
- date: {{ kw.date.strftime('%Y-%m-%d') }}
value: {{ kw.bhp }}
error: {{ [0.05 * kw.bhp, 10] | max }}
{%- endif -%}
{%- endfor %}
{%- for kw in schedule.get_keywords(kw_class="WCONINJH", well_name=well_name, ignore_nan="thp") -%}
{% if loop.first and not loop.last: %}
- key: WTHP:{{ well_name }}
observations:
{%- elif not loop.first: %}
- date: {{ kw.date.strftime('%Y-%m-%d') }}
value: {{ kw.bhp }}
error: {{ [0.05 * kw.thp, 5] | max }}

The user should have ownership to these (at least as long as observations and uncertainties are not extracted automatically from raw data in some future). Maybe the currently hard-coded values (both % and min. absolute value) should be moved to config, with no default value?

@anders-kiaer anders-kiaer added the enhancement New feature or request label Aug 14, 2020
@wouterjdb
Copy link
Collaborator

wouterjdb commented Aug 20, 2020

Suggestion from stand-up:

name: Norne

flownet:
  data_source:
    simulation:
      input_case: ../tests/data/norne/NORNE_ATW2013
      vectors:
        WTHP:            
          min_error: 10
          rel_error: 50%
        WBHP:
          min_error: 10
          rel_error: 50%
        FOPR:
         
          
  phases:
    - oil
    - gas
    - vapoil
    - disgas
    - water
  pvt:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants