diff --git a/mlair/data_handler/data_handler_wrf_chem.py b/mlair/data_handler/data_handler_wrf_chem.py index 1d42649bdde2b571ff9ba77dd8d3027386ae275d..94dcc9c2b30bd4658d0c29dc7bde913d3f70c3d5 100644 --- a/mlair/data_handler/data_handler_wrf_chem.py +++ b/mlair/data_handler/data_handler_wrf_chem.py @@ -1248,6 +1248,7 @@ class DataHandlerSectorGrid(DataHandlerSingleGridColumn): def wind_upstream_sector_by_name(self, wind_upstream_sector_by_name: xr.DataArray): self._wind_upstream_sector_by_name = wind_upstream_sector_by_name + @TimeTrackingWrapper def _store_wind_upstream_sector_by_name(self): file_name = os.path.join(self.experiment_path, f"data/{self.station[0]}_{self.start}_{self.end}_upstream_wind_sector.nc") @@ -1257,6 +1258,7 @@ class DataHandlerSectorGrid(DataHandlerSingleGridColumn): dim=list(set(dims_to_expand) - {self.iter_dim, self.target_dim}), drop=True) wind_upstream_sector_by_name = wind_upstream_sector_by_name.to_dataset(self.iter_dim) wind_upstream_sector_by_name.to_netcdf(file_name) + logging.info(f"_store_wind_upstream_sector_by_name: {file_name}") @TimeTrackingWrapper def extract_data_from_loader(self, loader): diff --git a/mlair/run_modules/post_processing.py b/mlair/run_modules/post_processing.py index 04bcbf753bc2ed2a15a8df41eaff852b3395a27c..9e3fbdb0b154b6463dd1d03d9ee2b241dd48ca9d 100644 --- a/mlair/run_modules/post_processing.py +++ b/mlair/run_modules/post_processing.py @@ -164,7 +164,7 @@ class PostProcessing(RunEnvironment): logging.warning("Dimension `XTIME' does not exist") ds = ds.squeeze() logging.info(f"PostProcessing.load_upstream_wind_sector({name_of_set}: shape of `upstream_wind_sector' is " - f"{ds.shape}\ndims are {ds.dims}") + f"{ds.shape}\ndims are {ds.dims}, ds.isnull().any()={ds.isnull().any()}") self.upstream_wind_sector = ds @TimeTrackingWrapper @@ -957,7 +957,10 @@ class PostProcessing(RunEnvironment): file = os.path.join(path, f"forecasts_{str(station)}_test.nc") with xr.open_dataarray(file) as da: return da.load() - except (IndexError, KeyError, FileNotFoundError): + except (IndexError, KeyError, FileNotFoundError) as e: + logging.error(f"Could not load external test data for station {station} from " + f"{path}) due to the following error:\n{sys.exc_info()[0]}\n" + f"{sys.exc_info()[1]}\n{sys.exc_info()[2]}") return None def _combine_forecasts(self, forecast, competitor, dim=None):