Skip to content
Snippets Groups Projects
Commit a1873052 authored by leufen1's avatar leufen1
Browse files

minor fix to skip calculate error metrics if external data is none

parent dfbbdd31
Branches
Tags
6 merge requests!319add all changes of dev into release v1.4.0 branch,!318Resolve "release v1.4.0",!283Merge latest develop into falcos issue,!264Merge develop into felix_issue287_tech-wrf-datahandler-should-inherit-from-singlestationdatahandler,!261minor fix to skip calculate error metrics if external data is none,!259Draft: Resolve "WRF-Datahandler should inherit from SingleStationDatahandler"
Pipeline #61779 passed
...@@ -680,6 +680,7 @@ class PostProcessing(RunEnvironment): ...@@ -680,6 +680,7 @@ class PostProcessing(RunEnvironment):
external_data = self._get_external_data(station, path) # test data external_data = self._get_external_data(station, path) # test data
# test errors # test errors
if external_data is not None:
errors[station] = statistics.calculate_error_metrics(*map(lambda x: external_data.sel(type=x), errors[station] = statistics.calculate_error_metrics(*map(lambda x: external_data.sel(type=x),
[self.forecast_indicator, "obs"]), [self.forecast_indicator, "obs"]),
dim="index") dim="index")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment