Skip to content

Commit

Permalink
Fixes for KNMI importer:
Browse files Browse the repository at this point in the history
Add forgotten @postprocess_import()
Don't call dropna on NWP data.
  • Loading branch information
ladc committed Aug 25, 2021
1 parent d86cd7b commit 4d1fb51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pysteps/io/nwp_importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ def _import_rmi_nwp_geodata_xr(
return ds_in


@postprocess_import()
def import_knmi_nwp_xr(filename, **kwargs):
"""Import a NetCDF with HARMONIE NWP rainfall forecasts from KNMI using
xarray.
Expand Down Expand Up @@ -455,7 +456,6 @@ def import_knmi_nwp_xr(filename, **kwargs):
varname = kwargs.get("varname", "P_fc")
if varname == "P_fc":
precipitation = ds_meta[varname]
precipitation = precipitation.dropna(varname_time, "all")
# update/copy attributes
precipitation.name = "precipitation"
# update attributes
Expand Down

0 comments on commit 4d1fb51

Please sign in to comment.