Skip to content

Conversation

@mingchen-NOAA
Copy link
Collaborator

@mingchen-NOAA mingchen-NOAA commented Nov 4, 2025

Pull Request Summary

This pull request modernizes procedure referencing in WW3 by replacing legacy EXTERNAL declarations with explicit INTERFACE blocks and structured CONTAINS sections. The changes improve code safety, compiler verification, and runtime stability within both the core WW3 model and the operational workflow.

Description

In this update, the serv_xnl4v5.f90 source file was modified to include explicit INTERFACE definitions for external functions, replacing the former EXTERNAL declarations. This ensures the compiler can perform proper type and argument consistency checks at compile time.

Within the w3profsmd module, all previously standalone subroutines and functions have been moved inside the module using the CONTAINS statement. This refactoring removes the need for external references and enforces a clear internal procedure scope, reducing the risk of mismatched interfaces or undefined references during runtime. To maintain consistency and encapsulation, these subroutines and functions have been set as PRIVATE within the module. Additional INTERFACE blocks and IMPLICIT NONE statements were added where required to define function prototypes clearly and enable strict compiler type checking. These updates collectively improve code robustness, eliminate potential runtime errors caused by missing or inconsistent external procedure definitions, and enhance the overall reliability and maintainability of the WW3 and operational workflow.

Issue(s) addressed

addressing #1501

Commit Message

replace EXTERNAL declarations with INTERFACE and CONTAINS for safer procedure referencing

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?) yes
  • Have the matrix regression tests been run (if yes, please note HPC and compiler)? Ursa Intel and GNU
  • 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):

URSA INTEL: No errors and unexpected differences

**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR3_UNO_MPI_d2                     (17 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                     (17 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                     (16 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (16 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_PR1_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (18 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

URSA GNU: No errors and unexpected differences

**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR3_UNO_MPI_d2                     (8 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (13 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (16 files differ)
mww3_test_09/./work_MPI_ASCII                     (0 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (5 files differ)
ww3_tp2.16/./work_MPI_OMPH                     (5 files differ)
ww3_tp2.6/./work_ST4_ASCII                     (0 files differ)
ww3_tp2.7/./work_ST0                     (1 files differ)
ww3_ufs1.3/./work_a                     (27 files differ)

matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt

@mingchen-NOAA
Copy link
Collaborator Author

In addition to the WW3 standalone tests, the UFS-WM RT tests were also conducted. All failures were due to timeouts and none of them involved the wave model.

SYNOPSIS:
Starting Date/Time: 20251114 04:52:11
Ending Date/Time: 20251114 07:00:36
Total Time: 02h:09m:11s
Compiles Completed: 67/67
Tests Completed: 272/276
Failed Tests:
* TEST conus13km_debug_intel: FAILED: TEST TIMED OUT
-- LOG: /scratch4/NCEPDEV/stmp/Ming.Chen1/RT_RUNDIRS/Ming.Chen1/FV3_RT/rt_2948680/conus13km_debug_intel/err
* TEST conus13km_debug_qr_intel: FAILED: TEST TIMED OUT
-- LOG: /scratch4/NCEPDEV/stmp/Ming.Chen1/RT_RUNDIRS/Ming.Chen1/FV3_RT/rt_2948680/conus13km_debug_qr_intel/err
* TEST conus13km_radar_tten_debug_intel: FAILED: TEST TIMED OUT
-- LOG: /scratch4/NCEPDEV/stmp/Ming.Chen1/RT_RUNDIRS/Ming.Chen1/FV3_RT/rt_2948680/conus13km_radar_tten_debug_intel/err
* TEST rrfs_v1beta_gnu: FAILED: TEST TIMED OUT
-- LOG: /scratch4/NCEPDEV/stmp/Ming.Chen1/RT_RUNDIRS/Ming.Chen1/FV3_RT/rt_2948680/rrfs_v1beta_gnu/err

RegressionTests_ursa.log

@mingchen-NOAA mingchen-NOAA marked this pull request as ready for review November 14, 2025 13:57
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.

mww3_test_03/./work_PR3_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (15 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (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_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                     (15 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2                     (17 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                     (5 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 merged commit 07d5ba0 into NOAA-EMC:develop Nov 17, 2025
22 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.

2 participants