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#2921 #2925

Merged
merged 101 commits into from
Jun 24, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 24, 2024

Update develop-ref to get past the following intended diffs:

musial6:logs johnhg$ egrep -i "error|warning|file1" comp_dir.log  | egrep -B 1 ERROR
file1: /data/output/met_test_truth/rmw_analysis/rmw_analysis_out.nc
ERROR: NetCDF headers differ:
--
file1: /data/output/met_test_truth/tc_diag/sal092022_gfso_doper_2022092400_cyl_grid_parent.nc
ERROR: NetCDF headers differ:
file1: /data/output/met_test_truth/tc_diag/sal092022_gfso_doper_2022092400_diag.dat
ERROR: diff error:
file1: /data/output/met_test_truth/tc_diag/sal092022_gfso_doper_2022092400_diag.nc
ERROR: found     5 differences in var 200DVRG                                - max abs: 100.4499 
ERROR: found     5 differences in var 850TANG                                - max abs: 31.41911 
ERROR: found     5 differences in var 850VORT                                - max abs: 37.72242 
--
file1: /data/output/met_test_truth/tc_rmw/tc_rmw_hwrf_gonzalo.nc
ERROR: NetCDF headers differ:
file1: /data/output/met_test_truth/tc_rmw/tc_rmw_pressure_lev_out.nc
ERROR: NetCDF headers differ:


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 27 commits April 17, 2024 16:52
…osed 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.
* #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>
* 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>
* 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.
* 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.
* #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>
…grid_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.
* 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.
* 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
* 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>
…g stat line types VCNT, RPS, DMAP, and SSIDX. (#2891)
* 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.
* 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>
* #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>
…sting workflow run failed (https://github.com/dtcenter/MET/actions/runs/9209471209). Here we switch to a unique update truth branch name to avoid conflicts.
…t is not necessary for the automation logic in MET.
Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
* 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>
@JohnHalleyGotway JohnHalleyGotway added this to the MET 12.0.0 milestone Jun 24, 2024
@JohnHalleyGotway JohnHalleyGotway merged commit 98c8c05 into develop-ref Jun 24, 2024
1 check passed
@JohnHalleyGotway JohnHalleyGotway deleted the update_develop_ad83b48e branch June 24, 2024 22:20
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.

None yet

8 participants