We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 710120d + 813a516 commit 8a0410bCopy full SHA for 8a0410b
src/climate_data/data.py
@@ -163,6 +163,8 @@ def save_daily_results(
163
encoding_kwargs: dict[str, Any],
164
) -> None:
165
path = self.daily_results_path(scenario, variable, year)
166
+ if path.exists():
167
+ path.unlink()
168
mkdir(path.parent, exist_ok=True, parents=True)
169
touch(path, exist_ok=True)
170
src/climate_data/generate/scenario_annual.py
@@ -152,6 +152,10 @@
152
transform_funcs=[utils.annual_sum],
153
encoding_scale=10,
154
),
155
+ "precipitation_days": utils.Transform(
156
+ source_variables=["total_precipitation"],
157
+ transform_funcs=[utils.count_threshold(0.1), utils.annual_sum],
158
+ ),
159
}
160
161
0 commit comments