Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing file safeguard for IMS prep in snow analysis tasks #3329

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ush/python/pygfs/task/snow_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def prepare_IMS(self) -> None:

asc_file = os.path.join(localconf.COMIN_OBS, f"{localconf.OPREFIX}imssnow96.asc")
if not os.path.isfile(asc_file):
logger.exception(f"Obs files are missing. Will not execute CALCFIMSEXE")
logger.warn(f"WARNING: Obs files are missing. Will not execute CALCFIMSEXE")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
logger.warn(f"WARNING: Obs files are missing. Will not execute CALCFIMSEXE")
logger.warning(f"WARNING: Obs files {asc_file} is missing. Will not execute CALCFIMSEXE")

same below

return

# copy the IMS obs files from COMIN_OBS to DATA/obs
Expand Down
2 changes: 1 addition & 1 deletion ush/python/pygfs/task/snowens_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def prepare_IMS(self) -> None:

asc_file = os.path.join(localconf.COMIN_OBS, f"{localconf.OPREFIX}imssnow96.asc")
if not os.path.isfile(asc_file):
logger.exception(f"Obs files are missing. Will not execute CALCFIMSEXE")
logger.warn(f"WARNING: Obs files are missing. Will not execute CALCFIMSEXE")
return

# copy the IMS obs files from COMIN_OBS to DATA/obs
Expand Down