Skip to content

Use ymd instead of uninitialized date in timeInit for (unused?) optDate in alarmInit #1423

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

Open
wants to merge 1 commit into
base: dev/ufs-weather-model
Choose a base branch
from

Conversation

NickSzapiro-NOAA
Copy link
Contributor

Pull Request Summary

Address compiler warning and bug that Warning: 'date' is used uninitialized [-Wuninitialized]

Description

This impacts alarmInit when using optDate. I don't know that anyone does that, especially as it's not working properly.

labels: bug

Issue(s) addressed

Part of ufs-community/ufs-weather-model#2703

Commit Message

Use ymd instead of uninitialized date in timeInit for (unused?) optDate in alarmInit

Solution by @DeniseWorthen

Check list

Testing

  • How were these changes tested?
  • Are the changes covered by regression tests? (If not, why? Do new tests need to be added?)
  • Have the matrix regression tests been run (if yes, please note HPC and compiler)?
  • Please indicate the expected changes in the regression test output, (Note the list of known non-identical tests.)
  • Please provide the summary output of matrix.comp (matrix.Diff.txt, matrixCompFull.txt and matrixCompSummary.txt):

@JessicaMeixner-NOAA
Copy link
Collaborator

@NickSzapiro-NOAA these changes look very straightforward and I saw the comments from @DeniseWorthen suggesting this fix in the other thread. I'm assuming the UFS regression tests are sufficient for these changes? We don't need any workflow tests or things like that? The standalone WW3 tests are not applicable here so I will not run them.

@NickSzapiro-NOAA
Copy link
Contributor Author

The UFS regression tests don't use this option, so I'm not sure they're applicable either

@JessicaMeixner-NOAA
Copy link
Collaborator

Is there any testing we need to do? If so, let me know. Otherwise I'm okay w/approving this PR - but if there's tests we should run or whatever I'm happy to help.

@DeniseWorthen
Copy link
Contributor

We'll need to run the UWM RTs when this comes in (here and in CICE), but I see no reason to run any standalone RTs prior to that.

@NickSzapiro-NOAA
Copy link
Contributor Author

I don't know if we should check that the alarm has the proper effect for optDate. For me, idea is to fix compiler warning

@JessicaMeixner-NOAA
Copy link
Collaborator

Thanks @DeniseWorthen

@JessicaMeixner-NOAA JessicaMeixner-NOAA self-requested a review May 6, 2025 18:49
Copy link
Collaborator

@JessicaMeixner-NOAA JessicaMeixner-NOAA left a comment

Choose a reason for hiding this comment

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

Approve assuming all the UFS tests pass.

@DeniseWorthen
Copy link
Contributor

@NickSzapiro-NOAA Thanks for making this fix. I'm concerned about the one in fld1md that is using **(3/2). Have you tested if changing that to **(1.5) changes answers?

@NickSzapiro-NOAA
Copy link
Contributor Author

I can do that one next...I assume **1 vs **1.5 has to change answers.

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.

3 participants