Skip to content

Commit

Permalink
FATAL ERROR
Browse files Browse the repository at this point in the history
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
  • Loading branch information
zmoon and WalterKolczynski-NOAA committed Dec 3, 2024
1 parent bc9e8f9 commit d047882
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ush/python/pygfs/task/aero_emissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def run(self) -> None:
try:
basefile = self.task_config['emisfiles'][emistype.lower()]
except KeyError as e:
logger.exception(f"{emistype.lower()} is not a supported emission type")
logger.exception(f"FATAL ERROR: {emistype.lower()} is not a supported emission type")
raise Exception(
f"FATAL ERROR: {emistype.lower()} is not a supported emission type, ABORT!"
) from e
Expand Down Expand Up @@ -185,7 +185,7 @@ def open_qfed(files: List[str], out_var_dict: Dict[str, str] = None) -> xr.Datas
da.name = out_var_dict[input_var]
dset_dict[da.name] = da
except Exception as e:
logger.exception(f"Unable to read dataset: {f}")
logger.exception(f"FATAL ERROR: Unable to read dataset: {f}")
raise Exception("FATAL ERROR: Unable to read dataset, ABORT!") from e

dset = xr.Dataset(dset_dict)
Expand Down Expand Up @@ -217,7 +217,7 @@ def open_climatology(files: List[str]) -> xr.Dataset:
with xr.open_dataset(f, engine="netcdf4") as da:
das.append(da)
except Exception as e:
logger.exception(f"Encountered an error reading climatology file: {f}")
logger.exception(f"FATAL ERROR: Encountered an error reading climatology file: {f}")
raise Exception("FATAL ERROR: Unable to read file, ABORT!") from e

return xr.concat(das, dim="time")
Expand Down Expand Up @@ -253,7 +253,7 @@ def write_ncf(dset: xr.Dataset, outfile: str) -> None:
try:
dset.load().to_netcdf(outfile, encoding=encoding)
except Exception as e:
logger.exception("Encountered an error writing dataset")
logger.exception("FATAL ERROR: Encountered an error writing dataset")
raise Exception("FATAL ERROR: Unable to write dataset, ABORT!") from e

@staticmethod
Expand Down

0 comments on commit d047882

Please sign in to comment.