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 Jan 14, 2019
1 parent b9fe689 commit 0c15560
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 @@ -226,7 +226,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 0c15560

Please sign in to comment.