Skip to content

Commit

Permalink
Summarise robustly against bad incomplete files
Browse files Browse the repository at this point in the history
In summariser, be robust against the problem occurring due to #296
  • Loading branch information
gerritholl committed Dec 12, 2018
1 parent 2ab8814 commit 399e83d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion FCDR_HIRS/analysis/summarise_fcdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ def create_summary(self, start_date, end_date,
fields=fields[fcdr_type]+self.extra_fields[fcdr_type])
if fcdr_type=="easy" and ds["u_structured"].dims == ():
raise DataFileError("See https://github.com/FIDUCEO/FCDR_HIRS/issues/171")
except DataFileError:
except (DataFileError, KeyError) as e:
logging.warning("Could not read "
f"{sd:%Y-%m-%d}--{ed:%Y-%m-%d}: {e!r}: {e.args[0]:s}")
continue
if fcdr_type == "debug":
bad = ((2*ds["u_R_Earth_nonrandom"] > ds["R_e"]) |
Expand Down

0 comments on commit 399e83d

Please sign in to comment.