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

Conversation

TravisElless-NOAA
Copy link
Contributor

@TravisElless-NOAA TravisElless-NOAA commented Feb 14, 2025

Description

This PR adds a safeguard to only continue running the IMS prep step in the snow analysis tasks if the necessary obs file is present.
Resolves #3328

Type of change

  • New feature (adds functionality)

Change characteristics

  • Is this a breaking change (a change in existing functionality)? NO
  • Does this change require a documentation update? NO
  • Does this change require an update to any of the following submodules? NO

How has this been tested?

2.5 cycle experiment on Hera

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • New and existing tests pass with my changes

@TravisElless-NOAA TravisElless-NOAA changed the title Feature/ims prep missing obs Add missing file safeguard for IMS prep in snow analysis tasks Feb 14, 2025
Copy link
Contributor

@jiaruidong2017 jiaruidong2017 left a comment

Choose a reason for hiding this comment

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

Suggest minor changes

TravisElless-NOAA and others added 2 commits February 14, 2025 17:11
Co-authored-by: Jiarui Dong <Jiarui.Dong@noaa.gov>
Co-authored-by: Jiarui Dong <Jiarui.Dong@noaa.gov>
jiaruidong2017
jiaruidong2017 previously approved these changes Feb 14, 2025
Copy link
Contributor

@jiaruidong2017 jiaruidong2017 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for your efforts.

@@ -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

Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

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

looks good.

@aerorahul aerorahul merged commit 192aa68 into NOAA-EMC:develop Feb 14, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update IMSprep snow analysis tasks for missing obs files
3 participants