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

Update develop-ref after dtcenter/MET#2942 #2950

Merged
merged 119 commits into from
Aug 22, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 22, 2024

  • In MPR line type:
    • Renames columns CLIMO_MEAN, CLIMO_STDEV, and CLIMO_CDF as OBS_CLIMO_MEAN, OBS_CLIMO_STDEV, and OBS_CLIMO_CDF, respectively.
    • Adds new columns FCST_CLIMO_MEAN and FCST_CLIMO_STDEV.
  • In ORANK line type:
    • Renames columns CLIMO_MEAN, CLIMO_STDEV as OBS_CLIMO_MEAN, OBS_CLIMO_STDEV, respectively.
    • Adds new columns FCST_CLIMO_MEAN and FCST_CLIMO_STDEV.
  • Makes similar name changes in gridded NetCDF output files from Grid-Stat.


Created by @JohnHalleyGotway

Howard Soh and others added 30 commits February 2, 2024 16:58
* 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
… 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.
* 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.
…ullptr

Feature 2673 sonarqube beta4 nullptr
…eturn

Feature 2673 sonarqube beta4 return
JohnHalleyGotway and others added 25 commits June 12, 2024 11:07
* 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>
* #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>
* 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.
* 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.
* 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>
* #2601 Added seeps_grid_climo_name and seeps_point_climo_name

* #2601 Added seeps_grid_climo_name

* #2601 Removed SEEPS settings

* #2601 Initial release

* #2601 Changed to set the SEEPS climo by using the configuration

* #2601 Removed SEESP settings at PointStatConfig_APCP and use PointStatConfig_SEEPS for SEEPSm testing

* #2601 Updated descryption for seeps_grid_climo_name

* #2601 Added a argument for the SEEPS clomo file

* #2601 Added conf_key_seeps_grid_climo_name and  conf_key_seeps_point_climo_name

* #2601 Support the climo filename from the configuration

* #2601 Corrected key for climo name

* Removing duplicate word

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
* #2673 Removed redundant_parentheses

* #2673 Removed redundant_parentheses

* #2673 Removed redundant parentheses

* #2673 Removed redundant parentheses

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
* #2857 Added MetNcCFDataFile::build_grid_from_lat_lon_vars

* #2857 Added NcCfFile::build_grid_from_lat_lon_vars

* #2857 Check the coordinates attribute to find latitude, longitude, and time variables

* #2857 Get the lat/lon variables from coordinates attribute if exists

* #2857 Added two constants

* #2857 Deleted debug messages

* #2857 Added lat_vname and lon_vname for var_name_map

* #2857 Added two unit tests: point2grid_sea_ice_tripolar and point2grid_sea_ice_tripolar_config

* #2857 Initial release

* #2857 Correct dictinary to get file_type

* #2857 DO not check the time variable for point2grid

* #2857 Added point2grid_tripolar_rtofs

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
* Per #2932, updating version and release notes

* Per #2932, updating date on release notes

* Per #2932, fixed formatting and links

* Update release-notes.rst

* Update release-notes.rst

Removing inline backticks since they do not format the way I expected, especially when put inside bolded release notes.

---------

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
* Fixing up release notes

* Update release-notes.rst

---------

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
* Per #2924, Update the MPR and ORANK output line types to just write duplicate existing climo values, update the header tables and MPR/ORANK documentation tables.

* Per #2924, update get_n_orank_columns() logic

* Per #2924, update the Stat-Analysis parsing logic to parse the new MPR and ORANK climatology columns.

* Per #2924, making some changes to the vx_statistics library to store climo data... but more work to come. Committing this first set of changes that are incomplete but do compile.

* Per #2924, this big set of changes does compile but make test produces a segfault for ensemble-stat

* Per #2924, fix return value for is_keeper_obs()

* Per #2924, move fcst_info/obs_info into the VxPairBase pointer.

* Per #2924, update Ensemble-Stat to set the VxPairBase::fcst_info pointer

* Per #2924 udpate handling of fcst_info and obs_info pointers in Ensemble-Stat

* Per #2924, update the GSI tools to handle the new fcst climo columns.

* Per #2924, add backward compatibility logic so that when old climo column names are requested, the new ones are used.

* Per #2924, print a DEBUG(2) log message if old column names are used.

* Per #2924, switch the unit tests to reference the updated MPR column names rather than the old ones.

* Per #2924, working progress. Not fully compiling yet

* Per #2924, another round of changes. Removing MPR:FCST_CLIMO_CDF output column. This compiles but not sure if it actually runs yet

* Per #2924, work in progress

* Per #2924, work in progress. Almost compiling again.

* Per #2924, get it compiling

* Per #2924, add back in support for SCP and CDP which are interpreted as SOCP and OCDP, resp

* Per #2924, update docs about SCP and CDP threshold types

* Per #2924, minor whitespace changes

* Per #2924, fix an uninitialized pointer bug by defining/calling SeepsClimoGrid::init_from_scratch() member function. The constructor had been calling clear() to delete pointers that weren't properly initialized to nullptr. Also, simplify some map processing logic.

* Per #2924, rename SeepsAggScore from seeps to seeps_agg for clarity and to avoid conflicts in member function implementations.

* Per #2924, fix seeps compilation error in Point-Stat

* Per #2924, fix bug in the boolean logic for handling the do_climo_cdp NetCDF output option.

* Per #2924, add missing exit statement.

* Per #2924, tweak threshold.h

* Per #2924, define one perc_thresh_info entry for each enumerated PercThreshType value

* Per #2924, simplify the logic for handling percentile threshold types and print a log message once when the old versions are still used.

* Per #2924, update the string comparison return value logic

* Per #2924, fix the perc thresh string parsing logic by calling ConcatString::startswith()

* Per #2924, switch all instances of CDP to OCDP. Gen-Ens-Prod was writing NetCDF files with OCDP in the output variable names, but Grid-Stat was requesting that the wrong variable name be read. So the unit tests failed.

* Per #2924, add more doc details

* Per #2924, update default config file to indicate when climo_mean and climo_stdev can be set seperately in the fcst and obs dictionaries.

* Per #2924, update the MET tools to parse climo_mean and climo_stdev separately from the fcst and obs dictionaries.

* Per #2924, backing out new/modified columns to minimize reg test diffs

* Per #2924, one more section to be commented out later.

* Per #2924, replace several calls to strncmp() with ConcatString::startswith() to simplify the code

* Per #2924, strip out some more references to OBS_CLIMO_... in the unit tests.

* Per #2924, delete accidental file

* Per #2924 fix broken XML comments

* Per #2924, fix comments

* Per #2924, address SonarQube findings

* Per #2924, tweak a Point-Stat and Grid-Stat unit test config file to make the output more comparable to develop.

* Per #2924, fix bug in the logic of PairDataPoint and PairDataEnsemble, when looping over the 3-dim array do not return when checking the climo and fcst values. Instead we need to continue to the next loop iteration.

* Per #2924, address more SonarQube code smells to reduce the overall number in MET for this PR.

* Per #2924, correct the logic for parsing climo data from MPR lines.

* Per #2924, cleanup grid_stat.cc source code by making calls to DataPlane::is_empty() and Grid::nxy().

* Per #2924, remove unneeded ==0
* Per #2924, track SL1L2 and SAL1L2 MAE scores with separate variables since they are no longer the same value. I renamed the existing 'mae' as 'smae' and added a new 'samae' variable. Renaming the existing lets me use the compiler help find all references to it throughout the code.

* Per #2924, update the User's Guide climatology details and equations.

* Per #2924, some changes to aggr_stat_line.cc and series_analysis.cc to satisfy some SonarQube code smells.
…to clarify that data specified in the fcst dictionary is read from the -single input files.
* Per #2924, Update the MPR and ORANK output line types to just write duplicate existing climo values, update the header tables and MPR/ORANK documentation tables.

* Per #2924, update get_n_orank_columns() logic

* Per #2924, update the Stat-Analysis parsing logic to parse the new MPR and ORANK climatology columns.

* Per #2924, making some changes to the vx_statistics library to store climo data... but more work to come. Committing this first set of changes that are incomplete but do compile.

* Per #2924, this big set of changes does compile but make test produces a segfault for ensemble-stat

* Per #2924, fix return value for is_keeper_obs()

* Per #2924, move fcst_info/obs_info into the VxPairBase pointer.

* Per #2924, update Ensemble-Stat to set the VxPairBase::fcst_info pointer

* Per #2924 udpate handling of fcst_info and obs_info pointers in Ensemble-Stat

* Per #2924, update the GSI tools to handle the new fcst climo columns.

* Per #2924, add backward compatibility logic so that when old climo column names are requested, the new ones are used.

* Per #2924, print a DEBUG(2) log message if old column names are used.

* Per #2924, switch the unit tests to reference the updated MPR column names rather than the old ones.

* Per #2924, working progress. Not fully compiling yet

* Per #2924, another round of changes. Removing MPR:FCST_CLIMO_CDF output column. This compiles but not sure if it actually runs yet

* Per #2924, work in progress

* Per #2924, work in progress. Almost compiling again.

* Per #2924, get it compiling

* Per #2924, add back in support for SCP and CDP which are interpreted as SOCP and OCDP, resp

* Per #2924, update docs about SCP and CDP threshold types

* Per #2924, minor whitespace changes

* Per #2924, fix an uninitialized pointer bug by defining/calling SeepsClimoGrid::init_from_scratch() member function. The constructor had been calling clear() to delete pointers that weren't properly initialized to nullptr. Also, simplify some map processing logic.

* Per #2924, rename SeepsAggScore from seeps to seeps_agg for clarity and to avoid conflicts in member function implementations.

* Per #2924, fix seeps compilation error in Point-Stat

* Per #2924, fix bug in the boolean logic for handling the do_climo_cdp NetCDF output option.

* Per #2924, add missing exit statement.

* Per #2924, tweak threshold.h

* Per #2924, define one perc_thresh_info entry for each enumerated PercThreshType value

* Per #2924, simplify the logic for handling percentile threshold types and print a log message once when the old versions are still used.

* Per #2924, update the string comparison return value logic

* Per #2924, fix the perc thresh string parsing logic by calling ConcatString::startswith()

* Per #2924, switch all instances of CDP to OCDP. Gen-Ens-Prod was writing NetCDF files with OCDP in the output variable names, but Grid-Stat was requesting that the wrong variable name be read. So the unit tests failed.

* Per #2924, add more doc details

* Per #2924, update default config file to indicate when climo_mean and climo_stdev can be set seperately in the fcst and obs dictionaries.

* Per #2924, update the MET tools to parse climo_mean and climo_stdev separately from the fcst and obs dictionaries.

* Per #2924, backing out new/modified columns to minimize reg test diffs

* Per #2924, one more section to be commented out later.

* Per #2924, replace several calls to strncmp() with ConcatString::startswith() to simplify the code

* Per #2924, strip out some more references to OBS_CLIMO_... in the unit tests.

* Per #2924, delete accidental file

* Per #2924 fix broken XML comments

* Per #2924, fix comments

* Per #2924, address SonarQube findings

* Per #2924, tweak a Point-Stat and Grid-Stat unit test config file to make the output more comparable to develop.

* Per #2924, fix bug in the logic of PairDataPoint and PairDataEnsemble, when looping over the 3-dim array do not return when checking the climo and fcst values. Instead we need to continue to the next loop iteration.

* Per #2924, address more SonarQube code smells to reduce the overall number in MET for this PR.

* Per #2924, correct the logic for parsing climo data from MPR lines.

* Per #2924, update MPR and ORANK line types to update/add FCST/OBS_CLIMO_MEAN/STDEV/CDF columns.

* Per #2924, cleanup grid_stat.cc source code by making calls to DataPlane::is_empty() and Grid::nxy().

* Per #2924, remove unneeded ==0

* Per #2924, working on PR2.

* Per #2924, update User's Guide with notional example of specifying climo_mean and climo_stdev separately in the fcst and obs dicts.

* Per #2924, adding a new unit test. It does NOT yet run as expected. Will debug on seneca

* Per #2924, pass the description string to the read_climo_data_plane*() function to provide better log messages

* Per #2924, more work on consistent log messages

* Per #2924, tweak the configuration to define both field, climo_mean, and climo_stdev in both the fcst and obs dictionaries

* Per #2924, tweak the unit_climatology_mixed.xml test

* Per #2924, only whitespace changes.

* Per #2924, missed swapping MET #2924 changes in 3 test files

* Per #2924, delete accidentally committed file

* Per #2924, delete accidentally committed files

* Per #2924, add support for GRIB1 time range indicator value of 123 used for the corresponding METplus Use Case. Note that there are 22 other TRI values not currently supported.
#2947)

* Adds caveat regarding longitudes appearing in DEBUG statements with a different sign to the FAQ.

* Update appendixA.rst

Missing paren
@JohnHalleyGotway
Copy link
Collaborator

JohnHalleyGotway commented Aug 22, 2024

I checked the differences flagged in the nightly build on 08/22/2024 and found the following.

  • 2 new output files are added:
ERROR: folder MET-develop-ref/test_output missing 2 files
    climatology_mixed/grid_stat_FCST_NCEP_1.0DEG_OBS_WMO_1.5DEG_240000L_20120410_000000V_pairs.nc 
    climatology_mixed/grid_stat_FCST_NCEP_1.0DEG_OBS_WMO_1.5DEG_240000L_20120410_000000V.stat 
  • And differences are flagged in 121 of 1153 output files:
    • 66 .stat, 31 _mpr.txt, 15 _orank.txt, and 9 _pairs.nc files.
    • These are the types of files in which differences are expected.

@JohnHalleyGotway JohnHalleyGotway merged commit a9a3a77 into develop-ref Aug 22, 2024
1 check passed
@JohnHalleyGotway JohnHalleyGotway deleted the update_develop_7cb93fd2 branch August 22, 2024 16:32
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.

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