Skip to content

Fix remaining Debug mode compiler warnings - #217

Merged
EdwardSafford-NOAA merged 4 commits into
NOAA-EMC:developfrom
EdwardSafford-NOAA:feature/fix-warn-216
Jul 7, 2026
Merged

EdwardSafford-NOAA merged 4 commits into
NOAA-EMC:developfrom
EdwardSafford-NOAA:feature/fix-warn-216

Conversation

@EdwardSafford-NOAA

@EdwardSafford-NOAA EdwardSafford-NOAA commented Jul 6, 2026 •

Copy link
Copy Markdown
Collaborator

This PR accomplishes these things:

  • Eliminate all remaining compiler warnings in GSI-monitor repo when building the executabes in "Debug" mode. Most of the warnings were from unused variables.
  • Fix all run-time failures in executables built in "Debug" mode. Generally these were seg faults caused by array overruns. Executables built in "Release" mode did not experience these failures.
  • Add missing support for ursa to the parm/Mon_config and module files as well as the ConMon's data extraction script.
  • Increase wall clock time for the data extraction job. The run time is much longer than it probably should be and I'll open a new issue to address that.

Testing was done on both ursa and wcoss2. Testing on ursa was done as part of development using a small sample of GDAS data. On wcoss2 executables built in both "Debug" and "Release" modes have been tested over separate 3-day periods using operational GDAS data. Results were nominal.

Closes #216

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR targets remaining “Debug” build warnings and runtime failures in the Conventional Monitor components, primarily by tightening array bounds/metadata handling in the time-based ConMon statistics pipeline and cleaning up unused arguments. It also adds operational support for the ursa platform across configs/scripts/modulefiles.

Changes:

  • Refactors/modernizes ConMon time-statistics routines (module packaging, assumed-shape arrays, safe type-loop bounds) and adjusts control-file generation call signatures.
  • Updates multiple ConMon GrADS programs/readers to remove unused subtype-related arguments and improve NetCDF bookkeeping (file ID tracking).
  • Adds ursa support in parm/Mon_config, the data-extract driver script, and new/updated modulefiles.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_time.fd/stas2ctl.f90 Updates creatstas_ctl interface to use nc sizing instead of a fixed count parameter.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_time.fd/stas_time.f90 Wraps stascal in a module and switches key arrays to assumed-shape with safer loop bounds.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_time.fd/stas_time_gps.f90 Makes GPS stats arrays assumed-shape and bounds the type loop using ntype_eff.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_time.fd/process_time_data.f90 Allocates work arrays based on effective type counts and updates calls/interfaces for stats routines.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_time.fd/mainconv_time.f90 Updates creatstas_ctl call sites to match the new signature.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_time.fd/conmon_read_diag.F90 Simplifies NetCDF read interfaces and improves open-status indexing via find_ncdiag_id.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_sig.fd/grads_sig.f90 Adds missing external declaration to avoid implicit interface warnings.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_sfctime.fd/maingrads_sfctime.f90 Removes unused subtype argument plumbing in sfctime GrADS driver.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_sfctime.fd/grads_sfctime.f90 Drops unused isubtype argument and adds missing extern declaration.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_sfctime.fd/conmon_read_diag.F90 Aligns NetCDF read routine signatures with updated argument lists.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_sfc.fd/maingrads_sfc.f90 Removes unused subtype argument plumbing in sfc GrADS driver.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_sfc.fd/grads_sfc.f90 Drops unused isubtype argument.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_sfc.fd/conmon_read_diag.F90 Aligns NetCDF read routine signatures with updated argument lists.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_mandlev.fd/maingrads_mandlev.f90 Removes unused subtype argument plumbing in mandlev GrADS driver.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_mandlev.fd/grads_mandlev.f90 Drops unused isubtype argument and adds missing extern declaration.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_mandlev.fd/conmon_read_diag.F90 Aligns NetCDF read routine signatures with updated argument lists.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_lev.fd/maingrads_lev.f90 Removes unused levcard/subtype plumbing in GrADS lev driver interface.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_lev.fd/grads_lev.f90 Drops unused parameters and adds missing extern declaration.
src/Conventional_Monitor/nwprod/conmon_shared/sorc/conmon_grads_lev.fd/conmon_read_diag.F90 Aligns NetCDF read routine signatures; minor comment cleanup needed.
src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh Adds missing input checks and introduces an ursa submission branch.
parm/Mon_config Adds ursa to supported platforms and defines its queue/tank/tmp defaults.
modulefiles/ursa.intel.lua Adds/adjusts ursa Intel environment modulefile (currently has a variable name issue).
modulefiles/ursa.intel-run.lua Adds/adjusts ursa runtime modulefile (currently has a variable name issue).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modulefiles/ursa.intel.lua Outdated
Comment thread modulefiles/ursa.intel-run.lua Outdated
Fix copilot identified issues.
@EdwardSafford-NOAA

Copy link
Copy Markdown
Collaborator Author

All copilot suggested changes have been made. Executables have been rebuilt in both "Debug" and "Release" modes, and both modes have been re-tested on ursa and wcoss2.

@EdwardSafford-NOAA
EdwardSafford-NOAA marked this pull request as ready for review July 6, 2026 18:58
Comment thread parm/Mon_config

@DavidHuber-NOAA DavidHuber-NOAA left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes look good. I just had a couple suggestions, but nothing critical. Approve.

Fix indentation.
@EdwardSafford-NOAA
EdwardSafford-NOAA merged commit 4c66d85 into NOAA-EMC:develop Jul 7, 2026
4 checks passed
EdwardSafford-NOAA added a commit to EdwardSafford-NOAA/GSI-Monitor that referenced this pull request Jul 7, 2026
Reset Radmon_user_settings to default values.
EdwardSafford-NOAA added a commit to EdwardSafford-NOAA/GSI-Monitor that referenced this pull request Jul 7, 2026
Fix copilot findings.
@EdwardSafford-NOAA
EdwardSafford-NOAA deleted the feature/fix-warn-216 branch September 14, 2026 14:26
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.

Eliminate debug warnings

3 participants