diff --git a/tests/workflows/localisation/example_case/test_full.py b/tests/workflows/localisation/example_case/test_full.py index a702ba0c7..aa13b3398 100644 --- a/tests/workflows/localisation/example_case/test_full.py +++ b/tests/workflows/localisation/example_case/test_full.py @@ -218,14 +218,16 @@ def test_that_localization_works_with_different_settings( with open_storage(facade.enspath) as storage: realization = 5 es_prior = storage.get_ensemble_by_name("es_prior") - es_prior_results = es_prior.load_parameters("FIELDPAR").sel( + es_prior_xdata = es_prior.load_parameters("FIELDPAR").sel( realizations=realization ) + es_prior_values_from_storage = es_prior_xdata["values"].values es_posterior = storage.get_ensemble_by_name("es_posterior") - es_posterior_results = es_posterior.load_parameters("FIELDPAR").sel( + es_posterior_xdata = es_posterior.load_parameters("FIELDPAR").sel( realizations=realization ) + es_posterior_values_from_storage = es_posterior_xdata["values"].values # Write to file for easier QC of differences es_prior_from_storage = xtgeo.GridProperty( @@ -233,7 +235,7 @@ def test_that_localization_works_with_different_settings( nrow=dims[1], nlay=dims[2], name="prior_storage", - values=es_prior_results.values, + values=es_prior_values_from_storage, ) es_prior_from_storage.mask_undef() es_prior_from_storage.to_file("prior_storage.roff", fformat="roff") @@ -244,7 +246,7 @@ def test_that_localization_works_with_different_settings( nrow=dims[1], nlay=dims[2], name="posterior_storage", - values=es_posterior_results.values, + values=es_posterior_values_from_storage, ) es_posterior_from_storage.mask_undef() es_posterior_from_storage.to_file("posterior_storage.roff", fformat="roff") @@ -252,14 +254,14 @@ def test_that_localization_works_with_different_settings( # Check with reference assert np.allclose( es_prior_expected.values3d, - np.round(es_prior_results.values, 4), + np.round(es_prior_values_from_storage, 4), atol=1e-4, equal_nan=True, ) assert np.allclose( es_posterior_expected.values3d, - np.round(es_posterior_results.values, 4), + np.round(es_posterior_values_from_storage, 4), atol=1e-4, equal_nan=True, )