Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix #2897 develop python_valid_time #2899

Merged
merged 8 commits into from
May 22, 2024

Conversation

JohnHalleyGotway
Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway commented May 21, 2024

Note that this bug in Point-Stat and Ensemble-Stat occurs when reading point observations through Python embedding. If some of the obs share a common valid time, then there is a mismatch in the unique list of numeric valid times and the non-unique list of valid time strings.

Expected Differences

  • 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:

    Please see the testing described in the body of Bugfix: Fix inconsistent handling of point observation valid times processed through Python embedding #2897. I demonstrated the problem using the nightly build versions of MET and the solution using seneca:/d1/projects/MET/MET_pull_requests/met-12.0.0/beta5/MET-bugfix_2897_develop_python_valid_time.
    I did also test with all 151 obs for the TCI use case and confirmed that the consistent and correct valid time is now being used.

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

    Review the changes and test using seneca:/d1/projects/MET/MET_pull_requests/met-12.0.0/beta5/MET-bugfix_2897_develop_python_valid_time as you see fit.

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

  • Do these changes include sufficient testing updates? [No]
    None needed as these will impact the output from METplus use cases and it will be tested there.

  • 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:

    I do not expect diffs from MET.

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

    If yes, create a new Update Truth METplus issue to describe them.
    I expect modified output from the TCI use case and it has the potential to impact output from other use cases.

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

    If yes, please describe:
    I hope not.

  • Please complete this pull request review by [Thurs 5/23/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.

…he valid time strings. The time string in vld_array should exactly correspond to the numeric unixtime values in vld_num_array. Therefore they need to be updated inside the same if block. The bug is that we were storing only the unique unixtime values but storing ALL of the valid time string, not just the unique ones.
@DanielAdriaansen
Copy link
Contributor

DanielAdriaansen commented May 22, 2024

@JohnHalleyGotway thanks for making this fix, I will test it shortly.

Regarding asking for additional debugging that would have helped, I think it's worthwhile to consider adding a high DEBUG option (10? 10+?) to print the "header" (an entire row of the 11-column data) for each of these rejection types:

rej_typ = (int ***) 0;
rej_mask = (int ***) 0;
rej_fcst = (int ***) 0;
rej_cmn = (int ***) 0;
rej_csd = (int ***) 0;
rej_mpr = (int ***) 0;
rej_dup = (int ***) 0;

In debugging I actually added some print statements here:

if(hdr_ut < beg_ut || hdr_ut > end_ut) {
rej_vld++;
return;

So that would be one place where if rej_vld is being incremented, check if the DEBUG exceeds some level and if so dump the row of data that's being rejected. I do think this would not be used very frequently, but the Python embedding case is a good example of where we were confident about this section of code (in pair_data_point.cc), but then came along with another way to serve data to this class (Python embedding). Future vehicles for serving data to MET that are yet to be defined would benefit from this added debugging.

j-opatz and others added 4 commits May 22, 2024 15:42
… detailed log messages about what obs are being rejected and which are being used for each verification task.
…ent with the summary rejection reason counts log message
Copy link
Contributor

@DanielAdriaansen DanielAdriaansen left a comment

Choose a reason for hiding this comment

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

I approve. I was able to test on Seneca and confirm that I received the correct number of rejections for valid time. I was also able to see the new debug messages, which provide more information about whether an observation is being used or skipped, and if it is being skipped, why it is being skipped. Thanks @JohnHalleyGotway!

@JohnHalleyGotway JohnHalleyGotway merged commit 663fda7 into develop May 22, 2024
6 of 7 checks passed
@JohnHalleyGotway JohnHalleyGotway deleted the bugfix_2897_develop_python_valid_time branch May 22, 2024 21:02
georgemccabe added a commit to dtcenter/METplus that referenced this pull request May 23, 2024
* combine release notes from development releases for 5.1.0 release

* fix indentation to prevent incorrect nesting of drop down menus

* Bugfix #2241 Create directory containing -out_stat file (#2242)

* Enhance diff logic to control decimal precision to prevent failures (#2243)

* Bugfix #2245 use unique run ID to name logger instance (#2247)

* per #2245, add METplusConfig class function that is called when object is deleted to close log handlers. This prevents OSError: [Errno 24] Too many open files from running all pytests

* Feature #1626 TCDiag updates to wrapper and basic use case (#2248)

Co-authored-by: Jonathan Vigh <jvigh@ucar.edu>

* move new use case into another group

* Bugfix #2244 develop fix diff tests (#2254)

* skip diff for specific png images that produce diffs occasionally but look the same visually

* add 2 more keywords for use cases that occasionally flag small, unnoticeable diffs in png images

* Feature #2253 update tests for diff_util (#2256)

Co-authored-by: root <root@localhost>

* Feature #1974 Documentation: update coding standards section (#2260)

* Feature #2253 conftest fixture to set pytest tmpdir (#2261)

* Feature #2151 Documentation: Add quick search keywords METplotpy/calcpy use cases (#2259)

* Feature #2138 CI enhance MET Docker tag override (#2258)

* Updating development instructions.

* fixed typo

* fixed another typo

* Feature #2207 Documentation - Updates to Contributor's Guide (#2263)

Co-authored-by: Dan Adriaansen <dadriaan@ucar.edu>

* Feature develop update install files (#2266)

* Updating installation files

* Removing run_commands.sh

* Updated the file to add a MINICONDA_PATH

* Adding files for jet

* Adding orion file

* Removing beta references

* Corrected met version

* Adding files for WCOSS2 machines

* Removing rc1 from acorn file

* Removing beta1

* Bugfix #1853 develop - PointStat don't require mask variables to be set (#2262)

* update version of certifi to match auto-generated dependabot PR #2267

* feature #2253 more tests for diff_util.py (#2264)

* update versions of METplus components for the next official release

* updated release notes for 5.1.0 release

* removed duplicate entries in release notes

* Added EC2 instance recipee with S3 mounting ability (#2269)

* Updating the Subsetting Tests by Marker section (#2272)

* update release date for 5.1.0 release (#2276)

* update version for development towards 6.0.0-beta1 release

* added new use case that was missing

* Bugfix #2279 develop - buoy station file from 2022 (#2280)

* Feature 2253 series analysis tests (#2277)

* Fix typo in pull_request_template.md

* Make code coverage report available (#2287)

* Use updated dtcenter/metplus-action-data-update tag that fixes bug that causes GHA disk to exceed capacity when too many data volumes are created. Use specific commit of coveralls python action to ensure it will not change

* removed climatology keyword from use cases that aren't relevant that were accidentally added with PR #1984

* update readme with current information

* Feature #2282 coord_release_docs (#2288)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* continue workflow if coveralls step fails -- this typically happens on a pull request from a fork because the authentication fails

* Feature 2253 system util tests (#2297)

* Feature #2294 LSR use case (#2295)

* Feature 2253 run util tests (#2307)

* Release Guide - remove beta/rc tags/releases (#2309)

* Add 'component: repository maintenance' label. Already ran the script to push this change and the NOAA OAR reporting label to all the METplus repos.

* Hotfix for labels, adding a new one for 'component: input data' and also fixing the get_lablels.sh to search for up to 200 existing labels. Also work on the log messages.

* Fix typo in comment

* Feature #2283 time looping consolidation (#2311)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* New issue template: Update Truth (#2332)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* feature #2253 tests for run_util, 'Usage' bugfix (#2313)

* Feature #2338 Debian 12 Conda environments (#2341)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature 1488 usecase satwinds (#2324)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #2283 include times (#2345)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* feature #2253 tests for config_validate, mock logger in conftest (#2320)

* Feature #2299 / #2310 Remove deprecated MET config env vars and TCMPRPlotter (#2347)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* remove MODEL and OBTYPE to use defaults from MET config

* Feature #2348 v6.0.0-beta1 release (#2351)

* update version for development towards 6.0.0-beta2 release

* copy libGL and libEGL files into docker image to prevent errors with geovista python package

* run use that uses geovista to test

* Feature #2156 release_acceptance_testing (#2352)

* feature #2253 print error logs from conftest (#2358)

* feature #2253 met_db_load tests (#2355)

* Rename 5.1.0.lua_wcoss2 to 6.0.0.lua_wcoss2

* Update and rename 5.1.0_acorn to 6.0.0_acorn

* Update 6.0.0_acorn

* feature #2253 add tests for gfdl_tracker (#2354)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Create 6.0.0_gaea

* Update and rename 5.1.0_hera to 6.0.0_hera

* Feature #2156 release_acceptance_testing take2 (#2361)

Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com>

* Feature #2329 Docker info in Installation Chapter (#2366)

* feature_2253_extract_tiles_tests (#2368)

* Feature 2253 tc pairs tests (#2369)

* Feature 2253 tc csv writer (#2373)

* update requirements for building docs to get around build failure where python packages required to build RTD have disappeared from the automatically generated commands from RTD

* fix ReadTheDocs requirements to include pillow which is a dependency of sphinx-gallery: see https://blog.readthedocs.com/defaulting-latest-build-tools/ for more info on why this was necessary

* Feature #2340 TCDiag one_time_per_file_flag (#2374)

* Update and rename 5.1.0_jet to 6.0.0_jet

* Added libssh

* prune docker files before running use cases to prevent running out of disk space when running use cases, ci-run-all-diff

* Feature 2253 command builder tests (#2378)

* Feature 2253 series analysis test (#2380)

* Feature 2253 py embed test (#2379)

* ignore cyclone plotter from code coverage report because it will be replaced with METplotpy logic

* Feature 898 headers (#2389)

* changing _ to - for header consistency

* changing _ to - for header consistency

* updating all headers for consistency

* updating all headers for consistency and adding spacing

The spacing doesn't seem to be required but it is the convention that we follow for headers.

* updating all headers for consistency

* updating headers for consistency and adding capital letters to  headers

* Using the overline ### to keep index consistent with other indexes

* updating all headers for consistency

* update requirements for building docs to get around build failure where python packages required to build RTD have disappeared from the automatically generated commands from RTD

* updating all headers and some spacing for consistency

* updating headers for consistency

* changing to ### for consistency

* Per #898, fixed the headers for the Release Guide part, chapters, and sections.

* Duplicating changes in develop branch for requirements.txt file

* updating headers

* Per #2669, updated header formatting to resolve errors

* Per #2669, udpating header

* Per #2669, udpating headers

* Per #2669, udpating header

* Per #2669, updated header formatting

* Per #2669, update header formatting

* updating headers

* Per #898, removed space in front of title

* Capitalizing Please

* changing to just italics to match standard formatting

* indenting for consistent formatting

* fixing italics again

* changing from note to warning for consistency

* updating headers, adding some capitalizing to the headers

* fixing typo

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* This file was committed but never updated or used

Per Minna, ok to delete.

* Restructuring table of contents to make it more clear which guides are for users and which are for contributors

* fixing formatting for clairity

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

* Feature #2349 upgrade instructions for deprecated MET config files (#2386)

* Feature 2123 di doc update (#2392)

Co-authored-by: Tracy <tracy.hertneky@noaa.gov>

* change log to list name of config variable , e.g. GRID_STAT_CONFIG_FILE, to easily see which variable should be removed

* Major refactor including elimination of unnecessary imports, only computing the index for the season requested instead of all seasons all the time, which also fixes a bug selecting which season the user requested. Results are identical for all seasons for the test data for the use case.

* Feature 1667 doc conventions (#2397)

* New additions based on the old branch feature_1667_updating_overview

* Moving the release-notes reference label

* Added label for METplus_glossary for use in Documentation conentions section.

* Adding images for the Documentation Conventions section

* Modifying wording and testing formatting in Internal Links section

* Second take on formatting

* Third attempt at formatting

* Fourth attempt at formatting

* Modified wording, sections, and formatting

* Minor modifications

* Added period

* Changed Pretty Table to PrettyTable

* Modify informationg about converting an existing table and adding images

* Resolving errors

* Reformatting

* Moving placement of reference label

* Attempting to fix table title

* Fixed incorrect alignment

* Made changes based on Lisa's suggestions

* Made changes based on Lisa's suggestions

* Made corrections

* Made corrections

* Per #1667, fixing typos

* Per #1667, corrected text

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

* Feature #2377 Log to terminal only (#2398)

* Update conda envs to use conda-forge only (#2402)

* rearrange MET config env var tables for GridStat so they are in the order that they appear in the wrapped MET config file

* use mamba instead of conda and update version of netcdf python package used to 1.6.2

* skip s2s_mid_lat WeatherRegime use case that produces different results often

* updated version of xesmf because <0.7.1 does not work with mamba

* per #2412, fix bug in GenVxMask to put quotes around argument so a grid specification string with spaces will be an accepted value

* downgrade version of esmf package to fix bug described in pangeo-data/xESMF#246

* Feature #2219 SeriesAnalysis multiple input files (#2408)

* Adding 3 new requestors to the list of common_labels.txt for NOAA/NHC, CSU/CIRA, and Australian BOM ci-skip-all

* Feature 2405 match tables2wrapper (#2416)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* per #2423, follow symbolic links when traversing directories to find files within a time window, ci-run-all-diff

* Feature #2252 WaveletStat wrapper (#2427)

Co-authored-by: j-opatz <59586397+j-opatz@users.noreply.github.com>

* add WaveletStat use case to group and temporarily disable TCDiag use case because changes to the wrapper are needed to fix it after changes to the MET tool were merged

* update version number for beta2 release (#2431)

* update version for dev towards beta3

* Feature #2371 Embed use case upgrade demo video into upgrade instructions (#2444)

* fix failing use case tests -- install python packages dateutil and requests via apk instead of pip because the pip commands began failing -- see PEP668 https://peps.python.org/pep-0668/ -- also changed scripts to create conda environments for use case tests to install all packages in a single call to mamba instead of individual calls

* remove commands to install geovista from source because it is now installed from conda

* Feature #1989: Add OMI use case (#2457)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #2432 TCDiag new config changes (#2453)

* move medium range 10 use case into group with 3-5 to speed up runs

* Feature #2334 land_mask (and topo_mask) in PointStat (#2456)

* added use cases with pygrib

* Feature #2430 TCPairs consensus.diag_required and consensus.diag_min_req (#2439)

* Quickfix cloud use case desc imgs (#2464)

* added pics, updated desc

* add last two imgs

* Fixing spelling and capitalization

* Feature 2454 doc overview conv (#2471)

* adding documentation in different sections

* adding grid table section

* fixing links

* grammar updates

* Per #2454, updated sections and wording.

* Per #2454, added a period to the end of a sentence.

* Per #2454, fixing formatting

* Per #2454, updating wording

* adding a section for line breaks in a table

* adding :code: information

* trying to fix warning

* take 2

* take 3 or 4

* maybe fixed

* updating link

* fixing web link again

* web link saga continues

* Changed "ReadTheDocs" to "Read the Docs"

* Updated "main_v" references to be "main_v12.0"

* Removed references to main_v*, replacing with raw RST 

It is not maintainable to have links to branches which will become old.  Since we can avoid it by adding the raw RST in the documentation, I have removed all references to main_v* in favor of placing the raw RST in the documentation.

* Modified the "Code in a Paragraph" section

* Reworded for consistency within the document

* Added back the link for Sphinx code blocks

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

* add argument to workflow dispatch event so that MET DockerHub repo used for tests can be easily overridden to test changes in a MET PR before merging

* Feature dtcenter/MET#2796 GHA Node20 deprecation warnings (#2473)

* per dtcenter/MET#2796, update versions of actions to prevent deprecated node warnings in GHA runs

* change arguments to workflow dispatch so they are no longer required -- these are not needed to be set when triggering by hand through the web interface

* Feature dtcenter/MET#2796 develop - Fix error log artifact creation (#2475)

* updated version of pillow to fix security vulnerability alerted by dependabot in PR #2477

* remove docker image after runtime image is created from metplus image and conda env image

* turn on use case to test image removal

* prune images if image tag doesn't exist -- it appears that if the image is built on the fly (when PR is coming from fork) then the tag exists, but if not, the image tag is set to <none>

* support commands that must run in the shell to see if || will work in docker image pruning step

* try to fix image removal

* Feature 2383 use case sat alt (#2480)

* new docs, files for use case

* new files

* updating to run use case

* updated python libraries, changed test env

* trying new point logic

* added to script for nan removal

* redid Python script to take adv of new MET ability for nans

* Update run status

* removed unused settings

* run image prune commands separately

* changed shell back to false

* split up use case groups so the same envs are used by a group to see if that resolves the disk space issues

* turn off use cases

* feature 2253 fix empty pytest logs (#2485)

* added more commands to free up disk space as suggested in https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh, ci-run-all-cases

* Feature 2406 redo usecase rrfs (#2488)

* issue #2406 RRFS use case files

* issue #2406 added usecase to tests

* Issue #2406 added metplotpy and metcalcpy as dependencies

* Feature #2460 allow missing input (#2493)

* changed template to use datetime format that works on MacOS

* update logic to only write a file list file if there are more than 1 files, updated unit tests to match new behavior, added exception handling to series analysis to prevent crash if file does not exist

* use getraw instead of getstr to prevent crash if providing a filename template tag to override a config variable on the command line

* Add optional argument to subset file function to always write a file list text file even if there is only 1 file found. Use this argument in UserScript wrapper so that the environment variables that contain paths to file list files are consistent in format for use in user scripts

* enhanced function to support different output variable types

* removed the need for overriding clear function in specific wrappers and added optional argument to skip clearing input file list

* clean up formatting

* per #2460, start to implement logic to prevent errors when some input files are not found

* isolate logic to find input files into find_input_files functions. clean up those functions to return boolean instead of sometimes returning None or a list of files to be consistent

* remove python embedding checks because MET is now smart enough to determine if a python script is used with always setting file_type

* turn on use cases to test error handling

* merge artifacts

* run only failed cases

* always run merge step

* run on a case that will succeed to test error log merge step

* only run error log merge step if there were 'Save error logs' jobs that succeeded

* run cases that will fail

* fix condition to merge error logs

* run group that will succeed but have diffs - check error logs doesn't fail

* testing - add use case group that will succeed but will cause diffs becaus there is no truth data - to confirm that the error log merge step behaves properly in this case

* run 3 jobs, 2 should error, to confirm that error_logs is created properly

* repeat diff no error test but with

* per dtcenter/MET#2796, fix error log artifact creation by merging error logs if any of the 'Save error logs' steps ran successfully

* run test to confirm diff does not cause merge error logs to fail

* Revert "run test to confirm diff does not cause merge error logs to fail"

This reverts commit ff2d1ca.

* run test to confirm error logs are merged properly when 2 use case groups have errors

* try checking output variable as string instead of boolean

* Revert "run test to confirm error logs are merged properly when 2 use case groups have errors"

This reverts commit 8106666.

* run test again

* test again

* move check for error logs for shell script and use github env vars

* Revert "run test again"

This reverts commit 7a0a99c.

* break 2 use cases to test that error logs are still created properly

* checkout repo to get script used to merge error logs

* Revert "break 2 use cases to test that error logs are still created properly"

This reverts commit cb6d0b4.

* test merge error log again on no error diff run

* fix script

* move merge error logic back to workflow

* break 2 use cases to test that error logs are still created properly

* Revert "break 2 use cases to test that error logs are still created properly"

This reverts commit 82aa0e1.

* remove testing use case group

* Revert "remove python embedding checks because MET is now smart enough to determine if a python script is used with always setting file_type"

This reverts commit de3b4b0.

* clean up lines

* update logic to check that python embedding is set up properly to only try to set file_type automatically if it is not already set and if the wrapper is a tool that supports multiple input files via python embedding (which require file_type to be set). also changed error if not set properly to warning and use PYTHON_NUMPY as a default

* remove run_count increment before run_at_time_once - set closer to find_input_files so run count and missing input count are consistent

* return boolean from find_input_files function to be consistent with other functions

* per #2460, warn instead of error if missing inputs are allowed, track counters for number of runs and missing inputs

* per #2460, added check to report error if allowed missing input threshold is met

* run clear before running plot_data_plane

* removed test group

* report warning instead of error if ALLOW_MISSING_INPUTS is True

* cleanup

* change function to pytest fixture so it can be used by other test scripts

* update ascii2nc test to process more than 1 time to ensure commands are built properly for each run

* add unit tests to ensure missing input file logic works properly for ascii2nc and grid_stat

* set variable to skip RuntimeFreq logic to find input files to prevent duplicate increment of run_count -- these will be removed when the wrapper has been updated to find files using RuntimeFreq logic

* remove unneccesary error checking

* cleanup

* call function to handle input templates that need to be handled separately for each item in the comma-separated list (for UserScript and GridDiag only)

* add time_info to ALL_FILES dictionaries to be consistent with other wrappers

* clean up logging for reporting error when missing inputs exceeds threshold

* added function to get files for a single run time to be consistent with other functions

* skip increment of run_count when FIND_FILES=True and RuntimeFreq input file logic is skipped to prevent duplicate increments

* added empty test files

* remove redundant variables

* view warnings on a failed test run

* add more empty test files

* added unit tests for missing input logic

* remove MANDATORY setting for EnsembleStat and GenEnsProd and instead pass mandatory argument to call to find model files so warnings/errors are properly displayed for other inputs

* cleanup

* remove allow missing input logic from ExtractTiles wrapper

* added functions to parse template/dir variables from config, removed explicit calls to read those variables from GridStat

* remove error if more labels than inputs are provided (for UserScript and GridDiag only) -- extra labels will just be ignored

* added required boolean for input templates

* per #2460, change warning messages to debug when checking a list of DA offsets since it is common that a given offset will not always be found in the files

* added tests for missing input logic for many wrappers

* cleanup

* fix increment of number of runs

* skip missing input logic

* change how required is handled for input templates

* warn instead of error if missing input is allowed

* remove increment of missing input counters because it is handled in RuntimeFreq

* check status of input files and increment counters in overridden run_once_per_lead. remove increment of missing input counters because it is handled in run_once_per_lead

* added unit tests for missing input logic

* skip missing input logic

* cleanup

* cleanup, use fixture for tests, add unit tests for missing input, bypass missing input logic on wrappers that don't need it

* removed file that is not needed

* added unit tests for pb2nc to test -valid_beg/end arguments and changes to properly support any runtime frequencies

* warn instead of error if allowing missing inputs

* cleanup

* implement changes to properly support all runtime frequencies for pb2nc. previously all files that match a wildcard will be used instead of selecting only files that fall within the specified time range. some functions moved into pb2nc wrapper will eventually be moved up so that they are used by all wrappers to be consistent

* added unit tests that will fail until wrapper is updated

* replace functions in RuntimeFreq wrapper used to find input files so they can be used by all wrappers, updated ioda2nc wrapper to find input files properly to fix tests

* cleanup

* removed mtd version of get_input_templates and added logic to RuntimeFreq's version to get the same behavior

* added unit tests for MTD missing input checks

* per #2491, add release notes for beta3

* Feature #2491 v6.0.0 beta3 (#2495)

* update version for beta3 release

* fixed typos in release notes

* update version to note development towards beta4 release

* Per suggestion from @JohnHalleyGotway, create intermediate branch for updating truth data to avoid branch protection rules. I added a step to delete the intermediate branch locally if it exists to prevent conflicts with the update

* added quotes to prevent error in echo caused by parenthesis

* fix incorrect command

* Revert "fix incorrect command"

This reverts commit e7dffb6.

* Revert "added quotes to prevent error in echo caused by parenthesis"

This reverts commit c1cb3c4.

* Revert "Per suggestion from @JohnHalleyGotway, create intermediate branch for updating truth data to avoid branch protection rules. I added a step to delete the intermediate branch locally if it exists to prevent conflicts with the update"

This reverts commit 525809d.

* Hotfix: Allow symbolic link to run_metplus.py to run (#2500)

* Adding use case tests

* Changing test environment

* Testing environment changes

* Documentation update

* Updating Documentation

* Updating documentation for disk space failure

* Added new use case category

* Fixing use case test

* Fixing bug in use case file

* Testing s2s after data removal

* add back use cases that were accidentally removed

* fix incorrect use case added

* Setting tests to false for merge

* Removes extraneous imports.

* Switches to function call for the coupling index.

* Correct number of args in comment.

* Testing for old use cases

* Setting tests to false for merge

* update tests to update develop data -- modified commands to create new use case category directory if it does not already exist, move step to remove old data to be completed just after new data is copied to vX.Y

* Summation has to have a dimension supplied for the gridded data, but for pandas the only dimension is time (but it is un-named). Therefore the numerator for the covariance term had to be split out between the fcst and obs case.

* Feature 2463 modify table (#2508)

* creating test dropdown menus

* fixing warnings

* fixing warnings

* fixing warnings 3

* fixing warnings 4

* Attempt to fix documentation errors

* adding 2 more test dropdowns

please note.  There is still a message about 
WARNING: Duplicate explicit target name: "gridstat: cloud fractions with neighborhood and probabilities (pygrib)".
John O will fix this.  I should not touch it.

* fixing spacing

* trying to fix link

* take 2

* Removing double underscores added earlier

* moving dropdown menus

* Adding version to dropdown menu title

* fixing spacing

* dropdowns date util, eofs, h5py

* fixing formatting

* fixing formatting

* Per #2463, adding template for future entries

* adding imageio, lxml & matplotlib

* dropdown up to nc-time-axis

* fixing spacing problems

* Fixing broken s2s links and other incorrect links

* Fixing spelling and capitalization

* Removing the dash in front of 1.4 for nc-time-axis

* Modifying formatting

* adding dropdowns thru pylab

* fixing problems

* dropdowns thru scikit-learn

* fixing spacing

* final dropdowns thru yaml

* fixing spacing

* fixing loose ends

* Per #2463, moving information to an Appendix and adding text and links in an overview

* Per #2463, adding to index.rst

* Per #2463, reworded language and updated Python 3.8 reference

* Per #2463, fixing errors

* Per #2463, made updates based on feedback at the METplus Engineering meeting.

* removing tables, changing most METplus wrappers, version numbers.

* trying to fix met_version

* Per #2463, adding necessary code for substitutions

* Per #2463, fixing syntax error

* adding period

* removing section 1.5

* Per #2463, replace old label reference with new label reference and updated text to reflect the move to drop down menus

* read python version from file to replace in docs

* fixed typo in variable name

* adding python_version to the overview.

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* per #2509, automate MET version used in documentation to be X+6.Y.0 of METplus version

* Bugfix #2520 ASCII2NC file window issue and redundant wrapper initialization (#2522)

* per PyCharm documentation, only ignore workspace.xml idea file and commit the rest of the .idea files to version control

* per #2520, create function to get METplus wrapper class without initializing it and use that function to read list of deprecated env vars to prevent redundant initialization of wrappers that can cause unintended side effects

* handle file_window variables consistently by using CommandBuilder function

* comment out optional config variables that previously caused a failure when unset

* Update update_truth.md

Fix typo in the update_truth issue template in the develop branch.

* Update update_truth.md

Update wording in the update_truth issue template.

* Feature #2530 dev timeline (#2532)

* Per #2530, add a development timeline to the METplus Release Information section of the User's Guide. Also update the Release Guide instructions.

* Per #2530, tweak the wording.

* Update docs/Release_Guide/release_steps/update_release_notes_development.rst

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

* Adds static station lookup file for use with Python embedding for FLUXNET observations.

* Major overhaul to forecast Python embedding script for the TCI use case.

* Major overhaul to observation Python embedding script for the TCI use case, to compute TCI from raw observations rather than read pre-computed TCI.

* Updates documentation file for TCI use case.

* Adds METcalcpy version number.

* Refactors wording and fixes typo.

* Fixes RST formatting.

* Finally fixed RST error.

* Adds support to remove leap days if requested.

* Updates command line args for Python embedding scripts.

* Feature #2537 develop sonarqube_gha (#2541)

* Per #2537, add SonarQube workflow for METplus

* Per #2537, update nightly build email list.

* Per #2537, fix cut/paste error configure_sonarqube.sh

* Per #2537, exclude test code from code coverage statistics.

* Updated conf file for use case.

* Removes new TCI function because it is in METcalcpy now.

* Removes old code, somsome reorganization and clarification and setting of params, and also switches the fluxnet metadata file to a command line argument instead of an environment variable.

* Update the 6.0.0 Coordinated Release development timeline in release-notes.rst

* Support for environment variables or default options for filtering and filename patterns, DEBUG mode added and set to False by default, adjustment of print statements for logging, and refactoring filtering of stations to ensure we don't process a file that we shouldn't by better coupling of filenames and stations.

* Makes DEBUG an env var for config via metplus wrappers.

* Reorganization of config file, adds environment variables, and updates comments for use case changes.

* Updates to documentation.

* Fixes tables.

* Adds table of contents to the top for users to click on.

* Updates use case documentation file.

* Updated config file with obs and fcst subirectories in the path.

* Added optional key/value to use_case_groups.json to prevent a use case group from running to easily disable it temporarily. Disable short_range:14 use case until it can be fixed with #2551

* update pillow version based on recommendation from dependabot: https://github.com/dtcenter/METplus/security/dependabot/5

* Switches to using metplotpy_env to get metcalcpy dependency.

* Adds filtering based on missing data values.

* Finishing touches to debug statements for testing.

* Fixing a few minor code smells from last week.

* update link to METplus Components Python Requirements table in PR template

* Update docs/use_cases/model_applications/land_surface/PointStat_fcstCESM_obsFLUXNET2015_TCI.py

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #2555 v6.0.0 beta4 (#2556)

* update version for beta4 release

* added release notes for beta4 release

* update version for development towards beta5 release

* update location of METviewer docker-compose.yml file that moved from PR dtcenter/METviewer#525

* Feature #2537 develop single_sq_project (#2558)

* Update the beta4 release date wording

* Feature #2433 Ugrid config variables in GridStat/PointStat (#2517)

* update version for release

* added new use case that was missing

* Bugfix #2279 main_v5.1 - buoy station file from 2022 (#2281)

* Fix typo in pull_request_template.md

* added notes to make it clear that upgrade instructions are not needed if upgrading from 5.0 to 5.1

* New issue template: Update Truth (#2332)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
(cherry picked from commit 44335f3)

* add GitHub Actions workflow that is used to create Docker images that hold the conda environment used for the automated tests -- adding this to the default main_v5.1 branch so that it will become available to run for other branches as a workflow_dispatch workflow

* Per #2433, added support for setting the ugrid MET config variables for GridStat and PointStat wrappers. Also moved the seeps variable up so that it matches the order of the default config files in the MET repo

* add argument to workflow dispatch event so that MET DockerHub repo used for tests can be easily overridden to test changes in a MET PR before merging

* Feature dtcenter/MET#2796 main_v5.1 GHA Node20 deprecation warnings (#2474)

* per dtcenter/MET#2796, update versions of actions to prevent deprecated node warnings in GHA runs - main_v5.1

* fix ReadTheDocs requirements to include pillow which is a dependency of sphinx-gallery: see https://blog.readthedocs.com/defaulting-latest-build-tools/ for more info on why this was necessary

* install python packages via apk instead of pip to prevent GHA failures that were fixed in develop but not in main_v5.1

* per dtcenter/MET#2796, fix error log merging for main_v5.1 same as develop

* Bump pillow from 10.0.1 to 10.2.0 in /docs (#2477)

Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](python-pillow/Pillow@10.0.1...10.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Create 5.1.0_casper

* per #2433, add support for setting the optional -config argument for a ugrid config file for PointStat and GridStat. Also moved the optional arguments to be added to the command after all of the required arguments so the command is easier to read

* per #2433 and discussion on meeting 3/21/2024, change command line argument from -config to -ugrid_config

* update unit tests to check for new command line argument name -ugrid_config

* Updates information about GDAS surface winds having a QC value that is above the default settings in the PB2NC config file.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>

* SonarQube add python code coverage report (#2565)

* run code coverage before SonarQube scan

* generate xml report and configure SQ to read coverage.xml

* exclude more files from code coverage report

* exclude more files that should not be included in the code coverage report

* more changes to code coverage exclude list

* removed bad characters accidentally added

* exclude cyclone plotter wrapper because it is excluded from code coverage report

* ignore SonarQube lint files generated by PyCharm

* Updating MTD conv radius/thresh description (#2566)

* Updating MTD conv radius/thresh description

* Update glossary.rst

* Update docs/Users_Guide/glossary.rst

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Update docs/Users_Guide/glossary.rst

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature update modulefiles (#2564)

* Adding 6.0.0 file for derecho and removing 5.1.0 file for cheyenne

* Updating modulefiles

* Updating orion file

* Adding file for hercules

* Adding file for casper

* Update internal/scripts/installation/modulefiles/6.0.0_casper

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #1989: Add OMI to Verification Datasets Guide (#2585)

Refs: #1989

* Feature #2479 time_offset_warning (#2587)

* Per #2479, add support for setting time_offset_warning in all wrapped MET config files

* Per #2479, add documentation and examples to basic use case param files for time_offset_warning

* Feature 2346 develop update templates (#2589)

* Per #2346, modifying issue templates

* Per #2346, modifying pull request template

* Per #2346, modifying entries based on suggestions by @georgemccabe

* Bugfix #2567 PointStat multiple point observation files (#2582)

* per #2567, properly pass multiple point observation files to point_stat using the -point_obs argument

* per #2567, fix bug that caused file window logic to fail

* Revert "per #2567, fix bug that caused file window logic to fail"

This reverts commit 27fe822.

* per #2567, fix bug that caused file window logic to fail

* Feature #1514 MADIS2NC wrapper (#2591)

* Per #1514, implement MADIS2NC wrapper and added example use case. Also updated the function to handle the time_summary dictionary in MET config files to support names that exactly match the name found in the dictionary, e.g. ASCII2NC_TIME_SUMMARY_OBS_VAR sets time_summary.obs_var (previously only ASCII2NC_TIME_SUMMARY_VAR_NAMES was supported and is still supported)

* remove execute permissions from image files

* Per #1514, add image for basic use case

* removed large image files that are no longer being used in documentation

* add support for time_offset_warning for MADIS2NC wrapper after the PR to add that support for other wrappers has been merged into develop

* report error if output template is not defined

* update contributor's guide with more up-to-date info on how to create a new wrapper and basic components of wrappers

* fix warnings in documentation

* fix formatting issues

* Per #1514, add new basic use case to automated test suite

* add step to comment out version number in wrapped MET config file

* turn off use case to prepare for PR

* added a pytest fixture to handle comparison of use case commands and environment variable values to remove a lot of redundant logic in each wrapper test. Added fake madis data

* removed commented code

* properly substitute template tags in all command line arguments

* properly handle unset rec_beg and rec_end to prevent missing value from being added to command lien arg

* added new madis2nc use case to existing met_tool_wrapper and temporarily disabled land_surface:0 until we can resolve the differences

* Feature 2346 develop update templates (#2594)

* Per #2346, modifying issue templates

* Per #2346, modifying pull request template

* Per #2346, modifying entries based on suggestions by @georgemccabe

* Per 2346, making updates based on feedback at last MET Eng. Meeting

* Enhance update truth data workflow to create a uniquely named branch to update *-ref branches and commit/append to a log file that tracks the reasons for updating the truth data. This is done to ensure that the *-ref branch testing workflow run that actually updates the truth data is always run even if there are no other changes to the METplus branch since the last update, e.g. when a change to another component like MET warrants the truth data update

* git add change log file in case it doesn't already exist

* added entry to update truth change log: develop dtcenter/MET#2892 and dtcenter/MET#2899

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: Jonathan Vigh <jvigh@ucar.edu>
Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com>
Co-authored-by: John Sharples <41682323+John-Sharples@users.noreply.github.com>
Co-authored-by: root <root@localhost>
Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com>
Co-authored-by: Dan Adriaansen <dadriaan@ucar.edu>
Co-authored-by: jprestop <jpresto@ucar.edu>
Co-authored-by: Hank Fisher <fisherh@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: j-opatz <59586397+j-opatz@users.noreply.github.com>
Co-authored-by: reza-armuei <144857501+reza-armuei@users.noreply.github.com>
Co-authored-by: Tracy Hertneky <39317287+hertneky@users.noreply.github.com>
Co-authored-by: Tracy <tracy.hertneky@noaa.gov>
Co-authored-by: Mallory Row <mallory.row@noaa.gov>
Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: bikegeek <3753118+bikegeek@users.noreply.github.com>
Co-authored-by: Christina Kalb <kalb@ucar.edu>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
JohnHalleyGotway added a commit that referenced this pull request May 23, 2024
* 2673 Moved dvariable declaration after include

* #2673 Move down namespace below include

* Feature #2395 wdir (#2820)

* Per #2395, add new columns to VL1L2, VAL1L2, and VCNT line types for wind direction statistics. Work still in progress.

* Per #2395, write the new VCNT columns to the output and document the additions to the VL1L2, VAL1L2, and VCNT columns.

* Per #2395, add the definition of new statistics to Appendix G.

* Per #2395, update file version history.

* Per #2395, tweak warning message about zero wind vectors and update grid-stat and point-stat to log calls to the do_vl1l2() function.

* Per #2395, refine the weights for wind direction stats, ignoring the undefined directions.

* Update src/tools/core/stat_analysis/aggr_stat_line.cc

* Update src/tools/core/stat_analysis/parse_stat_line.cc

* Update src/tools/core/stat_analysis/aggr_stat_line.cc

* Recent changes to branch protection rules for the develop branch have broken the logic of the update_truth.yml GHA workflow. Instead of submitting a PR to merge develop into develop-ref directly, use an intermediate update_truth_for_develop branch.

* Feature #2280 ens_prob (#2823)

* Per #2280, update to support probability threshold strings like ==8, where 8 is the number of ensemble members, to create probability bins centered on the n/8 for n = 0 ... 8.

* Per #2280, update docs about probability threshold settings.

* Per #2280, use a loose tolerance when checking for consistent bin widths.

* Per #2280, add a new unit test for grid_stat to demonstrate processing the output from gen_ens_prod.

* Per #2280, when verifying NMEP probability forecasts, smooth the obs data first.

* Per #2280, only request STAT output for the PCT line type to match unit_grid_stat.xml and minimize the new output files.

* Per #2280, update config option docs.

* Per #2280, update config option docs.

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 restored return statement

* #2673 Added std namespace

* #2673 Moved down 'using namespace' statement. Removed trailing spaces

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Added std namespace

* #2673 Added std namespace

* #2673 Added std namespace

* #2673 Changed literal 1 to boolean value, true

* Feature #2673 enum_to_string (#2835)

* Feature #2583 ecnt (#2825)

* Unrelated to #2583, fix typo in code comments.

* Per #2583, add hooks write 3 new ECNT columns for observation error data.

* Per #2583, make error messages about mis-matched array lengths more informative.

* Per #2583, switch to more concise variable naming conventions of ign_oerr_cnv, ign_oerr_cor, and dawid_seb.

* Per #2583, fix typo to enable compilation

* Per #2583, define the 5 new ECNT column names.

* Per #2583, add 5 new columns to the ECNT table in the Ensemble-Stat chapter

* Per #2583, update stat_columns.cc to write these 5 new ECNT columns

* Per #2583, update ECNTInfo class to compute the 5 new ECNT statistics.

* Per #2583, update stat-analysis to parse the 5 new ECNT columns.

* Per #2583, update aggregate_stat logic for 5 new ECNT columns.

* Per #2583, update PairDataEnsemble logic for 5 new ECNT columns

* Per #2583, update vx_statistics library with obs_error handling logic for the 5 new ECNT columns

* Per #2583, changes to make it compile

* Per #2583, changes to make it compile

* Per #2583, switch to a consistent ECNT column naming convention with OERR at the end. Using IGN_CONV_OERR and IGN_CORR_OERR.

* Per #2583, define ObsErrorEntry::variance() with a call to the dist_var() utility function.

* Per #2583, update PairDataEnsemble::compute_pair_vals() to compute the 5 new stats with the correct inputs.

* Per #2583, add DEBUG(10) log messages about computing these new stats.

* Per #2583, update Stat-Analysis to compute these 5 new stats from the ORANK line type.

* Per #2583, whitespace and comments.

* Per #2583, update the User's Guide.

* Per #2583, remove the DS_ADD_OERR and DS_MULT_OERR ECNT columns and rename DS_OERR as DSS, since observation error is not actually involved in its computation.

* Per #2583, minor update to Appendix C

* Per #2583, rename ECNT line type statistic DSS to IDSS.

* Per #2583, fix a couple of typos

* Per #2583, more error checking.

* Per #2583, remove the ECNT IDSS column since its just 2*pi*IGN, the existing ignorance score, and only provides meaningful information when combined with the other Dawid-Sebastiani statistics that have already been removed.

* Per #2583, add Eric's documentation of these new stats to Appendix C. Along the way, update the DOI links in the references based on this APA style guide: https://apastyle.apa.org/style-grammar-guidelines/references/dois-urls#:~:text=Include%20a%20DOI%20for%20all,URL%2C%20include%20only%20the%20DOI.

* Per #2583, fix new equations with embedded underscores for PDF by defining both html and pdf formatting options.

* Per #2583, update the ign_conv_oerr equation to include a 2
*pi multiplier for consistency with the existing ignorance score. Also, fix the documented equations.

* Per #2583, remove log file that was inadvertently added on this branch.

* Per #2583, simplify ObsErrorEntry::variance() implementation. For the distribution type of NONE, return a variance of 0.0 rather than bad data, as discussed with @michelleharrold and @JeffBeck-NOAA on 3/8/2024.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Revert #2825 since more documentation and testing is needed (#2837)

This reverts commit 108a895.

* Feature #2583 ecnt fix IGN_OERR_CORR (#2838)

* Unrelated to #2583, fix typo in code comments.

* Per #2583, add hooks write 3 new ECNT columns for observation error data.

* Per #2583, make error messages about mis-matched array lengths more informative.

* Per #2583, switch to more concise variable naming conventions of ign_oerr_cnv, ign_oerr_cor, and dawid_seb.

* Per #2583, fix typo to enable compilation

* Per #2583, define the 5 new ECNT column names.

* Per #2583, add 5 new columns to the ECNT table in the Ensemble-Stat chapter

* Per #2583, update stat_columns.cc to write these 5 new ECNT columns

* Per #2583, update ECNTInfo class to compute the 5 new ECNT statistics.

* Per #2583, update stat-analysis to parse the 5 new ECNT columns.

* Per #2583, update aggregate_stat logic for 5 new ECNT columns.

* Per #2583, update PairDataEnsemble logic for 5 new ECNT columns

* Per #2583, update vx_statistics library with obs_error handling logic for the 5 new ECNT columns

* Per #2583, changes to make it compile

* Per #2583, changes to make it compile

* Per #2583, switch to a consistent ECNT column naming convention with OERR at the end. Using IGN_CONV_OERR and IGN_CORR_OERR.

* Per #2583, define ObsErrorEntry::variance() with a call to the dist_var() utility function.

* Per #2583, update PairDataEnsemble::compute_pair_vals() to compute the 5 new stats with the correct inputs.

* Per #2583, add DEBUG(10) log messages about computing these new stats.

* Per #2583, update Stat-Analysis to compute these 5 new stats from the ORANK line type.

* Per #2583, whitespace and comments.

* Per #2583, update the User's Guide.

* Per #2583, remove the DS_ADD_OERR and DS_MULT_OERR ECNT columns and rename DS_OERR as DSS, since observation error is not actually involved in its computation.

* Per #2583, minor update to Appendix C

* Per #2583, rename ECNT line type statistic DSS to IDSS.

* Per #2583, fix a couple of typos

* Per #2583, more error checking.

* Per #2583, remove the ECNT IDSS column since its just 2*pi*IGN, the existing ignorance score, and only provides meaningful information when combined with the other Dawid-Sebastiani statistics that have already been removed.

* Per #2583, add Eric's documentation of these new stats to Appendix C. Along the way, update the DOI links in the references based on this APA style guide: https://apastyle.apa.org/style-grammar-guidelines/references/dois-urls#:~:text=Include%20a%20DOI%20for%20all,URL%2C%20include%20only%20the%20DOI.

* Per #2583, fix new equations with embedded underscores for PDF by defining both html and pdf formatting options.

* Per #2583, update the ign_conv_oerr equation to include a 2
*pi multiplier for consistency with the existing ignorance score. Also, fix the documented equations.

* Per #2583, remove log file that was inadvertently added on this branch.

* Per #2583, simplify ObsErrorEntry::variance() implementation. For the distribution type of NONE, return a variance of 0.0 rather than bad data, as discussed with @michelleharrold and @JeffBeck-NOAA on 3/8/2024.

* Per #2583, updates to ensemble-stat.rst recommended by @michelleharrold and @JeffBeck-NOAA.

* Per #2583, implement changes to the IGN_CORR_OERR corrected as directed by @ericgilleland.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Update the pull request template to include a question about expected impacts to existing METplus Use Cases.

* #2830 Changed enum Builtin to enum class

* #2830 Converted enum to enum class at config_constants.h

* Feature #2830 bootstrap enum (#2843)

* Bugfix #2833 develop azimuth (#2840)

* Per #2833, fix n-1 bug when defining the azimuth delta for range/azimuth grids.

* Per #2833, when definng TcrmwData:range_max_km, divide by n_range - 1 since the range values start at 0.

* Per #2833, remove max_range_km from the TC-RMW config file. Set the default rmw_scale to NA so that its not used by default. And update the documentation. Still actually need to make the logic of the code work as it should.

* Per #2833, update tc_rmw to define the range as either a function of rmw or using explicit spacing in km.

* Per #2833, update the TCRMW Config files to remove the max_range_km entry, and update the unit test for one call to use RMW ranges and the other to use ranges defined in kilometers.

* Per #2833, just correct code comments.

* Per #2833, divide by n - 1 when computing the range delta, rather than n.

* Per #2833, correct the handling of the maximum range in the tc-rmw tool. For fixed delta km, need to define the max range when setting up the grid at the beginning.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* #2830 Changed enum PadSize to enum class

* #2830 Removed redundant parantheses

* #2830 Removed commenyted out code

* #2830 Use auto

* #2830 Changed enum to enum class for DistType, InterpMthd, GridTemplates, and NormalizeType

* #2830 Moved enum_class_as_integer from header file to cc files

* #2830 Added enum_as_int.hpp

* #2830 Added enum_as_int.hpp

* Deleted enum_class_as_integer and renamed it to enum_class_as_int

* Removed redundant paranthese

* #2830 Changed enum to enumclass

* #2830 Changed enum_class_as_integer to enum_class_as_int

* Feature #2379 sonarqube gha (#2847)

* Per #2379, testing initial GHA SonarQube setup.

* Per #2379, switch to only analyzing the src directory.

* Per #2379, move more config logic from sonar-project.properties into the workflow. #ci-skip-all

* Per #2379, try removing + symbols

* Per #2379, move projectKey into xml workflow and remove sonar-project.properties.

* Per #2379, try following the instructions at https://github.com/sonarsource-cfamily-examples/linux-autotools-gh-actions-sq/blob/main/.github/workflows/build.yml ci-skip-all

* Per #2379, see details of progress described in this issue comment: #2379 (comment)

* Unrelated to #2379, just removing spurious space that gets flagged as a diff when re-running enum_to_string on seneca.

* Per #2379, try running SonarQube through GitHub.

* Per #2379, remove empty env section and also disable the testing workflow temporarily during sonarqube development.

* Per #2379, fix docker image name.

* Per #2379, delete unneeded script.

* Per #2379, update GHA to scan Python code and push to the correct SonarQube projects.

* Per #2379, update GHA SonarQube project names

* Per #2379, update the build job name

* Per #2379, update the comile step name

* Per #2379, switch to consistent SONAR variable names.

* Per #2379, fix type in sed expressions.

* Per #2379, just rename the log artifact

* Per #2379, use time_command wrapper instead of run_command.

* Per #2379, fix bad env var name

* Per #2379, switch from egrep to grep.

* Per #2379, just try cat-ting the logfile

* Per #2379, test whether cat-ting the log file actually works.

* Per #2379, revert back

* Per #2379, mention SonarQube in the PR template. Make workflow name more succinct.

* Per #2379, add SONAR_REFERENCE_BRANCH setting to define the sonar.newCode.referenceBranch property. The goal is to define the comparison reference branch for each SonarQube scan.

* Per #2379, have the sonarqube.yml job print the reference branch it's using

* Per #2379, intentionally introduce a new code smell to see if SonarQube correctly flag it as appearing in new code.

* Per #2379, trying adding the SonarQube quality gate check.

* Per #2379, add logic for using the report-task.txt output files to check the quality gate status for both the python and cxx scans.

* Per #2379 must use unique GHA id's

* Per #2379, working on syntax for quality gate checks

* Per #2379, try again.

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try yet again

* Per #2379

* Per #2379, add more debug

* Per #2379, remove -it option from docker run commands

* Per #2379, again

* Per #2379, now that the scan works as expected, remove the intentional SonarQube code smell as well as debug logging.

* Hotfix related to #2379. The sonar.newCode.referenceBranch and sonar.branch.name cannot be set to the same string! Only add the newCode definition when they differ.

* #2830 Changed enum STATJobType to enum class

* #2830 Changed STATLineType to enum class

* #2830 Changed Action to enum class

* #2830 Changed ModeDataType to enum class

* #2830 Changed StepCase to enum class

* #2830 Changed enum to enum class

* #2830 Changed GenesisPairCategory to enum class

* #2830 Removed rediundabt parenrthese

* #2830 Reduced same if checking

* #2830 Cleanup

* #2830 USe empty() instead of lebgth checking

* #2830 Adjusted indentations

* Feature #2379 develop sonarqube updates (#2850)

* Per #2379, move rgb2ctable.py into the python utility scripts directory for better organization and to enable convenient SonarQube scanning.

* Per #2379, remove point.py from the vx_python3_utils directory which cleary was inadvertenlty added during development 4 years ago. As far as I can tell it isn't being called by any other code and doesn't belong in the repository. Note that scripts/python/met/point.py has the same name but is entirely different.

* Per #2379, update the GHA SonarQube scan to do a single one with Python and C++ combined. The nightly build script is still doing 2 separate scans for now. If this all works well, they could also be combined into a single one.

* Per #2379, eliminate MET_CONFIG_OPTIONS from the SonarQube workflow since it doesn't need to be and probably shouldn't be configurable.

* Per #2379, trying to copy report-task.txt out of the image

* Per #2379, update build_met_sonarqube.sh to check the scan return status

* Per #2379, fix bash assignment syntax

* Per #2379, remove unused SCRIPT_DIR envvar

* Per #2379, switch to a single SonarQube scan for MET's nightly build as well

* Feature 2654 ascii2nc polar buoy support (#2846)

* Added iabp data type, and modified file_handler to filter based on time range, which was added as a command line option

* handle time using input year, hour, min, and doy

* cleanup and switch to position day of year for time computations

* Added an ascii2nc unit test for iabp data

* Added utility scripts to pull iabp data from the web and find files in a time range

* Modified iabp_handler to always output a placeholder 'location' observation with value 1

* added description of IABP data python utility scripts

* Fixed syntax error

* Fixed Another syntax error.

* Slight reformat of documentation

* Per #2654, update the Makefiles in scripts/python/utility to include all the python scripts that should be installed.

* Per #2654, remove unused code from get_iabp_from_web.py that is getting flagged as a bug by SonarQube.

* Per #2654, fix typo in docs

---------

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Feature #2786 rpss_from_prob (#2861)

* Per #2786, small change to a an error message unrelated to this development.

* Per #2786, add RPSInfo::set_climo_prob() function to derive the RPS line type from climatology probability bins. And update Ensemble-Stat to call it.

* Per #2786, minor change to clarify error log message.

* Per #2786, for is_prob = TRUE input, the RPS line type is the only output option. Still need to update docs!

* Per #2786, add new call to Ensemble-Stat to test computing RPS from climo probabilities

* Per #2786, use name rps_climo_bin_prob to be very explicit.

* Per #2786, redefine logic of RPSInfo::set_climo_bin_prob() to match the CPC definition. Note that reliability, resolution, uncertainty, and RPSS based on the sample climatology are all set to bad data. Need to investigate whether they can be computed using these inputs.

* Per #2786, remove the requirement that any fcst.prob_cat_thresh thresholds must be defined. If they are defined, pass them through to the FCST_THRESH output column. If not, write NA. Add check to make sure the event occurs in exactly 1 category.

* Per #2786, don't enforce fcst.prob_cat_thresh == obs.prob_cat_thresh for probabilistic inputs. And add more is_prob checks so that only the RPS line type can be written when given probabilistic inputs.

* updated documentation

* Per #2786, call rescale_probability() function to convert from 0-100 probs to 0-1 probs.

---------

Co-authored-by: j-opatz <jopatz@ucar.edu>

* Feature #2862 v12.0.0-beta4 (#2864)

* Feature #2379 develop single_sq_project (#2865)

* Hotfix to the documentation in the develop branch. Issue #2858 was closed as a duplicate of #2857. I had included it in the MET-12.0.0-beta4 release notes, but the work is not yet actually complete.

* Feature 2842 ugrid config (#2852)

* #2842 Removed UGrid related setting

* #2842 Corrected vertical level for data_plane_array

* #2842 Do not allow the time range

* #2842 The UGridConfig file can be passed as ugrid_dataset

* #2842 Changed -config option to -ugrid_config

* #2842 Deleted UGrid configurations

* 2842 Fix a compile error when UGrid is disabled

* #2842 Cleanup

* #2842 Added an unittest point_stat_ugrid_mpas_config

* #2842 Added a PointStatConfig without UGrid dataset.

* #2842 Corrected ty[po at the variable name

* Switched from time_centered to time_instant. I think time_centered is the center of the forecast lead window and time_instant is the time the forecast is valid (end of forecast window).

* #2842 Removed ugrid_max_distance_km and unused metadata names

* #2842 Restored time variable time_instant for LFric

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjusted lon to between -180 to 180

* #2842 Changed variable names

* Per #2842, switch from degrees east to west right when the longitudes are read.

* #2842, switch from degrees east to west right when the longitudes are read

* #2842 Cleanup debug messages

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature 2753 comp script config (#2868)

* set dynamic library file extension to .dylib if running on MacOS and .so otherwise

* Added disabling of jasper documentation for compiliation on Hera

* Updated

* remove extra export of compiler env vars

* include full path to log file so it is easier to file the log file to examine when a command fails

* send cmake output to a log file

* remove redundant semi-colon

* use full path to log file so it is easier to examine on failure

* use run_cmd to catch if rm command fails

* Modifications for compilation on hera, gaea, and orion

* Updating

* fixed variable name

* clean up if/else statements

* set TIFF_LIBRARY_RELEASE argument to use full path to dynamic library file to prevent failure installing proj library

* set LDFLAGS so that LDFLAGS value set in the user's environment will also be used

* Updated based on gaea, orion, and hera installs

* Updated

* change extension of dynamic library files only if architecture is arm64 because older Macs still use .so

* added netcdf library to args to prevent error installing NetCDF-CXX when PROJ has been installed in the same run of the script -- PATH is set in the COMPILE_PROJ if block that causes this flag from being added automatically

* clean up how rpath and -L are added to LDFLAGS so that each entry is separate -- prevents errors installing on Mac arm64 because multiple rpath values aren't read using :. Also use MET_PROJLIB

* Updated

* removed -ltiff from MET libs

* only add path to rpath and -L arguments if they are not already included in LDFLAGS

* changed from using LIB_TIFF (full path to tiff lib file) to use TIFF_LIB_DIR (dir containing tiff lib file). Added TIFF_INCLUDE_DIR to proj compilation and -DJAS_ENABLE_DOC to jasper compliation taken from @jprestop branch

* update comments

* ensure all MET_* and MET_*LIB variables are added to the rpath for consistency

* remove unnecessary if block and only export LDFLAGS at the end of setting locally

* Updated

* Added section for adding <VALUE>/lib64 and rearranged placement of ADDTL_DIR

* Commenting out the running of the Jasper lib tests

* Updating and/or removing files

* Updating and/or removing files

* Latest udpates which include the addition of the tiff library for proj

* Remove commented out line.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Per 2753, added -lm to configure_lib_args for NetCDF-CXX

* Per #2753 updating acorn files

* Per #2753, update wcoss2 files

* Per #2753, updating acorn file to include MET_PYTHON_EXE

* Per #2753, updated files for 12.0.0 for derecho

* Per #2753, updated derecho file adding MET_PYTHON_EXE and made corrections

* Updating config files

* Updating orion files

* Updates for gaea's files

* Updating gaea modulefile

* Removing modulefile for cheyenne

* Added MET_PYTHON_EXE

* Added MET_PYTHON_EXE to hera too

* Adding file for hercules

* Removing equals sign from setenv

* Adding file for hercules

* Updated script to add libjpeg installation for grib2c

* Per #2753, Adding file for casper

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature #2795 level_mismatch_warning (#2873)

* Per #2795, move the warning message about level mismatch from the config validation step to when the forecast files are being processed. Only check this when the number of forecast fields is greater than 1, but no longer limit the check to pressure levels only.

* Per #2795, add comments

* Whitespace

* Per #2795, port level mismatch fix over to Ensemble-Stat. Check it for each verification task, but only print it once for each task, rather than once for each task * ensemble member.

* Feature #2870 removing_MISSING_warning (#2872)

* Per #2870, define utility functions for parsing the file type from a file list and for logging missing files, checking for the MISSING keyword. Also, update Ensemble-Stat and Gen-Ens-Prod to call these functions.

* Per #2870, update the gen_ens_prod tests to demonstrate the use of the MISSING keyword for missing files. METplus uses this keyword for Ensemble-Stat and Gen-Ens-Prod.

* Feature 2842 ugrid config (#2875)

* #2842 Removed UGrid related setting

* #2842 Corrected vertical level for data_plane_array

* #2842 Do not allow the time range

* #2842 The UGridConfig file can be passed as ugrid_dataset

* #2842 Changed -config option to -ugrid_config

* #2842 Deleted UGrid configurations

* 2842 Fix a compile error when UGrid is disabled

* #2842 Cleanup

* #2842 Added an unittest point_stat_ugrid_mpas_config

* #2842 Added a PointStatConfig without UGrid dataset.

* #2842 Corrected ty[po at the variable name

* Switched from time_centered to time_instant. I think time_centered is the center of the forecast lead window and time_instant is the time the forecast is valid (end of forecast window).

* #2842 Removed ugrid_max_distance_km and unused metadata names

* #2842 Restored time variable time_instant for LFric

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjusted lon to between -180 to 180

* #2842 Changed variable names

* Per #2842, switch from degrees east to west right when the longitudes are read.

* #2842, switch from degrees east to west right when the longitudes are read

* #2842 Cleanup debug messages

* #2842 Disabled output types except STAT for sl1l2

* #2842 Disabled output types except STAT for sl1l2 and MPR

* #2842 Reduced output files for UGrid

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Hotfix to develop branch to remove duplicate test named 'point_stat_ugrid_mpas_config'. That was causing unit_ugrid.xml to fail because it was still looking for .txt output files that are no longer being generated.

* Feature 2748 document ugrid (#2869)

* Initial documentation of the UGRID capability.

* Fixes error in references, adds appendix to index, and adds sub-section for configuration entries and a table for metadata map items.

* Corrects LFRic, rewords section on UGRID conventions, updates description of using GridStat, and removes mention of nodes.

* Forgot one more mention of UGRID conventions.

* Incorporates more suggestions from @willmayfield.

* Switches to numerical table reference.

* Feature #2781 Convert MET NetCDF point obs to Pandas DataFrame (#2877)

* Per #2781, added function to convert MET NetCDF point observation data to pandas so it can be read and modified in a python embedding script. Added example python embedding script

* ignore python cache files

* fixed function call

* reduce cognitive complexity to satisfy SonarQube and add boolean return value to catch if function fails to read data

* clean up script and add comments

* replace call to object function that doesn't exist, handle exception when file passed to script cannot be read by the NetCDF library

* rename example script

* add new example script to makefiles

* fix logic to build pandas DataFrame to properly get header information from observation header IDs

* Per #2781, add unit test to demonstrate python embedding script that reads MET NetCDF point observation file and converts it to a pandas DataFrame

* Per #2781, added init function for nc_point_obs to take an input filename. Also raise TypeError exception from nc_point_obs.read_data() if input file cannot be read

* call parent class init function to properly initialize nc_point_obs

* Feature #2833 pcp_combine_missing (#2886)

* Per #2883, add -input_thresh command line option to configure allowable missing input files.

* Per #2883, update pcp_combine usage statement.

* Per #2883, update existing pcp_combine -derive unit test example by adding 3 new missing file inputs at the beginning, middle, and end of the file list. The first two are ignored since they include the MISSING keyword, but the third without that keyword triggers a warning message as desired. The -input_thresh option is added to only require 70% of the input files be present. This should produce the exact same output data.

* Per #2883, update the pcp_combine logic for the sum command to allow missing data files based on the -input_thresh threshold. Add a test in unit_pcp_combine.xml to demonstrate.

* Update docs/Users_Guide/reformat_grid.rst

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Per #2883, update pcp_combine usage statement in the code to be more simliar to the User's Guide.

* Per #2883, switch to using derive_file_list_missing as the one containing missing files and recreate derive_file_list as it had existed for the test named pcp_combine_derive_VLD_THRESH.

* Per #2883, move initialization inside the same loop to resolve SonarQube issues.

* Per #2883, update sum_data_files() to switch from allocating memory to using STL vectors to satisfy SonarQube.

* Per #2883, changes to declarations of variables to satisfy SonarQube.

* Per #2883, address more SonarQube issues

* Per #2883, backing out an unintended change I made to tcrmw_grid.cc. This change belongs on a different branch.

* Per #2883, update logic of parse_file_list_type() function to handle python input strings. Also update pcp_combine to parse the type of input files being read and log non-missing python input files expected.

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Per #2888, update STATAnalysisJob::dump_stat_line() to support dumping stat line types VCNT, RPS, DMAP, and SSIDX. (#2891)

* Per #2659, making updates as proposed at the 20240516 MET Eng. Mtg. (#2895)

* Feature #2395 TOTAL_DIR (#2892)

* Per #2395, remove the n_dir_undef and n_dira_undef variables that are superceded by the new dcount and dacount VL1L2Info members to keep track of the number of valid wind direction vectors.

* Per #2395, add TOTAL_DIR columns to the VL1L2, VAL1L2, and VCNT line types and update the header column tables.

* Per #2395, update the User's Guide to list the new TOTAL_DIR columns in the VL1L2, VAL1L2, and VCNT line types.

* Per #2395, update stat_analysis to parse the new TOTAL_DIR columns and use the values to aggregate results when needed.

* Per #2395, for SonarQube change 'const char *' to 'const char * const' to satisfy the finding that 'Global variables should be const.' Should probably switch from 'char char *' to strings eventually. But for now, I'm just making up for some SonarQube technical debt.

* Per #2395, fix typo in placement of the DIR_ME column name in the met_header_columns_V12.0.txt file

* Per #2395, add 2 new Stat-Analysis jobs to demonstrate the processing of VL1L2 lines.

* Per #2395, update logic of is_vector_dir_stat(). Instead of just checking 'DIR_', check 'DIR_ME', 'DIR_MAE', and 'DIR_MSE' to avoid an false positive match for the 'DIR_ERR' column which is computed from the vector partial sums rather than the individual direction differences.

* Bugfix #2897 develop python_valid_time (#2899)

* Per #2897, fix typos in 2 log messages. Also fix the bug in storing the valid time strings. The time string in vld_array should exactly correspond to the numeric unixtime values in vld_num_array. Therefore they need to be updated inside the same if block. The bug is that we were storing only the unique unixtime values but storing ALL of the valid time string, not just the unique ones.

* Per #2897, minor change to formatting of log message

* MET #2897, don’t waste time searching, just set the index to n - 1

* Per #2897, remove unused add_prec_point_obs(...) function

* Per #2897, update add_point_obs(...) logic for DEBUG(9) to print very detailed log messages about what obs are being rejected and which are being used for each verification task.

* Per #2897, refine the 'using' log message to make the wording consistent with the summary rejection reason counts log message

* Per #2897, update the User's Guide about -v 9 for Point-Stat

---------

Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Bugfix 2867 point2grid qc flag (#2890)

* #2867 Added compute_adp_qc_flag and adjusted ADP QC flags

* #2867 Added point2grid_GOES_16_ADP_Enterprise_high. Changed AOD QC flags to 0,1,2 (was 1,2,3)

* #2867 Added get_nc_att_values_

* #2867 Added get_nc_att_values. Added the argument allow_conversion to get_nc_data(netCDF::NcVar *, uchar  *data)

* #2867 Read the ADP QC flag values and meanings attributes from DQF variable and set the QC high, meduium, low values to support Enterprise algorithm. Adjusted the ADP QC values by using AOD qc values

* #2867 Cleanup

* #2867 Corrected indent

* #2867 Changed log message

* #2867 Removed unused argument

* #2867 Removed unused argument

* Cleanup

* #2867 Fix SonarQube findings

* #2867 Deleted protected section with no members

* #2867 Cleanup

* #2867 FIxed SonarQube findings; unused local variables, decalare as const, etc

* #2867 MOved include directives to top

* #2867 Changed some argumenmt with references to avoid copying objects

* #2867 Do not filter by QC flag if -qc is not given

* #2867 Use enumj class for GOES QC: HIGH, MEDIUM, and LOW

* #2867 Added log message back which were deleted accidently

* #2867 Chaned statci const to constexpr

* #2867 Initial release. Separated from nc_utils.h

* @2867 Added nc_utils_core.h

* #2867 Moved some blocks to nc_utils_core.h

* #2867 Include nc_utils_core.h

* #2867 Added const references

* Per #2867, fixing typo in comments.

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: j-opatz <jopatz@ucar.edu>

* Hotfix to develop to fix the update_truth.yml workflow logic. This testing workflow run failed (https://github.com/dtcenter/MET/actions/runs/9209471209). Here we switch to a unique update truth branch name to avoid conflicts.

* Avoid pushing directly to the develop or main_vX.Y branches since that is not necessary for the automation logic in MET.

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: Howard Soh <hsoh@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>
Co-authored-by: davidalbo <dave@ucar.edu>
Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com>
georgemccabe added a commit to dtcenter/METplus that referenced this pull request May 23, 2024
… Embedding in PointStat and EnsembleStat, which should fix the PBL use case -- #2246 -- so turned on diff test for PBL use case to ensure that results are consistent going forward
georgemccabe added a commit to dtcenter/METplus that referenced this pull request Jun 12, 2024
* Bugfix #2244 develop fix diff tests (#2254)

* skip diff for specific png images that produce diffs occasionally but look the same visually

* add 2 more keywords for use cases that occasionally flag small, unnoticeable diffs in png images

* Feature #2253 update tests for diff_util (#2256)

Co-authored-by: root <root@localhost>

* Feature #1974 Documentation: update coding standards section (#2260)

* Feature #2253 conftest fixture to set pytest tmpdir (#2261)

* Feature #2151 Documentation: Add quick search keywords METplotpy/calcpy use cases (#2259)

* Feature #2138 CI enhance MET Docker tag override (#2258)

* Updating development instructions.

* fixed typo

* fixed another typo

* Feature #2207 Documentation - Updates to Contributor's Guide (#2263)

Co-authored-by: Dan Adriaansen <dadriaan@ucar.edu>

* Feature develop update install files (#2266)

* Updating installation files

* Removing run_commands.sh

* Updated the file to add a MINICONDA_PATH

* Adding files for jet

* Adding orion file

* Removing beta references

* Corrected met version

* Adding files for WCOSS2 machines

* Removing rc1 from acorn file

* Removing beta1

* Bugfix #1853 develop - PointStat don't require mask variables to be set (#2262)

* update version of certifi to match auto-generated dependabot PR #2267

* feature #2253 more tests for diff_util.py (#2264)

* update versions of METplus components for the next official release

* updated release notes for 5.1.0 release

* removed duplicate entries in release notes

* Added EC2 instance recipee with S3 mounting ability (#2269)

* Updating the Subsetting Tests by Marker section (#2272)

* update release date for 5.1.0 release (#2276)

* update version for development towards 6.0.0-beta1 release

* added new use case that was missing

* Bugfix #2279 develop - buoy station file from 2022 (#2280)

* Feature 2253 series analysis tests (#2277)

* Fix typo in pull_request_template.md

* Make code coverage report available (#2287)

* Use updated dtcenter/metplus-action-data-update tag that fixes bug that causes GHA disk to exceed capacity when too many data volumes are created. Use specific commit of coveralls python action to ensure it will not change

* removed climatology keyword from use cases that aren't relevant that were accidentally added with PR #1984

* update readme with current information

* Feature #2282 coord_release_docs (#2288)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* continue workflow if coveralls step fails -- this typically happens on a pull request from a fork because the authentication fails

* Feature 2253 system util tests (#2297)

* Feature #2294 LSR use case (#2295)

* Feature 2253 run util tests (#2307)

* Release Guide - remove beta/rc tags/releases (#2309)

* Add 'component: repository maintenance' label. Already ran the script to push this change and the NOAA OAR reporting label to all the METplus repos.

* Hotfix for labels, adding a new one for 'component: input data' and also fixing the get_lablels.sh to search for up to 200 existing labels. Also work on the log messages.

* Fix typo in comment

* Feature #2283 time looping consolidation (#2311)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* New issue template: Update Truth (#2332)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* feature #2253 tests for run_util, 'Usage' bugfix (#2313)

* Feature #2338 Debian 12 Conda environments (#2341)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature 1488 usecase satwinds (#2324)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #2283 include times (#2345)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* feature #2253 tests for config_validate, mock logger in conftest (#2320)

* Feature #2299 / #2310 Remove deprecated MET config env vars and TCMPRPlotter (#2347)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* remove MODEL and OBTYPE to use defaults from MET config

* Feature #2348 v6.0.0-beta1 release (#2351)

* update version for development towards 6.0.0-beta2 release

* copy libGL and libEGL files into docker image to prevent errors with geovista python package

* run use that uses geovista to test

* Feature #2156 release_acceptance_testing (#2352)

* feature #2253 print error logs from conftest (#2358)

* feature #2253 met_db_load tests (#2355)

* Rename 5.1.0.lua_wcoss2 to 6.0.0.lua_wcoss2

* Update and rename 5.1.0_acorn to 6.0.0_acorn

* Update 6.0.0_acorn

* feature #2253 add tests for gfdl_tracker (#2354)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Create 6.0.0_gaea

* Update and rename 5.1.0_hera to 6.0.0_hera

* Feature #2156 release_acceptance_testing take2 (#2361)

Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com>

* Feature #2329 Docker info in Installation Chapter (#2366)

* feature_2253_extract_tiles_tests (#2368)

* Feature 2253 tc pairs tests (#2369)

* Feature 2253 tc csv writer (#2373)

* update requirements for building docs to get around build failure where python packages required to build RTD have disappeared from the automatically generated commands from RTD

* fix ReadTheDocs requirements to include pillow which is a dependency of sphinx-gallery: see https://blog.readthedocs.com/defaulting-latest-build-tools/ for more info on why this was necessary

* Feature #2340 TCDiag one_time_per_file_flag (#2374)

* Update and rename 5.1.0_jet to 6.0.0_jet

* Added libssh

* prune docker files before running use cases to prevent running out of disk space when running use cases, ci-run-all-diff

* Feature 2253 command builder tests (#2378)

* Feature 2253 series analysis test (#2380)

* Feature 2253 py embed test (#2379)

* ignore cyclone plotter from code coverage report because it will be replaced with METplotpy logic

* Feature 898 headers (#2389)

* changing _ to - for header consistency

* changing _ to - for header consistency

* updating all headers for consistency

* updating all headers for consistency and adding spacing

The spacing doesn't seem to be required but it is the convention that we follow for headers.

* updating all headers for consistency

* updating headers for consistency and adding capital letters to  headers

* Using the overline ### to keep index consistent with other indexes

* updating all headers for consistency

* update requirements for building docs to get around build failure where python packages required to build RTD have disappeared from the automatically generated commands from RTD

* updating all headers and some spacing for consistency

* updating headers for consistency

* changing to ### for consistency

* Per #898, fixed the headers for the Release Guide part, chapters, and sections.

* Duplicating changes in develop branch for requirements.txt file

* updating headers

* Per #2669, updated header formatting to resolve errors

* Per #2669, udpating header

* Per #2669, udpating headers

* Per #2669, udpating header

* Per #2669, updated header formatting

* Per #2669, update header formatting

* updating headers

* Per #898, removed space in front of title

* Capitalizing Please

* changing to just italics to match standard formatting

* indenting for consistent formatting

* fixing italics again

* changing from note to warning for consistency

* updating headers, adding some capitalizing to the headers

* fixing typo

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* This file was committed but never updated or used

Per Minna, ok to delete.

* Restructuring table of contents to make it more clear which guides are for users and which are for contributors

* fixing formatting for clairity

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

* Feature #2349 upgrade instructions for deprecated MET config files (#2386)

* Feature 2123 di doc update (#2392)

Co-authored-by: Tracy <tracy.hertneky@noaa.gov>

* change log to list name of config variable , e.g. GRID_STAT_CONFIG_FILE, to easily see which variable should be removed

* Major refactor including elimination of unnecessary imports, only computing the index for the season requested instead of all seasons all the time, which also fixes a bug selecting which season the user requested. Results are identical for all seasons for the test data for the use case.

* Feature 1667 doc conventions (#2397)

* New additions based on the old branch feature_1667_updating_overview

* Moving the release-notes reference label

* Added label for METplus_glossary for use in Documentation conentions section.

* Adding images for the Documentation Conventions section

* Modifying wording and testing formatting in Internal Links section

* Second take on formatting

* Third attempt at formatting

* Fourth attempt at formatting

* Modified wording, sections, and formatting

* Minor modifications

* Added period

* Changed Pretty Table to PrettyTable

* Modify informationg about converting an existing table and adding images

* Resolving errors

* Reformatting

* Moving placement of reference label

* Attempting to fix table title

* Fixed incorrect alignment

* Made changes based on Lisa's suggestions

* Made changes based on Lisa's suggestions

* Made corrections

* Made corrections

* Per #1667, fixing typos

* Per #1667, corrected text

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

* Feature #2377 Log to terminal only (#2398)

* Update conda envs to use conda-forge only (#2402)

* rearrange MET config env var tables for GridStat so they are in the order that they appear in the wrapped MET config file

* use mamba instead of conda and update version of netcdf python package used to 1.6.2

* skip s2s_mid_lat WeatherRegime use case that produces different results often

* updated version of xesmf because <0.7.1 does not work with mamba

* per #2412, fix bug in GenVxMask to put quotes around argument so a grid specification string with spaces will be an accepted value

* downgrade version of esmf package to fix bug described in pangeo-data/xESMF#246

* Feature #2219 SeriesAnalysis multiple input files (#2408)

* Adding 3 new requestors to the list of common_labels.txt for NOAA/NHC, CSU/CIRA, and Australian BOM ci-skip-all

* Feature 2405 match tables2wrapper (#2416)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* per #2423, follow symbolic links when traversing directories to find files within a time window, ci-run-all-diff

* Feature #2252 WaveletStat wrapper (#2427)

Co-authored-by: j-opatz <59586397+j-opatz@users.noreply.github.com>

* add WaveletStat use case to group and temporarily disable TCDiag use case because changes to the wrapper are needed to fix it after changes to the MET tool were merged

* update version number for beta2 release (#2431)

* update version for dev towards beta3

* Feature #2371 Embed use case upgrade demo video into upgrade instructions (#2444)

* fix failing use case tests -- install python packages dateutil and requests via apk instead of pip because the pip commands began failing -- see PEP668 https://peps.python.org/pep-0668/ -- also changed scripts to create conda environments for use case tests to install all packages in a single call to mamba instead of individual calls

* remove commands to install geovista from source because it is now installed from conda

* Feature #1989: Add OMI use case (#2457)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #2432 TCDiag new config changes (#2453)

* move medium range 10 use case into group with 3-5 to speed up runs

* Feature #2334 land_mask (and topo_mask) in PointStat (#2456)

* added use cases with pygrib

* Feature #2430 TCPairs consensus.diag_required and consensus.diag_min_req (#2439)

* Quickfix cloud use case desc imgs (#2464)

* added pics, updated desc

* add last two imgs

* Fixing spelling and capitalization

* Feature 2454 doc overview conv (#2471)

* adding documentation in different sections

* adding grid table section

* fixing links

* grammar updates

* Per #2454, updated sections and wording.

* Per #2454, added a period to the end of a sentence.

* Per #2454, fixing formatting

* Per #2454, updating wording

* adding a section for line breaks in a table

* adding :code: information

* trying to fix warning

* take 2

* take 3 or 4

* maybe fixed

* updating link

* fixing web link again

* web link saga continues

* Changed "ReadTheDocs" to "Read the Docs"

* Updated "main_v" references to be "main_v12.0"

* Removed references to main_v*, replacing with raw RST 

It is not maintainable to have links to branches which will become old.  Since we can avoid it by adding the raw RST in the documentation, I have removed all references to main_v* in favor of placing the raw RST in the documentation.

* Modified the "Code in a Paragraph" section

* Reworded for consistency within the document

* Added back the link for Sphinx code blocks

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

* add argument to workflow dispatch event so that MET DockerHub repo used for tests can be easily overridden to test changes in a MET PR before merging

* Feature dtcenter/MET#2796 GHA Node20 deprecation warnings (#2473)

* per dtcenter/MET#2796, update versions of actions to prevent deprecated node warnings in GHA runs

* change arguments to workflow dispatch so they are no longer required -- these are not needed to be set when triggering by hand through the web interface

* Feature dtcenter/MET#2796 develop - Fix error log artifact creation (#2475)

* updated version of pillow to fix security vulnerability alerted by dependabot in PR #2477

* remove docker image after runtime image is created from metplus image and conda env image

* turn on use case to test image removal

* prune images if image tag doesn't exist -- it appears that if the image is built on the fly (when PR is coming from fork) then the tag exists, but if not, the image tag is set to <none>

* support commands that must run in the shell to see if || will work in docker image pruning step

* try to fix image removal

* Feature 2383 use case sat alt (#2480)

* new docs, files for use case

* new files

* updating to run use case

* updated python libraries, changed test env

* trying new point logic

* added to script for nan removal

* redid Python script to take adv of new MET ability for nans

* Update run status

* removed unused settings

* run image prune commands separately

* changed shell back to false

* split up use case groups so the same envs are used by a group to see if that resolves the disk space issues

* turn off use cases

* feature 2253 fix empty pytest logs (#2485)

* added more commands to free up disk space as suggested in https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh, ci-run-all-cases

* Feature 2406 redo usecase rrfs (#2488)

* issue #2406 RRFS use case files

* issue #2406 added usecase to tests

* Issue #2406 added metplotpy and metcalcpy as dependencies

* Feature #2460 allow missing input (#2493)

* changed template to use datetime format that works on MacOS

* update logic to only write a file list file if there are more than 1 files, updated unit tests to match new behavior, added exception handling to series analysis to prevent crash if file does not exist

* use getraw instead of getstr to prevent crash if providing a filename template tag to override a config variable on the command line

* Add optional argument to subset file function to always write a file list text file even if there is only 1 file found. Use this argument in UserScript wrapper so that the environment variables that contain paths to file list files are consistent in format for use in user scripts

* enhanced function to support different output variable types

* removed the need for overriding clear function in specific wrappers and added optional argument to skip clearing input file list

* clean up formatting

* per #2460, start to implement logic to prevent errors when some input files are not found

* isolate logic to find input files into find_input_files functions. clean up those functions to return boolean instead of sometimes returning None or a list of files to be consistent

* remove python embedding checks because MET is now smart enough to determine if a python script is used with always setting file_type

* turn on use cases to test error handling

* merge artifacts

* run only failed cases

* always run merge step

* run on a case that will succeed to test error log merge step

* only run error log merge step if there were 'Save error logs' jobs that succeeded

* run cases that will fail

* fix condition to merge error logs

* run group that will succeed but have diffs - check error logs doesn't fail

* testing - add use case group that will succeed but will cause diffs becaus there is no truth data - to confirm that the error log merge step behaves properly in this case

* run 3 jobs, 2 should error, to confirm that error_logs is created properly

* repeat diff no error test but with

* per dtcenter/MET#2796, fix error log artifact creation by merging error logs if any of the 'Save error logs' steps ran successfully

* run test to confirm diff does not cause merge error logs to fail

* Revert "run test to confirm diff does not cause merge error logs to fail"

This reverts commit ff2d1ca.

* run test to confirm error logs are merged properly when 2 use case groups have errors

* try checking output variable as string instead of boolean

* Revert "run test to confirm error logs are merged properly when 2 use case groups have errors"

This reverts commit 8106666.

* run test again

* test again

* move check for error logs for shell script and use github env vars

* Revert "run test again"

This reverts commit 7a0a99c.

* break 2 use cases to test that error logs are still created properly

* checkout repo to get script used to merge error logs

* Revert "break 2 use cases to test that error logs are still created properly"

This reverts commit cb6d0b4.

* test merge error log again on no error diff run

* fix script

* move merge error logic back to workflow

* break 2 use cases to test that error logs are still created properly

* Revert "break 2 use cases to test that error logs are still created properly"

This reverts commit 82aa0e1.

* remove testing use case group

* Revert "remove python embedding checks because MET is now smart enough to determine if a python script is used with always setting file_type"

This reverts commit de3b4b0.

* clean up lines

* update logic to check that python embedding is set up properly to only try to set file_type automatically if it is not already set and if the wrapper is a tool that supports multiple input files via python embedding (which require file_type to be set). also changed error if not set properly to warning and use PYTHON_NUMPY as a default

* remove run_count increment before run_at_time_once - set closer to find_input_files so run count and missing input count are consistent

* return boolean from find_input_files function to be consistent with other functions

* per #2460, warn instead of error if missing inputs are allowed, track counters for number of runs and missing inputs

* per #2460, added check to report error if allowed missing input threshold is met

* run clear before running plot_data_plane

* removed test group

* report warning instead of error if ALLOW_MISSING_INPUTS is True

* cleanup

* change function to pytest fixture so it can be used by other test scripts

* update ascii2nc test to process more than 1 time to ensure commands are built properly for each run

* add unit tests to ensure missing input file logic works properly for ascii2nc and grid_stat

* set variable to skip RuntimeFreq logic to find input files to prevent duplicate increment of run_count -- these will be removed when the wrapper has been updated to find files using RuntimeFreq logic

* remove unneccesary error checking

* cleanup

* call function to handle input templates that need to be handled separately for each item in the comma-separated list (for UserScript and GridDiag only)

* add time_info to ALL_FILES dictionaries to be consistent with other wrappers

* clean up logging for reporting error when missing inputs exceeds threshold

* added function to get files for a single run time to be consistent with other functions

* skip increment of run_count when FIND_FILES=True and RuntimeFreq input file logic is skipped to prevent duplicate increments

* added empty test files

* remove redundant variables

* view warnings on a failed test run

* add more empty test files

* added unit tests for missing input logic

* remove MANDATORY setting for EnsembleStat and GenEnsProd and instead pass mandatory argument to call to find model files so warnings/errors are properly displayed for other inputs

* cleanup

* remove allow missing input logic from ExtractTiles wrapper

* added functions to parse template/dir variables from config, removed explicit calls to read those variables from GridStat

* remove error if more labels than inputs are provided (for UserScript and GridDiag only) -- extra labels will just be ignored

* added required boolean for input templates

* per #2460, change warning messages to debug when checking a list of DA offsets since it is common that a given offset will not always be found in the files

* added tests for missing input logic for many wrappers

* cleanup

* fix increment of number of runs

* skip missing input logic

* change how required is handled for input templates

* warn instead of error if missing input is allowed

* remove increment of missing input counters because it is handled in RuntimeFreq

* check status of input files and increment counters in overridden run_once_per_lead. remove increment of missing input counters because it is handled in run_once_per_lead

* added unit tests for missing input logic

* skip missing input logic

* cleanup

* cleanup, use fixture for tests, add unit tests for missing input, bypass missing input logic on wrappers that don't need it

* removed file that is not needed

* added unit tests for pb2nc to test -valid_beg/end arguments and changes to properly support any runtime frequencies

* warn instead of error if allowing missing inputs

* cleanup

* implement changes to properly support all runtime frequencies for pb2nc. previously all files that match a wildcard will be used instead of selecting only files that fall within the specified time range. some functions moved into pb2nc wrapper will eventually be moved up so that they are used by all wrappers to be consistent

* added unit tests that will fail until wrapper is updated

* replace functions in RuntimeFreq wrapper used to find input files so they can be used by all wrappers, updated ioda2nc wrapper to find input files properly to fix tests

* cleanup

* removed mtd version of get_input_templates and added logic to RuntimeFreq's version to get the same behavior

* added unit tests for MTD missing input checks

* per #2491, add release notes for beta3

* Feature #2491 v6.0.0 beta3 (#2495)

* update version for beta3 release

* fixed typos in release notes

* update version to note development towards beta4 release

* Per suggestion from @JohnHalleyGotway, create intermediate branch for updating truth data to avoid branch protection rules. I added a step to delete the intermediate branch locally if it exists to prevent conflicts with the update

* added quotes to prevent error in echo caused by parenthesis

* fix incorrect command

* Revert "fix incorrect command"

This reverts commit e7dffb6.

* Revert "added quotes to prevent error in echo caused by parenthesis"

This reverts commit c1cb3c4.

* Revert "Per suggestion from @JohnHalleyGotway, create intermediate branch for updating truth data to avoid branch protection rules. I added a step to delete the intermediate branch locally if it exists to prevent conflicts with the update"

This reverts commit 525809d.

* Hotfix: Allow symbolic link to run_metplus.py to run (#2500)

* Adding use case tests

* Changing test environment

* Testing environment changes

* Documentation update

* Updating Documentation

* Updating documentation for disk space failure

* Added new use case category

* Fixing use case test

* Fixing bug in use case file

* Testing s2s after data removal

* add back use cases that were accidentally removed

* fix incorrect use case added

* Setting tests to false for merge

* Removes extraneous imports.

* Switches to function call for the coupling index.

* Correct number of args in comment.

* Testing for old use cases

* Setting tests to false for merge

* update tests to update develop data -- modified commands to create new use case category directory if it does not already exist, move step to remove old data to be completed just after new data is copied to vX.Y

* Summation has to have a dimension supplied for the gridded data, but for pandas the only dimension is time (but it is un-named). Therefore the numerator for the covariance term had to be split out between the fcst and obs case.

* Feature 2463 modify table (#2508)

* creating test dropdown menus

* fixing warnings

* fixing warnings

* fixing warnings 3

* fixing warnings 4

* Attempt to fix documentation errors

* adding 2 more test dropdowns

please note.  There is still a message about 
WARNING: Duplicate explicit target name: "gridstat: cloud fractions with neighborhood and probabilities (pygrib)".
John O will fix this.  I should not touch it.

* fixing spacing

* trying to fix link

* take 2

* Removing double underscores added earlier

* moving dropdown menus

* Adding version to dropdown menu title

* fixing spacing

* dropdowns date util, eofs, h5py

* fixing formatting

* fixing formatting

* Per #2463, adding template for future entries

* adding imageio, lxml & matplotlib

* dropdown up to nc-time-axis

* fixing spacing problems

* Fixing broken s2s links and other incorrect links

* Fixing spelling and capitalization

* Removing the dash in front of 1.4 for nc-time-axis

* Modifying formatting

* adding dropdowns thru pylab

* fixing problems

* dropdowns thru scikit-learn

* fixing spacing

* final dropdowns thru yaml

* fixing spacing

* fixing loose ends

* Per #2463, moving information to an Appendix and adding text and links in an overview

* Per #2463, adding to index.rst

* Per #2463, reworded language and updated Python 3.8 reference

* Per #2463, fixing errors

* Per #2463, made updates based on feedback at the METplus Engineering meeting.

* removing tables, changing most METplus wrappers, version numbers.

* trying to fix met_version

* Per #2463, adding necessary code for substitutions

* Per #2463, fixing syntax error

* adding period

* removing section 1.5

* Per #2463, replace old label reference with new label reference and updated text to reflect the move to drop down menus

* read python version from file to replace in docs

* fixed typo in variable name

* adding python_version to the overview.

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* per #2509, automate MET version used in documentation to be X+6.Y.0 of METplus version

* Bugfix #2520 ASCII2NC file window issue and redundant wrapper initialization (#2522)

* per PyCharm documentation, only ignore workspace.xml idea file and commit the rest of the .idea files to version control

* per #2520, create function to get METplus wrapper class without initializing it and use that function to read list of deprecated env vars to prevent redundant initialization of wrappers that can cause unintended side effects

* handle file_window variables consistently by using CommandBuilder function

* comment out optional config variables that previously caused a failure when unset

* Update update_truth.md

Fix typo in the update_truth issue template in the develop branch.

* Update update_truth.md

Update wording in the update_truth issue template.

* Feature #2530 dev timeline (#2532)

* Per #2530, add a development timeline to the METplus Release Information section of the User's Guide. Also update the Release Guide instructions.

* Per #2530, tweak the wording.

* Update docs/Release_Guide/release_steps/update_release_notes_development.rst

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

* Adds static station lookup file for use with Python embedding for FLUXNET observations.

* Major overhaul to forecast Python embedding script for the TCI use case.

* Major overhaul to observation Python embedding script for the TCI use case, to compute TCI from raw observations rather than read pre-computed TCI.

* Updates documentation file for TCI use case.

* Adds METcalcpy version number.

* Refactors wording and fixes typo.

* Fixes RST formatting.

* Finally fixed RST error.

* Adds support to remove leap days if requested.

* Updates command line args for Python embedding scripts.

* Feature #2537 develop sonarqube_gha (#2541)

* Per #2537, add SonarQube workflow for METplus

* Per #2537, update nightly build email list.

* Per #2537, fix cut/paste error configure_sonarqube.sh

* Per #2537, exclude test code from code coverage statistics.

* Updated conf file for use case.

* Removes new TCI function because it is in METcalcpy now.

* Removes old code, somsome reorganization and clarification and setting of params, and also switches the fluxnet metadata file to a command line argument instead of an environment variable.

* Update the 6.0.0 Coordinated Release development timeline in release-notes.rst

* Support for environment variables or default options for filtering and filename patterns, DEBUG mode added and set to False by default, adjustment of print statements for logging, and refactoring filtering of stations to ensure we don't process a file that we shouldn't by better coupling of filenames and stations.

* Makes DEBUG an env var for config via metplus wrappers.

* Reorganization of config file, adds environment variables, and updates comments for use case changes.

* Updates to documentation.

* Fixes tables.

* Adds table of contents to the top for users to click on.

* Updates use case documentation file.

* Updated config file with obs and fcst subirectories in the path.

* Added optional key/value to use_case_groups.json to prevent a use case group from running to easily disable it temporarily. Disable short_range:14 use case until it can be fixed with #2551

* update pillow version based on recommendation from dependabot: https://github.com/dtcenter/METplus/security/dependabot/5

* Switches to using metplotpy_env to get metcalcpy dependency.

* Adds filtering based on missing data values.

* Finishing touches to debug statements for testing.

* Fixing a few minor code smells from last week.

* update link to METplus Components Python Requirements table in PR template

* Update docs/use_cases/model_applications/land_surface/PointStat_fcstCESM_obsFLUXNET2015_TCI.py

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #2555 v6.0.0 beta4 (#2556)

* update version for beta4 release

* added release notes for beta4 release

* update version for development towards beta5 release

* update location of METviewer docker-compose.yml file that moved from PR dtcenter/METviewer#525

* Feature #2537 develop single_sq_project (#2558)

* Update the beta4 release date wording

* Feature #2433 Ugrid config variables in GridStat/PointStat (#2517)

* update version for release

* added new use case that was missing

* Bugfix #2279 main_v5.1 - buoy station file from 2022 (#2281)

* Fix typo in pull_request_template.md

* added notes to make it clear that upgrade instructions are not needed if upgrading from 5.0 to 5.1

* New issue template: Update Truth (#2332)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
(cherry picked from commit 44335f3)

* add GitHub Actions workflow that is used to create Docker images that hold the conda environment used for the automated tests -- adding this to the default main_v5.1 branch so that it will become available to run for other branches as a workflow_dispatch workflow

* Per #2433, added support for setting the ugrid MET config variables for GridStat and PointStat wrappers. Also moved the seeps variable up so that it matches the order of the default config files in the MET repo

* add argument to workflow dispatch event so that MET DockerHub repo used for tests can be easily overridden to test changes in a MET PR before merging

* Feature dtcenter/MET#2796 main_v5.1 GHA Node20 deprecation warnings (#2474)

* per dtcenter/MET#2796, update versions of actions to prevent deprecated node warnings in GHA runs - main_v5.1

* fix ReadTheDocs requirements to include pillow which is a dependency of sphinx-gallery: see https://blog.readthedocs.com/defaulting-latest-build-tools/ for more info on why this was necessary

* install python packages via apk instead of pip to prevent GHA failures that were fixed in develop but not in main_v5.1

* per dtcenter/MET#2796, fix error log merging for main_v5.1 same as develop

* Bump pillow from 10.0.1 to 10.2.0 in /docs (#2477)

Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](python-pillow/Pillow@10.0.1...10.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Create 5.1.0_casper

* per #2433, add support for setting the optional -config argument for a ugrid config file for PointStat and GridStat. Also moved the optional arguments to be added to the command after all of the required arguments so the command is easier to read

* per #2433 and discussion on meeting 3/21/2024, change command line argument from -config to -ugrid_config

* update unit tests to check for new command line argument name -ugrid_config

* Updates information about GDAS surface winds having a QC value that is above the default settings in the PB2NC config file.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>

* SonarQube add python code coverage report (#2565)

* run code coverage before SonarQube scan

* generate xml report and configure SQ to read coverage.xml

* exclude more files from code coverage report

* exclude more files that should not be included in the code coverage report

* more changes to code coverage exclude list

* removed bad characters accidentally added

* exclude cyclone plotter wrapper because it is excluded from code coverage report

* ignore SonarQube lint files generated by PyCharm

* Updating MTD conv radius/thresh description (#2566)

* Updating MTD conv radius/thresh description

* Update glossary.rst

* Update docs/Users_Guide/glossary.rst

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Update docs/Users_Guide/glossary.rst

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature update modulefiles (#2564)

* Adding 6.0.0 file for derecho and removing 5.1.0 file for cheyenne

* Updating modulefiles

* Updating orion file

* Adding file for hercules

* Adding file for casper

* Update internal/scripts/installation/modulefiles/6.0.0_casper

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #1989: Add OMI to Verification Datasets Guide (#2585)

Refs: #1989

* Feature #2479 time_offset_warning (#2587)

* Per #2479, add support for setting time_offset_warning in all wrapped MET config files

* Per #2479, add documentation and examples to basic use case param files for time_offset_warning

* Feature 2346 develop update templates (#2589)

* Per #2346, modifying issue templates

* Per #2346, modifying pull request template

* Per #2346, modifying entries based on suggestions by @georgemccabe

* Bugfix #2567 PointStat multiple point observation files (#2582)

* per #2567, properly pass multiple point observation files to point_stat using the -point_obs argument

* per #2567, fix bug that caused file window logic to fail

* Revert "per #2567, fix bug that caused file window logic to fail"

This reverts commit 27fe822.

* per #2567, fix bug that caused file window logic to fail

* Feature #1514 MADIS2NC wrapper (#2591)

* Per #1514, implement MADIS2NC wrapper and added example use case. Also updated the function to handle the time_summary dictionary in MET config files to support names that exactly match the name found in the dictionary, e.g. ASCII2NC_TIME_SUMMARY_OBS_VAR sets time_summary.obs_var (previously only ASCII2NC_TIME_SUMMARY_VAR_NAMES was supported and is still supported)

* remove execute permissions from image files

* Per #1514, add image for basic use case

* removed large image files that are no longer being used in documentation

* add support for time_offset_warning for MADIS2NC wrapper after the PR to add that support for other wrappers has been merged into develop

* report error if output template is not defined

* update contributor's guide with more up-to-date info on how to create a new wrapper and basic components of wrappers

* fix warnings in documentation

* fix formatting issues

* Per #1514, add new basic use case to automated test suite

* add step to comment out version number in wrapped MET config file

* turn off use case to prepare for PR

* added a pytest fixture to handle comparison of use case commands and environment variable values to remove a lot of redundant logic in each wrapper test. Added fake madis data

* removed commented code

* properly substitute template tags in all command line arguments

* properly handle unset rec_beg and rec_end to prevent missing value from being added to command lien arg

* added new madis2nc use case to existing met_tool_wrapper and temporarily disabled land_surface:0 until we can resolve the differences

* Feature 2346 develop update templates (#2594)

* Per #2346, modifying issue templates

* Per #2346, modifying pull request template

* Per #2346, modifying entries based on suggestions by @georgemccabe

* Per 2346, making updates based on feedback at last MET Eng. Meeting

* Enhance update truth data workflow to create a uniquely named branch to update *-ref branches and commit/append to a log file that tracks the reasons for updating the truth data. This is done to ensure that the *-ref branch testing workflow run that actually updates the truth data is always run even if there are no other changes to the METplus branch since the last update, e.g. when a change to another component like MET warrants the truth data update

* git add change log file in case it doesn't already exist

* changed logic to no longer push changes to develop/main_vX.Y, but instead merge changes from -ref into the update branch

* retain update truth history file from *-ref

* dtcenter/MET#2899 fixes a bug reading point observations using Python Embedding in PointStat and EnsembleStat, which should fix the PBL use case -- #2246 -- so turned on diff test for PBL use case to ensure that results are consistent going forward

* Feature #2429 MvMODE multivar intensity (#2603)

* Feature #2547 ASCII2NC -valid_beg and -valid_end arguments (#2606)

* prevent divide by zero if run_count is 0

* Per #2547, add support for setting -valid_beg and -valid_end command line arguments. Added changes to make ASCII2NC wrapper able to run for all runtime frequencies

* Refactored system_util preprocess_file function to reduce cognitive complexity and add quotation marks around 'filenames' that contain spaces (typically python embedding commands) so explicit handling of these cases don't need to be done downstream. Added unit tests to test more python embedding cases

* remove logic to add quotes around input file since it is handled already in preprocess_file

* changed find_input_files function to return None or a time_info dictionary to be consistent across wrappers

* added ReformatPointWrapper to use as parent class for ASCII2NC, MADIS2NC, PB2NC, and Point2Grid wrappers to consistently handle tools that reformat point observation data. Moved verbosity to the end of commands

* clean up pb2nc wrapper to be more consistent with other ReformatPoint wrappers

* per #2547, added glossary entries for new config variables to set -valid_beg/end and added commented example to basic use case config file

* added glossary entries for *_RUNTIME_FREQ variables

* Per #2513, remove TC_RMW_MAX_RANGE_KM

* Feature 2494 update fv3 data (#2610)

* Updated for new data

* Updated to match new data

* Updates due to new data/updates to data

* Updates due to new data/data variables

* Changes due to changes to data variables, date

* Updates due to changes to data

* Update the date to reflect the new data (with updates to variables)

* fixed error with formatting

* Remove redundant instructions.

* For testing

* Update use_case_groups.json

* Revert to original location of input data to use the same data for all three FV3 Physics Tendency use cases.

* Revert to original location of data from tarball

* Remove typo in file directory name

* Update use_case_groups.json

Returned 10-12 to follow 11

* Update use_case_groups.json

revert to false for testing the short range use cases for  FV3 physics tendency

* Update use_case_groups.json

fix alignment of opening curly brace

* Update use_case_groups.json

revert to original formatting

* removed config variable that should be set by the user because it is specific to the user's environment

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* added entry to update truth change log: develop #2610

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com>
Co-authored-by: John Sharples <41682323+John-Sharples@users.noreply.github.com>
Co-authored-by: root <root@localhost>
Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com>
Co-authored-by: Dan Adriaansen <dadriaan@ucar.edu>
Co-authored-by: jprestop <jpresto@ucar.edu>
Co-authored-by: Hank Fisher <fisherh@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: j-opatz <59586397+j-opatz@users.noreply.github.com>
Co-authored-by: reza-armuei <144857501+reza-armuei@users.noreply.github.com>
Co-authored-by: Tracy Hertneky <39317287+hertneky@users.noreply.github.com>
Co-authored-by: Tracy <tracy.hertneky@noaa.gov>
Co-authored-by: Mallory Row <mallory.row@noaa.gov>
Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: bikegeek <3753118+bikegeek@users.noreply.github.com>
Co-authored-by: Christina Kalb <kalb@ucar.edu>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
JohnHalleyGotway added a commit that referenced this pull request Jun 14, 2024
* 2673 Moved dvariable declaration after include

* #2673 Move down namespace below include

* Feature #2395 wdir (#2820)

* Per #2395, add new columns to VL1L2, VAL1L2, and VCNT line types for wind direction statistics. Work still in progress.

* Per #2395, write the new VCNT columns to the output and document the additions to the VL1L2, VAL1L2, and VCNT columns.

* Per #2395, add the definition of new statistics to Appendix G.

* Per #2395, update file version history.

* Per #2395, tweak warning message about zero wind vectors and update grid-stat and point-stat to log calls to the do_vl1l2() function.

* Per #2395, refine the weights for wind direction stats, ignoring the undefined directions.

* Update src/tools/core/stat_analysis/aggr_stat_line.cc

* Update src/tools/core/stat_analysis/parse_stat_line.cc

* Update src/tools/core/stat_analysis/aggr_stat_line.cc

* Recent changes to branch protection rules for the develop branch have broken the logic of the update_truth.yml GHA workflow. Instead of submitting a PR to merge develop into develop-ref directly, use an intermediate update_truth_for_develop branch.

* Feature #2280 ens_prob (#2823)

* Per #2280, update to support probability threshold strings like ==8, where 8 is the number of ensemble members, to create probability bins centered on the n/8 for n = 0 ... 8.

* Per #2280, update docs about probability threshold settings.

* Per #2280, use a loose tolerance when checking for consistent bin widths.

* Per #2280, add a new unit test for grid_stat to demonstrate processing the output from gen_ens_prod.

* Per #2280, when verifying NMEP probability forecasts, smooth the obs data first.

* Per #2280, only request STAT output for the PCT line type to match unit_grid_stat.xml and minimize the new output files.

* Per #2280, update config option docs.

* Per #2280, update config option docs.

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 restored return statement

* #2673 Added std namespace

* #2673 Moved down 'using namespace' statement. Removed trailing spaces

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Added std namespace

* #2673 Added std namespace

* #2673 Added std namespace

* #2673 Changed literal 1 to boolean value, true

* Feature #2673 enum_to_string (#2835)

* Feature #2583 ecnt (#2825)

* Unrelated to #2583, fix typo in code comments.

* Per #2583, add hooks write 3 new ECNT columns for observation error data.

* Per #2583, make error messages about mis-matched array lengths more informative.

* Per #2583, switch to more concise variable naming conventions of ign_oerr_cnv, ign_oerr_cor, and dawid_seb.

* Per #2583, fix typo to enable compilation

* Per #2583, define the 5 new ECNT column names.

* Per #2583, add 5 new columns to the ECNT table in the Ensemble-Stat chapter

* Per #2583, update stat_columns.cc to write these 5 new ECNT columns

* Per #2583, update ECNTInfo class to compute the 5 new ECNT statistics.

* Per #2583, update stat-analysis to parse the 5 new ECNT columns.

* Per #2583, update aggregate_stat logic for 5 new ECNT columns.

* Per #2583, update PairDataEnsemble logic for 5 new ECNT columns

* Per #2583, update vx_statistics library with obs_error handling logic for the 5 new ECNT columns

* Per #2583, changes to make it compile

* Per #2583, changes to make it compile

* Per #2583, switch to a consistent ECNT column naming convention with OERR at the end. Using IGN_CONV_OERR and IGN_CORR_OERR.

* Per #2583, define ObsErrorEntry::variance() with a call to the dist_var() utility function.

* Per #2583, update PairDataEnsemble::compute_pair_vals() to compute the 5 new stats with the correct inputs.

* Per #2583, add DEBUG(10) log messages about computing these new stats.

* Per #2583, update Stat-Analysis to compute these 5 new stats from the ORANK line type.

* Per #2583, whitespace and comments.

* Per #2583, update the User's Guide.

* Per #2583, remove the DS_ADD_OERR and DS_MULT_OERR ECNT columns and rename DS_OERR as DSS, since observation error is not actually involved in its computation.

* Per #2583, minor update to Appendix C

* Per #2583, rename ECNT line type statistic DSS to IDSS.

* Per #2583, fix a couple of typos

* Per #2583, more error checking.

* Per #2583, remove the ECNT IDSS column since its just 2*pi*IGN, the existing ignorance score, and only provides meaningful information when combined with the other Dawid-Sebastiani statistics that have already been removed.

* Per #2583, add Eric's documentation of these new stats to Appendix C. Along the way, update the DOI links in the references based on this APA style guide: https://apastyle.apa.org/style-grammar-guidelines/references/dois-urls#:~:text=Include%20a%20DOI%20for%20all,URL%2C%20include%20only%20the%20DOI.

* Per #2583, fix new equations with embedded underscores for PDF by defining both html and pdf formatting options.

* Per #2583, update the ign_conv_oerr equation to include a 2
*pi multiplier for consistency with the existing ignorance score. Also, fix the documented equations.

* Per #2583, remove log file that was inadvertently added on this branch.

* Per #2583, simplify ObsErrorEntry::variance() implementation. For the distribution type of NONE, return a variance of 0.0 rather than bad data, as discussed with @michelleharrold and @JeffBeck-NOAA on 3/8/2024.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Revert #2825 since more documentation and testing is needed (#2837)

This reverts commit 108a895.

* Feature #2583 ecnt fix IGN_OERR_CORR (#2838)

* Unrelated to #2583, fix typo in code comments.

* Per #2583, add hooks write 3 new ECNT columns for observation error data.

* Per #2583, make error messages about mis-matched array lengths more informative.

* Per #2583, switch to more concise variable naming conventions of ign_oerr_cnv, ign_oerr_cor, and dawid_seb.

* Per #2583, fix typo to enable compilation

* Per #2583, define the 5 new ECNT column names.

* Per #2583, add 5 new columns to the ECNT table in the Ensemble-Stat chapter

* Per #2583, update stat_columns.cc to write these 5 new ECNT columns

* Per #2583, update ECNTInfo class to compute the 5 new ECNT statistics.

* Per #2583, update stat-analysis to parse the 5 new ECNT columns.

* Per #2583, update aggregate_stat logic for 5 new ECNT columns.

* Per #2583, update PairDataEnsemble logic for 5 new ECNT columns

* Per #2583, update vx_statistics library with obs_error handling logic for the 5 new ECNT columns

* Per #2583, changes to make it compile

* Per #2583, changes to make it compile

* Per #2583, switch to a consistent ECNT column naming convention with OERR at the end. Using IGN_CONV_OERR and IGN_CORR_OERR.

* Per #2583, define ObsErrorEntry::variance() with a call to the dist_var() utility function.

* Per #2583, update PairDataEnsemble::compute_pair_vals() to compute the 5 new stats with the correct inputs.

* Per #2583, add DEBUG(10) log messages about computing these new stats.

* Per #2583, update Stat-Analysis to compute these 5 new stats from the ORANK line type.

* Per #2583, whitespace and comments.

* Per #2583, update the User's Guide.

* Per #2583, remove the DS_ADD_OERR and DS_MULT_OERR ECNT columns and rename DS_OERR as DSS, since observation error is not actually involved in its computation.

* Per #2583, minor update to Appendix C

* Per #2583, rename ECNT line type statistic DSS to IDSS.

* Per #2583, fix a couple of typos

* Per #2583, more error checking.

* Per #2583, remove the ECNT IDSS column since its just 2*pi*IGN, the existing ignorance score, and only provides meaningful information when combined with the other Dawid-Sebastiani statistics that have already been removed.

* Per #2583, add Eric's documentation of these new stats to Appendix C. Along the way, update the DOI links in the references based on this APA style guide: https://apastyle.apa.org/style-grammar-guidelines/references/dois-urls#:~:text=Include%20a%20DOI%20for%20all,URL%2C%20include%20only%20the%20DOI.

* Per #2583, fix new equations with embedded underscores for PDF by defining both html and pdf formatting options.

* Per #2583, update the ign_conv_oerr equation to include a 2
*pi multiplier for consistency with the existing ignorance score. Also, fix the documented equations.

* Per #2583, remove log file that was inadvertently added on this branch.

* Per #2583, simplify ObsErrorEntry::variance() implementation. For the distribution type of NONE, return a variance of 0.0 rather than bad data, as discussed with @michelleharrold and @JeffBeck-NOAA on 3/8/2024.

* Per #2583, updates to ensemble-stat.rst recommended by @michelleharrold and @JeffBeck-NOAA.

* Per #2583, implement changes to the IGN_CORR_OERR corrected as directed by @ericgilleland.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Update the pull request template to include a question about expected impacts to existing METplus Use Cases.

* #2830 Changed enum Builtin to enum class

* #2830 Converted enum to enum class at config_constants.h

* Feature #2830 bootstrap enum (#2843)

* Bugfix #2833 develop azimuth (#2840)

* Per #2833, fix n-1 bug when defining the azimuth delta for range/azimuth grids.

* Per #2833, when definng TcrmwData:range_max_km, divide by n_range - 1 since the range values start at 0.

* Per #2833, remove max_range_km from the TC-RMW config file. Set the default rmw_scale to NA so that its not used by default. And update the documentation. Still actually need to make the logic of the code work as it should.

* Per #2833, update tc_rmw to define the range as either a function of rmw or using explicit spacing in km.

* Per #2833, update the TCRMW Config files to remove the max_range_km entry, and update the unit test for one call to use RMW ranges and the other to use ranges defined in kilometers.

* Per #2833, just correct code comments.

* Per #2833, divide by n - 1 when computing the range delta, rather than n.

* Per #2833, correct the handling of the maximum range in the tc-rmw tool. For fixed delta km, need to define the max range when setting up the grid at the beginning.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* #2830 Changed enum PadSize to enum class

* #2830 Removed redundant parantheses

* #2830 Removed commenyted out code

* #2830 Use auto

* #2830 Changed enum to enum class for DistType, InterpMthd, GridTemplates, and NormalizeType

* #2830 Moved enum_class_as_integer from header file to cc files

* #2830 Added enum_as_int.hpp

* #2830 Added enum_as_int.hpp

* Deleted enum_class_as_integer and renamed it to enum_class_as_int

* Removed redundant paranthese

* #2830 Changed enum to enumclass

* #2830 Changed enum_class_as_integer to enum_class_as_int

* Feature #2379 sonarqube gha (#2847)

* Per #2379, testing initial GHA SonarQube setup.

* Per #2379, switch to only analyzing the src directory.

* Per #2379, move more config logic from sonar-project.properties into the workflow. #ci-skip-all

* Per #2379, try removing + symbols

* Per #2379, move projectKey into xml workflow and remove sonar-project.properties.

* Per #2379, try following the instructions at https://github.com/sonarsource-cfamily-examples/linux-autotools-gh-actions-sq/blob/main/.github/workflows/build.yml ci-skip-all

* Per #2379, see details of progress described in this issue comment: #2379 (comment)

* Unrelated to #2379, just removing spurious space that gets flagged as a diff when re-running enum_to_string on seneca.

* Per #2379, try running SonarQube through GitHub.

* Per #2379, remove empty env section and also disable the testing workflow temporarily during sonarqube development.

* Per #2379, fix docker image name.

* Per #2379, delete unneeded script.

* Per #2379, update GHA to scan Python code and push to the correct SonarQube projects.

* Per #2379, update GHA SonarQube project names

* Per #2379, update the build job name

* Per #2379, update the comile step name

* Per #2379, switch to consistent SONAR variable names.

* Per #2379, fix type in sed expressions.

* Per #2379, just rename the log artifact

* Per #2379, use time_command wrapper instead of run_command.

* Per #2379, fix bad env var name

* Per #2379, switch from egrep to grep.

* Per #2379, just try cat-ting the logfile

* Per #2379, test whether cat-ting the log file actually works.

* Per #2379, revert back

* Per #2379, mention SonarQube in the PR template. Make workflow name more succinct.

* Per #2379, add SONAR_REFERENCE_BRANCH setting to define the sonar.newCode.referenceBranch property. The goal is to define the comparison reference branch for each SonarQube scan.

* Per #2379, have the sonarqube.yml job print the reference branch it's using

* Per #2379, intentionally introduce a new code smell to see if SonarQube correctly flag it as appearing in new code.

* Per #2379, trying adding the SonarQube quality gate check.

* Per #2379, add logic for using the report-task.txt output files to check the quality gate status for both the python and cxx scans.

* Per #2379 must use unique GHA id's

* Per #2379, working on syntax for quality gate checks

* Per #2379, try again.

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try yet again

* Per #2379

* Per #2379, add more debug

* Per #2379, remove -it option from docker run commands

* Per #2379, again

* Per #2379, now that the scan works as expected, remove the intentional SonarQube code smell as well as debug logging.

* Hotfix related to #2379. The sonar.newCode.referenceBranch and sonar.branch.name cannot be set to the same string! Only add the newCode definition when they differ.

* #2830 Changed enum STATJobType to enum class

* #2830 Changed STATLineType to enum class

* #2830 Changed Action to enum class

* #2830 Changed ModeDataType to enum class

* #2830 Changed StepCase to enum class

* #2830 Changed enum to enum class

* #2830 Changed GenesisPairCategory to enum class

* #2830 Removed rediundabt parenrthese

* #2830 Reduced same if checking

* #2830 Cleanup

* #2830 USe empty() instead of lebgth checking

* #2830 Adjusted indentations

* Feature #2379 develop sonarqube updates (#2850)

* Per #2379, move rgb2ctable.py into the python utility scripts directory for better organization and to enable convenient SonarQube scanning.

* Per #2379, remove point.py from the vx_python3_utils directory which cleary was inadvertenlty added during development 4 years ago. As far as I can tell it isn't being called by any other code and doesn't belong in the repository. Note that scripts/python/met/point.py has the same name but is entirely different.

* Per #2379, update the GHA SonarQube scan to do a single one with Python and C++ combined. The nightly build script is still doing 2 separate scans for now. If this all works well, they could also be combined into a single one.

* Per #2379, eliminate MET_CONFIG_OPTIONS from the SonarQube workflow since it doesn't need to be and probably shouldn't be configurable.

* Per #2379, trying to copy report-task.txt out of the image

* Per #2379, update build_met_sonarqube.sh to check the scan return status

* Per #2379, fix bash assignment syntax

* Per #2379, remove unused SCRIPT_DIR envvar

* Per #2379, switch to a single SonarQube scan for MET's nightly build as well

* Feature 2654 ascii2nc polar buoy support (#2846)

* Added iabp data type, and modified file_handler to filter based on time range, which was added as a command line option

* handle time using input year, hour, min, and doy

* cleanup and switch to position day of year for time computations

* Added an ascii2nc unit test for iabp data

* Added utility scripts to pull iabp data from the web and find files in a time range

* Modified iabp_handler to always output a placeholder 'location' observation with value 1

* added description of IABP data python utility scripts

* Fixed syntax error

* Fixed Another syntax error.

* Slight reformat of documentation

* Per #2654, update the Makefiles in scripts/python/utility to include all the python scripts that should be installed.

* Per #2654, remove unused code from get_iabp_from_web.py that is getting flagged as a bug by SonarQube.

* Per #2654, fix typo in docs

---------

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Feature #2786 rpss_from_prob (#2861)

* Per #2786, small change to a an error message unrelated to this development.

* Per #2786, add RPSInfo::set_climo_prob() function to derive the RPS line type from climatology probability bins. And update Ensemble-Stat to call it.

* Per #2786, minor change to clarify error log message.

* Per #2786, for is_prob = TRUE input, the RPS line type is the only output option. Still need to update docs!

* Per #2786, add new call to Ensemble-Stat to test computing RPS from climo probabilities

* Per #2786, use name rps_climo_bin_prob to be very explicit.

* Per #2786, redefine logic of RPSInfo::set_climo_bin_prob() to match the CPC definition. Note that reliability, resolution, uncertainty, and RPSS based on the sample climatology are all set to bad data. Need to investigate whether they can be computed using these inputs.

* Per #2786, remove the requirement that any fcst.prob_cat_thresh thresholds must be defined. If they are defined, pass them through to the FCST_THRESH output column. If not, write NA. Add check to make sure the event occurs in exactly 1 category.

* Per #2786, don't enforce fcst.prob_cat_thresh == obs.prob_cat_thresh for probabilistic inputs. And add more is_prob checks so that only the RPS line type can be written when given probabilistic inputs.

* updated documentation

* Per #2786, call rescale_probability() function to convert from 0-100 probs to 0-1 probs.

---------

Co-authored-by: j-opatz <jopatz@ucar.edu>

* Feature #2862 v12.0.0-beta4 (#2864)

* Feature #2379 develop single_sq_project (#2865)

* Hotfix to the documentation in the develop branch. Issue #2858 was closed as a duplicate of #2857. I had included it in the MET-12.0.0-beta4 release notes, but the work is not yet actually complete.

* Feature 2842 ugrid config (#2852)

* #2842 Removed UGrid related setting

* #2842 Corrected vertical level for data_plane_array

* #2842 Do not allow the time range

* #2842 The UGridConfig file can be passed as ugrid_dataset

* #2842 Changed -config option to -ugrid_config

* #2842 Deleted UGrid configurations

* 2842 Fix a compile error when UGrid is disabled

* #2842 Cleanup

* #2842 Added an unittest point_stat_ugrid_mpas_config

* #2842 Added a PointStatConfig without UGrid dataset.

* #2842 Corrected ty[po at the variable name

* Switched from time_centered to time_instant. I think time_centered is the center of the forecast lead window and time_instant is the time the forecast is valid (end of forecast window).

* #2842 Removed ugrid_max_distance_km and unused metadata names

* #2842 Restored time variable time_instant for LFric

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjusted lon to between -180 to 180

* #2842 Changed variable names

* Per #2842, switch from degrees east to west right when the longitudes are read.

* #2842, switch from degrees east to west right when the longitudes are read

* #2842 Cleanup debug messages

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature 2753 comp script config (#2868)

* set dynamic library file extension to .dylib if running on MacOS and .so otherwise

* Added disabling of jasper documentation for compiliation on Hera

* Updated

* remove extra export of compiler env vars

* include full path to log file so it is easier to file the log file to examine when a command fails

* send cmake output to a log file

* remove redundant semi-colon

* use full path to log file so it is easier to examine on failure

* use run_cmd to catch if rm command fails

* Modifications for compilation on hera, gaea, and orion

* Updating

* fixed variable name

* clean up if/else statements

* set TIFF_LIBRARY_RELEASE argument to use full path to dynamic library file to prevent failure installing proj library

* set LDFLAGS so that LDFLAGS value set in the user's environment will also be used

* Updated based on gaea, orion, and hera installs

* Updated

* change extension of dynamic library files only if architecture is arm64 because older Macs still use .so

* added netcdf library to args to prevent error installing NetCDF-CXX when PROJ has been installed in the same run of the script -- PATH is set in the COMPILE_PROJ if block that causes this flag from being added automatically

* clean up how rpath and -L are added to LDFLAGS so that each entry is separate -- prevents errors installing on Mac arm64 because multiple rpath values aren't read using :. Also use MET_PROJLIB

* Updated

* removed -ltiff from MET libs

* only add path to rpath and -L arguments if they are not already included in LDFLAGS

* changed from using LIB_TIFF (full path to tiff lib file) to use TIFF_LIB_DIR (dir containing tiff lib file). Added TIFF_INCLUDE_DIR to proj compilation and -DJAS_ENABLE_DOC to jasper compliation taken from @jprestop branch

* update comments

* ensure all MET_* and MET_*LIB variables are added to the rpath for consistency

* remove unnecessary if block and only export LDFLAGS at the end of setting locally

* Updated

* Added section for adding <VALUE>/lib64 and rearranged placement of ADDTL_DIR

* Commenting out the running of the Jasper lib tests

* Updating and/or removing files

* Updating and/or removing files

* Latest udpates which include the addition of the tiff library for proj

* Remove commented out line.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Per 2753, added -lm to configure_lib_args for NetCDF-CXX

* Per #2753 updating acorn files

* Per #2753, update wcoss2 files

* Per #2753, updating acorn file to include MET_PYTHON_EXE

* Per #2753, updated files for 12.0.0 for derecho

* Per #2753, updated derecho file adding MET_PYTHON_EXE and made corrections

* Updating config files

* Updating orion files

* Updates for gaea's files

* Updating gaea modulefile

* Removing modulefile for cheyenne

* Added MET_PYTHON_EXE

* Added MET_PYTHON_EXE to hera too

* Adding file for hercules

* Removing equals sign from setenv

* Adding file for hercules

* Updated script to add libjpeg installation for grib2c

* Per #2753, Adding file for casper

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature #2795 level_mismatch_warning (#2873)

* Per #2795, move the warning message about level mismatch from the config validation step to when the forecast files are being processed. Only check this when the number of forecast fields is greater than 1, but no longer limit the check to pressure levels only.

* Per #2795, add comments

* Whitespace

* Per #2795, port level mismatch fix over to Ensemble-Stat. Check it for each verification task, but only print it once for each task, rather than once for each task * ensemble member.

* Feature #2870 removing_MISSING_warning (#2872)

* Per #2870, define utility functions for parsing the file type from a file list and for logging missing files, checking for the MISSING keyword. Also, update Ensemble-Stat and Gen-Ens-Prod to call these functions.

* Per #2870, update the gen_ens_prod tests to demonstrate the use of the MISSING keyword for missing files. METplus uses this keyword for Ensemble-Stat and Gen-Ens-Prod.

* Feature 2842 ugrid config (#2875)

* #2842 Removed UGrid related setting

* #2842 Corrected vertical level for data_plane_array

* #2842 Do not allow the time range

* #2842 The UGridConfig file can be passed as ugrid_dataset

* #2842 Changed -config option to -ugrid_config

* #2842 Deleted UGrid configurations

* 2842 Fix a compile error when UGrid is disabled

* #2842 Cleanup

* #2842 Added an unittest point_stat_ugrid_mpas_config

* #2842 Added a PointStatConfig without UGrid dataset.

* #2842 Corrected ty[po at the variable name

* Switched from time_centered to time_instant. I think time_centered is the center of the forecast lead window and time_instant is the time the forecast is valid (end of forecast window).

* #2842 Removed ugrid_max_distance_km and unused metadata names

* #2842 Restored time variable time_instant for LFric

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjusted lon to between -180 to 180

* #2842 Changed variable names

* Per #2842, switch from degrees east to west right when the longitudes are read.

* #2842, switch from degrees east to west right when the longitudes are read

* #2842 Cleanup debug messages

* #2842 Disabled output types except STAT for sl1l2

* #2842 Disabled output types except STAT for sl1l2 and MPR

* #2842 Reduced output files for UGrid

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Hotfix to develop branch to remove duplicate test named 'point_stat_ugrid_mpas_config'. That was causing unit_ugrid.xml to fail because it was still looking for .txt output files that are no longer being generated.

* Feature 2748 document ugrid (#2869)

* Initial documentation of the UGRID capability.

* Fixes error in references, adds appendix to index, and adds sub-section for configuration entries and a table for metadata map items.

* Corrects LFRic, rewords section on UGRID conventions, updates description of using GridStat, and removes mention of nodes.

* Forgot one more mention of UGRID conventions.

* Incorporates more suggestions from @willmayfield.

* Switches to numerical table reference.

* Feature #2781 Convert MET NetCDF point obs to Pandas DataFrame (#2877)

* Per #2781, added function to convert MET NetCDF point observation data to pandas so it can be read and modified in a python embedding script. Added example python embedding script

* ignore python cache files

* fixed function call

* reduce cognitive complexity to satisfy SonarQube and add boolean return value to catch if function fails to read data

* clean up script and add comments

* replace call to object function that doesn't exist, handle exception when file passed to script cannot be read by the NetCDF library

* rename example script

* add new example script to makefiles

* fix logic to build pandas DataFrame to properly get header information from observation header IDs

* Per #2781, add unit test to demonstrate python embedding script that reads MET NetCDF point observation file and converts it to a pandas DataFrame

* Per #2781, added init function for nc_point_obs to take an input filename. Also raise TypeError exception from nc_point_obs.read_data() if input file cannot be read

* call parent class init function to properly initialize nc_point_obs

* Feature #2833 pcp_combine_missing (#2886)

* Per #2883, add -input_thresh command line option to configure allowable missing input files.

* Per #2883, update pcp_combine usage statement.

* Per #2883, update existing pcp_combine -derive unit test example by adding 3 new missing file inputs at the beginning, middle, and end of the file list. The first two are ignored since they include the MISSING keyword, but the third without that keyword triggers a warning message as desired. The -input_thresh option is added to only require 70% of the input files be present. This should produce the exact same output data.

* Per #2883, update the pcp_combine logic for the sum command to allow missing data files based on the -input_thresh threshold. Add a test in unit_pcp_combine.xml to demonstrate.

* Update docs/Users_Guide/reformat_grid.rst

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Per #2883, update pcp_combine usage statement in the code to be more simliar to the User's Guide.

* Per #2883, switch to using derive_file_list_missing as the one containing missing files and recreate derive_file_list as it had existed for the test named pcp_combine_derive_VLD_THRESH.

* Per #2883, move initialization inside the same loop to resolve SonarQube issues.

* Per #2883, update sum_data_files() to switch from allocating memory to using STL vectors to satisfy SonarQube.

* Per #2883, changes to declarations of variables to satisfy SonarQube.

* Per #2883, address more SonarQube issues

* Per #2883, backing out an unintended change I made to tcrmw_grid.cc. This change belongs on a different branch.

* Per #2883, update logic of parse_file_list_type() function to handle python input strings. Also update pcp_combine to parse the type of input files being read and log non-missing python input files expected.

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Per #2888, update STATAnalysisJob::dump_stat_line() to support dumping stat line types VCNT, RPS, DMAP, and SSIDX. (#2891)

* Per #2659, making updates as proposed at the 20240516 MET Eng. Mtg. (#2895)

* Feature #2395 TOTAL_DIR (#2892)

* Per #2395, remove the n_dir_undef and n_dira_undef variables that are superceded by the new dcount and dacount VL1L2Info members to keep track of the number of valid wind direction vectors.

* Per #2395, add TOTAL_DIR columns to the VL1L2, VAL1L2, and VCNT line types and update the header column tables.

* Per #2395, update the User's Guide to list the new TOTAL_DIR columns in the VL1L2, VAL1L2, and VCNT line types.

* Per #2395, update stat_analysis to parse the new TOTAL_DIR columns and use the values to aggregate results when needed.

* Per #2395, for SonarQube change 'const char *' to 'const char * const' to satisfy the finding that 'Global variables should be const.' Should probably switch from 'char char *' to strings eventually. But for now, I'm just making up for some SonarQube technical debt.

* Per #2395, fix typo in placement of the DIR_ME column name in the met_header_columns_V12.0.txt file

* Per #2395, add 2 new Stat-Analysis jobs to demonstrate the processing of VL1L2 lines.

* Per #2395, update logic of is_vector_dir_stat(). Instead of just checking 'DIR_', check 'DIR_ME', 'DIR_MAE', and 'DIR_MSE' to avoid an false positive match for the 'DIR_ERR' column which is computed from the vector partial sums rather than the individual direction differences.

* Bugfix #2897 develop python_valid_time (#2899)

* Per #2897, fix typos in 2 log messages. Also fix the bug in storing the valid time strings. The time string in vld_array should exactly correspond to the numeric unixtime values in vld_num_array. Therefore they need to be updated inside the same if block. The bug is that we were storing only the unique unixtime values but storing ALL of the valid time string, not just the unique ones.

* Per #2897, minor change to formatting of log message

* MET #2897, don’t waste time searching, just set the index to n - 1

* Per #2897, remove unused add_prec_point_obs(...) function

* Per #2897, update add_point_obs(...) logic for DEBUG(9) to print very detailed log messages about what obs are being rejected and which are being used for each verification task.

* Per #2897, refine the 'using' log message to make the wording consistent with the summary rejection reason counts log message

* Per #2897, update the User's Guide about -v 9 for Point-Stat

---------

Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Bugfix 2867 point2grid qc flag (#2890)

* #2867 Added compute_adp_qc_flag and adjusted ADP QC flags

* #2867 Added point2grid_GOES_16_ADP_Enterprise_high. Changed AOD QC flags to 0,1,2 (was 1,2,3)

* #2867 Added get_nc_att_values_

* #2867 Added get_nc_att_values. Added the argument allow_conversion to get_nc_data(netCDF::NcVar *, uchar  *data)

* #2867 Read the ADP QC flag values and meanings attributes from DQF variable and set the QC high, meduium, low values to support Enterprise algorithm. Adjusted the ADP QC values by using AOD qc values

* #2867 Cleanup

* #2867 Corrected indent

* #2867 Changed log message

* #2867 Removed unused argument

* #2867 Removed unused argument

* Cleanup

* #2867 Fix SonarQube findings

* #2867 Deleted protected section with no members

* #2867 Cleanup

* #2867 FIxed SonarQube findings; unused local variables, decalare as const, etc

* #2867 MOved include directives to top

* #2867 Changed some argumenmt with references to avoid copying objects

* #2867 Do not filter by QC flag if -qc is not given

* #2867 Use enumj class for GOES QC: HIGH, MEDIUM, and LOW

* #2867 Added log message back which were deleted accidently

* #2867 Chaned statci const to constexpr

* #2867 Initial release. Separated from nc_utils.h

* @2867 Added nc_utils_core.h

* #2867 Moved some blocks to nc_utils_core.h

* #2867 Include nc_utils_core.h

* #2867 Added const references

* Per #2867, fixing typo in comments.

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: j-opatz <jopatz@ucar.edu>

* Hotfix to develop to fix the update_truth.yml workflow logic. This testing workflow run failed (https://github.com/dtcenter/MET/actions/runs/9209471209). Here we switch to a unique update truth branch name to avoid conflicts.

* Avoid pushing directly to the develop or main_vX.Y branches since that is not necessary for the automation logic in MET.

* #2904 Changed R path to R-4.4.0 (#2905)

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>

* Feature #2912 pb2nc error (#2914)

* Feature 2717 convert unit.pl to unit.py (#2871)

* created unit.py module in new internal/test_unit/python directory

* added xml parsing to unit.py

* added repl_env function

* added reading of the remaining xml tags in build_tests function

* progress on main function (putting together test commands)

* a few more lines in the main function

* minor updates

* fixed how the test command was being run

* added if name/main and command line parsing

* fixed handling of no 'env' in cmd_only mode

* handle params from xml that have \ after filename without space in between

* added logging

* added some more pieces to unit

* more updates to unit.py, including running checks on output files

* bug fixes, improved handling of output file names, improved handling of env vars, improved logging output

* fixed how shell commands are run, and other minor fixes

* added last bits from the perl script, fixed some bugs

* created unit.py module in new internal/test_unit/python directory

* added xml parsing to unit.py

* added repl_env function

* added reading of the remaining xml tags in build_tests function

* progress on main function (putting together test commands)

* a few more lines in the main function

* minor updates

* update scripts to call python unit test script instead of the old perl script

* fix she-bang line to allow script to be run without python3 before it

* add missing test_dir and exit_on_fail tags that are found in the rest of the unit test xml files

* fix call to logger.warning

* change tags named 'exists' to 'exist' to match the rest of the xml files

* added logger to function

* removed tab at end of line that was causing output file path to be excluded from the command

* fix broken checks for output files

* incorporated george's recommended changes

* changed default to overwrite logs; allow for more than one xml file to be passed in command

---------

Co-authored-by: Natalie babij <natalie.babij@natbabij-mac1.home>
Co-authored-by: Natalie babij <natalie.babij@vpn68-237.vpnclient.ucar.edu>
Co-authored-by: Natalie babij <natalie.babij@gsd-sslvpn-209.fsl.noaa.gov>
Co-authored-by: Natalie Babij <nbabij@seneca.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: j-opatz <jopatz@ucar.edu>

* Bugfix 2867 point2grid qc unittest (#2913)

* #2867 Added compute_adp_qc_flag and adjusted ADP QC flags

* #2867 Added point2grid_GOES_16_ADP_Enterprise_high. Changed AOD QC flags to 0,1,2 (was 1,2,3)

* #2867 Added get_nc_att_values_

* #2867 Added get_nc_att_values. Added the argument allow_conversion to get_nc_data(netCDF::NcVar *, uchar  *data)

* #2867 Read the ADP QC flag values and meanings attributes from DQF variable and set the QC high, meduium, low values to support Enterprise algorithm. Adjusted the ADP QC values by using AOD qc values

* #2867 Cleanup

* #2867 Corrected indent

* #2867 Changed log message

* #2867 Removed unused argument

* #2867 Removed unused argument

* Cleanup

* #2867 Fix SonarQube findings

* #2867 Deleted protected section with no members

* #2867 Cleanup

* #2867 FIxed SonarQube findings; unused local variables, decalare as const, etc

* #2867 MOved include directives to top

* #2867 Changed some argumenmt with references to avoid copying objects

* #2867 Do not filter by QC flag if -qc is not given

* #2867 Use enumj class for GOES QC: HIGH, MEDIUM, and LOW

* #2867 Added log message back which were deleted accidently

* #2867 Chaned statci const to constexpr

* #2867 Initial release. Separated from nc_utils.h

* @2867 Added nc_utils_core.h

* #2867 Moved some blocks to nc_utils_core.h

* #2867 Include nc_utils_core.h

* #2867 Added const references

* #2867 Some 'static const' were chnaged to constexpr

* #2867 Changed -qc options (1,2,3 to 0,1 - high & medium) for AOD

* #2867 Merged develop branch

* #2867 Corrected the unit test name

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: Howard Soh <hsoh@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>
Co-authored-by: davidalbo <dave@ucar.edu>
Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: natalieb-noaa <146213121+natalieb-noaa@users.noreply.github.com>
Co-authored-by: Natalie babij <natalie.babij@natbabij-mac1.home>
Co-authored-by: Natalie babij <natalie.babij@vpn68-237.vpnclient.ucar.edu>
Co-authored-by: Natalie babij <natalie.babij@gsd-sslvpn-209.fsl.noaa.gov>
Co-authored-by: Natalie Babij <nbabij@seneca.rap.ucar.edu>
Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com>
JohnHalleyGotway added a commit that referenced this pull request Jun 19, 2024
* 2673 Moved dvariable declaration after include

* #2673 Move down namespace below include

* Feature #2395 wdir (#2820)

* Per #2395, add new columns to VL1L2, VAL1L2, and VCNT line types for wind direction statistics. Work still in progress.

* Per #2395, write the new VCNT columns to the output and document the additions to the VL1L2, VAL1L2, and VCNT columns.

* Per #2395, add the definition of new statistics to Appendix G.

* Per #2395, update file version history.

* Per #2395, tweak warning message about zero wind vectors and update grid-stat and point-stat to log calls to the do_vl1l2() function.

* Per #2395, refine the weights for wind direction stats, ignoring the undefined directions.

* Update src/tools/core/stat_analysis/aggr_stat_line.cc

* Update src/tools/core/stat_analysis/parse_stat_line.cc

* Update src/tools/core/stat_analysis/aggr_stat_line.cc

* Recent changes to branch protection rules for the develop branch have broken the logic of the update_truth.yml GHA workflow. Instead of submitting a PR to merge develop into develop-ref directly, use an intermediate update_truth_for_develop branch.

* Feature #2280 ens_prob (#2823)

* Per #2280, update to support probability threshold strings like ==8, where 8 is the number of ensemble members, to create probability bins centered on the n/8 for n = 0 ... 8.

* Per #2280, update docs about probability threshold settings.

* Per #2280, use a loose tolerance when checking for consistent bin widths.

* Per #2280, add a new unit test for grid_stat to demonstrate processing the output from gen_ens_prod.

* Per #2280, when verifying NMEP probability forecasts, smooth the obs data first.

* Per #2280, only request STAT output for the PCT line type to match unit_grid_stat.xml and minimize the new output files.

* Per #2280, update config option docs.

* Per #2280, update config option docs.

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 restored return statement

* #2673 Added std namespace

* #2673 Moved down 'using namespace' statement. Removed trailing spaces

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Added std namespace

* #2673 Added std namespace

* #2673 Added std namespace

* #2673 Changed literal 1 to boolean value, true

* Feature #2673 enum_to_string (#2835)

* Feature #2583 ecnt (#2825)

* Unrelated to #2583, fix typo in code comments.

* Per #2583, add hooks write 3 new ECNT columns for observation error data.

* Per #2583, make error messages about mis-matched array lengths more informative.

* Per #2583, switch to more concise variable naming conventions of ign_oerr_cnv, ign_oerr_cor, and dawid_seb.

* Per #2583, fix typo to enable compilation

* Per #2583, define the 5 new ECNT column names.

* Per #2583, add 5 new columns to the ECNT table in the Ensemble-Stat chapter

* Per #2583, update stat_columns.cc to write these 5 new ECNT columns

* Per #2583, update ECNTInfo class to compute the 5 new ECNT statistics.

* Per #2583, update stat-analysis to parse the 5 new ECNT columns.

* Per #2583, update aggregate_stat logic for 5 new ECNT columns.

* Per #2583, update PairDataEnsemble logic for 5 new ECNT columns

* Per #2583, update vx_statistics library with obs_error handling logic for the 5 new ECNT columns

* Per #2583, changes to make it compile

* Per #2583, changes to make it compile

* Per #2583, switch to a consistent ECNT column naming convention with OERR at the end. Using IGN_CONV_OERR and IGN_CORR_OERR.

* Per #2583, define ObsErrorEntry::variance() with a call to the dist_var() utility function.

* Per #2583, update PairDataEnsemble::compute_pair_vals() to compute the 5 new stats with the correct inputs.

* Per #2583, add DEBUG(10) log messages about computing these new stats.

* Per #2583, update Stat-Analysis to compute these 5 new stats from the ORANK line type.

* Per #2583, whitespace and comments.

* Per #2583, update the User's Guide.

* Per #2583, remove the DS_ADD_OERR and DS_MULT_OERR ECNT columns and rename DS_OERR as DSS, since observation error is not actually involved in its computation.

* Per #2583, minor update to Appendix C

* Per #2583, rename ECNT line type statistic DSS to IDSS.

* Per #2583, fix a couple of typos

* Per #2583, more error checking.

* Per #2583, remove the ECNT IDSS column since its just 2*pi*IGN, the existing ignorance score, and only provides meaningful information when combined with the other Dawid-Sebastiani statistics that have already been removed.

* Per #2583, add Eric's documentation of these new stats to Appendix C. Along the way, update the DOI links in the references based on this APA style guide: https://apastyle.apa.org/style-grammar-guidelines/references/dois-urls#:~:text=Include%20a%20DOI%20for%20all,URL%2C%20include%20only%20the%20DOI.

* Per #2583, fix new equations with embedded underscores for PDF by defining both html and pdf formatting options.

* Per #2583, update the ign_conv_oerr equation to include a 2
*pi multiplier for consistency with the existing ignorance score. Also, fix the documented equations.

* Per #2583, remove log file that was inadvertently added on this branch.

* Per #2583, simplify ObsErrorEntry::variance() implementation. For the distribution type of NONE, return a variance of 0.0 rather than bad data, as discussed with @michelleharrold and @JeffBeck-NOAA on 3/8/2024.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Revert #2825 since more documentation and testing is needed (#2837)

This reverts commit 108a895.

* Feature #2583 ecnt fix IGN_OERR_CORR (#2838)

* Unrelated to #2583, fix typo in code comments.

* Per #2583, add hooks write 3 new ECNT columns for observation error data.

* Per #2583, make error messages about mis-matched array lengths more informative.

* Per #2583, switch to more concise variable naming conventions of ign_oerr_cnv, ign_oerr_cor, and dawid_seb.

* Per #2583, fix typo to enable compilation

* Per #2583, define the 5 new ECNT column names.

* Per #2583, add 5 new columns to the ECNT table in the Ensemble-Stat chapter

* Per #2583, update stat_columns.cc to write these 5 new ECNT columns

* Per #2583, update ECNTInfo class to compute the 5 new ECNT statistics.

* Per #2583, update stat-analysis to parse the 5 new ECNT columns.

* Per #2583, update aggregate_stat logic for 5 new ECNT columns.

* Per #2583, update PairDataEnsemble logic for 5 new ECNT columns

* Per #2583, update vx_statistics library with obs_error handling logic for the 5 new ECNT columns

* Per #2583, changes to make it compile

* Per #2583, changes to make it compile

* Per #2583, switch to a consistent ECNT column naming convention with OERR at the end. Using IGN_CONV_OERR and IGN_CORR_OERR.

* Per #2583, define ObsErrorEntry::variance() with a call to the dist_var() utility function.

* Per #2583, update PairDataEnsemble::compute_pair_vals() to compute the 5 new stats with the correct inputs.

* Per #2583, add DEBUG(10) log messages about computing these new stats.

* Per #2583, update Stat-Analysis to compute these 5 new stats from the ORANK line type.

* Per #2583, whitespace and comments.

* Per #2583, update the User's Guide.

* Per #2583, remove the DS_ADD_OERR and DS_MULT_OERR ECNT columns and rename DS_OERR as DSS, since observation error is not actually involved in its computation.

* Per #2583, minor update to Appendix C

* Per #2583, rename ECNT line type statistic DSS to IDSS.

* Per #2583, fix a couple of typos

* Per #2583, more error checking.

* Per #2583, remove the ECNT IDSS column since its just 2*pi*IGN, the existing ignorance score, and only provides meaningful information when combined with the other Dawid-Sebastiani statistics that have already been removed.

* Per #2583, add Eric's documentation of these new stats to Appendix C. Along the way, update the DOI links in the references based on this APA style guide: https://apastyle.apa.org/style-grammar-guidelines/references/dois-urls#:~:text=Include%20a%20DOI%20for%20all,URL%2C%20include%20only%20the%20DOI.

* Per #2583, fix new equations with embedded underscores for PDF by defining both html and pdf formatting options.

* Per #2583, update the ign_conv_oerr equation to include a 2
*pi multiplier for consistency with the existing ignorance score. Also, fix the documented equations.

* Per #2583, remove log file that was inadvertently added on this branch.

* Per #2583, simplify ObsErrorEntry::variance() implementation. For the distribution type of NONE, return a variance of 0.0 rather than bad data, as discussed with @michelleharrold and @JeffBeck-NOAA on 3/8/2024.

* Per #2583, updates to ensemble-stat.rst recommended by @michelleharrold and @JeffBeck-NOAA.

* Per #2583, implement changes to the IGN_CORR_OERR corrected as directed by @ericgilleland.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Update the pull request template to include a question about expected impacts to existing METplus Use Cases.

* #2830 Changed enum Builtin to enum class

* #2830 Converted enum to enum class at config_constants.h

* Feature #2830 bootstrap enum (#2843)

* Bugfix #2833 develop azimuth (#2840)

* Per #2833, fix n-1 bug when defining the azimuth delta for range/azimuth grids.

* Per #2833, when definng TcrmwData:range_max_km, divide by n_range - 1 since the range values start at 0.

* Per #2833, remove max_range_km from the TC-RMW config file. Set the default rmw_scale to NA so that its not used by default. And update the documentation. Still actually need to make the logic of the code work as it should.

* Per #2833, update tc_rmw to define the range as either a function of rmw or using explicit spacing in km.

* Per #2833, update the TCRMW Config files to remove the max_range_km entry, and update the unit test for one call to use RMW ranges and the other to use ranges defined in kilometers.

* Per #2833, just correct code comments.

* Per #2833, divide by n - 1 when computing the range delta, rather than n.

* Per #2833, correct the handling of the maximum range in the tc-rmw tool. For fixed delta km, need to define the max range when setting up the grid at the beginning.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* #2830 Changed enum PadSize to enum class

* #2830 Removed redundant parantheses

* #2830 Removed commenyted out code

* #2830 Use auto

* #2830 Changed enum to enum class for DistType, InterpMthd, GridTemplates, and NormalizeType

* #2830 Moved enum_class_as_integer from header file to cc files

* #2830 Added enum_as_int.hpp

* #2830 Added enum_as_int.hpp

* Deleted enum_class_as_integer and renamed it to enum_class_as_int

* Removed redundant paranthese

* #2830 Changed enum to enumclass

* #2830 Changed enum_class_as_integer to enum_class_as_int

* Feature #2379 sonarqube gha (#2847)

* Per #2379, testing initial GHA SonarQube setup.

* Per #2379, switch to only analyzing the src directory.

* Per #2379, move more config logic from sonar-project.properties into the workflow. #ci-skip-all

* Per #2379, try removing + symbols

* Per #2379, move projectKey into xml workflow and remove sonar-project.properties.

* Per #2379, try following the instructions at https://github.com/sonarsource-cfamily-examples/linux-autotools-gh-actions-sq/blob/main/.github/workflows/build.yml ci-skip-all

* Per #2379, see details of progress described in this issue comment: #2379 (comment)

* Unrelated to #2379, just removing spurious space that gets flagged as a diff when re-running enum_to_string on seneca.

* Per #2379, try running SonarQube through GitHub.

* Per #2379, remove empty env section and also disable the testing workflow temporarily during sonarqube development.

* Per #2379, fix docker image name.

* Per #2379, delete unneeded script.

* Per #2379, update GHA to scan Python code and push to the correct SonarQube projects.

* Per #2379, update GHA SonarQube project names

* Per #2379, update the build job name

* Per #2379, update the comile step name

* Per #2379, switch to consistent SONAR variable names.

* Per #2379, fix type in sed expressions.

* Per #2379, just rename the log artifact

* Per #2379, use time_command wrapper instead of run_command.

* Per #2379, fix bad env var name

* Per #2379, switch from egrep to grep.

* Per #2379, just try cat-ting the logfile

* Per #2379, test whether cat-ting the log file actually works.

* Per #2379, revert back

* Per #2379, mention SonarQube in the PR template. Make workflow name more succinct.

* Per #2379, add SONAR_REFERENCE_BRANCH setting to define the sonar.newCode.referenceBranch property. The goal is to define the comparison reference branch for each SonarQube scan.

* Per #2379, have the sonarqube.yml job print the reference branch it's using

* Per #2379, intentionally introduce a new code smell to see if SonarQube correctly flag it as appearing in new code.

* Per #2379, trying adding the SonarQube quality gate check.

* Per #2379, add logic for using the report-task.txt output files to check the quality gate status for both the python and cxx scans.

* Per #2379 must use unique GHA id's

* Per #2379, working on syntax for quality gate checks

* Per #2379, try again.

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try yet again

* Per #2379

* Per #2379, add more debug

* Per #2379, remove -it option from docker run commands

* Per #2379, again

* Per #2379, now that the scan works as expected, remove the intentional SonarQube code smell as well as debug logging.

* Hotfix related to #2379. The sonar.newCode.referenceBranch and sonar.branch.name cannot be set to the same string! Only add the newCode definition when they differ.

* #2830 Changed enum STATJobType to enum class

* #2830 Changed STATLineType to enum class

* #2830 Changed Action to enum class

* #2830 Changed ModeDataType to enum class

* #2830 Changed StepCase to enum class

* #2830 Changed enum to enum class

* #2830 Changed GenesisPairCategory to enum class

* #2830 Removed rediundabt parenrthese

* #2830 Reduced same if checking

* #2830 Cleanup

* #2830 USe empty() instead of lebgth checking

* #2830 Adjusted indentations

* Feature #2379 develop sonarqube updates (#2850)

* Per #2379, move rgb2ctable.py into the python utility scripts directory for better organization and to enable convenient SonarQube scanning.

* Per #2379, remove point.py from the vx_python3_utils directory which cleary was inadvertenlty added during development 4 years ago. As far as I can tell it isn't being called by any other code and doesn't belong in the repository. Note that scripts/python/met/point.py has the same name but is entirely different.

* Per #2379, update the GHA SonarQube scan to do a single one with Python and C++ combined. The nightly build script is still doing 2 separate scans for now. If this all works well, they could also be combined into a single one.

* Per #2379, eliminate MET_CONFIG_OPTIONS from the SonarQube workflow since it doesn't need to be and probably shouldn't be configurable.

* Per #2379, trying to copy report-task.txt out of the image

* Per #2379, update build_met_sonarqube.sh to check the scan return status

* Per #2379, fix bash assignment syntax

* Per #2379, remove unused SCRIPT_DIR envvar

* Per #2379, switch to a single SonarQube scan for MET's nightly build as well

* Feature 2654 ascii2nc polar buoy support (#2846)

* Added iabp data type, and modified file_handler to filter based on time range, which was added as a command line option

* handle time using input year, hour, min, and doy

* cleanup and switch to position day of year for time computations

* Added an ascii2nc unit test for iabp data

* Added utility scripts to pull iabp data from the web and find files in a time range

* Modified iabp_handler to always output a placeholder 'location' observation with value 1

* added description of IABP data python utility scripts

* Fixed syntax error

* Fixed Another syntax error.

* Slight reformat of documentation

* Per #2654, update the Makefiles in scripts/python/utility to include all the python scripts that should be installed.

* Per #2654, remove unused code from get_iabp_from_web.py that is getting flagged as a bug by SonarQube.

* Per #2654, fix typo in docs

---------

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Feature #2786 rpss_from_prob (#2861)

* Per #2786, small change to a an error message unrelated to this development.

* Per #2786, add RPSInfo::set_climo_prob() function to derive the RPS line type from climatology probability bins. And update Ensemble-Stat to call it.

* Per #2786, minor change to clarify error log message.

* Per #2786, for is_prob = TRUE input, the RPS line type is the only output option. Still need to update docs!

* Per #2786, add new call to Ensemble-Stat to test computing RPS from climo probabilities

* Per #2786, use name rps_climo_bin_prob to be very explicit.

* Per #2786, redefine logic of RPSInfo::set_climo_bin_prob() to match the CPC definition. Note that reliability, resolution, uncertainty, and RPSS based on the sample climatology are all set to bad data. Need to investigate whether they can be computed using these inputs.

* Per #2786, remove the requirement that any fcst.prob_cat_thresh thresholds must be defined. If they are defined, pass them through to the FCST_THRESH output column. If not, write NA. Add check to make sure the event occurs in exactly 1 category.

* Per #2786, don't enforce fcst.prob_cat_thresh == obs.prob_cat_thresh for probabilistic inputs. And add more is_prob checks so that only the RPS line type can be written when given probabilistic inputs.

* updated documentation

* Per #2786, call rescale_probability() function to convert from 0-100 probs to 0-1 probs.

---------

Co-authored-by: j-opatz <jopatz@ucar.edu>

* Feature #2862 v12.0.0-beta4 (#2864)

* Feature #2379 develop single_sq_project (#2865)

* Hotfix to the documentation in the develop branch. Issue #2858 was closed as a duplicate of #2857. I had included it in the MET-12.0.0-beta4 release notes, but the work is not yet actually complete.

* Feature 2842 ugrid config (#2852)

* #2842 Removed UGrid related setting

* #2842 Corrected vertical level for data_plane_array

* #2842 Do not allow the time range

* #2842 The UGridConfig file can be passed as ugrid_dataset

* #2842 Changed -config option to -ugrid_config

* #2842 Deleted UGrid configurations

* 2842 Fix a compile error when UGrid is disabled

* #2842 Cleanup

* #2842 Added an unittest point_stat_ugrid_mpas_config

* #2842 Added a PointStatConfig without UGrid dataset.

* #2842 Corrected ty[po at the variable name

* Switched from time_centered to time_instant. I think time_centered is the center of the forecast lead window and time_instant is the time the forecast is valid (end of forecast window).

* #2842 Removed ugrid_max_distance_km and unused metadata names

* #2842 Restored time variable time_instant for LFric

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjusted lon to between -180 to 180

* #2842 Changed variable names

* Per #2842, switch from degrees east to west right when the longitudes are read.

* #2842, switch from degrees east to west right when the longitudes are read

* #2842 Cleanup debug messages

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature 2753 comp script config (#2868)

* set dynamic library file extension to .dylib if running on MacOS and .so otherwise

* Added disabling of jasper documentation for compiliation on Hera

* Updated

* remove extra export of compiler env vars

* include full path to log file so it is easier to file the log file to examine when a command fails

* send cmake output to a log file

* remove redundant semi-colon

* use full path to log file so it is easier to examine on failure

* use run_cmd to catch if rm command fails

* Modifications for compilation on hera, gaea, and orion

* Updating

* fixed variable name

* clean up if/else statements

* set TIFF_LIBRARY_RELEASE argument to use full path to dynamic library file to prevent failure installing proj library

* set LDFLAGS so that LDFLAGS value set in the user's environment will also be used

* Updated based on gaea, orion, and hera installs

* Updated

* change extension of dynamic library files only if architecture is arm64 because older Macs still use .so

* added netcdf library to args to prevent error installing NetCDF-CXX when PROJ has been installed in the same run of the script -- PATH is set in the COMPILE_PROJ if block that causes this flag from being added automatically

* clean up how rpath and -L are added to LDFLAGS so that each entry is separate -- prevents errors installing on Mac arm64 because multiple rpath values aren't read using :. Also use MET_PROJLIB

* Updated

* removed -ltiff from MET libs

* only add path to rpath and -L arguments if they are not already included in LDFLAGS

* changed from using LIB_TIFF (full path to tiff lib file) to use TIFF_LIB_DIR (dir containing tiff lib file). Added TIFF_INCLUDE_DIR to proj compilation and -DJAS_ENABLE_DOC to jasper compliation taken from @jprestop branch

* update comments

* ensure all MET_* and MET_*LIB variables are added to the rpath for consistency

* remove unnecessary if block and only export LDFLAGS at the end of setting locally

* Updated

* Added section for adding <VALUE>/lib64 and rearranged placement of ADDTL_DIR

* Commenting out the running of the Jasper lib tests

* Updating and/or removing files

* Updating and/or removing files

* Latest udpates which include the addition of the tiff library for proj

* Remove commented out line.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Per 2753, added -lm to configure_lib_args for NetCDF-CXX

* Per #2753 updating acorn files

* Per #2753, update wcoss2 files

* Per #2753, updating acorn file to include MET_PYTHON_EXE

* Per #2753, updated files for 12.0.0 for derecho

* Per #2753, updated derecho file adding MET_PYTHON_EXE and made corrections

* Updating config files

* Updating orion files

* Updates for gaea's files

* Updating gaea modulefile

* Removing modulefile for cheyenne

* Added MET_PYTHON_EXE

* Added MET_PYTHON_EXE to hera too

* Adding file for hercules

* Removing equals sign from setenv

* Adding file for hercules

* Updated script to add libjpeg installation for grib2c

* Per #2753, Adding file for casper

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature #2795 level_mismatch_warning (#2873)

* Per #2795, move the warning message about level mismatch from the config validation step to when the forecast files are being processed. Only check this when the number of forecast fields is greater than 1, but no longer limit the check to pressure levels only.

* Per #2795, add comments

* Whitespace

* Per #2795, port level mismatch fix over to Ensemble-Stat. Check it for each verification task, but only print it once for each task, rather than once for each task * ensemble member.

* Feature #2870 removing_MISSING_warning (#2872)

* Per #2870, define utility functions for parsing the file type from a file list and for logging missing files, checking for the MISSING keyword. Also, update Ensemble-Stat and Gen-Ens-Prod to call these functions.

* Per #2870, update the gen_ens_prod tests to demonstrate the use of the MISSING keyword for missing files. METplus uses this keyword for Ensemble-Stat and Gen-Ens-Prod.

* Feature 2842 ugrid config (#2875)

* #2842 Removed UGrid related setting

* #2842 Corrected vertical level for data_plane_array

* #2842 Do not allow the time range

* #2842 The UGridConfig file can be passed as ugrid_dataset

* #2842 Changed -config option to -ugrid_config

* #2842 Deleted UGrid configurations

* 2842 Fix a compile error when UGrid is disabled

* #2842 Cleanup

* #2842 Added an unittest point_stat_ugrid_mpas_config

* #2842 Added a PointStatConfig without UGrid dataset.

* #2842 Corrected ty[po at the variable name

* Switched from time_centered to time_instant. I think time_centered is the center of the forecast lead window and time_instant is the time the forecast is valid (end of forecast window).

* #2842 Removed ugrid_max_distance_km and unused metadata names

* #2842 Restored time variable time_instant for LFric

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjusted lon to between -180 to 180

* #2842 Changed variable names

* Per #2842, switch from degrees east to west right when the longitudes are read.

* #2842, switch from degrees east to west right when the longitudes are read

* #2842 Cleanup debug messages

* #2842 Disabled output types except STAT for sl1l2

* #2842 Disabled output types except STAT for sl1l2 and MPR

* #2842 Reduced output files for UGrid

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Hotfix to develop branch to remove duplicate test named 'point_stat_ugrid_mpas_config'. That was causing unit_ugrid.xml to fail because it was still looking for .txt output files that are no longer being generated.

* Feature 2748 document ugrid (#2869)

* Initial documentation of the UGRID capability.

* Fixes error in references, adds appendix to index, and adds sub-section for configuration entries and a table for metadata map items.

* Corrects LFRic, rewords section on UGRID conventions, updates description of using GridStat, and removes mention of nodes.

* Forgot one more mention of UGRID conventions.

* Incorporates more suggestions from @willmayfield.

* Switches to numerical table reference.

* Feature #2781 Convert MET NetCDF point obs to Pandas DataFrame (#2877)

* Per #2781, added function to convert MET NetCDF point observation data to pandas so it can be read and modified in a python embedding script. Added example python embedding script

* ignore python cache files

* fixed function call

* reduce cognitive complexity to satisfy SonarQube and add boolean return value to catch if function fails to read data

* clean up script and add comments

* replace call to object function that doesn't exist, handle exception when file passed to script cannot be read by the NetCDF library

* rename example script

* add new example script to makefiles

* fix logic to build pandas DataFrame to properly get header information from observation header IDs

* Per #2781, add unit test to demonstrate python embedding script that reads MET NetCDF point observation file and converts it to a pandas DataFrame

* Per #2781, added init function for nc_point_obs to take an input filename. Also raise TypeError exception from nc_point_obs.read_data() if input file cannot be read

* call parent class init function to properly initialize nc_point_obs

* Feature #2833 pcp_combine_missing (#2886)

* Per #2883, add -input_thresh command line option to configure allowable missing input files.

* Per #2883, update pcp_combine usage statement.

* Per #2883, update existing pcp_combine -derive unit test example by adding 3 new missing file inputs at the beginning, middle, and end of the file list. The first two are ignored since they include the MISSING keyword, but the third without that keyword triggers a warning message as desired. The -input_thresh option is added to only require 70% of the input files be present. This should produce the exact same output data.

* Per #2883, update the pcp_combine logic for the sum command to allow missing data files based on the -input_thresh threshold. Add a test in unit_pcp_combine.xml to demonstrate.

* Update docs/Users_Guide/reformat_grid.rst

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Per #2883, update pcp_combine usage statement in the code to be more simliar to the User's Guide.

* Per #2883, switch to using derive_file_list_missing as the one containing missing files and recreate derive_file_list as it had existed for the test named pcp_combine_derive_VLD_THRESH.

* Per #2883, move initialization inside the same loop to resolve SonarQube issues.

* Per #2883, update sum_data_files() to switch from allocating memory to using STL vectors to satisfy SonarQube.

* Per #2883, changes to declarations of variables to satisfy SonarQube.

* Per #2883, address more SonarQube issues

* Per #2883, backing out an unintended change I made to tcrmw_grid.cc. This change belongs on a different branch.

* Per #2883, update logic of parse_file_list_type() function to handle python input strings. Also update pcp_combine to parse the type of input files being read and log non-missing python input files expected.

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Per #2888, update STATAnalysisJob::dump_stat_line() to support dumping stat line types VCNT, RPS, DMAP, and SSIDX. (#2891)

* Per #2659, making updates as proposed at the 20240516 MET Eng. Mtg. (#2895)

* Feature #2395 TOTAL_DIR (#2892)

* Per #2395, remove the n_dir_undef and n_dira_undef variables that are superceded by the new dcount and dacount VL1L2Info members to keep track of the number of valid wind direction vectors.

* Per #2395, add TOTAL_DIR columns to the VL1L2, VAL1L2, and VCNT line types and update the header column tables.

* Per #2395, update the User's Guide to list the new TOTAL_DIR columns in the VL1L2, VAL1L2, and VCNT line types.

* Per #2395, update stat_analysis to parse the new TOTAL_DIR columns and use the values to aggregate results when needed.

* Per #2395, for SonarQube change 'const char *' to 'const char * const' to satisfy the finding that 'Global variables should be const.' Should probably switch from 'char char *' to strings eventually. But for now, I'm just making up for some SonarQube technical debt.

* Per #2395, fix typo in placement of the DIR_ME column name in the met_header_columns_V12.0.txt file

* Per #2395, add 2 new Stat-Analysis jobs to demonstrate the processing of VL1L2 lines.

* Per #2395, update logic of is_vector_dir_stat(). Instead of just checking 'DIR_', check 'DIR_ME', 'DIR_MAE', and 'DIR_MSE' to avoid an false positive match for the 'DIR_ERR' column which is computed from the vector partial sums rather than the individual direction differences.

* Bugfix #2897 develop python_valid_time (#2899)

* Per #2897, fix typos in 2 log messages. Also fix the bug in storing the valid time strings. The time string in vld_array should exactly correspond to the numeric unixtime values in vld_num_array. Therefore they need to be updated inside the same if block. The bug is that we were storing only the unique unixtime values but storing ALL of the valid time string, not just the unique ones.

* Per #2897, minor change to formatting of log message

* MET #2897, don’t waste time searching, just set the index to n - 1

* Per #2897, remove unused add_prec_point_obs(...) function

* Per #2897, update add_point_obs(...) logic for DEBUG(9) to print very detailed log messages about what obs are being rejected and which are being used for each verification task.

* Per #2897, refine the 'using' log message to make the wording consistent with the summary rejection reason counts log message

* Per #2897, update the User's Guide about -v 9 for Point-Stat

---------

Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Bugfix 2867 point2grid qc flag (#2890)

* #2867 Added compute_adp_qc_flag and adjusted ADP QC flags

* #2867 Added point2grid_GOES_16_ADP_Enterprise_high. Changed AOD QC flags to 0,1,2 (was 1,2,3)

* #2867 Added get_nc_att_values_

* #2867 Added get_nc_att_values. Added the argument allow_conversion to get_nc_data(netCDF::NcVar *, uchar  *data)

* #2867 Read the ADP QC flag values and meanings attributes from DQF variable and set the QC high, meduium, low values to support Enterprise algorithm. Adjusted the ADP QC values by using AOD qc values

* #2867 Cleanup

* #2867 Corrected indent

* #2867 Changed log message

* #2867 Removed unused argument

* #2867 Removed unused argument

* Cleanup

* #2867 Fix SonarQube findings

* #2867 Deleted protected section with no members

* #2867 Cleanup

* #2867 FIxed SonarQube findings; unused local variables, decalare as const, etc

* #2867 MOved include directives to top

* #2867 Changed some argumenmt with references to avoid copying objects

* #2867 Do not filter by QC flag if -qc is not given

* #2867 Use enumj class for GOES QC: HIGH, MEDIUM, and LOW

* #2867 Added log message back which were deleted accidently

* #2867 Chaned statci const to constexpr

* #2867 Initial release. Separated from nc_utils.h

* @2867 Added nc_utils_core.h

* #2867 Moved some blocks to nc_utils_core.h

* #2867 Include nc_utils_core.h

* #2867 Added const references

* Per #2867, fixing typo in comments.

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: j-opatz <jopatz@ucar.edu>

* Hotfix to develop to fix the update_truth.yml workflow logic. This testing workflow run failed (https://github.com/dtcenter/MET/actions/runs/9209471209). Here we switch to a unique update truth branch name to avoid conflicts.

* Avoid pushing directly to the develop or main_vX.Y branches since that is not necessary for the automation logic in MET.

* #2904 Changed R path to R-4.4.0 (#2905)

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>

* Feature #2912 pb2nc error (#2914)

* Feature 2717 convert unit.pl to unit.py (#2871)

* created unit.py module in new internal/test_unit/python directory

* added xml parsing to unit.py

* added repl_env function

* added reading of the remaining xml tags in build_tests function

* progress on main function (putting together test commands)

* a few more lines in the main function

* minor updates

* fixed how the test command was being run

* added if name/main and command line parsing

* fixed handling of no 'env' in cmd_only mode

* handle params from xml that have \ after filename without space in between

* added logging

* added some more pieces to unit

* more updates to unit.py, including running checks on output files

* bug fixes, improved handling of output file names, improved handling of env vars, improved logging output

* fixed how shell commands are run, and other minor fixes

* added last bits from the perl script, fixed some bugs

* created unit.py module in new internal/test_unit/python directory

* added xml parsing to unit.py

* added repl_env function

* added reading of the remaining xml tags in build_tests function

* progress on main function (putting together test commands)

* a few more lines in the main function

* minor updates

* update scripts to call python unit test script instead of the old perl script

* fix she-bang line to allow script to be run without python3 before it

* add missing test_dir and exit_on_fail tags that are found in the rest of the unit test xml files

* fix call to logger.warning

* change tags named 'exists' to 'exist' to match the rest of the xml files

* added logger to function

* removed tab at end of line that was causing output file path to be excluded from the command

* fix broken checks for output files

* incorporated george's recommended changes

* changed default to overwrite logs; allow for more than one xml file to be passed in command

---------

Co-authored-by: Natalie babij <natalie.babij@natbabij-mac1.home>
Co-authored-by: Natalie babij <natalie.babij@vpn68-237.vpnclient.ucar.edu>
Co-authored-by: Natalie babij <natalie.babij@gsd-sslvpn-209.fsl.noaa.gov>
Co-authored-by: Natalie Babij <nbabij@seneca.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: j-opatz <jopatz@ucar.edu>

* Bugfix 2867 point2grid qc unittest (#2913)

* #2867 Added compute_adp_qc_flag and adjusted ADP QC flags

* #2867 Added point2grid_GOES_16_ADP_Enterprise_high. Changed AOD QC flags to 0,1,2 (was 1,2,3)

* #2867 Added get_nc_att_values_

* #2867 Added get_nc_att_values. Added the argument allow_conversion to get_nc_data(netCDF::NcVar *, uchar  *data)

* #2867 Read the ADP QC flag values and meanings attributes from DQF variable and set the QC high, meduium, low values to support Enterprise algorithm. Adjusted the ADP QC values by using AOD qc values

* #2867 Cleanup

* #2867 Corrected indent

* #2867 Changed log message

* #2867 Removed unused argument

* #2867 Removed unused argument

* Cleanup

* #2867 Fix SonarQube findings

* #2867 Deleted protected section with no members

* #2867 Cleanup

* #2867 FIxed SonarQube findings; unused local variables, decalare as const, etc

* #2867 MOved include directives to top

* #2867 Changed some argumenmt with references to avoid copying objects

* #2867 Do not filter by QC flag if -qc is not given

* #2867 Use enumj class for GOES QC: HIGH, MEDIUM, and LOW

* #2867 Added log message back which were deleted accidently

* #2867 Chaned statci const to constexpr

* #2867 Initial release. Separated from nc_utils.h

* @2867 Added nc_utils_core.h

* #2867 Moved some blocks to nc_utils_core.h

* #2867 Include nc_utils_core.h

* #2867 Added const references

* #2867 Some 'static const' were chnaged to constexpr

* #2867 Changed -qc options (1,2,3 to 0,1 - high & medium) for AOD

* #2867 Merged develop branch

* #2867 Corrected the unit test name

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>

* Feature #2911 tc_stat_set_hdr (#2916)

* Per #2911, no real changes for Stat-Analysis. Just changing order of variables for consistency.

* Per #2911, add StatHdrColumns::apply_set_hdr_opts(...) function to be used by TC-Stat.

* Per #2911, move ByColumn to the TCStatJob base class and add HdrName and HdrValue to support the -set_hdr job command.

* Per #2911, update GSI tools to call the newly added  StatHdrColumns::apply_set_hdr_opts(...) function.

* Per #2911, update logic of Stat-Analysis for consistency to make use of common apply_set_hdr_opts() function.

* Per #2911, add DataLine::set_item() function to support -set_hdr options.

* Per #2911, just update contents of error message

* Per #2911, add TCStatLine member functions for has() and get_offset().

* Per #2911, update tc_stat to support applying -set_hdr to TC-Stat filter jobs.

* Per #2911, revise TC-Stat config files to exercise the -set_hdr job command option

* Per #2911, update TC-Stat documentation to mention the -set_hdr job command option

* Per #2911, add note

* Per #2911, as recommended by SonarQube, make some of these member functions const.

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: Howard Soh <hsoh@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>
Co-authored-by: davidalbo <dave@ucar.edu>
Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: natalieb-noaa <146213121+natalieb-noaa@users.noreply.github.com>
Co-authored-by: Natalie babij <natalie.babij@natbabij-mac1.home>
Co-authored-by: Natalie babij <natalie.babij@vpn68-237.vpnclient.ucar.edu>
Co-authored-by: Natalie babij <natalie.babij@gsd-sslvpn-209.fsl.noaa.gov>
Co-authored-by: Natalie Babij <nbabij@seneca.rap.ucar.edu>
Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com>
JohnHalleyGotway added a commit that referenced this pull request Jun 21, 2024
* 2673 Moved dvariable declaration after include

* #2673 Move down namespace below include

* Feature #2395 wdir (#2820)

* Per #2395, add new columns to VL1L2, VAL1L2, and VCNT line types for wind direction statistics. Work still in progress.

* Per #2395, write the new VCNT columns to the output and document the additions to the VL1L2, VAL1L2, and VCNT columns.

* Per #2395, add the definition of new statistics to Appendix G.

* Per #2395, update file version history.

* Per #2395, tweak warning message about zero wind vectors and update grid-stat and point-stat to log calls to the do_vl1l2() function.

* Per #2395, refine the weights for wind direction stats, ignoring the undefined directions.

* Update src/tools/core/stat_analysis/aggr_stat_line.cc

* Update src/tools/core/stat_analysis/parse_stat_line.cc

* Update src/tools/core/stat_analysis/aggr_stat_line.cc

* Recent changes to branch protection rules for the develop branch have broken the logic of the update_truth.yml GHA workflow. Instead of submitting a PR to merge develop into develop-ref directly, use an intermediate update_truth_for_develop branch.

* Feature #2280 ens_prob (#2823)

* Per #2280, update to support probability threshold strings like ==8, where 8 is the number of ensemble members, to create probability bins centered on the n/8 for n = 0 ... 8.

* Per #2280, update docs about probability threshold settings.

* Per #2280, use a loose tolerance when checking for consistent bin widths.

* Per #2280, add a new unit test for grid_stat to demonstrate processing the output from gen_ens_prod.

* Per #2280, when verifying NMEP probability forecasts, smooth the obs data first.

* Per #2280, only request STAT output for the PCT line type to match unit_grid_stat.xml and minimize the new output files.

* Per #2280, update config option docs.

* Per #2280, update config option docs.

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 restored return statement

* #2673 Added std namespace

* #2673 Moved down 'using namespace' statement. Removed trailing spaces

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Added std namespace

* #2673 Added std namespace

* #2673 Added std namespace

* #2673 Changed literal 1 to boolean value, true

* Feature #2673 enum_to_string (#2835)

* Feature #2583 ecnt (#2825)

* Unrelated to #2583, fix typo in code comments.

* Per #2583, add hooks write 3 new ECNT columns for observation error data.

* Per #2583, make error messages about mis-matched array lengths more informative.

* Per #2583, switch to more concise variable naming conventions of ign_oerr_cnv, ign_oerr_cor, and dawid_seb.

* Per #2583, fix typo to enable compilation

* Per #2583, define the 5 new ECNT column names.

* Per #2583, add 5 new columns to the ECNT table in the Ensemble-Stat chapter

* Per #2583, update stat_columns.cc to write these 5 new ECNT columns

* Per #2583, update ECNTInfo class to compute the 5 new ECNT statistics.

* Per #2583, update stat-analysis to parse the 5 new ECNT columns.

* Per #2583, update aggregate_stat logic for 5 new ECNT columns.

* Per #2583, update PairDataEnsemble logic for 5 new ECNT columns

* Per #2583, update vx_statistics library with obs_error handling logic for the 5 new ECNT columns

* Per #2583, changes to make it compile

* Per #2583, changes to make it compile

* Per #2583, switch to a consistent ECNT column naming convention with OERR at the end. Using IGN_CONV_OERR and IGN_CORR_OERR.

* Per #2583, define ObsErrorEntry::variance() with a call to the dist_var() utility function.

* Per #2583, update PairDataEnsemble::compute_pair_vals() to compute the 5 new stats with the correct inputs.

* Per #2583, add DEBUG(10) log messages about computing these new stats.

* Per #2583, update Stat-Analysis to compute these 5 new stats from the ORANK line type.

* Per #2583, whitespace and comments.

* Per #2583, update the User's Guide.

* Per #2583, remove the DS_ADD_OERR and DS_MULT_OERR ECNT columns and rename DS_OERR as DSS, since observation error is not actually involved in its computation.

* Per #2583, minor update to Appendix C

* Per #2583, rename ECNT line type statistic DSS to IDSS.

* Per #2583, fix a couple of typos

* Per #2583, more error checking.

* Per #2583, remove the ECNT IDSS column since its just 2*pi*IGN, the existing ignorance score, and only provides meaningful information when combined with the other Dawid-Sebastiani statistics that have already been removed.

* Per #2583, add Eric's documentation of these new stats to Appendix C. Along the way, update the DOI links in the references based on this APA style guide: https://apastyle.apa.org/style-grammar-guidelines/references/dois-urls#:~:text=Include%20a%20DOI%20for%20all,URL%2C%20include%20only%20the%20DOI.

* Per #2583, fix new equations with embedded underscores for PDF by defining both html and pdf formatting options.

* Per #2583, update the ign_conv_oerr equation to include a 2
*pi multiplier for consistency with the existing ignorance score. Also, fix the documented equations.

* Per #2583, remove log file that was inadvertently added on this branch.

* Per #2583, simplify ObsErrorEntry::variance() implementation. For the distribution type of NONE, return a variance of 0.0 rather than bad data, as discussed with @michelleharrold and @JeffBeck-NOAA on 3/8/2024.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Revert #2825 since more documentation and testing is needed (#2837)

This reverts commit 108a895.

* Feature #2583 ecnt fix IGN_OERR_CORR (#2838)

* Unrelated to #2583, fix typo in code comments.

* Per #2583, add hooks write 3 new ECNT columns for observation error data.

* Per #2583, make error messages about mis-matched array lengths more informative.

* Per #2583, switch to more concise variable naming conventions of ign_oerr_cnv, ign_oerr_cor, and dawid_seb.

* Per #2583, fix typo to enable compilation

* Per #2583, define the 5 new ECNT column names.

* Per #2583, add 5 new columns to the ECNT table in the Ensemble-Stat chapter

* Per #2583, update stat_columns.cc to write these 5 new ECNT columns

* Per #2583, update ECNTInfo class to compute the 5 new ECNT statistics.

* Per #2583, update stat-analysis to parse the 5 new ECNT columns.

* Per #2583, update aggregate_stat logic for 5 new ECNT columns.

* Per #2583, update PairDataEnsemble logic for 5 new ECNT columns

* Per #2583, update vx_statistics library with obs_error handling logic for the 5 new ECNT columns

* Per #2583, changes to make it compile

* Per #2583, changes to make it compile

* Per #2583, switch to a consistent ECNT column naming convention with OERR at the end. Using IGN_CONV_OERR and IGN_CORR_OERR.

* Per #2583, define ObsErrorEntry::variance() with a call to the dist_var() utility function.

* Per #2583, update PairDataEnsemble::compute_pair_vals() to compute the 5 new stats with the correct inputs.

* Per #2583, add DEBUG(10) log messages about computing these new stats.

* Per #2583, update Stat-Analysis to compute these 5 new stats from the ORANK line type.

* Per #2583, whitespace and comments.

* Per #2583, update the User's Guide.

* Per #2583, remove the DS_ADD_OERR and DS_MULT_OERR ECNT columns and rename DS_OERR as DSS, since observation error is not actually involved in its computation.

* Per #2583, minor update to Appendix C

* Per #2583, rename ECNT line type statistic DSS to IDSS.

* Per #2583, fix a couple of typos

* Per #2583, more error checking.

* Per #2583, remove the ECNT IDSS column since its just 2*pi*IGN, the existing ignorance score, and only provides meaningful information when combined with the other Dawid-Sebastiani statistics that have already been removed.

* Per #2583, add Eric's documentation of these new stats to Appendix C. Along the way, update the DOI links in the references based on this APA style guide: https://apastyle.apa.org/style-grammar-guidelines/references/dois-urls#:~:text=Include%20a%20DOI%20for%20all,URL%2C%20include%20only%20the%20DOI.

* Per #2583, fix new equations with embedded underscores for PDF by defining both html and pdf formatting options.

* Per #2583, update the ign_conv_oerr equation to include a 2
*pi multiplier for consistency with the existing ignorance score. Also, fix the documented equations.

* Per #2583, remove log file that was inadvertently added on this branch.

* Per #2583, simplify ObsErrorEntry::variance() implementation. For the distribution type of NONE, return a variance of 0.0 rather than bad data, as discussed with @michelleharrold and @JeffBeck-NOAA on 3/8/2024.

* Per #2583, updates to ensemble-stat.rst recommended by @michelleharrold and @JeffBeck-NOAA.

* Per #2583, implement changes to the IGN_CORR_OERR corrected as directed by @ericgilleland.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Update the pull request template to include a question about expected impacts to existing METplus Use Cases.

* #2830 Changed enum Builtin to enum class

* #2830 Converted enum to enum class at config_constants.h

* Feature #2830 bootstrap enum (#2843)

* Bugfix #2833 develop azimuth (#2840)

* Per #2833, fix n-1 bug when defining the azimuth delta for range/azimuth grids.

* Per #2833, when definng TcrmwData:range_max_km, divide by n_range - 1 since the range values start at 0.

* Per #2833, remove max_range_km from the TC-RMW config file. Set the default rmw_scale to NA so that its not used by default. And update the documentation. Still actually need to make the logic of the code work as it should.

* Per #2833, update tc_rmw to define the range as either a function of rmw or using explicit spacing in km.

* Per #2833, update the TCRMW Config files to remove the max_range_km entry, and update the unit test for one call to use RMW ranges and the other to use ranges defined in kilometers.

* Per #2833, just correct code comments.

* Per #2833, divide by n - 1 when computing the range delta, rather than n.

* Per #2833, correct the handling of the maximum range in the tc-rmw tool. For fixed delta km, need to define the max range when setting up the grid at the beginning.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* #2830 Changed enum PadSize to enum class

* #2830 Removed redundant parantheses

* #2830 Removed commenyted out code

* #2830 Use auto

* #2830 Changed enum to enum class for DistType, InterpMthd, GridTemplates, and NormalizeType

* #2830 Moved enum_class_as_integer from header file to cc files

* #2830 Added enum_as_int.hpp

* #2830 Added enum_as_int.hpp

* Deleted enum_class_as_integer and renamed it to enum_class_as_int

* Removed redundant paranthese

* #2830 Changed enum to enumclass

* #2830 Changed enum_class_as_integer to enum_class_as_int

* Feature #2379 sonarqube gha (#2847)

* Per #2379, testing initial GHA SonarQube setup.

* Per #2379, switch to only analyzing the src directory.

* Per #2379, move more config logic from sonar-project.properties into the workflow. #ci-skip-all

* Per #2379, try removing + symbols

* Per #2379, move projectKey into xml workflow and remove sonar-project.properties.

* Per #2379, try following the instructions at https://github.com/sonarsource-cfamily-examples/linux-autotools-gh-actions-sq/blob/main/.github/workflows/build.yml ci-skip-all

* Per #2379, see details of progress described in this issue comment: #2379 (comment)

* Unrelated to #2379, just removing spurious space that gets flagged as a diff when re-running enum_to_string on seneca.

* Per #2379, try running SonarQube through GitHub.

* Per #2379, remove empty env section and also disable the testing workflow temporarily during sonarqube development.

* Per #2379, fix docker image name.

* Per #2379, delete unneeded script.

* Per #2379, update GHA to scan Python code and push to the correct SonarQube projects.

* Per #2379, update GHA SonarQube project names

* Per #2379, update the build job name

* Per #2379, update the comile step name

* Per #2379, switch to consistent SONAR variable names.

* Per #2379, fix type in sed expressions.

* Per #2379, just rename the log artifact

* Per #2379, use time_command wrapper instead of run_command.

* Per #2379, fix bad env var name

* Per #2379, switch from egrep to grep.

* Per #2379, just try cat-ting the logfile

* Per #2379, test whether cat-ting the log file actually works.

* Per #2379, revert back

* Per #2379, mention SonarQube in the PR template. Make workflow name more succinct.

* Per #2379, add SONAR_REFERENCE_BRANCH setting to define the sonar.newCode.referenceBranch property. The goal is to define the comparison reference branch for each SonarQube scan.

* Per #2379, have the sonarqube.yml job print the reference branch it's using

* Per #2379, intentionally introduce a new code smell to see if SonarQube correctly flag it as appearing in new code.

* Per #2379, trying adding the SonarQube quality gate check.

* Per #2379, add logic for using the report-task.txt output files to check the quality gate status for both the python and cxx scans.

* Per #2379 must use unique GHA id's

* Per #2379, working on syntax for quality gate checks

* Per #2379, try again.

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try yet again

* Per #2379

* Per #2379, add more debug

* Per #2379, remove -it option from docker run commands

* Per #2379, again

* Per #2379, now that the scan works as expected, remove the intentional SonarQube code smell as well as debug logging.

* Hotfix related to #2379. The sonar.newCode.referenceBranch and sonar.branch.name cannot be set to the same string! Only add the newCode definition when they differ.

* #2830 Changed enum STATJobType to enum class

* #2830 Changed STATLineType to enum class

* #2830 Changed Action to enum class

* #2830 Changed ModeDataType to enum class

* #2830 Changed StepCase to enum class

* #2830 Changed enum to enum class

* #2830 Changed GenesisPairCategory to enum class

* #2830 Removed rediundabt parenrthese

* #2830 Reduced same if checking

* #2830 Cleanup

* #2830 USe empty() instead of lebgth checking

* #2830 Adjusted indentations

* Feature #2379 develop sonarqube updates (#2850)

* Per #2379, move rgb2ctable.py into the python utility scripts directory for better organization and to enable convenient SonarQube scanning.

* Per #2379, remove point.py from the vx_python3_utils directory which cleary was inadvertenlty added during development 4 years ago. As far as I can tell it isn't being called by any other code and doesn't belong in the repository. Note that scripts/python/met/point.py has the same name but is entirely different.

* Per #2379, update the GHA SonarQube scan to do a single one with Python and C++ combined. The nightly build script is still doing 2 separate scans for now. If this all works well, they could also be combined into a single one.

* Per #2379, eliminate MET_CONFIG_OPTIONS from the SonarQube workflow since it doesn't need to be and probably shouldn't be configurable.

* Per #2379, trying to copy report-task.txt out of the image

* Per #2379, update build_met_sonarqube.sh to check the scan return status

* Per #2379, fix bash assignment syntax

* Per #2379, remove unused SCRIPT_DIR envvar

* Per #2379, switch to a single SonarQube scan for MET's nightly build as well

* Feature 2654 ascii2nc polar buoy support (#2846)

* Added iabp data type, and modified file_handler to filter based on time range, which was added as a command line option

* handle time using input year, hour, min, and doy

* cleanup and switch to position day of year for time computations

* Added an ascii2nc unit test for iabp data

* Added utility scripts to pull iabp data from the web and find files in a time range

* Modified iabp_handler to always output a placeholder 'location' observation with value 1

* added description of IABP data python utility scripts

* Fixed syntax error

* Fixed Another syntax error.

* Slight reformat of documentation

* Per #2654, update the Makefiles in scripts/python/utility to include all the python scripts that should be installed.

* Per #2654, remove unused code from get_iabp_from_web.py that is getting flagged as a bug by SonarQube.

* Per #2654, fix typo in docs

---------

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Feature #2786 rpss_from_prob (#2861)

* Per #2786, small change to a an error message unrelated to this development.

* Per #2786, add RPSInfo::set_climo_prob() function to derive the RPS line type from climatology probability bins. And update Ensemble-Stat to call it.

* Per #2786, minor change to clarify error log message.

* Per #2786, for is_prob = TRUE input, the RPS line type is the only output option. Still need to update docs!

* Per #2786, add new call to Ensemble-Stat to test computing RPS from climo probabilities

* Per #2786, use name rps_climo_bin_prob to be very explicit.

* Per #2786, redefine logic of RPSInfo::set_climo_bin_prob() to match the CPC definition. Note that reliability, resolution, uncertainty, and RPSS based on the sample climatology are all set to bad data. Need to investigate whether they can be computed using these inputs.

* Per #2786, remove the requirement that any fcst.prob_cat_thresh thresholds must be defined. If they are defined, pass them through to the FCST_THRESH output column. If not, write NA. Add check to make sure the event occurs in exactly 1 category.

* Per #2786, don't enforce fcst.prob_cat_thresh == obs.prob_cat_thresh for probabilistic inputs. And add more is_prob checks so that only the RPS line type can be written when given probabilistic inputs.

* updated documentation

* Per #2786, call rescale_probability() function to convert from 0-100 probs to 0-1 probs.

---------

Co-authored-by: j-opatz <jopatz@ucar.edu>

* Feature #2862 v12.0.0-beta4 (#2864)

* Feature #2379 develop single_sq_project (#2865)

* Hotfix to the documentation in the develop branch. Issue #2858 was closed as a duplicate of #2857. I had included it in the MET-12.0.0-beta4 release notes, but the work is not yet actually complete.

* Feature 2842 ugrid config (#2852)

* #2842 Removed UGrid related setting

* #2842 Corrected vertical level for data_plane_array

* #2842 Do not allow the time range

* #2842 The UGridConfig file can be passed as ugrid_dataset

* #2842 Changed -config option to -ugrid_config

* #2842 Deleted UGrid configurations

* 2842 Fix a compile error when UGrid is disabled

* #2842 Cleanup

* #2842 Added an unittest point_stat_ugrid_mpas_config

* #2842 Added a PointStatConfig without UGrid dataset.

* #2842 Corrected ty[po at the variable name

* Switched from time_centered to time_instant. I think time_centered is the center of the forecast lead window and time_instant is the time the forecast is valid (end of forecast window).

* #2842 Removed ugrid_max_distance_km and unused metadata names

* #2842 Restored time variable time_instant for LFric

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjusted lon to between -180 to 180

* #2842 Changed variable names

* Per #2842, switch from degrees east to west right when the longitudes are read.

* #2842, switch from degrees east to west right when the longitudes are read

* #2842 Cleanup debug messages

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature 2753 comp script config (#2868)

* set dynamic library file extension to .dylib if running on MacOS and .so otherwise

* Added disabling of jasper documentation for compiliation on Hera

* Updated

* remove extra export of compiler env vars

* include full path to log file so it is easier to file the log file to examine when a command fails

* send cmake output to a log file

* remove redundant semi-colon

* use full path to log file so it is easier to examine on failure

* use run_cmd to catch if rm command fails

* Modifications for compilation on hera, gaea, and orion

* Updating

* fixed variable name

* clean up if/else statements

* set TIFF_LIBRARY_RELEASE argument to use full path to dynamic library file to prevent failure installing proj library

* set LDFLAGS so that LDFLAGS value set in the user's environment will also be used

* Updated based on gaea, orion, and hera installs

* Updated

* change extension of dynamic library files only if architecture is arm64 because older Macs still use .so

* added netcdf library to args to prevent error installing NetCDF-CXX when PROJ has been installed in the same run of the script -- PATH is set in the COMPILE_PROJ if block that causes this flag from being added automatically

* clean up how rpath and -L are added to LDFLAGS so that each entry is separate -- prevents errors installing on Mac arm64 because multiple rpath values aren't read using :. Also use MET_PROJLIB

* Updated

* removed -ltiff from MET libs

* only add path to rpath and -L arguments if they are not already included in LDFLAGS

* changed from using LIB_TIFF (full path to tiff lib file) to use TIFF_LIB_DIR (dir containing tiff lib file). Added TIFF_INCLUDE_DIR to proj compilation and -DJAS_ENABLE_DOC to jasper compliation taken from @jprestop branch

* update comments

* ensure all MET_* and MET_*LIB variables are added to the rpath for consistency

* remove unnecessary if block and only export LDFLAGS at the end of setting locally

* Updated

* Added section for adding <VALUE>/lib64 and rearranged placement of ADDTL_DIR

* Commenting out the running of the Jasper lib tests

* Updating and/or removing files

* Updating and/or removing files

* Latest udpates which include the addition of the tiff library for proj

* Remove commented out line.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Per 2753, added -lm to configure_lib_args for NetCDF-CXX

* Per #2753 updating acorn files

* Per #2753, update wcoss2 files

* Per #2753, updating acorn file to include MET_PYTHON_EXE

* Per #2753, updated files for 12.0.0 for derecho

* Per #2753, updated derecho file adding MET_PYTHON_EXE and made corrections

* Updating config files

* Updating orion files

* Updates for gaea's files

* Updating gaea modulefile

* Removing modulefile for cheyenne

* Added MET_PYTHON_EXE

* Added MET_PYTHON_EXE to hera too

* Adding file for hercules

* Removing equals sign from setenv

* Adding file for hercules

* Updated script to add libjpeg installation for grib2c

* Per #2753, Adding file for casper

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature #2795 level_mismatch_warning (#2873)

* Per #2795, move the warning message about level mismatch from the config validation step to when the forecast files are being processed. Only check this when the number of forecast fields is greater than 1, but no longer limit the check to pressure levels only.

* Per #2795, add comments

* Whitespace

* Per #2795, port level mismatch fix over to Ensemble-Stat. Check it for each verification task, but only print it once for each task, rather than once for each task * ensemble member.

* Feature #2870 removing_MISSING_warning (#2872)

* Per #2870, define utility functions for parsing the file type from a file list and for logging missing files, checking for the MISSING keyword. Also, update Ensemble-Stat and Gen-Ens-Prod to call these functions.

* Per #2870, update the gen_ens_prod tests to demonstrate the use of the MISSING keyword for missing files. METplus uses this keyword for Ensemble-Stat and Gen-Ens-Prod.

* Feature 2842 ugrid config (#2875)

* #2842 Removed UGrid related setting

* #2842 Corrected vertical level for data_plane_array

* #2842 Do not allow the time range

* #2842 The UGridConfig file can be passed as ugrid_dataset

* #2842 Changed -config option to -ugrid_config

* #2842 Deleted UGrid configurations

* 2842 Fix a compile error when UGrid is disabled

* #2842 Cleanup

* #2842 Added an unittest point_stat_ugrid_mpas_config

* #2842 Added a PointStatConfig without UGrid dataset.

* #2842 Corrected ty[po at the variable name

* Switched from time_centered to time_instant. I think time_centered is the center of the forecast lead window and time_instant is the time the forecast is valid (end of forecast window).

* #2842 Removed ugrid_max_distance_km and unused metadata names

* #2842 Restored time variable time_instant for LFric

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjusted lon to between -180 to 180

* #2842 Changed variable names

* Per #2842, switch from degrees east to west right when the longitudes are read.

* #2842, switch from degrees east to west right when the longitudes are read

* #2842 Cleanup debug messages

* #2842 Disabled output types except STAT for sl1l2

* #2842 Disabled output types except STAT for sl1l2 and MPR

* #2842 Reduced output files for UGrid

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Hotfix to develop branch to remove duplicate test named 'point_stat_ugrid_mpas_config'. That was causing unit_ugrid.xml to fail because it was still looking for .txt output files that are no longer being generated.

* Feature 2748 document ugrid (#2869)

* Initial documentation of the UGRID capability.

* Fixes error in references, adds appendix to index, and adds sub-section for configuration entries and a table for metadata map items.

* Corrects LFRic, rewords section on UGRID conventions, updates description of using GridStat, and removes mention of nodes.

* Forgot one more mention of UGRID conventions.

* Incorporates more suggestions from @willmayfield.

* Switches to numerical table reference.

* Feature #2781 Convert MET NetCDF point obs to Pandas DataFrame (#2877)

* Per #2781, added function to convert MET NetCDF point observation data to pandas so it can be read and modified in a python embedding script. Added example python embedding script

* ignore python cache files

* fixed function call

* reduce cognitive complexity to satisfy SonarQube and add boolean return value to catch if function fails to read data

* clean up script and add comments

* replace call to object function that doesn't exist, handle exception when file passed to script cannot be read by the NetCDF library

* rename example script

* add new example script to makefiles

* fix logic to build pandas DataFrame to properly get header information from observation header IDs

* Per #2781, add unit test to demonstrate python embedding script that reads MET NetCDF point observation file and converts it to a pandas DataFrame

* Per #2781, added init function for nc_point_obs to take an input filename. Also raise TypeError exception from nc_point_obs.read_data() if input file cannot be read

* call parent class init function to properly initialize nc_point_obs

* Feature #2833 pcp_combine_missing (#2886)

* Per #2883, add -input_thresh command line option to configure allowable missing input files.

* Per #2883, update pcp_combine usage statement.

* Per #2883, update existing pcp_combine -derive unit test example by adding 3 new missing file inputs at the beginning, middle, and end of the file list. The first two are ignored since they include the MISSING keyword, but the third without that keyword triggers a warning message as desired. The -input_thresh option is added to only require 70% of the input files be present. This should produce the exact same output data.

* Per #2883, update the pcp_combine logic for the sum command to allow missing data files based on the -input_thresh threshold. Add a test in unit_pcp_combine.xml to demonstrate.

* Update docs/Users_Guide/reformat_grid.rst

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Per #2883, update pcp_combine usage statement in the code to be more simliar to the User's Guide.

* Per #2883, switch to using derive_file_list_missing as the one containing missing files and recreate derive_file_list as it had existed for the test named pcp_combine_derive_VLD_THRESH.

* Per #2883, move initialization inside the same loop to resolve SonarQube issues.

* Per #2883, update sum_data_files() to switch from allocating memory to using STL vectors to satisfy SonarQube.

* Per #2883, changes to declarations of variables to satisfy SonarQube.

* Per #2883, address more SonarQube issues

* Per #2883, backing out an unintended change I made to tcrmw_grid.cc. This change belongs on a different branch.

* Per #2883, update logic of parse_file_list_type() function to handle python input strings. Also update pcp_combine to parse the type of input files being read and log non-missing python input files expected.

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Per #2888, update STATAnalysisJob::dump_stat_line() to support dumping stat line types VCNT, RPS, DMAP, and SSIDX. (#2891)

* Per #2659, making updates as proposed at the 20240516 MET Eng. Mtg. (#2895)

* Feature #2395 TOTAL_DIR (#2892)

* Per #2395, remove the n_dir_undef and n_dira_undef variables that are superceded by the new dcount and dacount VL1L2Info members to keep track of the number of valid wind direction vectors.

* Per #2395, add TOTAL_DIR columns to the VL1L2, VAL1L2, and VCNT line types and update the header column tables.

* Per #2395, update the User's Guide to list the new TOTAL_DIR columns in the VL1L2, VAL1L2, and VCNT line types.

* Per #2395, update stat_analysis to parse the new TOTAL_DIR columns and use the values to aggregate results when needed.

* Per #2395, for SonarQube change 'const char *' to 'const char * const' to satisfy the finding that 'Global variables should be const.' Should probably switch from 'char char *' to strings eventually. But for now, I'm just making up for some SonarQube technical debt.

* Per #2395, fix typo in placement of the DIR_ME column name in the met_header_columns_V12.0.txt file

* Per #2395, add 2 new Stat-Analysis jobs to demonstrate the processing of VL1L2 lines.

* Per #2395, update logic of is_vector_dir_stat(). Instead of just checking 'DIR_', check 'DIR_ME', 'DIR_MAE', and 'DIR_MSE' to avoid an false positive match for the 'DIR_ERR' column which is computed from the vector partial sums rather than the individual direction differences.

* Bugfix #2897 develop python_valid_time (#2899)

* Per #2897, fix typos in 2 log messages. Also fix the bug in storing the valid time strings. The time string in vld_array should exactly correspond to the numeric unixtime values in vld_num_array. Therefore they need to be updated inside the same if block. The bug is that we were storing only the unique unixtime values but storing ALL of the valid time string, not just the unique ones.

* Per #2897, minor change to formatting of log message

* MET #2897, don’t waste time searching, just set the index to n - 1

* Per #2897, remove unused add_prec_point_obs(...) function

* Per #2897, update add_point_obs(...) logic for DEBUG(9) to print very detailed log messages about what obs are being rejected and which are being used for each verification task.

* Per #2897, refine the 'using' log message to make the wording consistent with the summary rejection reason counts log message

* Per #2897, update the User's Guide about -v 9 for Point-Stat

---------

Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Bugfix 2867 point2grid qc flag (#2890)

* #2867 Added compute_adp_qc_flag and adjusted ADP QC flags

* #2867 Added point2grid_GOES_16_ADP_Enterprise_high. Changed AOD QC flags to 0,1,2 (was 1,2,3)

* #2867 Added get_nc_att_values_

* #2867 Added get_nc_att_values. Added the argument allow_conversion to get_nc_data(netCDF::NcVar *, uchar  *data)

* #2867 Read the ADP QC flag values and meanings attributes from DQF variable and set the QC high, meduium, low values to support Enterprise algorithm. Adjusted the ADP QC values by using AOD qc values

* #2867 Cleanup

* #2867 Corrected indent

* #2867 Changed log message

* #2867 Removed unused argument

* #2867 Removed unused argument

* Cleanup

* #2867 Fix SonarQube findings

* #2867 Deleted protected section with no members

* #2867 Cleanup

* #2867 FIxed SonarQube findings; unused local variables, decalare as const, etc

* #2867 MOved include directives to top

* #2867 Changed some argumenmt with references to avoid copying objects

* #2867 Do not filter by QC flag if -qc is not given

* #2867 Use enumj class for GOES QC: HIGH, MEDIUM, and LOW

* #2867 Added log message back which were deleted accidently

* #2867 Chaned statci const to constexpr

* #2867 Initial release. Separated from nc_utils.h

* @2867 Added nc_utils_core.h

* #2867 Moved some blocks to nc_utils_core.h

* #2867 Include nc_utils_core.h

* #2867 Added const references

* Per #2867, fixing typo in comments.

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: j-opatz <jopatz@ucar.edu>

* Hotfix to develop to fix the update_truth.yml workflow logic. This testing workflow run failed (https://github.com/dtcenter/MET/actions/runs/9209471209). Here we switch to a unique update truth branch name to avoid conflicts.

* Avoid pushing directly to the develop or main_vX.Y branches since that is not necessary for the automation logic in MET.

* #2904 Changed R path to R-4.4.0 (#2905)

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>

* Feature #2912 pb2nc error (#2914)

* Feature 2717 convert unit.pl to unit.py (#2871)

* created unit.py module in new internal/test_unit/python directory

* added xml parsing to unit.py

* added repl_env function

* added reading of the remaining xml tags in build_tests function

* progress on main function (putting together test commands)

* a few more lines in the main function

* minor updates

* fixed how the test command was being run

* added if name/main and command line parsing

* fixed handling of no 'env' in cmd_only mode

* handle params from xml that have \ after filename without space in between

* added logging

* added some more pieces to unit

* more updates to unit.py, including running checks on output files

* bug fixes, improved handling of output file names, improved handling of env vars, improved logging output

* fixed how shell commands are run, and other minor fixes

* added last bits from the perl script, fixed some bugs

* created unit.py module in new internal/test_unit/python directory

* added xml parsing to unit.py

* added repl_env function

* added reading of the remaining xml tags in build_tests function

* progress on main function (putting together test commands)

* a few more lines in the main function

* minor updates

* update scripts to call python unit test script instead of the old perl script

* fix she-bang line to allow script to be run without python3 before it

* add missing test_dir and exit_on_fail tags that are found in the rest of the unit test xml files

* fix call to logger.warning

* change tags named 'exists' to 'exist' to match the rest of the xml files

* added logger to function

* removed tab at end of line that was causing output file path to be excluded from the command

* fix broken checks for output files

* incorporated george's recommended changes

* changed default to overwrite logs; allow for more than one xml file to be passed in command

---------

Co-authored-by: Natalie babij <natalie.babij@natbabij-mac1.home>
Co-authored-by: Natalie babij <natalie.babij@vpn68-237.vpnclient.ucar.edu>
Co-authored-by: Natalie babij <natalie.babij@gsd-sslvpn-209.fsl.noaa.gov>
Co-authored-by: Natalie Babij <nbabij@seneca.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: j-opatz <jopatz@ucar.edu>

* Bugfix 2867 point2grid qc unittest (#2913)

* #2867 Added compute_adp_qc_flag and adjusted ADP QC flags

* #2867 Added point2grid_GOES_16_ADP_Enterprise_high. Changed AOD QC flags to 0,1,2 (was 1,2,3)

* #2867 Added get_nc_att_values_

* #2867 Added get_nc_att_values. Added the argument allow_conversion to get_nc_data(netCDF::NcVar *, uchar  *data)

* #2867 Read the ADP QC flag values and meanings attributes from DQF variable and set the QC high, meduium, low values to support Enterprise algorithm. Adjusted the ADP QC values by using AOD qc values

* #2867 Cleanup

* #2867 Corrected indent

* #2867 Changed log message

* #2867 Removed unused argument

* #2867 Removed unused argument

* Cleanup

* #2867 Fix SonarQube findings

* #2867 Deleted protected section with no members

* #2867 Cleanup

* #2867 FIxed SonarQube findings; unused local variables, decalare as const, etc

* #2867 MOved include directives to top

* #2867 Changed some argumenmt with references to avoid copying objects

* #2867 Do not filter by QC flag if -qc is not given

* #2867 Use enumj class for GOES QC: HIGH, MEDIUM, and LOW

* #2867 Added log message back which were deleted accidently

* #2867 Chaned statci const to constexpr

* #2867 Initial release. Separated from nc_utils.h

* @2867 Added nc_utils_core.h

* #2867 Moved some blocks to nc_utils_core.h

* #2867 Include nc_utils_core.h

* #2867 Added const references

* #2867 Some 'static const' were chnaged to constexpr

* #2867 Changed -qc options (1,2,3 to 0,1 - high & medium) for AOD

* #2867 Merged develop branch

* #2867 Corrected the unit test name

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>

* Feature #2911 tc_stat_set_hdr (#2916)

* Per #2911, no real changes for Stat-Analysis. Just changing order of variables for consistency.

* Per #2911, add StatHdrColumns::apply_set_hdr_opts(...) function to be used by TC-Stat.

* Per #2911, move ByColumn to the TCStatJob base class and add HdrName and HdrValue to support the -set_hdr job command.

* Per #2911, update GSI tools to call the newly added  StatHdrColumns::apply_set_hdr_opts(...) function.

* Per #2911, update logic of Stat-Analysis for consistency to make use of common apply_set_hdr_opts() function.

* Per #2911, add DataLine::set_item() function to support -set_hdr options.

* Per #2911, just update contents of error message

* Per #2911, add TCStatLine member functions for has() and get_offset().

* Per #2911, update tc_stat to support applying -set_hdr to TC-Stat filter jobs.

* Per #2911, revise TC-Stat config files to exercise the -set_hdr job command option

* Per #2911, update TC-Stat documentation to mention the -set_hdr job command option

* Per #2911, add note

* Per #2911, as recommended by SonarQube, make some of these member functions const.

* Bugfix #2856 develop ens_climo (#2918)

* Per #2856, port over fixes from main_v11.1 to develop.

* Per #2856, correct conditionals in set_job_controls.sh and tweak existing Ensemble-Stat configuration file to exercise the logic that's being impacted here.

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: Howard Soh <hsoh@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>
Co-authored-by: davidalbo <dave@ucar.edu>
Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: natalieb-noaa <146213121+natalieb-noaa@users.noreply.github.com>
Co-authored-by: Natalie babij <natalie.babij@natbabij-mac1.home>
Co-authored-by: Natalie babij <natalie.babij@vpn68-237.vpnclient.ucar.edu>
Co-authored-by: Natalie babij <natalie.babij@gsd-sslvpn-209.fsl.noaa.gov>
Co-authored-by: Natalie Babij <nbabij@seneca.rap.ucar.edu>
Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com>
JohnHalleyGotway added a commit that referenced this pull request Jun 24, 2024
* 2673 Moved dvariable declaration after include

* #2673 Move down namespace below include

* Feature #2395 wdir (#2820)

* Per #2395, add new columns to VL1L2, VAL1L2, and VCNT line types for wind direction statistics. Work still in progress.

* Per #2395, write the new VCNT columns to the output and document the additions to the VL1L2, VAL1L2, and VCNT columns.

* Per #2395, add the definition of new statistics to Appendix G.

* Per #2395, update file version history.

* Per #2395, tweak warning message about zero wind vectors and update grid-stat and point-stat to log calls to the do_vl1l2() function.

* Per #2395, refine the weights for wind direction stats, ignoring the undefined directions.

* Update src/tools/core/stat_analysis/aggr_stat_line.cc

* Update src/tools/core/stat_analysis/parse_stat_line.cc

* Update src/tools/core/stat_analysis/aggr_stat_line.cc

* Recent changes to branch protection rules for the develop branch have broken the logic of the update_truth.yml GHA workflow. Instead of submitting a PR to merge develop into develop-ref directly, use an intermediate update_truth_for_develop branch.

* Feature #2280 ens_prob (#2823)

* Per #2280, update to support probability threshold strings like ==8, where 8 is the number of ensemble members, to create probability bins centered on the n/8 for n = 0 ... 8.

* Per #2280, update docs about probability threshold settings.

* Per #2280, use a loose tolerance when checking for consistent bin widths.

* Per #2280, add a new unit test for grid_stat to demonstrate processing the output from gen_ens_prod.

* Per #2280, when verifying NMEP probability forecasts, smooth the obs data first.

* Per #2280, only request STAT output for the PCT line type to match unit_grid_stat.xml and minimize the new output files.

* Per #2280, update config option docs.

* Per #2280, update config option docs.

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 restored return statement

* #2673 Added std namespace

* #2673 Moved down 'using namespace' statement. Removed trailing spaces

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Added std namespace

* #2673 Added std namespace

* #2673 Added std namespace

* #2673 Changed literal 1 to boolean value, true

* Feature #2673 enum_to_string (#2835)

* Feature #2583 ecnt (#2825)

* Unrelated to #2583, fix typo in code comments.

* Per #2583, add hooks write 3 new ECNT columns for observation error data.

* Per #2583, make error messages about mis-matched array lengths more informative.

* Per #2583, switch to more concise variable naming conventions of ign_oerr_cnv, ign_oerr_cor, and dawid_seb.

* Per #2583, fix typo to enable compilation

* Per #2583, define the 5 new ECNT column names.

* Per #2583, add 5 new columns to the ECNT table in the Ensemble-Stat chapter

* Per #2583, update stat_columns.cc to write these 5 new ECNT columns

* Per #2583, update ECNTInfo class to compute the 5 new ECNT statistics.

* Per #2583, update stat-analysis to parse the 5 new ECNT columns.

* Per #2583, update aggregate_stat logic for 5 new ECNT columns.

* Per #2583, update PairDataEnsemble logic for 5 new ECNT columns

* Per #2583, update vx_statistics library with obs_error handling logic for the 5 new ECNT columns

* Per #2583, changes to make it compile

* Per #2583, changes to make it compile

* Per #2583, switch to a consistent ECNT column naming convention with OERR at the end. Using IGN_CONV_OERR and IGN_CORR_OERR.

* Per #2583, define ObsErrorEntry::variance() with a call to the dist_var() utility function.

* Per #2583, update PairDataEnsemble::compute_pair_vals() to compute the 5 new stats with the correct inputs.

* Per #2583, add DEBUG(10) log messages about computing these new stats.

* Per #2583, update Stat-Analysis to compute these 5 new stats from the ORANK line type.

* Per #2583, whitespace and comments.

* Per #2583, update the User's Guide.

* Per #2583, remove the DS_ADD_OERR and DS_MULT_OERR ECNT columns and rename DS_OERR as DSS, since observation error is not actually involved in its computation.

* Per #2583, minor update to Appendix C

* Per #2583, rename ECNT line type statistic DSS to IDSS.

* Per #2583, fix a couple of typos

* Per #2583, more error checking.

* Per #2583, remove the ECNT IDSS column since its just 2*pi*IGN, the existing ignorance score, and only provides meaningful information when combined with the other Dawid-Sebastiani statistics that have already been removed.

* Per #2583, add Eric's documentation of these new stats to Appendix C. Along the way, update the DOI links in the references based on this APA style guide: https://apastyle.apa.org/style-grammar-guidelines/references/dois-urls#:~:text=Include%20a%20DOI%20for%20all,URL%2C%20include%20only%20the%20DOI.

* Per #2583, fix new equations with embedded underscores for PDF by defining both html and pdf formatting options.

* Per #2583, update the ign_conv_oerr equation to include a 2
*pi multiplier for consistency with the existing ignorance score. Also, fix the documented equations.

* Per #2583, remove log file that was inadvertently added on this branch.

* Per #2583, simplify ObsErrorEntry::variance() implementation. For the distribution type of NONE, return a variance of 0.0 rather than bad data, as discussed with @michelleharrold and @JeffBeck-NOAA on 3/8/2024.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Revert #2825 since more documentation and testing is needed (#2837)

This reverts commit 108a895.

* Feature #2583 ecnt fix IGN_OERR_CORR (#2838)

* Unrelated to #2583, fix typo in code comments.

* Per #2583, add hooks write 3 new ECNT columns for observation error data.

* Per #2583, make error messages about mis-matched array lengths more informative.

* Per #2583, switch to more concise variable naming conventions of ign_oerr_cnv, ign_oerr_cor, and dawid_seb.

* Per #2583, fix typo to enable compilation

* Per #2583, define the 5 new ECNT column names.

* Per #2583, add 5 new columns to the ECNT table in the Ensemble-Stat chapter

* Per #2583, update stat_columns.cc to write these 5 new ECNT columns

* Per #2583, update ECNTInfo class to compute the 5 new ECNT statistics.

* Per #2583, update stat-analysis to parse the 5 new ECNT columns.

* Per #2583, update aggregate_stat logic for 5 new ECNT columns.

* Per #2583, update PairDataEnsemble logic for 5 new ECNT columns

* Per #2583, update vx_statistics library with obs_error handling logic for the 5 new ECNT columns

* Per #2583, changes to make it compile

* Per #2583, changes to make it compile

* Per #2583, switch to a consistent ECNT column naming convention with OERR at the end. Using IGN_CONV_OERR and IGN_CORR_OERR.

* Per #2583, define ObsErrorEntry::variance() with a call to the dist_var() utility function.

* Per #2583, update PairDataEnsemble::compute_pair_vals() to compute the 5 new stats with the correct inputs.

* Per #2583, add DEBUG(10) log messages about computing these new stats.

* Per #2583, update Stat-Analysis to compute these 5 new stats from the ORANK line type.

* Per #2583, whitespace and comments.

* Per #2583, update the User's Guide.

* Per #2583, remove the DS_ADD_OERR and DS_MULT_OERR ECNT columns and rename DS_OERR as DSS, since observation error is not actually involved in its computation.

* Per #2583, minor update to Appendix C

* Per #2583, rename ECNT line type statistic DSS to IDSS.

* Per #2583, fix a couple of typos

* Per #2583, more error checking.

* Per #2583, remove the ECNT IDSS column since its just 2*pi*IGN, the existing ignorance score, and only provides meaningful information when combined with the other Dawid-Sebastiani statistics that have already been removed.

* Per #2583, add Eric's documentation of these new stats to Appendix C. Along the way, update the DOI links in the references based on this APA style guide: https://apastyle.apa.org/style-grammar-guidelines/references/dois-urls#:~:text=Include%20a%20DOI%20for%20all,URL%2C%20include%20only%20the%20DOI.

* Per #2583, fix new equations with embedded underscores for PDF by defining both html and pdf formatting options.

* Per #2583, update the ign_conv_oerr equation to include a 2
*pi multiplier for consistency with the existing ignorance score. Also, fix the documented equations.

* Per #2583, remove log file that was inadvertently added on this branch.

* Per #2583, simplify ObsErrorEntry::variance() implementation. For the distribution type of NONE, return a variance of 0.0 rather than bad data, as discussed with @michelleharrold and @JeffBeck-NOAA on 3/8/2024.

* Per #2583, updates to ensemble-stat.rst recommended by @michelleharrold and @JeffBeck-NOAA.

* Per #2583, implement changes to the IGN_CORR_OERR corrected as directed by @ericgilleland.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Update the pull request template to include a question about expected impacts to existing METplus Use Cases.

* #2830 Changed enum Builtin to enum class

* #2830 Converted enum to enum class at config_constants.h

* Feature #2830 bootstrap enum (#2843)

* Bugfix #2833 develop azimuth (#2840)

* Per #2833, fix n-1 bug when defining the azimuth delta for range/azimuth grids.

* Per #2833, when definng TcrmwData:range_max_km, divide by n_range - 1 since the range values start at 0.

* Per #2833, remove max_range_km from the TC-RMW config file. Set the default rmw_scale to NA so that its not used by default. And update the documentation. Still actually need to make the logic of the code work as it should.

* Per #2833, update tc_rmw to define the range as either a function of rmw or using explicit spacing in km.

* Per #2833, update the TCRMW Config files to remove the max_range_km entry, and update the unit test for one call to use RMW ranges and the other to use ranges defined in kilometers.

* Per #2833, just correct code comments.

* Per #2833, divide by n - 1 when computing the range delta, rather than n.

* Per #2833, correct the handling of the maximum range in the tc-rmw tool. For fixed delta km, need to define the max range when setting up the grid at the beginning.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* #2830 Changed enum PadSize to enum class

* #2830 Removed redundant parantheses

* #2830 Removed commenyted out code

* #2830 Use auto

* #2830 Changed enum to enum class for DistType, InterpMthd, GridTemplates, and NormalizeType

* #2830 Moved enum_class_as_integer from header file to cc files

* #2830 Added enum_as_int.hpp

* #2830 Added enum_as_int.hpp

* Deleted enum_class_as_integer and renamed it to enum_class_as_int

* Removed redundant paranthese

* #2830 Changed enum to enumclass

* #2830 Changed enum_class_as_integer to enum_class_as_int

* Feature #2379 sonarqube gha (#2847)

* Per #2379, testing initial GHA SonarQube setup.

* Per #2379, switch to only analyzing the src directory.

* Per #2379, move more config logic from sonar-project.properties into the workflow. #ci-skip-all

* Per #2379, try removing + symbols

* Per #2379, move projectKey into xml workflow and remove sonar-project.properties.

* Per #2379, try following the instructions at https://github.com/sonarsource-cfamily-examples/linux-autotools-gh-actions-sq/blob/main/.github/workflows/build.yml ci-skip-all

* Per #2379, see details of progress described in this issue comment: #2379 (comment)

* Unrelated to #2379, just removing spurious space that gets flagged as a diff when re-running enum_to_string on seneca.

* Per #2379, try running SonarQube through GitHub.

* Per #2379, remove empty env section and also disable the testing workflow temporarily during sonarqube development.

* Per #2379, fix docker image name.

* Per #2379, delete unneeded script.

* Per #2379, update GHA to scan Python code and push to the correct SonarQube projects.

* Per #2379, update GHA SonarQube project names

* Per #2379, update the build job name

* Per #2379, update the comile step name

* Per #2379, switch to consistent SONAR variable names.

* Per #2379, fix type in sed expressions.

* Per #2379, just rename the log artifact

* Per #2379, use time_command wrapper instead of run_command.

* Per #2379, fix bad env var name

* Per #2379, switch from egrep to grep.

* Per #2379, just try cat-ting the logfile

* Per #2379, test whether cat-ting the log file actually works.

* Per #2379, revert back

* Per #2379, mention SonarQube in the PR template. Make workflow name more succinct.

* Per #2379, add SONAR_REFERENCE_BRANCH setting to define the sonar.newCode.referenceBranch property. The goal is to define the comparison reference branch for each SonarQube scan.

* Per #2379, have the sonarqube.yml job print the reference branch it's using

* Per #2379, intentionally introduce a new code smell to see if SonarQube correctly flag it as appearing in new code.

* Per #2379, trying adding the SonarQube quality gate check.

* Per #2379, add logic for using the report-task.txt output files to check the quality gate status for both the python and cxx scans.

* Per #2379 must use unique GHA id's

* Per #2379, working on syntax for quality gate checks

* Per #2379, try again.

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try yet again

* Per #2379

* Per #2379, add more debug

* Per #2379, remove -it option from docker run commands

* Per #2379, again

* Per #2379, now that the scan works as expected, remove the intentional SonarQube code smell as well as debug logging.

* Hotfix related to #2379. The sonar.newCode.referenceBranch and sonar.branch.name cannot be set to the same string! Only add the newCode definition when they differ.

* #2830 Changed enum STATJobType to enum class

* #2830 Changed STATLineType to enum class

* #2830 Changed Action to enum class

* #2830 Changed ModeDataType to enum class

* #2830 Changed StepCase to enum class

* #2830 Changed enum to enum class

* #2830 Changed GenesisPairCategory to enum class

* #2830 Removed rediundabt parenrthese

* #2830 Reduced same if checking

* #2830 Cleanup

* #2830 USe empty() instead of lebgth checking

* #2830 Adjusted indentations

* Feature #2379 develop sonarqube updates (#2850)

* Per #2379, move rgb2ctable.py into the python utility scripts directory for better organization and to enable convenient SonarQube scanning.

* Per #2379, remove point.py from the vx_python3_utils directory which cleary was inadvertenlty added during development 4 years ago. As far as I can tell it isn't being called by any other code and doesn't belong in the repository. Note that scripts/python/met/point.py has the same name but is entirely different.

* Per #2379, update the GHA SonarQube scan to do a single one with Python and C++ combined. The nightly build script is still doing 2 separate scans for now. If this all works well, they could also be combined into a single one.

* Per #2379, eliminate MET_CONFIG_OPTIONS from the SonarQube workflow since it doesn't need to be and probably shouldn't be configurable.

* Per #2379, trying to copy report-task.txt out of the image

* Per #2379, update build_met_sonarqube.sh to check the scan return status

* Per #2379, fix bash assignment syntax

* Per #2379, remove unused SCRIPT_DIR envvar

* Per #2379, switch to a single SonarQube scan for MET's nightly build as well

* Feature 2654 ascii2nc polar buoy support (#2846)

* Added iabp data type, and modified file_handler to filter based on time range, which was added as a command line option

* handle time using input year, hour, min, and doy

* cleanup and switch to position day of year for time computations

* Added an ascii2nc unit test for iabp data

* Added utility scripts to pull iabp data from the web and find files in a time range

* Modified iabp_handler to always output a placeholder 'location' observation with value 1

* added description of IABP data python utility scripts

* Fixed syntax error

* Fixed Another syntax error.

* Slight reformat of documentation

* Per #2654, update the Makefiles in scripts/python/utility to include all the python scripts that should be installed.

* Per #2654, remove unused code from get_iabp_from_web.py that is getting flagged as a bug by SonarQube.

* Per #2654, fix typo in docs

---------

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Feature #2786 rpss_from_prob (#2861)

* Per #2786, small change to a an error message unrelated to this development.

* Per #2786, add RPSInfo::set_climo_prob() function to derive the RPS line type from climatology probability bins. And update Ensemble-Stat to call it.

* Per #2786, minor change to clarify error log message.

* Per #2786, for is_prob = TRUE input, the RPS line type is the only output option. Still need to update docs!

* Per #2786, add new call to Ensemble-Stat to test computing RPS from climo probabilities

* Per #2786, use name rps_climo_bin_prob to be very explicit.

* Per #2786, redefine logic of RPSInfo::set_climo_bin_prob() to match the CPC definition. Note that reliability, resolution, uncertainty, and RPSS based on the sample climatology are all set to bad data. Need to investigate whether they can be computed using these inputs.

* Per #2786, remove the requirement that any fcst.prob_cat_thresh thresholds must be defined. If they are defined, pass them through to the FCST_THRESH output column. If not, write NA. Add check to make sure the event occurs in exactly 1 category.

* Per #2786, don't enforce fcst.prob_cat_thresh == obs.prob_cat_thresh for probabilistic inputs. And add more is_prob checks so that only the RPS line type can be written when given probabilistic inputs.

* updated documentation

* Per #2786, call rescale_probability() function to convert from 0-100 probs to 0-1 probs.

---------

Co-authored-by: j-opatz <jopatz@ucar.edu>

* Feature #2862 v12.0.0-beta4 (#2864)

* Feature #2379 develop single_sq_project (#2865)

* Hotfix to the documentation in the develop branch. Issue #2858 was closed as a duplicate of #2857. I had included it in the MET-12.0.0-beta4 release notes, but the work is not yet actually complete.

* Feature 2842 ugrid config (#2852)

* #2842 Removed UGrid related setting

* #2842 Corrected vertical level for data_plane_array

* #2842 Do not allow the time range

* #2842 The UGridConfig file can be passed as ugrid_dataset

* #2842 Changed -config option to -ugrid_config

* #2842 Deleted UGrid configurations

* 2842 Fix a compile error when UGrid is disabled

* #2842 Cleanup

* #2842 Added an unittest point_stat_ugrid_mpas_config

* #2842 Added a PointStatConfig without UGrid dataset.

* #2842 Corrected ty[po at the variable name

* Switched from time_centered to time_instant. I think time_centered is the center of the forecast lead window and time_instant is the time the forecast is valid (end of forecast window).

* #2842 Removed ugrid_max_distance_km and unused metadata names

* #2842 Restored time variable time_instant for LFric

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjusted lon to between -180 to 180

* #2842 Changed variable names

* Per #2842, switch from degrees east to west right when the longitudes are read.

* #2842, switch from degrees east to west right when the longitudes are read

* #2842 Cleanup debug messages

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature 2753 comp script config (#2868)

* set dynamic library file extension to .dylib if running on MacOS and .so otherwise

* Added disabling of jasper documentation for compiliation on Hera

* Updated

* remove extra export of compiler env vars

* include full path to log file so it is easier to file the log file to examine when a command fails

* send cmake output to a log file

* remove redundant semi-colon

* use full path to log file so it is easier to examine on failure

* use run_cmd to catch if rm command fails

* Modifications for compilation on hera, gaea, and orion

* Updating

* fixed variable name

* clean up if/else statements

* set TIFF_LIBRARY_RELEASE argument to use full path to dynamic library file to prevent failure installing proj library

* set LDFLAGS so that LDFLAGS value set in the user's environment will also be used

* Updated based on gaea, orion, and hera installs

* Updated

* change extension of dynamic library files only if architecture is arm64 because older Macs still use .so

* added netcdf library to args to prevent error installing NetCDF-CXX when PROJ has been installed in the same run of the script -- PATH is set in the COMPILE_PROJ if block that causes this flag from being added automatically

* clean up how rpath and -L are added to LDFLAGS so that each entry is separate -- prevents errors installing on Mac arm64 because multiple rpath values aren't read using :. Also use MET_PROJLIB

* Updated

* removed -ltiff from MET libs

* only add path to rpath and -L arguments if they are not already included in LDFLAGS

* changed from using LIB_TIFF (full path to tiff lib file) to use TIFF_LIB_DIR (dir containing tiff lib file). Added TIFF_INCLUDE_DIR to proj compilation and -DJAS_ENABLE_DOC to jasper compliation taken from @jprestop branch

* update comments

* ensure all MET_* and MET_*LIB variables are added to the rpath for consistency

* remove unnecessary if block and only export LDFLAGS at the end of setting locally

* Updated

* Added section for adding <VALUE>/lib64 and rearranged placement of ADDTL_DIR

* Commenting out the running of the Jasper lib tests

* Updating and/or removing files

* Updating and/or removing files

* Latest udpates which include the addition of the tiff library for proj

* Remove commented out line.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Make indentation consistent.

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Per 2753, added -lm to configure_lib_args for NetCDF-CXX

* Per #2753 updating acorn files

* Per #2753, update wcoss2 files

* Per #2753, updating acorn file to include MET_PYTHON_EXE

* Per #2753, updated files for 12.0.0 for derecho

* Per #2753, updated derecho file adding MET_PYTHON_EXE and made corrections

* Updating config files

* Updating orion files

* Updates for gaea's files

* Updating gaea modulefile

* Removing modulefile for cheyenne

* Added MET_PYTHON_EXE

* Added MET_PYTHON_EXE to hera too

* Adding file for hercules

* Removing equals sign from setenv

* Adding file for hercules

* Updated script to add libjpeg installation for grib2c

* Per #2753, Adding file for casper

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature #2795 level_mismatch_warning (#2873)

* Per #2795, move the warning message about level mismatch from the config validation step to when the forecast files are being processed. Only check this when the number of forecast fields is greater than 1, but no longer limit the check to pressure levels only.

* Per #2795, add comments

* Whitespace

* Per #2795, port level mismatch fix over to Ensemble-Stat. Check it for each verification task, but only print it once for each task, rather than once for each task * ensemble member.

* Feature #2870 removing_MISSING_warning (#2872)

* Per #2870, define utility functions for parsing the file type from a file list and for logging missing files, checking for the MISSING keyword. Also, update Ensemble-Stat and Gen-Ens-Prod to call these functions.

* Per #2870, update the gen_ens_prod tests to demonstrate the use of the MISSING keyword for missing files. METplus uses this keyword for Ensemble-Stat and Gen-Ens-Prod.

* Feature 2842 ugrid config (#2875)

* #2842 Removed UGrid related setting

* #2842 Corrected vertical level for data_plane_array

* #2842 Do not allow the time range

* #2842 The UGridConfig file can be passed as ugrid_dataset

* #2842 Changed -config option to -ugrid_config

* #2842 Deleted UGrid configurations

* 2842 Fix a compile error when UGrid is disabled

* #2842 Cleanup

* #2842 Added an unittest point_stat_ugrid_mpas_config

* #2842 Added a PointStatConfig without UGrid dataset.

* #2842 Corrected ty[po at the variable name

* Switched from time_centered to time_instant. I think time_centered is the center of the forecast lead window and time_instant is the time the forecast is valid (end of forecast window).

* #2842 Removed ugrid_max_distance_km and unused metadata names

* #2842 Restored time variable time_instant for LFric

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjust lon between -180 and 180

* #2842 Adjusted lon to between -180 to 180

* #2842 Changed variable names

* Per #2842, switch from degrees east to west right when the longitudes are read.

* #2842, switch from degrees east to west right when the longitudes are read

* #2842 Cleanup debug messages

* #2842 Disabled output types except STAT for sl1l2

* #2842 Disabled output types except STAT for sl1l2 and MPR

* #2842 Reduced output files for UGrid

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Hotfix to develop branch to remove duplicate test named 'point_stat_ugrid_mpas_config'. That was causing unit_ugrid.xml to fail because it was still looking for .txt output files that are no longer being generated.

* Feature 2748 document ugrid (#2869)

* Initial documentation of the UGRID capability.

* Fixes error in references, adds appendix to index, and adds sub-section for configuration entries and a table for metadata map items.

* Corrects LFRic, rewords section on UGRID conventions, updates description of using GridStat, and removes mention of nodes.

* Forgot one more mention of UGRID conventions.

* Incorporates more suggestions from @willmayfield.

* Switches to numerical table reference.

* Feature #2781 Convert MET NetCDF point obs to Pandas DataFrame (#2877)

* Per #2781, added function to convert MET NetCDF point observation data to pandas so it can be read and modified in a python embedding script. Added example python embedding script

* ignore python cache files

* fixed function call

* reduce cognitive complexity to satisfy SonarQube and add boolean return value to catch if function fails to read data

* clean up script and add comments

* replace call to object function that doesn't exist, handle exception when file passed to script cannot be read by the NetCDF library

* rename example script

* add new example script to makefiles

* fix logic to build pandas DataFrame to properly get header information from observation header IDs

* Per #2781, add unit test to demonstrate python embedding script that reads MET NetCDF point observation file and converts it to a pandas DataFrame

* Per #2781, added init function for nc_point_obs to take an input filename. Also raise TypeError exception from nc_point_obs.read_data() if input file cannot be read

* call parent class init function to properly initialize nc_point_obs

* Feature #2833 pcp_combine_missing (#2886)

* Per #2883, add -input_thresh command line option to configure allowable missing input files.

* Per #2883, update pcp_combine usage statement.

* Per #2883, update existing pcp_combine -derive unit test example by adding 3 new missing file inputs at the beginning, middle, and end of the file list. The first two are ignored since they include the MISSING keyword, but the third without that keyword triggers a warning message as desired. The -input_thresh option is added to only require 70% of the input files be present. This should produce the exact same output data.

* Per #2883, update the pcp_combine logic for the sum command to allow missing data files based on the -input_thresh threshold. Add a test in unit_pcp_combine.xml to demonstrate.

* Update docs/Users_Guide/reformat_grid.rst

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Per #2883, update pcp_combine usage statement in the code to be more simliar to the User's Guide.

* Per #2883, switch to using derive_file_list_missing as the one containing missing files and recreate derive_file_list as it had existed for the test named pcp_combine_derive_VLD_THRESH.

* Per #2883, move initialization inside the same loop to resolve SonarQube issues.

* Per #2883, update sum_data_files() to switch from allocating memory to using STL vectors to satisfy SonarQube.

* Per #2883, changes to declarations of variables to satisfy SonarQube.

* Per #2883, address more SonarQube issues

* Per #2883, backing out an unintended change I made to tcrmw_grid.cc. This change belongs on a different branch.

* Per #2883, update logic of parse_file_list_type() function to handle python input strings. Also update pcp_combine to parse the type of input files being read and log non-missing python input files expected.

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Per #2888, update STATAnalysisJob::dump_stat_line() to support dumping stat line types VCNT, RPS, DMAP, and SSIDX. (#2891)

* Per #2659, making updates as proposed at the 20240516 MET Eng. Mtg. (#2895)

* Feature #2395 TOTAL_DIR (#2892)

* Per #2395, remove the n_dir_undef and n_dira_undef variables that are superceded by the new dcount and dacount VL1L2Info members to keep track of the number of valid wind direction vectors.

* Per #2395, add TOTAL_DIR columns to the VL1L2, VAL1L2, and VCNT line types and update the header column tables.

* Per #2395, update the User's Guide to list the new TOTAL_DIR columns in the VL1L2, VAL1L2, and VCNT line types.

* Per #2395, update stat_analysis to parse the new TOTAL_DIR columns and use the values to aggregate results when needed.

* Per #2395, for SonarQube change 'const char *' to 'const char * const' to satisfy the finding that 'Global variables should be const.' Should probably switch from 'char char *' to strings eventually. But for now, I'm just making up for some SonarQube technical debt.

* Per #2395, fix typo in placement of the DIR_ME column name in the met_header_columns_V12.0.txt file

* Per #2395, add 2 new Stat-Analysis jobs to demonstrate the processing of VL1L2 lines.

* Per #2395, update logic of is_vector_dir_stat(). Instead of just checking 'DIR_', check 'DIR_ME', 'DIR_MAE', and 'DIR_MSE' to avoid an false positive match for the 'DIR_ERR' column which is computed from the vector partial sums rather than the individual direction differences.

* Bugfix #2897 develop python_valid_time (#2899)

* Per #2897, fix typos in 2 log messages. Also fix the bug in storing the valid time strings. The time string in vld_array should exactly correspond to the numeric unixtime values in vld_num_array. Therefore they need to be updated inside the same if block. The bug is that we were storing only the unique unixtime values but storing ALL of the valid time string, not just the unique ones.

* Per #2897, minor change to formatting of log message

* MET #2897, don’t waste time searching, just set the index to n - 1

* Per #2897, remove unused add_prec_point_obs(...) function

* Per #2897, update add_point_obs(...) logic for DEBUG(9) to print very detailed log messages about what obs are being rejected and which are being used for each verification task.

* Per #2897, refine the 'using' log message to make the wording consistent with the summary rejection reason counts log message

* Per #2897, update the User's Guide about -v 9 for Point-Stat

---------

Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Bugfix 2867 point2grid qc flag (#2890)

* #2867 Added compute_adp_qc_flag and adjusted ADP QC flags

* #2867 Added point2grid_GOES_16_ADP_Enterprise_high. Changed AOD QC flags to 0,1,2 (was 1,2,3)

* #2867 Added get_nc_att_values_

* #2867 Added get_nc_att_values. Added the argument allow_conversion to get_nc_data(netCDF::NcVar *, uchar  *data)

* #2867 Read the ADP QC flag values and meanings attributes from DQF variable and set the QC high, meduium, low values to support Enterprise algorithm. Adjusted the ADP QC values by using AOD qc values

* #2867 Cleanup

* #2867 Corrected indent

* #2867 Changed log message

* #2867 Removed unused argument

* #2867 Removed unused argument

* Cleanup

* #2867 Fix SonarQube findings

* #2867 Deleted protected section with no members

* #2867 Cleanup

* #2867 FIxed SonarQube findings; unused local variables, decalare as const, etc

* #2867 MOved include directives to top

* #2867 Changed some argumenmt with references to avoid copying objects

* #2867 Do not filter by QC flag if -qc is not given

* #2867 Use enumj class for GOES QC: HIGH, MEDIUM, and LOW

* #2867 Added log message back which were deleted accidently

* #2867 Chaned statci const to constexpr

* #2867 Initial release. Separated from nc_utils.h

* @2867 Added nc_utils_core.h

* #2867 Moved some blocks to nc_utils_core.h

* #2867 Include nc_utils_core.h

* #2867 Added const references

* Per #2867, fixing typo in comments.

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: j-opatz <jopatz@ucar.edu>

* Hotfix to develop to fix the update_truth.yml workflow logic. This testing workflow run failed (https://github.com/dtcenter/MET/actions/runs/9209471209). Here we switch to a unique update truth branch name to avoid conflicts.

* Avoid pushing directly to the develop or main_vX.Y branches since that is not necessary for the automation logic in MET.

* #2904 Changed R path to R-4.4.0 (#2905)

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>

* Feature #2912 pb2nc error (#2914)

* Feature 2717 convert unit.pl to unit.py (#2871)

* created unit.py module in new internal/test_unit/python directory

* added xml parsing to unit.py

* added repl_env function

* added reading of the remaining xml tags in build_tests function

* progress on main function (putting together test commands)

* a few more lines in the main function

* minor updates

* fixed how the test command was being run

* added if name/main and command line parsing

* fixed handling of no 'env' in cmd_only mode

* handle params from xml that have \ after filename without space in between

* added logging

* added some more pieces to unit

* more updates to unit.py, including running checks on output files

* bug fixes, improved handling of output file names, improved handling of env vars, improved logging output

* fixed how shell commands are run, and other minor fixes

* added last bits from the perl script, fixed some bugs

* created unit.py module in new internal/test_unit/python directory

* added xml parsing to unit.py

* added repl_env function

* added reading of the remaining xml tags in build_tests function

* progress on main function (putting together test commands)

* a few more lines in the main function

* minor updates

* update scripts to call python unit test script instead of the old perl script

* fix she-bang line to allow script to be run without python3 before it

* add missing test_dir and exit_on_fail tags that are found in the rest of the unit test xml files

* fix call to logger.warning

* change tags named 'exists' to 'exist' to match the rest of the xml files

* added logger to function

* removed tab at end of line that was causing output file path to be excluded from the command

* fix broken checks for output files

* incorporated george's recommended changes

* changed default to overwrite logs; allow for more than one xml file to be passed in command

---------

Co-authored-by: Natalie babij <natalie.babij@natbabij-mac1.home>
Co-authored-by: Natalie babij <natalie.babij@vpn68-237.vpnclient.ucar.edu>
Co-authored-by: Natalie babij <natalie.babij@gsd-sslvpn-209.fsl.noaa.gov>
Co-authored-by: Natalie Babij <nbabij@seneca.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: j-opatz <jopatz@ucar.edu>

* Bugfix 2867 point2grid qc unittest (#2913)

* #2867 Added compute_adp_qc_flag and adjusted ADP QC flags

* #2867 Added point2grid_GOES_16_ADP_Enterprise_high. Changed AOD QC flags to 0,1,2 (was 1,2,3)

* #2867 Added get_nc_att_values_

* #2867 Added get_nc_att_values. Added the argument allow_conversion to get_nc_data(netCDF::NcVar *, uchar  *data)

* #2867 Read the ADP QC flag values and meanings attributes from DQF variable and set the QC high, meduium, low values to support Enterprise algorithm. Adjusted the ADP QC values by using AOD qc values

* #2867 Cleanup

* #2867 Corrected indent

* #2867 Changed log message

* #2867 Removed unused argument

* #2867 Removed unused argument

* Cleanup

* #2867 Fix SonarQube findings

* #2867 Deleted protected section with no members

* #2867 Cleanup

* #2867 FIxed SonarQube findings; unused local variables, decalare as const, etc

* #2867 MOved include directives to top

* #2867 Changed some argumenmt with references to avoid copying objects

* #2867 Do not filter by QC flag if -qc is not given

* #2867 Use enumj class for GOES QC: HIGH, MEDIUM, and LOW

* #2867 Added log message back which were deleted accidently

* #2867 Chaned statci const to constexpr

* #2867 Initial release. Separated from nc_utils.h

* @2867 Added nc_utils_core.h

* #2867 Moved some blocks to nc_utils_core.h

* #2867 Include nc_utils_core.h

* #2867 Added const references

* #2867 Some 'static const' were chnaged to constexpr

* #2867 Changed -qc options (1,2,3 to 0,1 - high & medium) for AOD

* #2867 Merged develop branch

* #2867 Corrected the unit test name

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>

* Feature #2911 tc_stat_set_hdr (#2916)

* Per #2911, no real changes for Stat-Analysis. Just changing order of variables for consistency.

* Per #2911, add StatHdrColumns::apply_set_hdr_opts(...) function to be used by TC-Stat.

* Per #2911, move ByColumn to the TCStatJob base class and add HdrName and HdrValue to support the -set_hdr job command.

* Per #2911, update GSI tools to call the newly added  StatHdrColumns::apply_set_hdr_opts(...) function.

* Per #2911, update logic of Stat-Analysis for consistency to make use of common apply_set_hdr_opts() function.

* Per #2911, add DataLine::set_item() function to support -set_hdr options.

* Per #2911, just update contents of error message

* Per #2911, add TCStatLine member functions for has() and get_offset().

* Per #2911, update tc_stat to support applying -set_hdr to TC-Stat filter jobs.

* Per #2911, revise TC-Stat config files to exercise the -set_hdr job command option

* Per #2911, update TC-Stat documentation to mention the -set_hdr job command option

* Per #2911, add note

* Per #2911, as recommended by SonarQube, make some of these member functions const.

* Bugfix #2856 develop ens_climo (#2918)

* Per #2856, port over fixes from main_v11.1 to develop.

* Per #2856, correct conditionals in set_job_controls.sh and tweak existing Ensemble-Stat configuration file to exercise the logic that's being impacted here.

* Bugfix #2841 develop tang_rad_winds (#2921)

* Per #2841, port over fixes from bugfix_2841_main_v11.1_tang_rad_winds for the develop branch

* Per #2841, clarify in the docs that azimuths are defined in degrees counter-clockwise from due east.

* Per #2841, just updating with output from enum_to_string.

* Per #2841, tweak the documentation.

* Per #2841, correct the location of using namespace lines.

* Per #2841, update compute_tc_diag.py to no longer skip writing the radial and tangential wind diagnostics.

* Per #2841, update compute_tc_diag.py to no longer skip writing radial and tangential wind diagnostics.

* Revert "Per #2841, update compute_tc_diag.py to no longer skip writing radial and tangential wind diagnostics."

This reverts commit f097345.

* Revert "Per #2841, update compute_tc_diag.py to no longer skip writing the radial and tangential wind diagnostics."

This reverts commit c040215.

* Per #2841, update comp_dir.sh logic to include .dat in the files that are diffed

* Replace tab with spaces

* Per #2841, correct the units for the azimuth netcdf output variable

* Per #2841, reverse the x dimension of the rotated latlon grid to effectively switch from counterclockwise rotation to clockwise.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: Howard Soh <hsoh@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>
Co-authored-by: davidalbo <dave@ucar.edu>
Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: natalieb-noaa <146213121+natalieb-noaa@users.noreply.github.com>
Co-authored-by: Natalie babij <natalie.babij@natbabij-mac1.home>
Co-authored-by: Natalie babij <natalie.babij@vpn68-237.vpnclient.ucar.edu>
Co-authored-by: Natalie babij <natalie.babij@gsd-sslvpn-209.fsl.noaa.gov>
Co-authored-by: Natalie Babij <nbabij@seneca.rap.ucar.edu>
Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com>
jprestop added a commit to dtcenter/METplus that referenced this pull request Jun 28, 2024
* Feature #1974 Documentation: update coding standards section (#2260)

* Feature #2253 conftest fixture to set pytest tmpdir (#2261)

* Feature #2151 Documentation: Add quick search keywords METplotpy/calcpy use cases (#2259)

* Feature #2138 CI enhance MET Docker tag override (#2258)

* Updating development instructions.

* fixed typo

* fixed another typo

* Feature #2207 Documentation - Updates to Contributor's Guide (#2263)

Co-authored-by: Dan Adriaansen <dadriaan@ucar.edu>

* Feature develop update install files (#2266)

* Updating installation files

* Removing run_commands.sh

* Updated the file to add a MINICONDA_PATH

* Adding files for jet

* Adding orion file

* Removing beta references

* Corrected met version

* Adding files for WCOSS2 machines

* Removing rc1 from acorn file

* Removing beta1

* Bugfix #1853 develop - PointStat don't require mask variables to be set (#2262)

* update version of certifi to match auto-generated dependabot PR #2267

* feature #2253 more tests for diff_util.py (#2264)

* update versions of METplus components for the next official release

* updated release notes for 5.1.0 release

* removed duplicate entries in release notes

* Added EC2 instance recipee with S3 mounting ability (#2269)

* Updating the Subsetting Tests by Marker section (#2272)

* update release date for 5.1.0 release (#2276)

* update version for development towards 6.0.0-beta1 release

* added new use case that was missing

* Bugfix #2279 develop - buoy station file from 2022 (#2280)

* Feature 2253 series analysis tests (#2277)

* Fix typo in pull_request_template.md

* Make code coverage report available (#2287)

* Use updated dtcenter/metplus-action-data-update tag that fixes bug that causes GHA disk to exceed capacity when too many data volumes are created. Use specific commit of coveralls python action to ensure it will not change

* removed climatology keyword from use cases that aren't relevant that were accidentally added with PR #1984

* update readme with current information

* Feature #2282 coord_release_docs (#2288)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* continue workflow if coveralls step fails -- this typically happens on a pull request from a fork because the authentication fails

* Feature 2253 system util tests (#2297)

* Feature #2294 LSR use case (#2295)

* Feature 2253 run util tests (#2307)

* Release Guide - remove beta/rc tags/releases (#2309)

* Add 'component: repository maintenance' label. Already ran the script to push this change and the NOAA OAR reporting label to all the METplus repos.

* Hotfix for labels, adding a new one for 'component: input data' and also fixing the get_lablels.sh to search for up to 200 existing labels. Also work on the log messages.

* Fix typo in comment

* Feature #2283 time looping consolidation (#2311)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* New issue template: Update Truth (#2332)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* feature #2253 tests for run_util, 'Usage' bugfix (#2313)

* Feature #2338 Debian 12 Conda environments (#2341)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* Feature 1488 usecase satwinds (#2324)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #2283 include times (#2345)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* feature #2253 tests for config_validate, mock logger in conftest (#2320)

* Feature #2299 / #2310 Remove deprecated MET config env vars and TCMPRPlotter (#2347)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

* remove MODEL and OBTYPE to use defaults from MET config

* Feature #2348 v6.0.0-beta1 release (#2351)

* update version for development towards 6.0.0-beta2 release

* copy libGL and libEGL files into docker image to prevent errors with geovista python package

* run use that uses geovista to test

* Feature #2156 release_acceptance_testing (#2352)

* feature #2253 print error logs from conftest (#2358)

* feature #2253 met_db_load tests (#2355)

* Rename 5.1.0.lua_wcoss2 to 6.0.0.lua_wcoss2

* Update and rename 5.1.0_acorn to 6.0.0_acorn

* Update 6.0.0_acorn

* feature #2253 add tests for gfdl_tracker (#2354)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Create 6.0.0_gaea

* Update and rename 5.1.0_hera to 6.0.0_hera

* Feature #2156 release_acceptance_testing take2 (#2361)

Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com>

* Feature #2329 Docker info in Installation Chapter (#2366)

* feature_2253_extract_tiles_tests (#2368)

* Feature 2253 tc pairs tests (#2369)

* Feature 2253 tc csv writer (#2373)

* update requirements for building docs to get around build failure where python packages required to build RTD have disappeared from the automatically generated commands from RTD

* fix ReadTheDocs requirements to include pillow which is a dependency of sphinx-gallery: see https://blog.readthedocs.com/defaulting-latest-build-tools/ for more info on why this was necessary

* Feature #2340 TCDiag one_time_per_file_flag (#2374)

* Update and rename 5.1.0_jet to 6.0.0_jet

* Added libssh

* prune docker files before running use cases to prevent running out of disk space when running use cases, ci-run-all-diff

* Feature 2253 command builder tests (#2378)

* Feature 2253 series analysis test (#2380)

* Feature 2253 py embed test (#2379)

* ignore cyclone plotter from code coverage report because it will be replaced with METplotpy logic

* Feature 898 headers (#2389)

* changing _ to - for header consistency

* changing _ to - for header consistency

* updating all headers for consistency

* updating all headers for consistency and adding spacing

The spacing doesn't seem to be required but it is the convention that we follow for headers.

* updating all headers for consistency

* updating headers for consistency and adding capital letters to  headers

* Using the overline ### to keep index consistent with other indexes

* updating all headers for consistency

* update requirements for building docs to get around build failure where python packages required to build RTD have disappeared from the automatically generated commands from RTD

* updating all headers and some spacing for consistency

* updating headers for consistency

* changing to ### for consistency

* Per #898, fixed the headers for the Release Guide part, chapters, and sections.

* Duplicating changes in develop branch for requirements.txt file

* updating headers

* Per #2669, updated header formatting to resolve errors

* Per #2669, udpating header

* Per #2669, udpating headers

* Per #2669, udpating header

* Per #2669, updated header formatting

* Per #2669, update header formatting

* updating headers

* Per #898, removed space in front of title

* Capitalizing Please

* changing to just italics to match standard formatting

* indenting for consistent formatting

* fixing italics again

* changing from note to warning for consistency

* updating headers, adding some capitalizing to the headers

* fixing typo

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* This file was committed but never updated or used

Per Minna, ok to delete.

* Restructuring table of contents to make it more clear which guides are for users and which are for contributors

* fixing formatting for clairity

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

* Feature #2349 upgrade instructions for deprecated MET config files (#2386)

* Feature 2123 di doc update (#2392)

Co-authored-by: Tracy <tracy.hertneky@noaa.gov>

* change log to list name of config variable , e.g. GRID_STAT_CONFIG_FILE, to easily see which variable should be removed

* Major refactor including elimination of unnecessary imports, only computing the index for the season requested instead of all seasons all the time, which also fixes a bug selecting which season the user requested. Results are identical for all seasons for the test data for the use case.

* Feature 1667 doc conventions (#2397)

* New additions based on the old branch feature_1667_updating_overview

* Moving the release-notes reference label

* Added label for METplus_glossary for use in Documentation conentions section.

* Adding images for the Documentation Conventions section

* Modifying wording and testing formatting in Internal Links section

* Second take on formatting

* Third attempt at formatting

* Fourth attempt at formatting

* Modified wording, sections, and formatting

* Minor modifications

* Added period

* Changed Pretty Table to PrettyTable

* Modify informationg about converting an existing table and adding images

* Resolving errors

* Reformatting

* Moving placement of reference label

* Attempting to fix table title

* Fixed incorrect alignment

* Made changes based on Lisa's suggestions

* Made changes based on Lisa's suggestions

* Made corrections

* Made corrections

* Per #1667, fixing typos

* Per #1667, corrected text

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

* Feature #2377 Log to terminal only (#2398)

* Update conda envs to use conda-forge only (#2402)

* rearrange MET config env var tables for GridStat so they are in the order that they appear in the wrapped MET config file

* use mamba instead of conda and update version of netcdf python package used to 1.6.2

* skip s2s_mid_lat WeatherRegime use case that produces different results often

* updated version of xesmf because <0.7.1 does not work with mamba

* per #2412, fix bug in GenVxMask to put quotes around argument so a grid specification string with spaces will be an accepted value

* downgrade version of esmf package to fix bug described in pangeo-data/xESMF#246

* Feature #2219 SeriesAnalysis multiple input files (#2408)

* Adding 3 new requestors to the list of common_labels.txt for NOAA/NHC, CSU/CIRA, and Australian BOM ci-skip-all

* Feature 2405 match tables2wrapper (#2416)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* per #2423, follow symbolic links when traversing directories to find files within a time window, ci-run-all-diff

* Feature #2252 WaveletStat wrapper (#2427)

Co-authored-by: j-opatz <59586397+j-opatz@users.noreply.github.com>

* add WaveletStat use case to group and temporarily disable TCDiag use case because changes to the wrapper are needed to fix it after changes to the MET tool were merged

* update version number for beta2 release (#2431)

* update version for dev towards beta3

* Feature #2371 Embed use case upgrade demo video into upgrade instructions (#2444)

* fix failing use case tests -- install python packages dateutil and requests via apk instead of pip because the pip commands began failing -- see PEP668 https://peps.python.org/pep-0668/ -- also changed scripts to create conda environments for use case tests to install all packages in a single call to mamba instead of individual calls

* remove commands to install geovista from source because it is now installed from conda

* Feature #1989: Add OMI use case (#2457)

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #2432 TCDiag new config changes (#2453)

* move medium range 10 use case into group with 3-5 to speed up runs

* Feature #2334 land_mask (and topo_mask) in PointStat (#2456)

* added use cases with pygrib

* Feature #2430 TCPairs consensus.diag_required and consensus.diag_min_req (#2439)

* Quickfix cloud use case desc imgs (#2464)

* added pics, updated desc

* add last two imgs

* Fixing spelling and capitalization

* Feature 2454 doc overview conv (#2471)

* adding documentation in different sections

* adding grid table section

* fixing links

* grammar updates

* Per #2454, updated sections and wording.

* Per #2454, added a period to the end of a sentence.

* Per #2454, fixing formatting

* Per #2454, updating wording

* adding a section for line breaks in a table

* adding :code: information

* trying to fix warning

* take 2

* take 3 or 4

* maybe fixed

* updating link

* fixing web link again

* web link saga continues

* Changed "ReadTheDocs" to "Read the Docs"

* Updated "main_v" references to be "main_v12.0"

* Removed references to main_v*, replacing with raw RST 

It is not maintainable to have links to branches which will become old.  Since we can avoid it by adding the raw RST in the documentation, I have removed all references to main_v* in favor of placing the raw RST in the documentation.

* Modified the "Code in a Paragraph" section

* Reworded for consistency within the document

* Added back the link for Sphinx code blocks

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

* add argument to workflow dispatch event so that MET DockerHub repo used for tests can be easily overridden to test changes in a MET PR before merging

* Feature dtcenter/MET#2796 GHA Node20 deprecation warnings (#2473)

* per dtcenter/MET#2796, update versions of actions to prevent deprecated node warnings in GHA runs

* change arguments to workflow dispatch so they are no longer required -- these are not needed to be set when triggering by hand through the web interface

* Feature dtcenter/MET#2796 develop - Fix error log artifact creation (#2475)

* updated version of pillow to fix security vulnerability alerted by dependabot in PR #2477

* remove docker image after runtime image is created from metplus image and conda env image

* turn on use case to test image removal

* prune images if image tag doesn't exist -- it appears that if the image is built on the fly (when PR is coming from fork) then the tag exists, but if not, the image tag is set to <none>

* support commands that must run in the shell to see if || will work in docker image pruning step

* try to fix image removal

* Feature 2383 use case sat alt (#2480)

* new docs, files for use case

* new files

* updating to run use case

* updated python libraries, changed test env

* trying new point logic

* added to script for nan removal

* redid Python script to take adv of new MET ability for nans

* Update run status

* removed unused settings

* run image prune commands separately

* changed shell back to false

* split up use case groups so the same envs are used by a group to see if that resolves the disk space issues

* turn off use cases

* feature 2253 fix empty pytest logs (#2485)

* added more commands to free up disk space as suggested in https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh, ci-run-all-cases

* Feature 2406 redo usecase rrfs (#2488)

* issue #2406 RRFS use case files

* issue #2406 added usecase to tests

* Issue #2406 added metplotpy and metcalcpy as dependencies

* Feature #2460 allow missing input (#2493)

* changed template to use datetime format that works on MacOS

* update logic to only write a file list file if there are more than 1 files, updated unit tests to match new behavior, added exception handling to series analysis to prevent crash if file does not exist

* use getraw instead of getstr to prevent crash if providing a filename template tag to override a config variable on the command line

* Add optional argument to subset file function to always write a file list text file even if there is only 1 file found. Use this argument in UserScript wrapper so that the environment variables that contain paths to file list files are consistent in format for use in user scripts

* enhanced function to support different output variable types

* removed the need for overriding clear function in specific wrappers and added optional argument to skip clearing input file list

* clean up formatting

* per #2460, start to implement logic to prevent errors when some input files are not found

* isolate logic to find input files into find_input_files functions. clean up those functions to return boolean instead of sometimes returning None or a list of files to be consistent

* remove python embedding checks because MET is now smart enough to determine if a python script is used with always setting file_type

* turn on use cases to test error handling

* merge artifacts

* run only failed cases

* always run merge step

* run on a case that will succeed to test error log merge step

* only run error log merge step if there were 'Save error logs' jobs that succeeded

* run cases that will fail

* fix condition to merge error logs

* run group that will succeed but have diffs - check error logs doesn't fail

* testing - add use case group that will succeed but will cause diffs becaus there is no truth data - to confirm that the error log merge step behaves properly in this case

* run 3 jobs, 2 should error, to confirm that error_logs is created properly

* repeat diff no error test but with

* per dtcenter/MET#2796, fix error log artifact creation by merging error logs if any of the 'Save error logs' steps ran successfully

* run test to confirm diff does not cause merge error logs to fail

* Revert "run test to confirm diff does not cause merge error logs to fail"

This reverts commit ff2d1ca.

* run test to confirm error logs are merged properly when 2 use case groups have errors

* try checking output variable as string instead of boolean

* Revert "run test to confirm error logs are merged properly when 2 use case groups have errors"

This reverts commit 8106666.

* run test again

* test again

* move check for error logs for shell script and use github env vars

* Revert "run test again"

This reverts commit 7a0a99c.

* break 2 use cases to test that error logs are still created properly

* checkout repo to get script used to merge error logs

* Revert "break 2 use cases to test that error logs are still created properly"

This reverts commit cb6d0b4.

* test merge error log again on no error diff run

* fix script

* move merge error logic back to workflow

* break 2 use cases to test that error logs are still created properly

* Revert "break 2 use cases to test that error logs are still created properly"

This reverts commit 82aa0e1.

* remove testing use case group

* Revert "remove python embedding checks because MET is now smart enough to determine if a python script is used with always setting file_type"

This reverts commit de3b4b0.

* clean up lines

* update logic to check that python embedding is set up properly to only try to set file_type automatically if it is not already set and if the wrapper is a tool that supports multiple input files via python embedding (which require file_type to be set). also changed error if not set properly to warning and use PYTHON_NUMPY as a default

* remove run_count increment before run_at_time_once - set closer to find_input_files so run count and missing input count are consistent

* return boolean from find_input_files function to be consistent with other functions

* per #2460, warn instead of error if missing inputs are allowed, track counters for number of runs and missing inputs

* per #2460, added check to report error if allowed missing input threshold is met

* run clear before running plot_data_plane

* removed test group

* report warning instead of error if ALLOW_MISSING_INPUTS is True

* cleanup

* change function to pytest fixture so it can be used by other test scripts

* update ascii2nc test to process more than 1 time to ensure commands are built properly for each run

* add unit tests to ensure missing input file logic works properly for ascii2nc and grid_stat

* set variable to skip RuntimeFreq logic to find input files to prevent duplicate increment of run_count -- these will be removed when the wrapper has been updated to find files using RuntimeFreq logic

* remove unneccesary error checking

* cleanup

* call function to handle input templates that need to be handled separately for each item in the comma-separated list (for UserScript and GridDiag only)

* add time_info to ALL_FILES dictionaries to be consistent with other wrappers

* clean up logging for reporting error when missing inputs exceeds threshold

* added function to get files for a single run time to be consistent with other functions

* skip increment of run_count when FIND_FILES=True and RuntimeFreq input file logic is skipped to prevent duplicate increments

* added empty test files

* remove redundant variables

* view warnings on a failed test run

* add more empty test files

* added unit tests for missing input logic

* remove MANDATORY setting for EnsembleStat and GenEnsProd and instead pass mandatory argument to call to find model files so warnings/errors are properly displayed for other inputs

* cleanup

* remove allow missing input logic from ExtractTiles wrapper

* added functions to parse template/dir variables from config, removed explicit calls to read those variables from GridStat

* remove error if more labels than inputs are provided (for UserScript and GridDiag only) -- extra labels will just be ignored

* added required boolean for input templates

* per #2460, change warning messages to debug when checking a list of DA offsets since it is common that a given offset will not always be found in the files

* added tests for missing input logic for many wrappers

* cleanup

* fix increment of number of runs

* skip missing input logic

* change how required is handled for input templates

* warn instead of error if missing input is allowed

* remove increment of missing input counters because it is handled in RuntimeFreq

* check status of input files and increment counters in overridden run_once_per_lead. remove increment of missing input counters because it is handled in run_once_per_lead

* added unit tests for missing input logic

* skip missing input logic

* cleanup

* cleanup, use fixture for tests, add unit tests for missing input, bypass missing input logic on wrappers that don't need it

* removed file that is not needed

* added unit tests for pb2nc to test -valid_beg/end arguments and changes to properly support any runtime frequencies

* warn instead of error if allowing missing inputs

* cleanup

* implement changes to properly support all runtime frequencies for pb2nc. previously all files that match a wildcard will be used instead of selecting only files that fall within the specified time range. some functions moved into pb2nc wrapper will eventually be moved up so that they are used by all wrappers to be consistent

* added unit tests that will fail until wrapper is updated

* replace functions in RuntimeFreq wrapper used to find input files so they can be used by all wrappers, updated ioda2nc wrapper to find input files properly to fix tests

* cleanup

* removed mtd version of get_input_templates and added logic to RuntimeFreq's version to get the same behavior

* added unit tests for MTD missing input checks

* per #2491, add release notes for beta3

* Feature #2491 v6.0.0 beta3 (#2495)

* update version for beta3 release

* fixed typos in release notes

* update version to note development towards beta4 release

* Per suggestion from @JohnHalleyGotway, create intermediate branch for updating truth data to avoid branch protection rules. I added a step to delete the intermediate branch locally if it exists to prevent conflicts with the update

* added quotes to prevent error in echo caused by parenthesis

* fix incorrect command

* Revert "fix incorrect command"

This reverts commit e7dffb6.

* Revert "added quotes to prevent error in echo caused by parenthesis"

This reverts commit c1cb3c4.

* Revert "Per suggestion from @JohnHalleyGotway, create intermediate branch for updating truth data to avoid branch protection rules. I added a step to delete the intermediate branch locally if it exists to prevent conflicts with the update"

This reverts commit 525809d.

* Hotfix: Allow symbolic link to run_metplus.py to run (#2500)

* Adding use case tests

* Changing test environment

* Testing environment changes

* Documentation update

* Updating Documentation

* Updating documentation for disk space failure

* Added new use case category

* Fixing use case test

* Fixing bug in use case file

* Testing s2s after data removal

* add back use cases that were accidentally removed

* fix incorrect use case added

* Setting tests to false for merge

* Removes extraneous imports.

* Switches to function call for the coupling index.

* Correct number of args in comment.

* Testing for old use cases

* Setting tests to false for merge

* update tests to update develop data -- modified commands to create new use case category directory if it does not already exist, move step to remove old data to be completed just after new data is copied to vX.Y

* Summation has to have a dimension supplied for the gridded data, but for pandas the only dimension is time (but it is un-named). Therefore the numerator for the covariance term had to be split out between the fcst and obs case.

* Feature 2463 modify table (#2508)

* creating test dropdown menus

* fixing warnings

* fixing warnings

* fixing warnings 3

* fixing warnings 4

* Attempt to fix documentation errors

* adding 2 more test dropdowns

please note.  There is still a message about 
WARNING: Duplicate explicit target name: "gridstat: cloud fractions with neighborhood and probabilities (pygrib)".
John O will fix this.  I should not touch it.

* fixing spacing

* trying to fix link

* take 2

* Removing double underscores added earlier

* moving dropdown menus

* Adding version to dropdown menu title

* fixing spacing

* dropdowns date util, eofs, h5py

* fixing formatting

* fixing formatting

* Per #2463, adding template for future entries

* adding imageio, lxml & matplotlib

* dropdown up to nc-time-axis

* fixing spacing problems

* Fixing broken s2s links and other incorrect links

* Fixing spelling and capitalization

* Removing the dash in front of 1.4 for nc-time-axis

* Modifying formatting

* adding dropdowns thru pylab

* fixing problems

* dropdowns thru scikit-learn

* fixing spacing

* final dropdowns thru yaml

* fixing spacing

* fixing loose ends

* Per #2463, moving information to an Appendix and adding text and links in an overview

* Per #2463, adding to index.rst

* Per #2463, reworded language and updated Python 3.8 reference

* Per #2463, fixing errors

* Per #2463, made updates based on feedback at the METplus Engineering meeting.

* removing tables, changing most METplus wrappers, version numbers.

* trying to fix met_version

* Per #2463, adding necessary code for substitutions

* Per #2463, fixing syntax error

* adding period

* removing section 1.5

* Per #2463, replace old label reference with new label reference and updated text to reflect the move to drop down menus

* read python version from file to replace in docs

* fixed typo in variable name

* adding python_version to the overview.

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* per #2509, automate MET version used in documentation to be X+6.Y.0 of METplus version

* Bugfix #2520 ASCII2NC file window issue and redundant wrapper initialization (#2522)

* per PyCharm documentation, only ignore workspace.xml idea file and commit the rest of the .idea files to version control

* per #2520, create function to get METplus wrapper class without initializing it and use that function to read list of deprecated env vars to prevent redundant initialization of wrappers that can cause unintended side effects

* handle file_window variables consistently by using CommandBuilder function

* comment out optional config variables that previously caused a failure when unset

* Update update_truth.md

Fix typo in the update_truth issue template in the develop branch.

* Update update_truth.md

Update wording in the update_truth issue template.

* Feature #2530 dev timeline (#2532)

* Per #2530, add a development timeline to the METplus Release Information section of the User's Guide. Also update the Release Guide instructions.

* Per #2530, tweak the wording.

* Update docs/Release_Guide/release_steps/update_release_notes_development.rst

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>

* Adds static station lookup file for use with Python embedding for FLUXNET observations.

* Major overhaul to forecast Python embedding script for the TCI use case.

* Major overhaul to observation Python embedding script for the TCI use case, to compute TCI from raw observations rather than read pre-computed TCI.

* Updates documentation file for TCI use case.

* Adds METcalcpy version number.

* Refactors wording and fixes typo.

* Fixes RST formatting.

* Finally fixed RST error.

* Adds support to remove leap days if requested.

* Updates command line args for Python embedding scripts.

* Feature #2537 develop sonarqube_gha (#2541)

* Per #2537, add SonarQube workflow for METplus

* Per #2537, update nightly build email list.

* Per #2537, fix cut/paste error configure_sonarqube.sh

* Per #2537, exclude test code from code coverage statistics.

* Updated conf file for use case.

* Removes new TCI function because it is in METcalcpy now.

* Removes old code, somsome reorganization and clarification and setting of params, and also switches the fluxnet metadata file to a command line argument instead of an environment variable.

* Update the 6.0.0 Coordinated Release development timeline in release-notes.rst

* Support for environment variables or default options for filtering and filename patterns, DEBUG mode added and set to False by default, adjustment of print statements for logging, and refactoring filtering of stations to ensure we don't process a file that we shouldn't by better coupling of filenames and stations.

* Makes DEBUG an env var for config via metplus wrappers.

* Reorganization of config file, adds environment variables, and updates comments for use case changes.

* Updates to documentation.

* Fixes tables.

* Adds table of contents to the top for users to click on.

* Updates use case documentation file.

* Updated config file with obs and fcst subirectories in the path.

* Added optional key/value to use_case_groups.json to prevent a use case group from running to easily disable it temporarily. Disable short_range:14 use case until it can be fixed with #2551

* update pillow version based on recommendation from dependabot: https://github.com/dtcenter/METplus/security/dependabot/5

* Switches to using metplotpy_env to get metcalcpy dependency.

* Adds filtering based on missing data values.

* Finishing touches to debug statements for testing.

* Fixing a few minor code smells from last week.

* update link to METplus Components Python Requirements table in PR template

* Update docs/use_cases/model_applications/land_surface/PointStat_fcstCESM_obsFLUXNET2015_TCI.py

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #2555 v6.0.0 beta4 (#2556)

* update version for beta4 release

* added release notes for beta4 release

* update version for development towards beta5 release

* update location of METviewer docker-compose.yml file that moved from PR dtcenter/METviewer#525

* Feature #2537 develop single_sq_project (#2558)

* Update the beta4 release date wording

* Feature #2433 Ugrid config variables in GridStat/PointStat (#2517)

* update version for release

* added new use case that was missing

* Bugfix #2279 main_v5.1 - buoy station file from 2022 (#2281)

* Fix typo in pull_request_template.md

* added notes to make it clear that upgrade instructions are not needed if upgrading from 5.0 to 5.1

* New issue template: Update Truth (#2332)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
(cherry picked from commit 44335f3)

* add GitHub Actions workflow that is used to create Docker images that hold the conda environment used for the automated tests -- adding this to the default main_v5.1 branch so that it will become available to run for other branches as a workflow_dispatch workflow

* Per #2433, added support for setting the ugrid MET config variables for GridStat and PointStat wrappers. Also moved the seeps variable up so that it matches the order of the default config files in the MET repo

* add argument to workflow dispatch event so that MET DockerHub repo used for tests can be easily overridden to test changes in a MET PR before merging

* Feature dtcenter/MET#2796 main_v5.1 GHA Node20 deprecation warnings (#2474)

* per dtcenter/MET#2796, update versions of actions to prevent deprecated node warnings in GHA runs - main_v5.1

* fix ReadTheDocs requirements to include pillow which is a dependency of sphinx-gallery: see https://blog.readthedocs.com/defaulting-latest-build-tools/ for more info on why this was necessary

* install python packages via apk instead of pip to prevent GHA failures that were fixed in develop but not in main_v5.1

* per dtcenter/MET#2796, fix error log merging for main_v5.1 same as develop

* Bump pillow from 10.0.1 to 10.2.0 in /docs (#2477)

Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](python-pillow/Pillow@10.0.1...10.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Create 5.1.0_casper

* per #2433, add support for setting the optional -config argument for a ugrid config file for PointStat and GridStat. Also moved the optional arguments to be added to the command after all of the required arguments so the command is easier to read

* per #2433 and discussion on meeting 3/21/2024, change command line argument from -config to -ugrid_config

* update unit tests to check for new command line argument name -ugrid_config

* Updates information about GDAS surface winds having a QC value that is above the default settings in the PB2NC config file.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>

* SonarQube add python code coverage report (#2565)

* run code coverage before SonarQube scan

* generate xml report and configure SQ to read coverage.xml

* exclude more files from code coverage report

* exclude more files that should not be included in the code coverage report

* more changes to code coverage exclude list

* removed bad characters accidentally added

* exclude cyclone plotter wrapper because it is excluded from code coverage report

* ignore SonarQube lint files generated by PyCharm

* Updating MTD conv radius/thresh description (#2566)

* Updating MTD conv radius/thresh description

* Update glossary.rst

* Update docs/Users_Guide/glossary.rst

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Update docs/Users_Guide/glossary.rst

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature update modulefiles (#2564)

* Adding 6.0.0 file for derecho and removing 5.1.0 file for cheyenne

* Updating modulefiles

* Updating orion file

* Adding file for hercules

* Adding file for casper

* Update internal/scripts/installation/modulefiles/6.0.0_casper

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #1989: Add OMI to Verification Datasets Guide (#2585)

Refs: #1989

* Feature #2479 time_offset_warning (#2587)

* Per #2479, add support for setting time_offset_warning in all wrapped MET config files

* Per #2479, add documentation and examples to basic use case param files for time_offset_warning

* Feature 2346 develop update templates (#2589)

* Per #2346, modifying issue templates

* Per #2346, modifying pull request template

* Per #2346, modifying entries based on suggestions by @georgemccabe

* Bugfix #2567 PointStat multiple point observation files (#2582)

* per #2567, properly pass multiple point observation files to point_stat using the -point_obs argument

* per #2567, fix bug that caused file window logic to fail

* Revert "per #2567, fix bug that caused file window logic to fail"

This reverts commit 27fe822.

* per #2567, fix bug that caused file window logic to fail

* Feature #1514 MADIS2NC wrapper (#2591)

* Per #1514, implement MADIS2NC wrapper and added example use case. Also updated the function to handle the time_summary dictionary in MET config files to support names that exactly match the name found in the dictionary, e.g. ASCII2NC_TIME_SUMMARY_OBS_VAR sets time_summary.obs_var (previously only ASCII2NC_TIME_SUMMARY_VAR_NAMES was supported and is still supported)

* remove execute permissions from image files

* Per #1514, add image for basic use case

* removed large image files that are no longer being used in documentation

* add support for time_offset_warning for MADIS2NC wrapper after the PR to add that support for other wrappers has been merged into develop

* report error if output template is not defined

* update contributor's guide with more up-to-date info on how to create a new wrapper and basic components of wrappers

* fix warnings in documentation

* fix formatting issues

* Per #1514, add new basic use case to automated test suite

* add step to comment out version number in wrapped MET config file

* turn off use case to prepare for PR

* added a pytest fixture to handle comparison of use case commands and environment variable values to remove a lot of redundant logic in each wrapper test. Added fake madis data

* removed commented code

* properly substitute template tags in all command line arguments

* properly handle unset rec_beg and rec_end to prevent missing value from being added to command lien arg

* added new madis2nc use case to existing met_tool_wrapper and temporarily disabled land_surface:0 until we can resolve the differences

* Feature 2346 develop update templates (#2594)

* Per #2346, modifying issue templates

* Per #2346, modifying pull request template

* Per #2346, modifying entries based on suggestions by @georgemccabe

* Per 2346, making updates based on feedback at last MET Eng. Meeting

* Enhance update truth data workflow to create a uniquely named branch to update *-ref branches and commit/append to a log file that tracks the reasons for updating the truth data. This is done to ensure that the *-ref branch testing workflow run that actually updates the truth data is always run even if there are no other changes to the METplus branch since the last update, e.g. when a change to another component like MET warrants the truth data update

* git add change log file in case it doesn't already exist

* changed logic to no longer push changes to develop/main_vX.Y, but instead merge changes from -ref into the update branch

* retain update truth history file from *-ref

* dtcenter/MET#2899 fixes a bug reading point observations using Python Embedding in PointStat and EnsembleStat, which should fix the PBL use case -- #2246 -- so turned on diff test for PBL use case to ensure that results are consistent going forward

* Feature #2429 MvMODE multivar intensity (#2603)

* Feature #2547 ASCII2NC -valid_beg and -valid_end arguments (#2606)

* prevent divide by zero if run_count is 0

* Per #2547, add support for setting -valid_beg and -valid_end command line arguments. Added changes to make ASCII2NC wrapper able to run for all runtime frequencies

* Refactored system_util preprocess_file function to reduce cognitive complexity and add quotation marks around 'filenames' that contain spaces (typically python embedding commands) so explicit handling of these cases don't need to be done downstream. Added unit tests to test more python embedding cases

* remove logic to add quotes around input file since it is handled already in preprocess_file

* changed find_input_files function to return None or a time_info dictionary to be consistent across wrappers

* added ReformatPointWrapper to use as parent class for ASCII2NC, MADIS2NC, PB2NC, and Point2Grid wrappers to consistently handle tools that reformat point observation data. Moved verbosity to the end of commands

* clean up pb2nc wrapper to be more consistent with other ReformatPoint wrappers

* per #2547, added glossary entries for new config variables to set -valid_beg/end and added commented example to basic use case config file

* added glossary entries for *_RUNTIME_FREQ variables

* Per #2513, remove TC_RMW_MAX_RANGE_KM

* Feature 2494 update fv3 data (#2610)

* Updated for new data

* Updated to match new data

* Updates due to new data/updates to data

* Updates due to new data/data variables

* Changes due to changes to data variables, date

* Updates due to changes to data

* Update the date to reflect the new data (with updates to variables)

* fixed error with formatting

* Remove redundant instructions.

* For testing

* Update use_case_groups.json

* Revert to original location of input data to use the same data for all three FV3 Physics Tendency use cases.

* Revert to original location of data from tarball

* Remove typo in file directory name

* Update use_case_groups.json

Returned 10-12 to follow 11

* Update use_case_groups.json

revert to false for testing the short range use cases for  FV3 physics tendency

* Update use_case_groups.json

fix alignment of opening curly brace

* Update use_case_groups.json

revert to original formatting

* removed config variable that should be set by the user because it is specific to the user's environment

---------

Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>

* Feature #2578 PCPCombine -input_thresh for missing inputs (#2609)

* refactoring to reduce duplicate/redundant code, reduce cognitive complexity to satisfy SonarQube, etc

* change wording of error log to satisfy test

* set -input_thresh argument if set for add, derive, and sum methods. refactor setting of method arguments, e.g. -add, -sum, etc., cleanup

* refactor how level is handled in find_data function so that if the level has already been set, it will use that value, otherwise try to get it from {data_type}_level, e.g. fcst_level, otherwise set it to 0 to prevent errors

* refactor duplicate code into function to satisfy SonarQube

* removed unused variable

* use find_data function to find input files to be consistent with other wrappers, only allow multiple input files to be found for a given call to find_data if using the -derive method

* fix typo in key

* suppress warnings when files aren't found because it is expected

* formatting to be consistent in doc string

* per #2578, add MISSING before file path that is not found if input_thresh is set and less than 1.0, added unit test to ensure correct behavior occurs

* add documentation blocks for new functions, ci-run-all-diff

* use pytest fixture instead of local function

* add support for setting -vld_thresh argument

* per #2578, added documentation and tests for setting -input_thresh and -vld_thresh

* moved verbosity argument to end of command to more easily change it when debugging

* refactor to reduce cognitive complexity to satisfy SonarQube

* update usage statement to include METplus version number

* Add copy button for code blocks to easily copy/paste commands (#2611)

* add copy button for code blocks to easily copy/paste commands

* turn off copy button always visible but leave code block so it can be turned on easily if desired

* Update release-notes.rst

Update METplus-6.0.0 development schedule.

* Fix numbering.

* fix broken link

* added entry to update truth change log: develop dtcenter/MET#2921

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: John Sharples <41682323+John-Sharples@users.noreply.github.com>
Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com>
Co-authored-by: Dan Adriaansen <dadriaan@ucar.edu>
Co-authored-by: jprestop <jpresto@ucar.edu>
Co-authored-by: Hank Fisher <fisherh@ucar.edu>
Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: j-opatz <59586397+j-opatz@users.noreply.github.com>
Co-authored-by: reza-armuei <144857501+reza-armuei@users.noreply.github.com>
Co-authored-by: Tracy Hertneky <39317287+hertneky@users.noreply.github.com>
Co-authored-by: Tracy <tracy.hertneky@noaa.gov>
Co-authored-by: Mallory Row <mallory.row@noaa.gov>
Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: bikegeek <3753118+bikegeek@users.noreply.github.com>
Co-authored-by: Christina Kalb <kalb@ucar.edu>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Bugfix: Fix inconsistent handling of point observation valid times processed through Python embedding
3 participants