diff --git a/mom6/mom6_module/mom6_mhw.py b/mom6/mom6_module/mom6_mhw.py index 31176ee..d38c2f4 100644 --- a/mom6/mom6_module/mom6_mhw.py +++ b/mom6/mom6_module/mom6_mhw.py @@ -109,6 +109,8 @@ def generate_forecast_batch( # anomaly used for the threshold ds_anom = xr.Dataset() ds_anom[f'{self.varname}_anom'] = dict_anom['anomaly'] + ds_anom['lon'] = self.dataset['lon'] + ds_anom['lat'] = self.dataset['lat'] # calculate threshold class_forecast_quantile = ForecastQuantile(ds_anom,f'{self.varname}_anom') diff --git a/tests/test_mom6_mhw.py b/tests/test_mom6_mhw.py index e98fb0e..3287b1a 100644 --- a/tests/test_mom6_mhw.py +++ b/tests/test_mom6_mhw.py @@ -59,8 +59,8 @@ def test_MarineHeatwaveForecast_generate_forecast_single(ds_forecast): ) assert np.abs(ds_mhw_single.mhw_prob90.sum().data-505.)==0. - assert np.abs(ds_mhw_single.ssta_avg.max().data-0.37654305) < 1e-6 - assert np.abs(ds_mhw_single.mhw_mag_indentified_ens.max().data-0.37654305) < 1e-6 + assert np.abs(ds_mhw_single.ssta_avg.max().data-0.37654305) < 1e-5 + assert np.abs(ds_mhw_single.mhw_mag_indentified_ens.max().data-0.37654305) < 1e-5 def test_MarineHeatwaveForecast_generate_forecast_batch(ds_forecast):