Skip to content

Feature #3304 power_spectra - #3411

Open
JohnHalleyGotway wants to merge 113 commits into
developfrom
feature_3304_power_spectra
Open

Feature #3304 power_spectra#3411
JohnHalleyGotway wants to merge 113 commits into
developfrom
feature_3304_power_spectra

Conversation

@JohnHalleyGotway

@JohnHalleyGotway JohnHalleyGotway commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

After many iterations, Grid-Diag now replicates the output from the reference KE_Spectra_Calculation_Plot code using the same sample data.
Screenshot 2026-08-26 at 5 54 16 PM

Note that the link checker automated test will still fail until @jprestop is able to address the broken links in the documentation.

Expected Differences

  • Do these changes introduce new tools, command line arguments, or configuration file options? [Yes]

    If yes, please describe:

    In the Grid-Diag configuration file, the power_spectrum dictionary and output_flag.power_spectrum boolean are both new:
power_spectrum = {
   missing_flag  = NONE;
   missing_value = 0.0;
   vld_thresh    = 0.5;
}
 output_flag = {
...
   power_spectrum = FALSE;
}
  • Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [Yes]

    If yes, please describe:

    Adds new NetCDF variables and dimensions to the Grid-Diag output file, as noted in this grid_diag Output File section and in the Output format changes portion of the Upgrade Instructions.

Pull Request Testing

  • Describe testing already performed for these changes:

    Ran Grid-Diag many times to achieve the result shown above replicating the functionality of the existing Python code.

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

    Please find this feature branch compiled and available for testing in the following locations:

  1. NCAR machine for Tina seneca:/d1/projects/MET/MET_pull_requests/met-13.0.0/rc1/MET-feature_3304_power_spectra/bin/grid_diag.
  2. NOAA machine for Gerard ursa:/scratch3/BMC/dtc/John.H.Gotway/METplus/development/MET-feature_3304_power_spectra/bin/grid_diag.
  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
    I updated the Grid-Diag documentation and upgrade instructions. Please review and advise whether more detail should be added.

  • Do these changes include sufficient testing updates? [Yes]
    I added two new tests to unit_grid_diag.xml, one for wind speed and one for kinetic energy. Note that evaluating kinetic energy (KENG) is what triggers the logic to diff the U and V components separately.

  • Will this PR result in changes to the MET test suite? [Yes]

    If yes, describe the new output and/or changes to the existing output:

    Modifies 4 existing output files:

/data/output/met_test_truth/grid_diag/grid_diag_APCP_06_VARN.nc
/data/output/met_test_truth/grid_diag/grid_diag_temperature.nc
/data/output/met_test_truth/grid_diag/grid_diag_APCP_06_FCST_OBS.nc
/data/output/met_test_truth/grid_diag/grid_diag_out.nc

Adds 6 new output files:

/data/output/met_test_output/grid_diag/uv_wind_fcst_file_list
/data/output/met_test_output/grid_diag/uv_wind_anly_file_list
/data/output/met_test_output/grid_diag/grid_diag_WIND_Z10.nc
/data/output/met_test_output/grid_diag/keng_anly_file_list
/data/output/met_test_output/grid_diag/grid_diag_KENG_Z10.nc
/data/output/met_test_output/grid_diag/keng_fcst_file_list
  • Will this PR result in changes to existing METplus Use Cases? [Yes]

    If yes, create a new Update Truth METplus issue to describe them.

  • Do these changes introduce new SonarQube findings? [Yes or No]

    If yes, please describe:
    Reduces the overall number of findings from 13,426 in develop to 13,362 in this feature branch.

  • Please complete this pull request review by [During the week of 8/31 - 9/4].

Pull Request Checklist

See the METplus Workflow for details.

  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the version that will include these changes
    Select: METplus-X.Y Support project for bugfix releases or MET-X.Y Development project for the next coordinated release
  • After submitting the PR, select the ⚙️ icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

…d, used a pre-defined hard-coded list of variable names to drive the derivation logic.
…class. Next up are handling wind rotations and adding lots of tests.
…add long names and units for derived wind fields.
…ing winds, the level string needs to be wrapped in parenthesis based on the existing parsing logic.
…r than just the derived classes for GRIB1 and GRIB2.
…nce. Still need to add the vorticity and divergence derivations and add new unit tests.
@JohnHalleyGotway JohnHalleyGotway moved this from 🏗 In progress to 🔎 In review in METplus-13.0 Development Aug 27, 2026
@JohnHalleyGotway
JohnHalleyGotway marked this pull request as ready for review August 27, 2026 22:58
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 In review

Development

Successfully merging this pull request may close these issues.

Add power spectra calculation capability to the Grid-Diag tool in MET

1 participant