Skip to content

Conversation

JohnHalleyGotway
Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway commented Aug 8, 2024

Expected Differences

This PR corrects the computation of the MAE value reported in the SAL1L2 line type. Since the forecast and observation climo means may now differ, the SL1L2 MAE and SAL1L2 MAE values can now differ as well. This PR also includes updates to the Point-Stat and Appendix C chapters of the User's Guide.

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

    If yes, please describe:

  • Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]

    If yes, please describe:

Pull Request Testing

  • Describe testing already performed for these changes:

    Built the docs several times locally to confirm that they render as expected.
    Confirmed that the code compiles.
    Confirmed that no diffs are flagged by the regression test for this PR.
    Ran the following test being introduced by PR Feature #2924 fcst climo, PR 2 of 3 #2942 using the code for this PR:
export FCST_CLIMO_DIR='${MET_TEST_INPUT}/climatology_data/NCEP_NCAR_40YR_1.0deg'
export OBS_CLIMO_DIR='${MET_TEST_INPUT}/climatology_data/ERA_DAILY_1.5deg'
export OUTPUT_PREFIX='FCST_NCEP_1.0DEG_OBS_WMO_1.5DEG'
/Volumes/d1/projects/MET/MET_development/MET-feature_2924_sal1l2_mae/internal/test_unit/../../share/met/../../bin/grid_stat \
      /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/model_data/grib2/gfs/gfs_2012040900_F024.grib2 \
      /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/model_data/grib2/gfsanl/gfsanl_4_20120410_0000_000.grb2 \
      /Volumes/d1/projects/MET/MET_development/MET-feature_2924_fcst_climo/internal/test_unit/config/GridStatConfig_climo_FCST_NCEP_1.0DEG_OBS_WMO_1.5DEG \
      -outdir /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/climatology_mixed -v 2

Compared the MAE values reported in the SL1L2 and SAL1L2 line types and confirmed that they now actually do differ:

egrep "SL1L2|SAL1L2" \
MET_test_output/climatology_mixed/grid_stat_FCST_NCEP_1.0DEG_OBS_WMO_1.5DEG_240000L_20120410_000000V.stat | \
awk '{print $24, $31}'
SL1L2 1.39999
SAL1L2 1.84432
SL1L2 2.91
SAL1L2 2.75721
SL1L2 2.97
SAL1L2 2.96737
SL1L2 0.5
SAL1L2 0.76962
SL1L2 0.27
SAL1L2 0.85964
SL1L2 3.02
SAL1L2 2.94773
  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

    Review code changes and doc updates.

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]

  • Do these changes include sufficient testing updates? [No]
    But the unit_climatology_mixed.xml test being introduced by PR Feature #2924 fcst climo, PR 2 of 3 #2942 is sufficient.

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

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

None of the existing tests provide different forecast and observation climatology data.

  • Will this PR result in changes to existing METplus Use Cases? [No]

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

None of the existing tests provide different forecast and observation climatology data.

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

    If yes, please describe:
    It originally flagged 4 codes smells. I addressed 3 of them, but did not do the 4th to maintain internal code consistency. However, it will still fail SonarQube because of too much duplicated new code. This is not a finding we'd chosen to address.

  • Please complete this pull request review by [Tues 8/13/24].

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: Coordinated METplus-X.Y Support project for bugfix releases or MET-X.Y.Z Development project for official releases
  • 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.

…since they are no longer the same value. I renamed the existing 'mae' as 'smae' and added a new 'samae' variable. Renaming the existing lets me use the compiler help find all references to it throughout the code.
@JohnHalleyGotway JohnHalleyGotway marked this pull request as ready for review August 8, 2024 23:25
Copy link
Contributor

@j-opatz j-opatz left a comment

Choose a reason for hiding this comment

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

All documentation updates are meaningful and appear rendered in the RTD correctly. Code updates have been shown to produce different values for the variables in question, so the PR is approved.

@JohnHalleyGotway JohnHalleyGotway merged commit 8b7d49f into develop Aug 9, 2024
38 checks passed
@JohnHalleyGotway JohnHalleyGotway deleted the feature_2924_sal1l2_mae branch August 9, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

Enhance MET to support separate climatology datasets for both the forecast and observation inputs
2 participants