Skip to content

Commit

Permalink
Rename variable state_kw -> response_key
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Aug 21, 2024
1 parent 4301613 commit ef64736
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/ert/config/observations.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@ def _handle_general_observation(
time_map: List[datetime],
has_refcase: bool,
) -> Dict[str, ObsVector]:
state_kw = general_observation.data
if not ensemble_config.hasNodeGenData(state_kw):
response_key = general_observation.data
if not ensemble_config.hasNodeGenData(response_key):
ConfigWarning.warn(
f"No GEN_DATA with name: {state_kw} found - ignoring observation {obs_key}",
state_kw,
f"No GEN_DATA with name: {response_key} found - ignoring observation {obs_key}",
response_key,
)
return {}

Expand All @@ -401,10 +401,10 @@ def _handle_general_observation(
general_observation, obs_key, time_map, has_refcase
)

config_node = ensemble_config[state_kw]
config_node = ensemble_config[response_key]
if not isinstance(config_node, GenDataConfig):
ConfigWarning.warn(
f"{state_kw} has implementation type:"
f"{response_key} has implementation type:"
f"'{type(config_node)}' - "
f"expected:'GEN_DATA' in observation:{obs_key}."
"The observation will be ignored",
Expand All @@ -419,10 +419,10 @@ def _handle_general_observation(
restart is not None and restart not in response_report_steps
):
ConfigWarning.warn(
f"The GEN_DATA node:{state_kw} is not configured to load from"
f"The GEN_DATA node:{response_key} is not configured to load from"
f" report step:{restart} for the observation:{obs_key}"
" - The observation will be ignored",
state_kw,
response_key,
)
return {}

Expand Down

0 comments on commit ef64736

Please sign in to comment.