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

fixed another problem with missing station forecastas

parent 4c94e33d
Branches
Tags
9 merge requests!353add developments to release v1.5.0,!352Resolve "release v1.5.0",!351Lukas issue337 bug ci pipeline fails for docs,!350Resolve "upgrade code to TensorFlow V2",!343Update wrf with develop,!342Include sample-uncertainty to wrf workflow,!340Lukas issue332 feat report error metrics for all competitors,!336Resolve "report error metrics for all competitors",!259Draft: Resolve "WRF-Datahandler should inherit from SingleStationDatahandler"
Pipeline #80722 passed
...@@ -785,7 +785,7 @@ class PostProcessing(RunEnvironment): ...@@ -785,7 +785,7 @@ class PostProcessing(RunEnvironment):
model_list = None model_list = None
# test errors of competitors # test errors of competitors
for model_type in remove_items(model_list or [], errors.keys()): for model_type in remove_items(model_list or [], list(errors.keys())):
if self.observation_indicator not in combined.coords[self.model_type_dim]: if self.observation_indicator not in combined.coords[self.model_type_dim]:
continue continue
if model_type not in errors.keys(): if model_type not in errors.keys():
...@@ -815,10 +815,11 @@ class PostProcessing(RunEnvironment): ...@@ -815,10 +815,11 @@ class PostProcessing(RunEnvironment):
avg_skill_score = 0 avg_skill_score = 0
n_total = None n_total = None
for vals in counts.values(): for vals in counts.values():
n_total = vals if n_total is None else n_total + vals n_total = vals if n_total is None else n_total.add(vals, fill_value=0)
for station, station_errors in scores.items(): for station, station_scores in scores.items():
n = counts.get(station) n = counts.get(station)
avg_skill_score = station_errors * n / n_total + avg_skill_score avg_skill_score = station_scores.mul(n.div(n_total, fill_value=0), fill_value=0).add(avg_skill_score,
fill_value=0)
return avg_skill_score return avg_skill_score
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment