Skip to content

Fix Uninitialized TRHO in W3IORS to Ensure Consistent Restart File Output#1472

Merged
JessicaMeixner-NOAA merged 1 commit into
NOAA-EMC:developfrom
mingchen-NOAA:ww3/ss192_diff_fix
Jul 25, 2025
Merged

Fix Uninitialized TRHO in W3IORS to Ensure Consistent Restart File Output#1472
JessicaMeixner-NOAA merged 1 commit into
NOAA-EMC:developfrom
mingchen-NOAA:ww3/ss192_diff_fix

Conversation

@mingchen-NOAA
Copy link
Copy Markdown
Collaborator

Pull Request Summary

This PR fixes an uninitialized TRHO variable in the W3IORS subroutine of w3iorsmd.F90, which caused inconsistent values in restart binary files on Ursa (Intel).

Description

This PR fixes an uninitialized TRHO variable in the W3IORS subroutine of w3iorsmd.F90, which was causing inconsistent values in restart binary files on Ursa (Intel).
The issue was found during regression tests. Unexpected differences were observed in binary restart files. Using a debug text output, the difference was traced to the variable TRHO(2) had uninitialized values. An initialization of the variable TRHO(2) = 0 has been added in subroutine W3IORS to fix the issue.

Issue(s) addressed

Addressing issue #1468

Commit Message

Fix uninitialized TRHO in W3IORS for consistent restart files

Check list

Testing

  • How were these changes tested? Matrix
  • 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)? Ursa Intel
  • 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):

No unexpected difference was observed.

**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR3_UNO_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR2_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e_c                     (1 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (17 files differ)
mww3_test_03/./work_PR2_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (17 files differ)
mww3_test_03/./work_PR1_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (16 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e_c                     (1 files differ)
mww3_test_09/./work_MPI_ASCII                     (0 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (6 files differ)
ww3_tp2.6/./work_ST4_ASCII                     (0 files differ)
ww3_ufs1.3/./work_a                     (3 files differ)

matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt

@JessicaMeixner-NOAA
Copy link
Copy Markdown
Collaborator

Thanks @mingchen-NOAA ! I'll get the regression tests going on my end here shortly.

@JessicaMeixner-NOAA
Copy link
Copy Markdown
Collaborator

Regression tests from Hera:

**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR1_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (12 files differ)
mww3_test_03/./work_PR1_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2                     (17 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (17 files differ)
mww3_test_03/./work_PR2_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (16 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e_c                     (1 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (12 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR2_UQ_MPI_e                     (1 files differ)
mww3_test_09/./work_MPI_ASCII                     (0 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (7 files differ)
ww3_tp2.16/./work_MPI_OMPH                     (4 files differ)
ww3_tp2.6/./work_ST4_ASCII                     (0 files differ)
ww3_ts3/./work_ST4_PR2_UNO_MPI_OMPH                     (1 files differ)
ww3_ufs1.3/./work_a                     (2 files differ)

ww3_ts3/./work_ST4_PR2_UNO_MPI_OMPH (1 files differ)
is not expected, the file with differences is ww3_grid.out differ.

The diff is:

294c294,297
< Reading 3D look-up table for SIN4 from file.

Filling 3D look-up table for SIN4. please wait
WAVEWATCH III ST4 TABLE FOR STRESS 2018-06-08 2.475509 9.4999997E-03
1.430000 100 200 50 6.0000001E-03
0.4000000 9.806000

I don't think this is a concern, just documenting.

matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt

Confirming results on Ursa:

**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR3_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (17 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (12 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR2_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e_c                     (1 files differ)
mww3_test_03/./work_PR1_MPI_e                     (1 files differ)
mww3_test_03/./work_PR2_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (16 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e_c                     (1 files differ)
mww3_test_09/./work_MPI_ASCII                     (0 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (6 files differ)
ww3_tp2.6/./work_ST4_ASCII                     (0 files differ)
ww3_ufs1.3/./work_a                     (3 files differ)

matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt

@JessicaMeixner-NOAA JessicaMeixner-NOAA self-requested a review July 25, 2025 14:04
Copy link
Copy Markdown
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.

Thanks for finding and fixing this bug @mingchen-NOAA !

@JessicaMeixner-NOAA JessicaMeixner-NOAA merged commit e7bacf5 into NOAA-EMC:develop Jul 25, 2025
3 of 6 checks passed
@mingchen-NOAA mingchen-NOAA deleted the ww3/ss192_diff_fix branch January 13, 2026 14:40
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.

2 participants