From cb3dd585dab333d64cef89c383fa8a5d736900e1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 15:02:00 -0600 Subject: [PATCH] Update develop-ref after #2993 and #2995 (#2997) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 * Revert #2825 since more documentation and testing is needed (#2837) This reverts commit 108a8958b206d6712197823a083666ab039bf818. * 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 * 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 * #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: https://github.com/dtcenter/MET/issues/2379#issuecomment-2000242425 * 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 Co-authored-by: MET Tools Test Account * 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 * 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 Co-authored-by: Daniel Adriaansen Co-authored-by: John Halley Gotway * 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 /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 * Make indentation consistent. Co-authored-by: John Halley Gotway * Make indentation consistent. Co-authored-by: John Halley Gotway * Make indentation consistent. Co-authored-by: John Halley Gotway * 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 * 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 Co-authored-by: Daniel Adriaansen Co-authored-by: John Halley Gotway * 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 Co-authored-by: MET Tools Test Account * 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 Co-authored-by: j-opatz * 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 * 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 Co-authored-by: Natalie babij Co-authored-by: Natalie babij Co-authored-by: Natalie Babij Co-authored-by: John Halley Gotway Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com> Co-authored-by: j-opatz * 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 * 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 f097345bedcfcca663e8fb4322eed5b5e00e19fd. * Revert "Per #2841, update compute_tc_diag.py to no longer skip writing the radial and tangential wind diagnostics." This reverts commit c0402151b038c59efab99c060cc5c390edf002f6. * 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 * Feature #2601 seeps climo config (#2927) * #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 Co-authored-by: Julie Prestopnik * Feature 2673 sonarqube beta5 redundant parentheses (#2930) * #2673 Removed redundant_parentheses * #2673 Removed redundant_parentheses * #2673 Removed redundant parentheses * #2673 Removed redundant parentheses --------- Co-authored-by: Howard Soh * Fix release checksum action (#2929) * Feature 2857 tripolar coordinates (#2928) * #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 * Feature 2932 v12.0.0-beta5 (#2933) * 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 * Feature fix release notes (#2934) * Fixing up release notes * Update release-notes.rst --------- Co-authored-by: John Halley Gotway * Per dtcenter/METplus#2643 discussion, add more detail about the budget interpolation method. * Feature #2924 fcst climo, PR 1 of 2 (#2939) * 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 * Hotfix to the develop branch for a copy/paste bug introduced by PR #2939 * Feature #2924 sal1l2_mae, PR 3 of 3 (#2943) * 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. * Update develop to clarify masking poly options based on METplus Discussion dtcenter/METplus#2650 * Remove two semi-colons that are not actually necessary to avoid confusion. * Per dtcenter/METplus#2653 discussion, update the MTD usage statement to clarify that data specified in the fcst dictionary is read from the -single input files. * Feature #2924 fcst climo, PR 2 of 3 (#2942) * 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. * Adds caveat regarding longitudes appearing in DEBUG statements with a… (#2947) * Adds caveat regarding longitudes appearing in DEBUG statements with a different sign to the FAQ. * Update appendixA.rst Missing paren * Create install_met_env.cactus * Adding special script for installing beta5 on wcoss2 * Modifying script, including updates to eckit and atlas * Corrected version of bufr being used * Feature #2938 pb2nc_center_time (#2954) * Per #2938, define CRC_Array::add_uniq(...) member function which is now used in PB2NC * Per #2938, replace n_elements() with n() to make the code more concise. Refine log/warning message when multiple message center times are encountered. * Feature #1371 series_analysis (#2951) * Per #1371, add -input command line argument and add support for ALL for the CTC, MCTC, SL1L2, and PCT line types. * Per #1371, rename the -input command line option as -aggregate instead * Per #1371, work in progress * Per #1371, just comments * Per #1371, working on aggregating CTC counts * Per #1371, work in progress * Per #1371, update timing info using time stamps in the aggr file * Per #1371, close the aggregate data file * Per #1371, define set_event() and set_nonevent() member functions * Per #1371, add logic to aggregate MCTC and PCT counts * Merging changes from develop * Per #1371, work in progress aggregating all the line statistics types. Still have several issues to address * Per #1371, switch to using get_stat() functions * Per #1371, work in progress. More consolidation * Per #1371, correct expected output file name * Per #1371, consistent regridding log messages and fix the Series-Analysis PairDataPoint object handling logic. * Per #1371, check the return status when opening the aggregate file. * Per #1371, fix prc/pjc typo * Per #1371, fix the series_analysis PCT aggregation logic and add a test to unit_series_analysis.xml to demonstrate. * Per #1371, resolve a few SonarQube findings * Per #1371, make use of range-based for loop, as recommeded by SonarQube * Per #1371, update series-analysis to apply the valid data threshold properly using the old aggregate data and the new pair data. * Per #1371, update series_analysis to buffer data and write it all at once instead of storing data value by value for each point. * Per #1371, add useful error message when required aggregation variables are not present in the input -aggr file. * Per #1371, print a Debug(2) message listing the aggregation fields being read. * Per #1371, correct operator+= logic in met_stats.cc for SL1L2Info, VL1L2Info, and NBRCNTInfo. The metadata settings, like fthresh and othresh, were not being passed to the output. * Per #1371, the DataPlane for the computed statistics should be initialized to a field of bad data values rather than the default value of 0. Otherwise, 0's are reported for stats a grid points with no data when they should really be reported as bad data! * Per #1371, update logic of the compute_cntinfo() function so that CNT statistics can be derived from a single SL1L2Info object containing both scalar and scalar anomaly partial sums. These changes enable CNT:ANOM_CORR to be aggregated in the Series-Analysis tool. * Per #1371, fix logic of climo log message. * Per #1371, this is actually related to MET #2924. In compute_pctinfo() used obs climo data first, if provided. And if not, use fcst climo data. * Per #1371, fix indexing bug (+i instead of +1) when check the valid data count. Also update the logic of read_aggr_total() to return a count of 0 for bad data. * Per #1371, add logic to aggregate the PSTD BRIERCL and BSS statistics in the do_climo_brier() function. Tested manually to confirm that it works. * Per #1371, switch to using string literals to satisfy SonarQube * Per #1371, update series_analysis tests in unit_climatology_1.0deg.xml to demonstrate aggregating climo-based stats. * Per #1371, remove extra comment * Per #1371, skip writing the PCT THRESH_i columns to the Series-Analysis output since they are not used * Per #1371, fix the R string literals to remove \t and \n escape sequences. * Per #1371, update the read_aggr_data_plane() suggestion strings. * Per #1371, ignore unneeded PCT 'THRESH_' variables both when reading and writing ALL PCT columns. * Per #1371, update the test named series_analysis_AGGR_CMD_LINE to include data for the F42 lead time that had previously been included for the same run in the develop branch. Note however that the timestamps in the output file for the develop branch (2012040900_to_2012041100) were wrong and have been corrected here (2012040900_to_2012041018) to match the actual data. * Per #1371, update the -aggr note to warn users about slow runtimes * Feature 2948 cxx17 (#2953) * Per #2948, updating versions of ecbuild, eckit, and atlas * Per #2948, Adding MET_CXX_STANDARD * Per #2948, updated wording for MET_CXX_STANDARD description * Per #2948, updating script to work with two versions of ecbuild, eckit, and atlas * Per #2948, without this change, there are compilation problems if the user wants to compile wihtout python * Per #2948, fixing logic for MET_CXX_STANDARD * Per #2928, adding missing end bracket * Per #2948, fixed the logic for compiling versions of ecbuild, eckit, and atlas * Per 948, fixed syntax for setting CXXFLAGS * Per #2948, adding new Makefile.in files and configure and changing METbaseimage 3.2 to 3.3. * Per #2948, updating version of met base tag from 3.2 to 3.3 * Per #2948, adding --enable-all MET_CXX_STANDARD=11 job * Update compilation_options.yml * Per #2948, added a job10 for MET_CXX_STANDARD=14 * Per #2948, added brief documentation for the MET_CXX_STANDARD option --------- Co-authored-by: Julie Prestopnik Co-authored-by: John Halley Gotway * Feature 1729 set attr grid (#2955) * #1729 Allow to change to differnt grid size if the raw size is 0 * Added build_grid_by_grid_string and build_grid_by_grid_string * #1729 Calls build_grid_by_grid_string * #1729 Added set_attr_grid at the -field option * #1729 Set obs_type to TYPE_NCCF if the file_type is given at the config file * #1729 Support set_sttr_grid and changed Error messages to Warning * #1729 FIxed SonmarQube findings * #1729 Initial release for unit test * #1729 Added update_missing_values * #1729 Deleted a shadowed local variable * #2673 Added more is_eq * #2673 Added get_exe_duration * 2673 Reducded nested statements * 2673 Fixed SonarGube findings * 2673 Fixed SonarQube findings * 2673 Fixed SonarQube findings * #1729 Added aan unittest plot_data_plane_set_attr_grid * #1729 Added aan unittest point2grid_cice_set_attr_grid * #1729 Added changed back the verbose level * #1729 Corrected typo --------- Co-authored-by: Howard Soh * Bugfix #2958 develop BAGSS SEDI CI (#2959) * Bugfix 2936 point2grid gfs (#2964) * #2936 Support 1D lat/lon values * #2936 Initial release * #2936 Cast the data type to avoid a compile warning * #2936 Added an unittest point2grid_gfs_1D_lat_lon --------- Co-authored-by: Howard Soh * Bugfix 2968 point2grid set attr grid (#2969) * #2968 Corrected set_attr_grid for point2grid_cice_set_attr_grid * #2968 Compare the DataPlane size and the variable data size * #2968 nx and ny are not ignored with set_attr_grid * #2968 Compare the DataPlane size and the variable data size --------- Co-authored-by: Howard Soh * Feature 2937 update unit (#2944) * added single quotes around env var/val pairs in export statements in cmd only mode * updated logic in unit() to check exec return value against expected return value; created TEST xml file to test this feature * deleted TEST_ xml, added test with retval 1 to unit_ascii2nc --------- Co-authored-by: Natalie Babij * Feature #2887 categorical weights PR 1 of 2 (#2967) * Per #2887, update NumArray::vals() to return a reference to the vector rather a pointer to doubles. * Per #2887, switch over the whole ContingencyTable class heirarchy from storing integer counts to storing double-precision weights. * Add ContingencyTable::is_integer() member function to check whether the table contains all integers * Per #2887, update parse_stat_line.cc to get it to compile after changing PCT to store thresholds in a std::vector. * Per #2887, update PCTInfo::clear() logic. * Per #2887, update ctc_by_row() logic to create reproducible results with the develop branch. * Per #2887, update logic of define_prob_bins() to add a final >=1.0 threshold if needed. While ==0.1 works fine, I found that ==0.05 did not because the last >=1.0 threshold was missing likely do to floating point precision issues. This change should fix that problem. * Per #2887, update roc_auc() function to match the develop branch * Per #2887, fix bug if computation of far() * Per #2887, replaced all ==0 integer equality checks with calls to is_eq() instead and fix a couple of equations to snuff out diffs in some CTS statistics. * Per #2887, address some of the 34 SonarQube code smells flagged for this PR. Note that the compute_ci.h/.cc changes are necessary and good since we should be computing CI's using doubles instead of integer counts. * Per #2887, update run_sonarqube.sh to specify the target CXX standard as 11. The hope is that that will limit the findings to only those features available in the C++11 standard. * Per #2887, update to SonarQube version 6.1.0.4477 released on 6/27/2024. * Per #2887, updating build_met_sonarqube.sh to specify --std=c++11 since c++17 is used by default * Hotfix to develop to fix a bug introduced for MET #2887. Refine the define_prob_bins() utility function so that ==n probability thresholds result in the correct number of probability thresholds. We were adding an unncessary 10-th bin (from 1.07143 to 1.0) for the ==7 probability threshold type. * Fix typo in tc-pairs.rst * Update build_docker_and_trigger_metplus.yml The docs directory was moved up to the top-level of the repository but this workflow was not updated. Changing the ignore setting so that doc-only updates do not trigger the full METplus testing workflow. * Feature 2023 remove double quotes around keywords (#2974) * testing AREA and AUTO changes * Keywords B thru L * thru R * adding quotes back in for lower case items * S thru the end of the document * Removing double quotes around 3 key words * Per #2023, adding a label name for the Attributes section * Per #2023, adding an internal link for the MODE tool Attributes section. * Adding quotes around Valid basins entries * more double quote updates * more complex updates with Julie P help * removing double quotes * fixing typos * removing double quotes * unbolding SURFACE and putting it in double quotes * fixing grammar * grammar * fixing typo * fixing typo --------- Co-authored-by: Julie Prestopnik * Feature #2924 parse_config (#2963) * Per #2924, remove GenEnsProd config file comment about parsing desc separately from each obs.field entry because the obs dictionary does not exist in the GenEnsProd config file. * Per #2924, update list of needed config entry names * Per #2924, remove const from the parent() member function so that we can perform lookups for the parent. * Per #2924, update the signature for and logic of the utility functions that retrieve the climatology data. Rather than requiring all the climo_mean and climo_stdev dictionary entries to be defined at the same config file context level, parse each one individually. This enables the METplus wrappers to only partially override this dictionary and still rely on the default values provided in MET's default configuration files. * Per #2924, update all calls to the climatology utility functions based on the new function signature. Also update the tools to check the number of climo fields separately for the forecast and observation climos. * Per #2924, update the parsing logic for the climatology regrid dictionary. Use config.fcst.climo_mean.regrid first, config.fcst.regrid second, and config.climo_mean.regrid third. Notably, DO NOT use config.regrid. This is definitely the problem with having regrid specified at mutliple config file context levels. It makes the logic for which to use when very messy. * Per #2924, forgot to add an else to print an error * Per #2924, remove extraneous semicolon * Per #2924, move 'fcst.regrid' into 'fcst.climo_mean.regrid'. Defining the climatology regridding logic inside fcst is problematic because it applies to the forecast data as well and you end up with the verification grid being undefined. So the climo regridding logic must be defined in 'climo_mean.regrid' either within the 'fcst' and 'obs' dictionaries or at the top-level config context. * Per #2924, based on PR feedback from @georgemccabe, add the Upper_Left, Upper_Right, Lower_Right, and Lower_Left interpolation methods to the list of valid options for regridding, as already indicated in the MET User's Guide. * Per #2924, update the logic of parse_conf_regrid() to (hopefully) make it work the way @georgemccabe expects it to. It now uses pointers to both the primary and default dictionaries and parses each entry individually. * Per #2924, need to check for non-null pointer before using it * Per #2924, revise the climo_name dictionary lookup logic when parsing the regrid dictionary. * Per #2924, update logic for handling RegridInfo * Per #2924, remove the default regridding information from the 'Searching' log message to avoid confusion. --------- Co-authored-by: MET Tools Test Account * Feature #2924 parse_config PR 2 (#2975) * Per #2924, remove GenEnsProd config file comment about parsing desc separately from each obs.field entry because the obs dictionary does not exist in the GenEnsProd config file. * Per #2924, update list of needed config entry names * Per #2924, remove const from the parent() member function so that we can perform lookups for the parent. * Per #2924, update the signature for and logic of the utility functions that retrieve the climatology data. Rather than requiring all the climo_mean and climo_stdev dictionary entries to be defined at the same config file context level, parse each one individually. This enables the METplus wrappers to only partially override this dictionary and still rely on the default values provided in MET's default configuration files. * Per #2924, update all calls to the climatology utility functions based on the new function signature. Also update the tools to check the number of climo fields separately for the forecast and observation climos. * Per #2924, update the parsing logic for the climatology regrid dictionary. Use config.fcst.climo_mean.regrid first, config.fcst.regrid second, and config.climo_mean.regrid third. Notably, DO NOT use config.regrid. This is definitely the problem with having regrid specified at mutliple config file context levels. It makes the logic for which to use when very messy. * Per #2924, forgot to add an else to print an error * Per #2924, remove extraneous semicolon * Per #2924, move 'fcst.regrid' into 'fcst.climo_mean.regrid'. Defining the climatology regridding logic inside fcst is problematic because it applies to the forecast data as well and you end up with the verification grid being undefined. So the climo regridding logic must be defined in 'climo_mean.regrid' either within the 'fcst' and 'obs' dictionaries or at the top-level config context. * Per #2924, based on PR feedback from @georgemccabe, add the Upper_Left, Upper_Right, Lower_Right, and Lower_Left interpolation methods to the list of valid options for regridding, as already indicated in the MET User's Guide. * Per #2924, update the logic of parse_conf_regrid() to (hopefully) make it work the way @georgemccabe expects it to. It now uses pointers to both the primary and default dictionaries and parses each entry individually. * Per #2924, need to check for non-null pointer before using it * Per #2924, revise the climo_name dictionary lookup logic when parsing the regrid dictionary. * Per #2924, update logic for handling RegridInfo * Per #2924, remove the default regridding information from the 'Searching' log message to avoid confusion. * Per #2924, escape sequences, like \n, cannot be used inside R-string literals. * Per #2924, update the logic of check_climo_n_vx() * Per #2924, revise logic in read_climo_data_plane_array(). Check the number of climo fields provided. If there's 0, just return since no data has been requested. If there's 1, use it regardless of the number of input fields. If there's more than 1, just use the requested i_vx index value. * Per #2924, update Series-Analysis to set both i_fcst and i_obs when looping over the series entries. * Per #2924, no real change. Just whitespace. * Unrelated to #2924, superficial changes to formatting of method_name strings for consistency. * Per #2924, add a new series_analysis test that ERRORS OUT prior to this PR but works after the changes in this PR. --------- Co-authored-by: MET Tools Test Account * Feature 2949 cxx11 doc (#2973) * Per #2949, updating installation instructions * Per #2949, adding missing colon from note directive * Per #2949, third attempt to get the new note to show up * Per #2949, modifying text and format * Per #2949, removing images in favor of code blocks for easier modification * Per #2949, modified wording for clarity * Per #2929, corrected typo * Update installation.rst No changes to content, only whitespace for consistency, mostly removing tabs. * Update docs/Users_Guide/installation.rst Co-authored-by: John Halley Gotway * Per #2949, testing variable replacement, expect failures * Per #2949, reverting to orignal state after testing --------- Co-authored-by: John Halley Gotway * Bugfix #2979 develop MTD Grid (#2981) * Per #2979, remove nc_grid.h/.cc and replace it with calls to the read_netcdf_grid(...) and write_netcdf_proj(...) library utility functions. Note that these changes do compile but I haven't tested whether they actually fix the underlying problem. Also note that nc_utils_local.h/.cc can also likely be replaced with calls to common library functions. * Per #2979, remove references to nc_grid.o from the MTD test code. * Per #2979, insert a newline in unit.py output between the env vars and the command. * Per #2979, insert a newline in unit.py output between the env vars and the command. * Per #2979, the write_netcdf_proj(...) utility function adds the lat and lon dimensions. Update mtd to NOT define those dimensions prior to calling write_netcdf_proj(...). * Per #2979, minor changes to is_eq() calls to fix compiler warning messages * Per #2979, for the develop branch, also replace nc_utils_local.h/.cc with calls to common library code. Also remove commented out code. * Per #2979, delete commented out code and make error/warning message formatting consistent. * Fixes for SonarQube --------- Co-authored-by: MET Tools Test Account * Feature #2880 point2grid qc (#2984) * Per #2880, remove Point2Grid quality_mark_thresh config option and add obs_quality_inc and obs_quality_exc from the config file. * Per #2880, update point2grid docs and reformat whitespace throughout. * Per #2880, remove quality_mark_thresh and add obs_quality_inc and obs_quality_exc. * Unrelated to #2880, fix formatting of this R-string which cannot include any special formatting, such as \n. * Per #2880, not working quite right yet but this is progress * Per #2880, add a write_css(IntArray) utility function. * Per #2880, update NcPointObsData class to read the obs quality values from the input file. * Per #2880, update the log message about the quality control filter options applied. * Per #2880, tweak log messages. * Per #2880, tweak log messages. * Per #2880, add a Point2Grid unit test to demonstrate using the obs_quality_inc and obs_quality_exc options. * Per #2880, declare these get accessor functions as const to avoid SonarQube code smell. * Per #2880, many changes to the vx_nc_obs library and point2grid application to replace dynamically allocated memory with STL vectors to satisfy SonarQube code smells. * Per #2880, fix compilation error. * Per #2880, fix compilation error * Per #2880, revert skip_times back to vector since I wasn't postive the casting (int *) to (bool *) would actually work in the way I expect. This is safer. * Per #2880, rename the -qc command line option as -goes_qc, but still quietly support -qc * Per #2880, based on guidance from @hsoh, reset the var_cell_mapping vector for each loop iteration. * Spelling correction * Feature #2882 seeps qa (#2987) * Update seeps.h Change variable names to reduce ambiguity for interpretation and aid useability. * Update seeps.cc Pull through variable name changes and renaming of functions to aid legibility and clarity. Introduced some additional debug print statements. * Update grid-stat.rst Add documentation about the location of the gridded climatology files for SEEPS and which environment variable to use. * Replace read_seeps_scores() with get_seeps_climo_grid() * Manually merging Rachel's patch-1 changes. * Getting close to getting these seeps changes to compile. But it's failing in pair_data_point.cc * Per #2882, get branch feature_2882_seeps_qa compiling again. Recommend revisiting the volume of SEEPS-related Debug log messages and reducing them once its fully tested. * Per #2882, need to update the handling of the PPT24_seepsweights_grid.nc file name. Rename as _v12.0.nc for the updated version with the new names so that the existing regressions tests and nightly builds for main_v11.1 and develop continue to work. We can remove the _v12.0 once this feature branch is merged into develop but for the time being, we need both versions to exist. * Per #2882, rename the SEEPS columns from S12, S13, S21, S23, S31, S32 to the more descriptive ODFL, ODFH, OLFD, OLFH, OHFD, OHFL names. * Per #2882, update SEEPS details * Per #2882, store and report the weighted mean fcst and mean obs, just like the SEEPS score itself so that they're handled in a consistent manner. Note however that it's hard-coded to NOT write the weighted means/score, only the unweighted ones. * Per #2882, change SEEPS debug log levels and correct the storage of mean_fcst and mean_obs values. * Per #2882, correct SEEPS column name lookups * Per #2882, call is_bad_data() instead of is_eq(..., -9999.0) to get rid of compiler warning message. * Per #2882, add 2 more variations of the is_eq() function with mixed float and double inputs to satisfy compiler pb2nc compiler warnings. * Per #2882, switch from dynamically allocated arrays to std::vector * Per #2882, enhance Stat-Analysis to write the SEEPS line type to an output .stat file. * Per #2882, update the aggregated seeps computation to use better-initialized vectors. * Per #2882, resolve a few more SonarQube code smells. * Per #2882, now that this PR is ready to merge, remove the v12.0 version number from the gridded SEEPS climo file name ci-skip-all --------- Co-authored-by: mpm-meto <64001904+mpm-meto@users.noreply.github.com> * Hotfix to the develop branch for unit_grid_stat.xml to use the updated gridded seeps climo file name. * Feature #2887 categorical weights (#2988) * Per #2887, update NumArray::vals() to return a reference to the vector rather a pointer to doubles. * Per #2887, switch over the whole ContingencyTable class heirarchy from storing integer counts to storing double-precision weights. * Add ContingencyTable::is_integer() member function to check whether the table contains all integers * Per #2887, update parse_stat_line.cc to get it to compile after changing PCT to store thresholds in a std::vector. * Per #2887, update PCTInfo::clear() logic. * Per #2887, update ctc_by_row() logic to create reproducible results with the develop branch. * Per #2887, update logic of define_prob_bins() to add a final >=1.0 threshold if needed. While ==0.1 works fine, I found that ==0.05 did not because the last >=1.0 threshold was missing likely do to floating point precision issues. This change should fix that problem. * Per #2887, update roc_auc() function to match the develop branch * Per #2887, fix bug if computation of far() * Per #2887, replaced all ==0 integer equality checks with calls to is_eq() instead and fix a couple of equations to snuff out diffs in some CTS statistics. * Per #2887, address some of the 34 SonarQube code smells flagged for this PR. Note that the compute_ci.h/.cc changes are necessary and good since we should be computing CI's using doubles instead of integer counts. * Per #2887, update run_sonarqube.sh to specify the target CXX standard as 11. The hope is that that will limit the findings to only those features available in the C++11 standard. * Per #2887, update to SonarQube version 6.1.0.4477 released on 6/27/2024. * Per #2887, updating build_met_sonarqube.sh to specify --std=c++11 since c++17 is used by default * Per #2887, swap in a much simpler implementation of the ORSS statistic to match the equation listed in the MET User's Guide. * Per #2887, update grid_stat and library code to actually apply the grid_weight_flag settings to the computation of contingency table counts and statistics. * Per #2887, fix the handling of bad data in the ORSS equation. * Per #2887, add Npairs member to the ContingencyTable class, eliminate the n() accessor function, and carefully replace references to n() with n_pairs() for the integer number of matched pairs or total() with the double-precision sum of the weights. * Per #2887, reset Npairs = 0 for ContingencyTable::zero_out() * Per #2883, need to call set_n_pairs() in a few spots to set ECLV TOTAL column correctly ci-run-unit * Per #2887, call set_n_pairs() when aggregating PCT data in Series-Analysis ci-run-unit * Per #2887, update stat_analysis to parse the TOTAL column for the PCT and MCTC line types. * Pet #2882, call set_n_pairs() after set_size() ci-run-unit * Per #2887, reconfigure existing Ensemble-Stat unit test to request probabilistic output to see that it's impacted by the grid_weight_flag setting. * Per #2887, update Ensemble-Stat test to provide climo stdev data * Per #2887, add grid_weight_flag to the list of config options for Grid-Stat and Ensemble-Stat. * Per #2887, disable FHO output if grid_weight_flag != NONE. * Per #2887, revise the existing unit_grid_weight.xml unit tests for Grid-Stat to write CTC/CTS/MCTC/MCTS output and for the DESC column to be populated to indicate the type of grid weighting that was applied. * Per #2887, relatively small changes to drive down SonarQube code smells. Also, switch from total() to n_pairs() when computing confidence intervals. * Per #2887, more SonarQube tweaks * Per #2887, more SonarQube tweaks. * Per #2887, more SonarQube tweaks. * Per #2887, whitespace only changes. * Per #2287, fix path the seeps climo grid. * Per #2887, update the grid_weight_flag documentation. * Per #2887, tweak the wording. * Feature 2673 sonarqube beta6 vector (#2991) * 673 Replaceddynamic allocatin method (using vector instead of new) * 673 SonarQube findings: use vector for the dynamic memory allocation * 673 SonarQube findings: use vector for the dynamic memory allocation * #2673 Check None of met_data.shape * #2673 Check None of met_data.shape --------- Co-authored-by: Howard Soh * Feature #2279 point_weight_flag (#2993) * Per #2887, update NumArray::vals() to return a reference to the vector rather a pointer to doubles. * Per #2887, switch over the whole ContingencyTable class heirarchy from storing integer counts to storing double-precision weights. * Add ContingencyTable::is_integer() member function to check whether the table contains all integers * Per #2887, update parse_stat_line.cc to get it to compile after changing PCT to store thresholds in a std::vector. * Per #2887, update PCTInfo::clear() logic. * Per #2887, update ctc_by_row() logic to create reproducible results with the develop branch. * Per #2887, update logic of define_prob_bins() to add a final >=1.0 threshold if needed. While ==0.1 works fine, I found that ==0.05 did not because the last >=1.0 threshold was missing likely do to floating point precision issues. This change should fix that problem. * Per #2887, update roc_auc() function to match the develop branch * Per #2887, fix bug if computation of far() * Per #2887, replaced all ==0 integer equality checks with calls to is_eq() instead and fix a couple of equations to snuff out diffs in some CTS statistics. * Per #2887, address some of the 34 SonarQube code smells flagged for this PR. Note that the compute_ci.h/.cc changes are necessary and good since we should be computing CI's using doubles instead of integer counts. * Per #2887, update run_sonarqube.sh to specify the target CXX standard as 11. The hope is that that will limit the findings to only those features available in the C++11 standard. * Per #2887, update to SonarQube version 6.1.0.4477 released on 6/27/2024. * Per #2887, updating build_met_sonarqube.sh to specify --std=c++11 since c++17 is used by default * Per #2887, swap in a much simpler implementation of the ORSS statistic to match the equation listed in the MET User's Guide. * Per #2887, update grid_stat and library code to actually apply the grid_weight_flag settings to the computation of contingency table counts and statistics. * Per #2887, fix the handling of bad data in the ORSS equation. * Per #2887, add Npairs member to the ContingencyTable class, eliminate the n() accessor function, and carefully replace references to n() with n_pairs() for the integer number of matched pairs or total() with the double-precision sum of the weights. * Per #2887, reset Npairs = 0 for ContingencyTable::zero_out() * Per #2883, need to call set_n_pairs() in a few spots to set ECLV TOTAL column correctly ci-run-unit * Per #2887, call set_n_pairs() when aggregating PCT data in Series-Analysis ci-run-unit * Per #2887, update stat_analysis to parse the TOTAL column for the PCT and MCTC line types. * Pet #2882, call set_n_pairs() after set_size() ci-run-unit * Per #2887, reconfigure existing Ensemble-Stat unit test to request probabilistic output to see that it's impacted by the grid_weight_flag setting. * Per #2887, update Ensemble-Stat test to provide climo stdev data * Per #2887, add grid_weight_flag to the list of config options for Grid-Stat and Ensemble-Stat. * Per #2887, disable FHO output if grid_weight_flag != NONE. * Per #2887, revise the existing unit_grid_weight.xml unit tests for Grid-Stat to write CTC/CTS/MCTC/MCTS output and for the DESC column to be populated to indicate the type of grid weighting that was applied. * Per #2279, add the MaskSID struct to store information about station id names and corresponding weights. * Per #2279, add new PointWeightType enumeration along with code to parse it. * Per #2279, adding point_weight_flag option to all Point-Stat and Ensemble-Stat config file and tweaking whitespace. * Per #2279, add point_weight_flag to the Point-Stat and Ensemble-Stat config class. Also remove sue unneeded wgt_dp argument for the add_point_obs() functions. Plan to add logic to set the point weights only AFTER all the observations have been collected for each verification task. * Per #2279, use the default_weight contstant instead of the literal 1.0 value. * Per #2279, add stubs for actually applying the point_weight_flag settings. * Per #2279, fix PairBase to actually set point weight values parsed from station id masks. * Per #2279, trying to fix 2 sonarqurqube bugs * Per #2279, fix a couple bugs parsing the SID weights and add a new unit_point_weight.xml unit test to run Point-Stat on scalar and probability inputs weighting the stations by their elevation. Still need to add Ensemble-Stat calls. * Per #2279, fix small bug ci-run-unit * Per #2279, add ensemble_stat calls to unit_point_weight.xml * Per #2279, add documentation about the point_weight_flag configuration option. * Per #2279, working on debug and warning messages. * Per #2279, tweak the user's guide * Per #2279, switch MaskSID::sid_list from a vector of pairs to a simpler map named sid_map. * Per #2279, fix the madis2nc call to parse_sid_mask() * Per #2279, move MaskSID from vx_config over into dedicated vx_util/mask_sid.h and .cc to be consistent with mask_poly.h. I note that the members of the MaskSID struct were not being initialized properly. So making it a complete class was the right solution. * Per #2279, another change to make it compile. * Per #2279, more tweaks to get it to compile. * Feature #2893 output_obtype (#2995) * Per #2893, add obtype_as_obs_message_type_flag option for Point-Stat and Ensemble-Stat that applies when writing MPR, SEEPS_MPR, and ORANK line types. If true, write the input observation message type to the OBTYPE output column rather than the name of the group. * Per #2893, add option to default config files and fix compilation errors. * Per #2893, change the name from obtype_as_obs_message_type_flag to obtype_as_group_val_flag. * Per #2893, add docs ci-run-unit * Per #2893, add obtype_as_group_val_flag entry for all config files that already include the message_type_group_map entry. * Per #2893, modify existing PointStatConfig_WINDS config file to have it write MPR output with obtype_as_group_val_flag = TRUE. Note that I switched the message types from ADPSFC, SFCSHP, USERSF to just USERSF. The original reason for the 3 was to prove that the counts for ADPSFC + SFCSHP = USERSF. * Per #2893, update commit history for ensemble_stat and point_stat * Per #2893, revert back PointStatConfig_WINDS to minimize diffs * Per #2893, add a Point-Stat unit test to demonstrate setting the obtype_as_group_val_flag option. * Per #2893, need to reset the obtype after writing all MPR, SEEPS_MPR, and ORANK line types in Point-Stat * Per #2893, tweak Point-Stat configuration to also write HIRA ORANK and PCT outputs. * Feature 2673 sonarqube beta6 vector dictionary (#2994) * #2673 SonarQube findings: use vector for the dynamic memory allocation * #2673 Check if a vector is allocated * #2673 Check if a vector is allocated * #2673 SonarQube findings use vector * #2673 Resolved SonarQube findingds * #2673 SonarQube: Replaced f-strings to regular strings * #2673 Added staticmethod to read_mpr * #2673 SonarQube: removed unnecessary pass * #2673 SonarQube: use vector * #2673 Initialize vecvgtor variables * 673 Check if an user python command is empty * #2673 Changed 0 to nullptr * #2673 Rollback for s and av * #2673 Applied the static method call * #2673 Rollback using vector because of introducing a bug * 673 Cleanup commented out code --------- Co-authored-by: Howard Soh --------- Co-authored-by: Howard Soh Co-authored-by: John Halley Gotway Co-authored-by: Howard Soh Co-authored-by: MET Tools Test Account Co-authored-by: davidalbo Co-authored-by: j-opatz Co-authored-by: Daniel Adriaansen Co-authored-by: Julie Prestopnik 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 Co-authored-by: Natalie babij Co-authored-by: Natalie babij Co-authored-by: Natalie Babij Co-authored-by: Julie Prestopnik Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com> Co-authored-by: mpm-meto <64001904+mpm-meto@users.noreply.github.com> Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com> --- .github/workflows/testing.yml | 4 +- data/config/ConfigConstants | 4 + data/config/EnsembleStatConfig_default | 10 +- data/config/GridStatConfig_default | 7 +- data/config/PointStatConfig_default | 10 +- docs/Users_Guide/config_options.rst | 61 +- docs/Users_Guide/ensemble-stat.rst | 15 +- docs/Users_Guide/point-stat.rst | 2 + internal/test_unit/config/EnsembleStatConfig | 8 +- .../config/EnsembleStatConfig_MASK_SID | 8 +- .../test_unit/config/EnsembleStatConfig_climo | 8 +- .../config/EnsembleStatConfig_grid_weight | 8 +- .../config/EnsembleStatConfig_one_cdf_bin | 8 +- .../config/EnsembleStatConfig_point_weight | 214 ++ .../config/EnsembleStatConfig_python | 10 +- .../config/EnsembleStatConfig_qty_inc_exc | 8 +- .../EnsembleStatConfig_rps_climo_bin_prob | 8 +- .../EnsembleStatConfig_single_file_grib | 10 +- .../config/EnsembleStatConfig_single_file_nc | 10 +- .../config/GridStatConfig_APCP_regrid | 7 +- .../config/GridStatConfig_GRIB_lvl_typ_val | 7 +- .../config/GridStatConfig_GRIB_set_attr | 7 +- .../config/GridStatConfig_GTG_latlon | 7 +- .../test_unit/config/GridStatConfig_GTG_lc | 7 +- .../test_unit/config/GridStatConfig_SEEPS | 7 +- .../test_unit/config/GridStatConfig_WRF_pres | 7 +- .../config/GridStatConfig_apply_mask | 7 +- ...nfig_climo_FCST_NCEP_1.0DEG_OBS_WMO_1.5DEG | 7 +- .../test_unit/config/GridStatConfig_climo_WMO | 7 +- .../config/GridStatConfig_climo_prob | 7 +- .../config/GridStatConfig_climo_wrap_year | 7 +- .../config/GridStatConfig_fbias_perc_thresh | 7 +- .../test_unit/config/GridStatConfig_fourier | 7 +- .../config/GridStatConfig_gen_ens_prod | 7 +- .../config/GridStatConfig_grid_weight | 7 +- .../config/GridStatConfig_interp_shape | 7 +- .../config/GridStatConfig_mpr_thresh | 7 +- .../test_unit/config/GridStatConfig_no_leap | 7 +- .../config/GridStatConfig_prob_as_scalar | 7 +- .../test_unit/config/GridStatConfig_python | 7 +- .../config/GridStatConfig_python_mixed | 7 +- internal/test_unit/config/GridStatConfig_rtma | 7 +- .../config/GridStatConfig_rtma_perc_thresh | 7 +- internal/test_unit/config/GridStatConfig_st4 | 7 +- .../config/GridStatConfig_st4_censor | 7 +- .../config/GridStatConfig_ugrid_mpas | 7 +- .../config/GridStatConfig_ugrid_mpas_diag | 7 +- .../test_unit/config/PointStatConfig_APCP | 9 +- .../config/PointStatConfig_APCP_HIRA | 9 +- .../config/PointStatConfig_GTG_latlon | 9 +- .../test_unit/config/PointStatConfig_GTG_lc | 9 +- .../config/PointStatConfig_INTERP_OPTS | 9 +- .../config/PointStatConfig_LAND_TOPO_MASK | 11 +- .../test_unit/config/PointStatConfig_MASK_SID | 9 +- .../config/PointStatConfig_MPR_OBTYPE | 166 ++ .../test_unit/config/PointStatConfig_PHYS | 9 +- .../config/PointStatConfig_PHYS_pint | 9 +- .../test_unit/config/PointStatConfig_SEEPS | 9 +- .../test_unit/config/PointStatConfig_WINDS | 11 +- .../test_unit/config/PointStatConfig_aeronet | 9 +- .../test_unit/config/PointStatConfig_airnow | 10 +- .../test_unit/config/PointStatConfig_climo | 9 +- .../config/PointStatConfig_climo_WMO | 9 +- .../config/PointStatConfig_climo_prob | 9 +- internal/test_unit/config/PointStatConfig_dup | 9 +- .../config/PointStatConfig_mpr_thresh | 9 +- .../config/PointStatConfig_obs_summary | 9 +- .../config/PointStatConfig_obs_summary_all | 9 +- .../config/PointStatConfig_point_weight | 145 ++ .../test_unit/config/PointStatConfig_prob | 9 +- .../config/PointStatConfig_prob_point_weight | 151 ++ .../test_unit/config/PointStatConfig_python | 9 +- .../config/PointStatConfig_qty_inc_exc | 9 +- .../config/PointStatConfig_sid_inc_exc | 9 +- .../config/PointStatConfig_ugrid_mpas_diag | 9 +- .../config/PointStatConfig_ugrid_mpas_out | 9 +- .../config/PointStatConfig_ugrid_no_dataset | 9 +- .../config/SID_CONUS_ADPSFC_ELEV.txt | 2109 +++++++++++++++++ .../config/SID_CONUS_ADPUPA_ELEV.txt | 98 + .../config/ref_config/GridStatConfig_03h | 7 +- .../config/ref_config/GridStatConfig_24h | 7 +- .../config/ref_config/PointStatConfig_ADPUPA | 9 +- .../config/ref_config/PointStatConfig_ONLYSF | 9 +- .../config/ref_config/PointStatConfig_WINDS | 9 +- internal/test_unit/t | 114 - internal/test_unit/xml/unit_point_stat.xml | 20 + internal/test_unit/xml/unit_point_weight.xml | 148 ++ scripts/config/EnsembleStatConfig | 10 +- scripts/config/GridStatConfig_APCP_12 | 7 +- scripts/config/GridStatConfig_APCP_24 | 7 +- scripts/config/GridStatConfig_POP_12 | 7 +- scripts/config/GridStatConfig_all | 7 +- scripts/config/PointStatConfig | 9 +- scripts/python/examples/read_ascii_numpy.py | 1 - scripts/python/met/dataplane.py | 9 +- scripts/python/met/logger.py | 33 +- scripts/python/met/mprbase.py | 1 + scripts/python/met/point.py | 73 +- src/basic/vx_config/config_constants.h | 16 + src/basic/vx_config/config_util.cc | 104 +- src/basic/vx_config/config_util.h | 7 +- src/basic/vx_math/hist.cc | 12 +- src/basic/vx_math/hist.h | 3 +- src/basic/vx_math/legendre.cc | 12 +- src/basic/vx_math/legendre.h | 8 +- src/basic/vx_math/ptile.cc | 4 +- src/basic/vx_util/Makefile.am | 1 + src/basic/vx_util/Makefile.in | 35 +- src/basic/vx_util/mask_sid.cc | 161 ++ src/basic/vx_util/mask_sid.h | 71 + src/basic/vx_util/num_array.cc | 81 +- src/basic/vx_util/util_constants.h | 2 +- src/basic/vx_util/vx_util.h | 1 + src/libcode/vx_analysis_util/stat_job.cc | 9 +- src/libcode/vx_data2d_nc_cf/nc_cf_file.cc | 16 +- src/libcode/vx_data2d_nc_met/get_met_grid.cc | 5 +- src/libcode/vx_data2d_nc_met/met_file.cc | 15 +- src/libcode/vx_data2d_nc_wrf/wrf_file.cc | 4 +- .../vx_data2d_python/python_dataplane.cc | 10 +- src/libcode/vx_data2d_ugrid/ugrid_file.cc | 29 +- src/libcode/vx_nc_obs/nc_obs_util.cc | 72 +- src/libcode/vx_nc_util/nc_utils.cc | 188 +- src/libcode/vx_nc_util/write_netcdf.cc | 27 +- src/libcode/vx_python3_utils/wchar_argv.cc | 53 +- src/libcode/vx_shapedata/shapedata.cc | 19 +- src/libcode/vx_stat_out/stat_columns.cc | 14 +- src/libcode/vx_stat_out/stat_columns.h | 7 +- src/libcode/vx_statistics/apply_mask.cc | 2 +- src/libcode/vx_statistics/contable.h | 14 +- src/libcode/vx_statistics/pair_base.cc | 95 +- src/libcode/vx_statistics/pair_base.h | 26 +- .../vx_statistics/pair_data_ensemble.cc | 15 +- .../vx_statistics/pair_data_ensemble.h | 4 +- src/libcode/vx_statistics/pair_data_point.cc | 45 +- src/libcode/vx_statistics/pair_data_point.h | 14 +- src/libcode/vx_tc_util/vx_tc_nc_util.cc | 64 +- src/tools/core/ensemble_stat/ensemble_stat.cc | 57 +- .../ensemble_stat/ensemble_stat_conf_info.cc | 17 +- .../ensemble_stat/ensemble_stat_conf_info.h | 8 +- src/tools/core/grid_stat/grid_stat.cc | 25 +- src/tools/core/mode/mode_exec.cc | 3 +- src/tools/core/point_stat/point_stat.cc | 38 +- .../core/point_stat/point_stat_conf_info.cc | 16 +- .../core/point_stat/point_stat_conf_info.h | 5 +- .../core/series_analysis/series_analysis.cc | 9 +- .../core/stat_analysis/aggr_stat_line.cc | 22 +- .../core/stat_analysis/parse_stat_line.cc | 1 - src/tools/core/wavelet_stat/wavelet_stat.cc | 67 +- src/tools/dev_utils/gen_climo_bin.cc | 7 +- src/tools/other/ascii2nc/ascii2nc.cc | 8 +- src/tools/other/gen_ens_prod/gen_ens_prod.cc | 42 +- src/tools/other/gen_vx_mask/gen_vx_mask.cc | 124 +- src/tools/other/gsi_tools/gsidens2orank.cc | 8 +- src/tools/other/ioda2nc/ioda2nc.cc | 38 +- src/tools/other/ioda2nc/ioda2nc_conf_info.cc | 12 +- src/tools/other/lidar2nc/lidar2nc.cc | 38 +- src/tools/other/madis2nc/madis2nc.cc | 8 +- .../other/mode_time_domain/mtd_nc_output.cc | 32 +- src/tools/other/pb2nc/pb2nc_conf_info.cc | 12 +- src/tools/other/point2grid/point2grid.cc | 4 +- .../regrid_data_plane/regrid_data_plane.cc | 7 +- .../shift_data_plane/shift_data_plane.cc | 5 +- src/tools/tc_utils/tc_diag/tc_diag.cc | 30 +- src/tools/tc_utils/tc_dland/tc_dland.cc | 10 +- src/tools/tc_utils/tc_gen/tc_gen.cc | 11 +- 165 files changed, 4647 insertions(+), 1295 deletions(-) create mode 100644 internal/test_unit/config/EnsembleStatConfig_point_weight create mode 100644 internal/test_unit/config/PointStatConfig_MPR_OBTYPE create mode 100644 internal/test_unit/config/PointStatConfig_point_weight create mode 100644 internal/test_unit/config/PointStatConfig_prob_point_weight create mode 100644 internal/test_unit/config/SID_CONUS_ADPSFC_ELEV.txt create mode 100644 internal/test_unit/config/SID_CONUS_ADPUPA_ELEV.txt delete mode 100755 internal/test_unit/t create mode 100644 internal/test_unit/xml/unit_point_weight.xml create mode 100644 src/basic/vx_util/mask_sid.cc create mode 100644 src/basic/vx_util/mask_sid.h diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 4c1eb33e9c..4e6e3872b7 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -176,7 +176,7 @@ jobs: - jobid: 'job1' tests: 'ascii2nc_indy pb2nc_indy tc_dland tc_pairs tc_stat plot_tc tc_rmw rmw_analysis tc_diag tc_gen' - jobid: 'job2' - tests: 'met_test_scripts mode_multivar mode_graphics mtd regrid airnow gsi_tools netcdf modis series_analysis wwmca_regrid gen_vx_mask grid_weight interp_shape grid_diag grib_tables lidar2nc shift_data_plane trmm2nc aeronet wwmca_plot ioda2nc gaussian' + tests: 'met_test_scripts mode_multivar mode_graphics mtd regrid airnow gsi_tools netcdf modis series_analysis wwmca_regrid gen_vx_mask interp_shape grid_diag grib_tables lidar2nc shift_data_plane trmm2nc aeronet wwmca_plot ioda2nc gaussian' fail-fast: false steps: - uses: actions/checkout@v4 @@ -310,6 +310,8 @@ jobs: tests: 'ensemble_stat stat_analysis_es' - jobid: 'job5' tests: 'ugrid' + - jobid: 'job6' + tests: 'grid_weight point_weight' fail-fast: false steps: - uses: actions/checkout@v4 diff --git a/data/config/ConfigConstants b/data/config/ConfigConstants index 23210b6c34..15a2a8db4c 100644 --- a/data/config/ConfigConstants +++ b/data/config/ConfigConstants @@ -137,6 +137,10 @@ NONE = 1; COS_LAT = 2; AREA = 3; +// Point weight flag settings +NONE = 1; +SID = 2; + // Duplicate flag settings NONE = 1; UNIQUE = 2; diff --git a/data/config/EnsembleStatConfig_default b/data/config/EnsembleStatConfig_default index c496dd3507..c4b2463f7d 100644 --- a/data/config/EnsembleStatConfig_default +++ b/data/config/EnsembleStatConfig_default @@ -120,6 +120,8 @@ message_type_group_map = [ { key = "ONLYSF"; val = "ADPSFC,SFCSHP"; } ]; +obtype_as_group_val_flag = FALSE; + // // Ensemble bin sizes // May be set separately in each "obs.field" entry @@ -266,8 +268,10 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; -output_prefix = ""; -version = "V12.0.0"; +grid_weight_flag = NONE; +point_weight_flag = NONE; + +output_prefix = ""; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/data/config/GridStatConfig_default b/data/config/GridStatConfig_default index 4a0c7dce44..aa4d9517b5 100644 --- a/data/config/GridStatConfig_default +++ b/data/config/GridStatConfig_default @@ -271,8 +271,9 @@ nc_pairs_flag = { //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = ""; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = ""; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/data/config/PointStatConfig_default b/data/config/PointStatConfig_default index 266c251e59..95665fe017 100644 --- a/data/config/PointStatConfig_default +++ b/data/config/PointStatConfig_default @@ -115,6 +115,8 @@ message_type_group_map = [ { key = "WATERSF"; val = "SFCSHP"; } ]; +obtype_as_group_val_flag = FALSE; + //////////////////////////////////////////////////////////////////////////////// // @@ -305,8 +307,10 @@ output_flag = { //////////////////////////////////////////////////////////////////////////////// -tmp_dir = "/tmp"; -output_prefix = ""; -version = "V12.0.0"; +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = ""; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/docs/Users_Guide/config_options.rst b/docs/Users_Guide/config_options.rst index 25515fc524..b85b2d233b 100644 --- a/docs/Users_Guide/config_options.rst +++ b/docs/Users_Guide/config_options.rst @@ -667,6 +667,25 @@ used. { key = "ONLYSF"; val = "ADPSFC,SFCSHP"; } ]; +obtype_as_group_val_flag +------------------------ + +The "obtype_as_group_val_flag" entry is a boolean that controls how the +OBTYPE header column is populated for message type groups defined in +"message_type_group_map". If set to TRUE and when writing matched pair +line types (MPR, SEEPS_MPR, and ORANK), write OBTYPE as the group map +*value*, i.e. the input message type for each individual observation. +If set to FALSE (default) and for all other line types, write OBTYPE +as the group map key, i.e. the name of the message type group. + +For example, if FALSE, write the OBTYPE column in the MPR line type +as the "ANYAIR" message type group name. If TRUE, write OBTYPE as "AIRCAR" +or "AIRCFT", based on the input message type of each point observation. + +.. code-block:: none + + obtyp_as_group_val_flag = FALSE; + message_type_map ---------------- @@ -1847,15 +1866,18 @@ in the following ways: embedded within another quoted string. Any such embedded quotes must be escaped using a preceeding backslash character. -* The "sid" entry is an array of strings which define groups of - observation station ID's over which to compute statistics. Each entry - in the array is either a filename of a comma-separated list. +* The "sid" entry is an array of strings which define groups of observation station + ID's over which to compute statistics. Each station ID string can be followed by an + optional numeric weight enclosed in parenethesis and used by the "point_weight_flag" + configuration option. Each entry in the "sid" "array is either a filename or a + comma-separated list. - * For a filename, the strings are whitespace-separated. The first - string is the mask "name" and the remaining strings are the station + * For an ASCII filename, the strings contained within it are whitespace-separated. + The first string is the mask "name" and the remaining strings are the station ID's to be used. * For a comma-separated list, optionally use a colon to specify a name. - For "MY_LIST:SID1,SID2", name = MY_LIST and values = SID1 and SID2. + For "MY_LIST:SID1(WGT1),SID2(WGT2)", name = MY_LIST which consists of + two station ID's (SID1 and SID2) and optional numeric weights (WGT1 and WGT2). * For a comma-separated list of length one with no name specified, the mask "name" and value are both set to the single station ID string. For "SID1", name = SID1 and value = SID1. @@ -1865,6 +1887,7 @@ in the following ways: For "SID1,SID2", name = MASK_SID and values = SID1 and SID2. * The "name" of the station ID mask is written to the VX_MASK column of the MET output files. + * The "llpnt" entry is either a single dictionary or an array of dictionaries. Each dictionary contains three entries, the "name" for the masking region, "lat_thresh", and "lon_thresh". The latitude and @@ -2353,8 +2376,9 @@ NBRCTC), partial sums (SL1L2, SAL1L2, VL1L2, and VAL1L2), and statistics It is meant to account for grid box area distortion and is often applied to global Lat/Lon grids. It is only applied for grid-to-grid verification in Grid-Stat and Ensemble-Stat and is not applied for grid-to-point -verification. It can only be defined once at the highest level of config -file context and applies to all verification tasks for that run. +verification, which is controlled by the "point_weight_flag" option. +It can only be defined once at the highest level of config file context +and applies to all verification tasks for that run. Three grid weighting options are currently supported: @@ -2391,6 +2415,27 @@ versions of MET. grid_weight_flag = NONE; +point_weight_flag +----------------- + +The "point_weight_flag" is similar to the "grid_weight_flag", described above, +but applies to grid-to-point verification in Point-Stat and Ensemble-Stat. +It is not applied for grid-to-grid verification which is controlled by the +"grid_weight_flag" option. It can only be defined once at the highest level +of config file context and applies to all verification tasks for that run. + +While only one point weighting option is currently supported, additional +methods are planned for future versions: + +* NONE to disable point weighting using a constant weight of 1.0 (default). + +* SID to use the weights defined by the station ID masking configuration option, + "mask.sid". + +.. code-block:: none + + point_weight_flag = NONE; + hss_ec_value ------------ diff --git a/docs/Users_Guide/ensemble-stat.rst b/docs/Users_Guide/ensemble-stat.rst index 8a2502c525..1680164d70 100644 --- a/docs/Users_Guide/ensemble-stat.rst +++ b/docs/Users_Guide/ensemble-stat.rst @@ -181,14 +181,27 @@ ____________________ obs_summary = NONE; obs_perc_value = 50; message_type_group_map = [...]; + obtype_as_group_val_flag = FALSE; grid_weight_flag = NONE; + point_weight_flag = NONE; output_prefix = ""; version = "VN.N"; The configuration options listed above are common to many MET tools and are described in :numref:`config_options`. -Note that the **HIRA** interpolation method is only supported in Ensemble-Stat. +.. note:: + + The **HIRA** interpolation method is only supported in Ensemble-Stat. + +.. note:: + + The "grid_weight_flag" and "point_weight_flag" options described in + :numref:`config_options` define how matched pairs are weighted for + grid-to-grid and grid-to-point verification in Ensemble-Stat. These + weights currently only apply to the computation of probabilistic + outputs (PCT, PSTD, PJC, and PRC) but no other Ensemble-Stat output + line types. _____________________ diff --git a/docs/Users_Guide/point-stat.rst b/docs/Users_Guide/point-stat.rst index 73b7ce9a33..41e154ac8c 100644 --- a/docs/Users_Guide/point-stat.rst +++ b/docs/Users_Guide/point-stat.rst @@ -362,6 +362,8 @@ ________________________ obs_summary = NONE; obs_perc_value = 50; message_type_group_map = [...]; + obtype_as_group_val_flag = FALSE; + point_weight_flag = NONE; tmp_dir = "/tmp"; output_prefix = ""; version = "VN.N"; diff --git a/internal/test_unit/config/EnsembleStatConfig b/internal/test_unit/config/EnsembleStatConfig index 80157bed0c..59661a5fe2 100644 --- a/internal/test_unit/config/EnsembleStatConfig +++ b/internal/test_unit/config/EnsembleStatConfig @@ -226,8 +226,10 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; +grid_weight_flag = NONE; +point_weight_flag = NONE; + +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/EnsembleStatConfig_MASK_SID b/internal/test_unit/config/EnsembleStatConfig_MASK_SID index 96128cb148..28bd9899b3 100644 --- a/internal/test_unit/config/EnsembleStatConfig_MASK_SID +++ b/internal/test_unit/config/EnsembleStatConfig_MASK_SID @@ -218,8 +218,10 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; +grid_weight_flag = NONE; +point_weight_flag = NONE; + +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/EnsembleStatConfig_climo b/internal/test_unit/config/EnsembleStatConfig_climo index 06699abf0a..89abf95dd8 100644 --- a/internal/test_unit/config/EnsembleStatConfig_climo +++ b/internal/test_unit/config/EnsembleStatConfig_climo @@ -248,8 +248,10 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; +grid_weight_flag = NONE; +point_weight_flag = NONE; + +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/EnsembleStatConfig_grid_weight b/internal/test_unit/config/EnsembleStatConfig_grid_weight index 12994a3a5b..67da4d825f 100644 --- a/internal/test_unit/config/EnsembleStatConfig_grid_weight +++ b/internal/test_unit/config/EnsembleStatConfig_grid_weight @@ -240,8 +240,10 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = ${GRID_WEIGHT}; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; +grid_weight_flag = ${GRID_WEIGHT}; +point_weight_flag = NONE; + +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/EnsembleStatConfig_one_cdf_bin b/internal/test_unit/config/EnsembleStatConfig_one_cdf_bin index 013763c74d..3828b386e5 100644 --- a/internal/test_unit/config/EnsembleStatConfig_one_cdf_bin +++ b/internal/test_unit/config/EnsembleStatConfig_one_cdf_bin @@ -232,8 +232,10 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; +grid_weight_flag = NONE; +point_weight_flag = NONE; + +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/EnsembleStatConfig_point_weight b/internal/test_unit/config/EnsembleStatConfig_point_weight new file mode 100644 index 0000000000..2e9ad158b8 --- /dev/null +++ b/internal/test_unit/config/EnsembleStatConfig_point_weight @@ -0,0 +1,214 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Ensemble-Stat configuration file. +// +// For additional information, please see the MET User's Guide. +// +//////////////////////////////////////////////////////////////////////////////// + +// +// Output model name to be written +// +model = "FCST"; + +// +// Output description to be written +// May be set separately in each "obs.field" entry +// +desc = "${DESC}"; + +// +// Output observation type to be written +// +obtype = "ANALYS"; + +//////////////////////////////////////////////////////////////////////////////// + +// +// Verification grid +// +regrid = { + to_grid = NONE; + method = NEAREST; + width = 1; + vld_thresh = 0.5; + shape = SQUARE; +} + +//////////////////////////////////////////////////////////////////////////////// + +// +// IDs for ensemble members +// Only set if processing a single file with all ensembles +// +ens_member_ids = []; +control_id = ""; + +// +// May be set separately in each "fcst.field" and "obs.field" entry +// +censor_thresh = []; +censor_val = []; +prob_cat_thresh = []; + +// +// May be set separately in each "fcst.field" entry +// +prob_pct_thresh = [ ==0.25 ]; + +// +// May be set separately in each "obs.field" entry +// +nc_var_str = ""; +eclv_points = 0.05; + +// +// Forecast and observation fields to be verified +// +fcst = { + ens_thresh = 0.75; + vld_thresh = 1.0; + message_type = [ "ADPSFC" ]; + obs_quality_inc = []; + obs_quality_exc = []; + + field = [ + { name = "APCP"; level = "A24"; prob_cat_thresh = [ >=2.54 ]; } + ]; +} +obs = fcst; + +//////////////////////////////////////////////////////////////////////////////// + +// +// Point observation filtering options +// May be set separately in each "obs.field" entry +// +message_type = []; +sid_inc = []; +sid_exc = []; +obs_thresh = [ NA ]; +obs_quality_inc = []; +obs_quality_exc = []; +duplicate_flag = NONE; +obs_summary = NONE; +obs_perc_value = 50; +skip_const = FALSE; + +// +// Observation error options +// Set dist_type to NONE to use the observation error table instead +// May be set separately in each "obs.field" entry +// +obs_error = { + flag = FALSE; + dist_type = NONE; + dist_parm = []; + inst_bias_scale = 1.0; + inst_bias_offset = 0.0; + min = NA; + max = NA; +} + +// +// Ensemble bin sizes +// May be set separately in each "obs.field" entry +// +ens_ssvar_bin_size = 1.0; +ens_phist_bin_size = 0.05; + +//////////////////////////////////////////////////////////////////////////////// + +// +// Point observation time window +// +obs_window = { + beg = -5400; + end = 5400; +} + +//////////////////////////////////////////////////////////////////////////////// + +// +// Verification masking regions +// +mask = { + grid = []; + poly = []; + sid = [ "${CONFIG_DIR}/SID_CONUS_ADPSFC_ELEV.txt" ]; + llpnt = []; +} + +//////////////////////////////////////////////////////////////////////////////// + +// +// Confidence interval settings +// +ci_alpha = [ 0.05 ]; + +//////////////////////////////////////////////////////////////////////////////// + +// +// Interpolation methods +// +interp = { + field = BOTH; + vld_thresh = 1.0; + shape = SQUARE; + + type = [ + { + method = NEAREST; + width = 1; + } + ]; +} + +//////////////////////////////////////////////////////////////////////////////// + +// +// Statistical output types +// May be set separately in each "obs.field" entry +// +output_flag = { + ecnt = NONE; + rps = NONE; + rhist = NONE; + phist = NONE; + orank = NONE; + ssvar = NONE; + relp = NONE; + pct = STAT; + pstd = STAT; + pjc = STAT; + prc = STAT; + eclv = STAT; +} + +//////////////////////////////////////////////////////////////////////////////// + +// +// Gridded verification output types +// May be set separately in each "obs.field" entry +// +nc_orank_flag = FALSE; + +//////////////////////////////////////////////////////////////////////////////// + +// +// Random number generator +// +rng = { + type = "mt19937"; + seed = "1"; +} + +//////////////////////////////////////////////////////////////////////////////// + +grid_weight_flag = NONE; +point_weight_flag = ${POINT_WEIGHT}; + +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; + +//////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/EnsembleStatConfig_python b/internal/test_unit/config/EnsembleStatConfig_python index 4de2045664..1b32091705 100644 --- a/internal/test_unit/config/EnsembleStatConfig_python +++ b/internal/test_unit/config/EnsembleStatConfig_python @@ -119,6 +119,8 @@ message_type_group_map = [ { key = "ONLYSF"; val = "ADPSFC,SFCSHP"; } ]; +obtype_as_group_val_flag = FALSE; + // // Ensemble bin sizes // May be set separately in each "obs.field" entry @@ -222,8 +224,10 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; +grid_weight_flag = NONE; +point_weight_flag = NONE; + +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/EnsembleStatConfig_qty_inc_exc b/internal/test_unit/config/EnsembleStatConfig_qty_inc_exc index 0881ff3b8d..0a0bf9b074 100644 --- a/internal/test_unit/config/EnsembleStatConfig_qty_inc_exc +++ b/internal/test_unit/config/EnsembleStatConfig_qty_inc_exc @@ -235,8 +235,10 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; +grid_weight_flag = NONE; +point_weight_flag = NONE; + +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/EnsembleStatConfig_rps_climo_bin_prob b/internal/test_unit/config/EnsembleStatConfig_rps_climo_bin_prob index af4354bfea..ea1023dc36 100644 --- a/internal/test_unit/config/EnsembleStatConfig_rps_climo_bin_prob +++ b/internal/test_unit/config/EnsembleStatConfig_rps_climo_bin_prob @@ -216,8 +216,10 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; +grid_weight_flag = NONE; +point_weight_flag = NONE; + +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/EnsembleStatConfig_single_file_grib b/internal/test_unit/config/EnsembleStatConfig_single_file_grib index 20220f82b5..ba1ec381a2 100644 --- a/internal/test_unit/config/EnsembleStatConfig_single_file_grib +++ b/internal/test_unit/config/EnsembleStatConfig_single_file_grib @@ -131,6 +131,8 @@ message_type_group_map = [ { key = "ONLYSF"; val = "ADPSFC,SFCSHP"; } ]; +obtype_as_group_val_flag = FALSE; + // // Ensemble bin sizes // May be set separately in each "obs.field" entry @@ -271,8 +273,10 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; +grid_weight_flag = NONE; +point_weight_flag = NONE; + +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/EnsembleStatConfig_single_file_nc b/internal/test_unit/config/EnsembleStatConfig_single_file_nc index b3faf78d95..f9d18a2129 100644 --- a/internal/test_unit/config/EnsembleStatConfig_single_file_nc +++ b/internal/test_unit/config/EnsembleStatConfig_single_file_nc @@ -137,6 +137,8 @@ message_type_group_map = [ { key = "ONLYSF"; val = "ADPSFC,SFCSHP"; } ]; +obtype_as_group_val_flag = FALSE; + // // Ensemble bin sizes // May be set separately in each "obs.field" entry @@ -277,8 +279,10 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; +grid_weight_flag = NONE; +point_weight_flag = NONE; + +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_APCP_regrid b/internal/test_unit/config/GridStatConfig_APCP_regrid index 74bbba5b4d..aea9adeaef 100644 --- a/internal/test_unit/config/GridStatConfig_APCP_regrid +++ b/internal/test_unit/config/GridStatConfig_APCP_regrid @@ -208,8 +208,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_GRIB_lvl_typ_val b/internal/test_unit/config/GridStatConfig_GRIB_lvl_typ_val index 64381023a8..ecce9ddfdf 100644 --- a/internal/test_unit/config/GridStatConfig_GRIB_lvl_typ_val +++ b/internal/test_unit/config/GridStatConfig_GRIB_lvl_typ_val @@ -305,8 +305,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "GRIB_lvl_typ_val"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "GRIB_lvl_typ_val"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_GRIB_set_attr b/internal/test_unit/config/GridStatConfig_GRIB_set_attr index cb2f86984c..36ab040a33 100644 --- a/internal/test_unit/config/GridStatConfig_GRIB_set_attr +++ b/internal/test_unit/config/GridStatConfig_GRIB_set_attr @@ -237,8 +237,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "GRIB_set_attr"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "GRIB_set_attr"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_GTG_latlon b/internal/test_unit/config/GridStatConfig_GTG_latlon index 90be6f2172..77edd743db 100644 --- a/internal/test_unit/config/GridStatConfig_GTG_latlon +++ b/internal/test_unit/config/GridStatConfig_GTG_latlon @@ -216,8 +216,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_GTG_lc b/internal/test_unit/config/GridStatConfig_GTG_lc index ddd8321fdd..0385bfda9e 100644 --- a/internal/test_unit/config/GridStatConfig_GTG_lc +++ b/internal/test_unit/config/GridStatConfig_GTG_lc @@ -216,8 +216,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_SEEPS b/internal/test_unit/config/GridStatConfig_SEEPS index 51bc14e2d6..808e5a10f3 100644 --- a/internal/test_unit/config/GridStatConfig_SEEPS +++ b/internal/test_unit/config/GridStatConfig_SEEPS @@ -215,8 +215,9 @@ seeps_grid_climo_name = "${SEEPS_GRID_CLIMO_NAME}"; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_WRF_pres b/internal/test_unit/config/GridStatConfig_WRF_pres index 10d46e8f94..98851dfa7b 100644 --- a/internal/test_unit/config/GridStatConfig_WRF_pres +++ b/internal/test_unit/config/GridStatConfig_WRF_pres @@ -281,8 +281,9 @@ ugrid_coordinates_file = ""; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_apply_mask b/internal/test_unit/config/GridStatConfig_apply_mask index 77af6251c0..041cae792d 100644 --- a/internal/test_unit/config/GridStatConfig_apply_mask +++ b/internal/test_unit/config/GridStatConfig_apply_mask @@ -217,8 +217,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_climo_FCST_NCEP_1.0DEG_OBS_WMO_1.5DEG b/internal/test_unit/config/GridStatConfig_climo_FCST_NCEP_1.0DEG_OBS_WMO_1.5DEG index 8783cbd9e1..8eab6dccb0 100644 --- a/internal/test_unit/config/GridStatConfig_climo_FCST_NCEP_1.0DEG_OBS_WMO_1.5DEG +++ b/internal/test_unit/config/GridStatConfig_climo_FCST_NCEP_1.0DEG_OBS_WMO_1.5DEG @@ -284,8 +284,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = COS_LAT; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_climo_WMO b/internal/test_unit/config/GridStatConfig_climo_WMO index 739d122295..5e37820412 100644 --- a/internal/test_unit/config/GridStatConfig_climo_WMO +++ b/internal/test_unit/config/GridStatConfig_climo_WMO @@ -278,8 +278,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = COS_LAT; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_climo_prob b/internal/test_unit/config/GridStatConfig_climo_prob index 3f00164d86..a1d35ed9e2 100644 --- a/internal/test_unit/config/GridStatConfig_climo_prob +++ b/internal/test_unit/config/GridStatConfig_climo_prob @@ -288,8 +288,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = COS_LAT; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_climo_wrap_year b/internal/test_unit/config/GridStatConfig_climo_wrap_year index beacc6825d..d0a6296ac8 100644 --- a/internal/test_unit/config/GridStatConfig_climo_wrap_year +++ b/internal/test_unit/config/GridStatConfig_climo_wrap_year @@ -259,8 +259,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_fbias_perc_thresh b/internal/test_unit/config/GridStatConfig_fbias_perc_thresh index 9d9d544afb..cb8c1ba195 100644 --- a/internal/test_unit/config/GridStatConfig_fbias_perc_thresh +++ b/internal/test_unit/config/GridStatConfig_fbias_perc_thresh @@ -203,8 +203,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_fourier b/internal/test_unit/config/GridStatConfig_fourier index 3ec891b8dd..c1ae46bb99 100644 --- a/internal/test_unit/config/GridStatConfig_fourier +++ b/internal/test_unit/config/GridStatConfig_fourier @@ -243,8 +243,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_gen_ens_prod b/internal/test_unit/config/GridStatConfig_gen_ens_prod index 015ef3e946..653f178a52 100644 --- a/internal/test_unit/config/GridStatConfig_gen_ens_prod +++ b/internal/test_unit/config/GridStatConfig_gen_ens_prod @@ -278,8 +278,9 @@ ugrid_coordinates_file = ""; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_grid_weight b/internal/test_unit/config/GridStatConfig_grid_weight index 27b266dfa8..0ac9eb393c 100644 --- a/internal/test_unit/config/GridStatConfig_grid_weight +++ b/internal/test_unit/config/GridStatConfig_grid_weight @@ -228,8 +228,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = ${GRID_WEIGHT}; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_interp_shape b/internal/test_unit/config/GridStatConfig_interp_shape index ad250e9802..ac3179cf94 100644 --- a/internal/test_unit/config/GridStatConfig_interp_shape +++ b/internal/test_unit/config/GridStatConfig_interp_shape @@ -211,8 +211,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_mpr_thresh b/internal/test_unit/config/GridStatConfig_mpr_thresh index e99405be7a..54ea06965f 100644 --- a/internal/test_unit/config/GridStatConfig_mpr_thresh +++ b/internal/test_unit/config/GridStatConfig_mpr_thresh @@ -276,8 +276,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = COS_LAT; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_no_leap b/internal/test_unit/config/GridStatConfig_no_leap index 32d05b0862..f22c8e3008 100644 --- a/internal/test_unit/config/GridStatConfig_no_leap +++ b/internal/test_unit/config/GridStatConfig_no_leap @@ -217,8 +217,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_prob_as_scalar b/internal/test_unit/config/GridStatConfig_prob_as_scalar index 0d5bdd25cb..2b8b91a0c4 100644 --- a/internal/test_unit/config/GridStatConfig_prob_as_scalar +++ b/internal/test_unit/config/GridStatConfig_prob_as_scalar @@ -238,8 +238,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_python b/internal/test_unit/config/GridStatConfig_python index 7ca801748e..14021bd14d 100644 --- a/internal/test_unit/config/GridStatConfig_python +++ b/internal/test_unit/config/GridStatConfig_python @@ -218,8 +218,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "python"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "python"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_python_mixed b/internal/test_unit/config/GridStatConfig_python_mixed index 9a39bc9533..b4c9feff07 100644 --- a/internal/test_unit/config/GridStatConfig_python_mixed +++ b/internal/test_unit/config/GridStatConfig_python_mixed @@ -222,8 +222,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "python_mixed"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "python_mixed"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_rtma b/internal/test_unit/config/GridStatConfig_rtma index ddef797d2e..fea47945db 100644 --- a/internal/test_unit/config/GridStatConfig_rtma +++ b/internal/test_unit/config/GridStatConfig_rtma @@ -218,8 +218,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_rtma_perc_thresh b/internal/test_unit/config/GridStatConfig_rtma_perc_thresh index 44ed5f564f..f468a9d1ba 100644 --- a/internal/test_unit/config/GridStatConfig_rtma_perc_thresh +++ b/internal/test_unit/config/GridStatConfig_rtma_perc_thresh @@ -221,8 +221,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_st4 b/internal/test_unit/config/GridStatConfig_st4 index 71d165e98a..1a55fc2cca 100644 --- a/internal/test_unit/config/GridStatConfig_st4 +++ b/internal/test_unit/config/GridStatConfig_st4 @@ -222,8 +222,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_st4_censor b/internal/test_unit/config/GridStatConfig_st4_censor index e1e9adb1df..bfc90cad92 100644 --- a/internal/test_unit/config/GridStatConfig_st4_censor +++ b/internal/test_unit/config/GridStatConfig_st4_censor @@ -231,8 +231,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_ugrid_mpas b/internal/test_unit/config/GridStatConfig_ugrid_mpas index d54b25de53..e61b0c2611 100644 --- a/internal/test_unit/config/GridStatConfig_ugrid_mpas +++ b/internal/test_unit/config/GridStatConfig_ugrid_mpas @@ -255,8 +255,9 @@ ugrid_coordinates_file = "${MET_TEST_INPUT}/ugrid_data/mpas/static.40962_reduced //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/GridStatConfig_ugrid_mpas_diag b/internal/test_unit/config/GridStatConfig_ugrid_mpas_diag index 9e479d0302..0655fd1aa9 100644 --- a/internal/test_unit/config/GridStatConfig_ugrid_mpas_diag +++ b/internal/test_unit/config/GridStatConfig_ugrid_mpas_diag @@ -256,8 +256,9 @@ ugrid_coordinates_file = "${MET_TEST_INPUT}/ugrid_data/mpas/static.40962_reduced //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_APCP b/internal/test_unit/config/PointStatConfig_APCP index b1df56e94b..ca381a89d4 100644 --- a/internal/test_unit/config/PointStatConfig_APCP +++ b/internal/test_unit/config/PointStatConfig_APCP @@ -135,8 +135,11 @@ output_flag = { duplicate_flag = NONE; rank_corr_flag = FALSE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_APCP_HIRA b/internal/test_unit/config/PointStatConfig_APCP_HIRA index 3dc823a50b..4e965bd716 100644 --- a/internal/test_unit/config/PointStatConfig_APCP_HIRA +++ b/internal/test_unit/config/PointStatConfig_APCP_HIRA @@ -142,8 +142,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = FALSE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_GTG_latlon b/internal/test_unit/config/PointStatConfig_GTG_latlon index 17aba08c1f..ae84d237fd 100644 --- a/internal/test_unit/config/PointStatConfig_GTG_latlon +++ b/internal/test_unit/config/PointStatConfig_GTG_latlon @@ -161,8 +161,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_GTG_lc b/internal/test_unit/config/PointStatConfig_GTG_lc index d45c47f618..198a40dc2f 100644 --- a/internal/test_unit/config/PointStatConfig_GTG_lc +++ b/internal/test_unit/config/PointStatConfig_GTG_lc @@ -169,8 +169,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_INTERP_OPTS b/internal/test_unit/config/PointStatConfig_INTERP_OPTS index 43eb1f0708..e0e75a5b9b 100644 --- a/internal/test_unit/config/PointStatConfig_INTERP_OPTS +++ b/internal/test_unit/config/PointStatConfig_INTERP_OPTS @@ -152,8 +152,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = FALSE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK b/internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK index 48a04ed227..49cbf781dd 100644 --- a/internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK +++ b/internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK @@ -81,6 +81,8 @@ message_type_group_map = [ { key = "WATERSF"; val = "SFCSHP"; } ]; +obtype_as_group_val_flag = FALSE; + //////////////////////////////////////////////////////////////////////////////// climo_mean = fcst; @@ -192,8 +194,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_MASK_SID b/internal/test_unit/config/PointStatConfig_MASK_SID index a77a8f9008..253f7320a1 100644 --- a/internal/test_unit/config/PointStatConfig_MASK_SID +++ b/internal/test_unit/config/PointStatConfig_MASK_SID @@ -147,8 +147,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_MPR_OBTYPE b/internal/test_unit/config/PointStatConfig_MPR_OBTYPE new file mode 100644 index 0000000000..6aa68e9842 --- /dev/null +++ b/internal/test_unit/config/PointStatConfig_MPR_OBTYPE @@ -0,0 +1,166 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Point-Stat configuration file. +// +// For additional information, please see the MET User's Guide. +// +//////////////////////////////////////////////////////////////////////////////// + +model = "FCST"; + +// +// Output description to be written +// May be set separately in each "obs.field" entry +// +desc = "NA"; + +//////////////////////////////////////////////////////////////////////////////// + +regrid = { + to_grid = NONE; + method = NEAREST; + width = 1; +} + +//////////////////////////////////////////////////////////////////////////////// + +obs_window = { + beg = ${BEG_DS}; + end = ${END_DS}; +} + +//////////////////////////////////////////////////////////////////////////////// + +mpr_column = []; +mpr_thresh = []; +cnt_thresh = [ NA ]; +cnt_logic = UNION; +wind_thresh = [ NA ]; +wind_logic = UNION; +eclv_points = 0.05; + +// +// Mapping of message type group name to comma-separated list of values. +// +message_type_group_map = [ + { key = "SURFACE"; val = "ADPSFC,SFCSHP,MSONET"; }, + { key = "ANYAIR"; val = "AIRCAR,AIRCFT"; }, + { key = "ANYSFC"; val = "ADPSFC,SFCSHP,ADPUPA,PROFLR,MSONET"; }, + { key = "ONLYSF"; val = "ADPSFC,SFCSHP"; }, + { key = "LANDSF"; val = "ADPSFC,MSONET"; }, + { key = "WATERSF"; val = "SFCSHP"; } +]; + +obtype_as_group_val_flag = TRUE; + +fcst = { + sid_inc = []; + sid_exc = []; + obs_quality_inc = []; + obs_quality_exc = []; + + message_type = [ "SURFACE" ]; + + field = [ + { name = "TMP"; level = "Z2"; } + ]; + +} +obs = fcst; + +//////////////////////////////////////////////////////////////////////////////// + +climo_mean = fcst; +climo_mean = { + file_name = [ ${CLIMO_FILE} ]; +} + +//////////////////////////////////////////////////////////////////////////////// + +mask = { + grid = [ "FULL" ]; + poly = []; + sid = []; + llpnt = []; +} + +//////////////////////////////////////////////////////////////////////////////// + +ci_alpha = [ 0.05 ]; + +boot = { + interval = PCTILE; + rep_prop = 1.0; + n_rep = 200; + rng = "mt19937"; + seed = "1"; +} + +//////////////////////////////////////////////////////////////////////////////// + +interp = { + vld_thresh = 1.0; + + type = [ + { + method = NEAREST; + width = 1; + } + ]; +} + +//////////////////////////////////////////////////////////////////////////////// + +hira = { + flag = TRUE; + width = [ 3 ]; + vld_thresh = 1.0; + cov_thresh = [ ==0.25 ]; + shape = SQUARE; + prob_cat_thresh = [ >273 ]; +} + +//////////////////////////////////////////////////////////////////////////////// + +output_flag = { + fho = NONE; + ctc = NONE; + cts = NONE; + mctc = NONE; + mcts = NONE; + cnt = STAT; + sl1l2 = STAT; + sal1l2 = STAT; + vl1l2 = NONE; + val1l2 = NONE; + vcnt = NONE; + pct = STAT; + pstd = NONE; + pjc = NONE; + prc = NONE; + ecnt = STAT; + rps = NONE; + orank = STAT; + eclv = NONE; + mpr = STAT; + seeps = NONE; + seeps_mpr = NONE; +} + +//////////////////////////////////////////////////////////////////////////////// +// Threshold for SEEPS p1 (Probability of being dry) + +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + +duplicate_flag = NONE; +rank_corr_flag = TRUE; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; + +//////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_PHYS b/internal/test_unit/config/PointStatConfig_PHYS index 3c13262a71..6f3308f785 100644 --- a/internal/test_unit/config/PointStatConfig_PHYS +++ b/internal/test_unit/config/PointStatConfig_PHYS @@ -148,8 +148,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_PHYS_pint b/internal/test_unit/config/PointStatConfig_PHYS_pint index e246c570b3..f98f2e4102 100644 --- a/internal/test_unit/config/PointStatConfig_PHYS_pint +++ b/internal/test_unit/config/PointStatConfig_PHYS_pint @@ -143,8 +143,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_SEEPS b/internal/test_unit/config/PointStatConfig_SEEPS index 20ffa18cfb..cb7244311f 100644 --- a/internal/test_unit/config/PointStatConfig_SEEPS +++ b/internal/test_unit/config/PointStatConfig_SEEPS @@ -142,8 +142,11 @@ seeps_point_climo_name = "${SEEPS_POINT_CLIMO_NAME}"; duplicate_flag = NONE; rank_corr_flag = FALSE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_WINDS b/internal/test_unit/config/PointStatConfig_WINDS index 1c87273e89..4dac7fe51e 100644 --- a/internal/test_unit/config/PointStatConfig_WINDS +++ b/internal/test_unit/config/PointStatConfig_WINDS @@ -52,6 +52,8 @@ message_type_group_map = [ { key = "USERSF"; val = "ADPSFC,SFCSHP"; } ]; +obtype_as_group_val_flag = FALSE; + fcst = { sid_inc = []; sid_exc = []; @@ -163,8 +165,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_aeronet b/internal/test_unit/config/PointStatConfig_aeronet index fef6c9bb42..387a3c54a2 100644 --- a/internal/test_unit/config/PointStatConfig_aeronet +++ b/internal/test_unit/config/PointStatConfig_aeronet @@ -212,8 +212,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_airnow b/internal/test_unit/config/PointStatConfig_airnow index 4223455902..4e7cfe79ba 100644 --- a/internal/test_unit/config/PointStatConfig_airnow +++ b/internal/test_unit/config/PointStatConfig_airnow @@ -92,6 +92,8 @@ message_type_group_map = [ { key = "WATERSF"; val = "SFCSHP"; } ]; +obtype_as_group_val_flag = FALSE; + //////////////////////////////////////////////////////////////////////////////// // @@ -240,8 +242,10 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// -tmp_dir = "/tmp"; -output_prefix = ""; -version = "V12.0.0"; +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = ""; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_climo b/internal/test_unit/config/PointStatConfig_climo index d7f89b3cb0..d87ff87ca5 100644 --- a/internal/test_unit/config/PointStatConfig_climo +++ b/internal/test_unit/config/PointStatConfig_climo @@ -285,8 +285,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_climo_WMO b/internal/test_unit/config/PointStatConfig_climo_WMO index 01c3f9b3de..c34dc0989e 100644 --- a/internal/test_unit/config/PointStatConfig_climo_WMO +++ b/internal/test_unit/config/PointStatConfig_climo_WMO @@ -230,8 +230,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_climo_prob b/internal/test_unit/config/PointStatConfig_climo_prob index 364c1bfe73..b69812fae5 100644 --- a/internal/test_unit/config/PointStatConfig_climo_prob +++ b/internal/test_unit/config/PointStatConfig_climo_prob @@ -232,8 +232,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_dup b/internal/test_unit/config/PointStatConfig_dup index 8fad74b0e5..ff42a31eab 100644 --- a/internal/test_unit/config/PointStatConfig_dup +++ b/internal/test_unit/config/PointStatConfig_dup @@ -165,8 +165,11 @@ seeps_p1_thresh = NA; duplicate_flag = ${DUPLICATE_FLAG}; rank_corr_flag = FALSE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_mpr_thresh b/internal/test_unit/config/PointStatConfig_mpr_thresh index 675b0696c2..6b62a8df4f 100644 --- a/internal/test_unit/config/PointStatConfig_mpr_thresh +++ b/internal/test_unit/config/PointStatConfig_mpr_thresh @@ -224,8 +224,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_obs_summary b/internal/test_unit/config/PointStatConfig_obs_summary index a931ba6b21..dc5b55a67e 100644 --- a/internal/test_unit/config/PointStatConfig_obs_summary +++ b/internal/test_unit/config/PointStatConfig_obs_summary @@ -153,8 +153,11 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// rank_corr_flag = FALSE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_obs_summary_all b/internal/test_unit/config/PointStatConfig_obs_summary_all index 384e4ada19..e5bc4dcd7a 100644 --- a/internal/test_unit/config/PointStatConfig_obs_summary_all +++ b/internal/test_unit/config/PointStatConfig_obs_summary_all @@ -222,8 +222,11 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// rank_corr_flag = FALSE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_point_weight b/internal/test_unit/config/PointStatConfig_point_weight new file mode 100644 index 0000000000..4f9528e26e --- /dev/null +++ b/internal/test_unit/config/PointStatConfig_point_weight @@ -0,0 +1,145 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Point-Stat configuration file. +// +// For additional information, please see the MET User's Guide. +// +//////////////////////////////////////////////////////////////////////////////// + +model = "SREF"; + +// +// Output description to be written +// May be set separately in each "obs.field" entry +// +desc = "${DESC}"; + +//////////////////////////////////////////////////////////////////////////////// + +regrid = { + to_grid = NONE; + method = NEAREST; + width = 1; +} + +//////////////////////////////////////////////////////////////////////////////// + +obs_window = { + beg = -1800; + end = 1800; +} + +//////////////////////////////////////////////////////////////////////////////// + +mpr_column = []; +mpr_thresh = []; +cnt_thresh = [ NA ]; +cnt_logic = UNION; +wind_thresh = [ NA ]; +wind_logic = UNION; +eclv_points = 0.05; + +fcst = { + sid_inc = []; + sid_exc = []; + obs_quality_inc = []; + obs_quality_exc = []; + + field = [ + { name = "TMP"; level = "P850"; message_type = "ADPUPA"; cat_thresh = [ >273, >283 ]; }, + { name = "UGRD"; level = "P850"; message_type = "ADPUPA"; cat_thresh = [ >5 ]; }, + { name = "VGRD"; level = "P850"; message_type = "ADPUPA"; cat_thresh = [ >5 ]; } + ]; + +} +obs = fcst; + +//////////////////////////////////////////////////////////////////////////////// + +mask = { + grid = []; + poly = []; + sid = [ "${CONFIG_DIR}/SID_CONUS_ADPUPA_ELEV.txt" ]; + llpnt = []; +} + +//////////////////////////////////////////////////////////////////////////////// + +ci_alpha = [ 0.05 ]; + +boot = { + interval = PCTILE; + rep_prop = 1.0; + n_rep = 200; + rng = "mt19937"; + seed = "1"; +} + +//////////////////////////////////////////////////////////////////////////////// + +interp = { + vld_thresh = 1.0; + + type = [ + { + method = NEAREST; + width = 1; + } + ]; +} + +//////////////////////////////////////////////////////////////////////////////// + +hira = { + flag = FALSE; + width = [ 2, 3, 4, 5 ]; + vld_thresh = 1.0; + cov_thresh = [ ==0.25 ]; + shape = SQUARE; + prob_cat_thresh = []; +} + +//////////////////////////////////////////////////////////////////////////////// + +output_flag = { + fho = NONE; + ctc = STAT; + cts = STAT; + mctc = STAT; + mcts = STAT; + cnt = STAT; + sl1l2 = STAT; + sal1l2 = NONE; + vl1l2 = STAT; + val1l2 = NONE; + vcnt = STAT; + pct = NONE; + pstd = NONE; + pjc = NONE; + prc = NONE; + ecnt = NONE; + orank = NONE; + rps = NONE; + eclv = STAT; + mpr = STAT; + seeps = NONE; + seeps_mpr = NONE; +} + +//////////////////////////////////////////////////////////////////////////////// +// Threshold for SEEPS p1 (Probability of being dry) + +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + +duplicate_flag = NONE; +rank_corr_flag = TRUE; + +point_weight_flag = ${POINT_WEIGHT}; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; + +//////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_prob b/internal/test_unit/config/PointStatConfig_prob index ab8067a79e..e4149c7eff 100644 --- a/internal/test_unit/config/PointStatConfig_prob +++ b/internal/test_unit/config/PointStatConfig_prob @@ -150,8 +150,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = FALSE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_prob_point_weight b/internal/test_unit/config/PointStatConfig_prob_point_weight new file mode 100644 index 0000000000..f083cb8807 --- /dev/null +++ b/internal/test_unit/config/PointStatConfig_prob_point_weight @@ -0,0 +1,151 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Point-Stat configuration file. +// +// For additional information, please see the MET User's Guide. +// +//////////////////////////////////////////////////////////////////////////////// + +model = "SREF"; + +// +// Output description to be written +// May be set separately in each "obs.field" entry +// +desc = "${DESC}"; + +//////////////////////////////////////////////////////////////////////////////// + +regrid = { + to_grid = NONE; + method = NEAREST; + width = 1; +} + +//////////////////////////////////////////////////////////////////////////////// + +obs_window = { + beg = -1800; + end = 1800; +} + +//////////////////////////////////////////////////////////////////////////////// + +mpr_column = []; +mpr_thresh = []; +cnt_thresh = [ NA ]; +cnt_logic = UNION; +wind_thresh = [ NA ]; +wind_logic = UNION; +eclv_points = 0.05; + +fcst = { + sid_inc = []; + sid_exc = []; + obs_quality_inc = []; + obs_quality_exc = []; + + field = [ + { name = "PROB"; level = "P850"; + prob = { name = "TMP"; thresh_hi = 273; }; + cat_thresh = ==0.25; } + ]; + +} +obs = { + message_type = "ADPUPA"; + + field = [ + { name = "TMP"; level = "P850"; cat_thresh = <273; } + ]; +} + +//////////////////////////////////////////////////////////////////////////////// + +mask = { + grid = [ "FULL" ]; + poly = []; + sid = [ "${CONFIG_DIR}/SID_CONUS_ADPUPA_ELEV.txt" ]; + llpnt = []; +} + +//////////////////////////////////////////////////////////////////////////////// + +ci_alpha = [ 0.05 ]; + +boot = { + interval = PCTILE; + rep_prop = 1.0; + n_rep = 200; + rng = "mt19937"; + seed = "1"; +} + +//////////////////////////////////////////////////////////////////////////////// + +interp = { + vld_thresh = 1.0; + + type = [ + { + method = NEAREST; + width = 1; + } + ]; +} + +//////////////////////////////////////////////////////////////////////////////// + +hira = { + flag = FALSE; + width = [ 2, 3, 4, 5 ]; + vld_thresh = 1.0; + cov_thresh = [ ==0.25 ]; + shape = SQUARE; + prob_cat_thresh = []; +} + +//////////////////////////////////////////////////////////////////////////////// + +output_flag = { + fho = NONE; + ctc = NONE; + cts = NONE; + mctc = NONE; + mcts = NONE; + cnt = NONE; + sl1l2 = NONE; + sal1l2 = NONE; + vl1l2 = NONE; + val1l2 = NONE; + vcnt = NONE; + pct = STAT; + pstd = STAT; + pjc = STAT; + prc = STAT; + ecnt = NONE; + orank = NONE; + rps = NONE; + eclv = STAT; + mpr = STAT; + seeps = NONE; + seeps_mpr = NONE; +} + +//////////////////////////////////////////////////////////////////////////////// +// Threshold for SEEPS p1 (Probability of being dry) + +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + +duplicate_flag = NONE; +rank_corr_flag = TRUE; + +point_weight_flag = ${POINT_WEIGHT}; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; + +//////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_python b/internal/test_unit/config/PointStatConfig_python index 5116179451..3f56423d96 100644 --- a/internal/test_unit/config/PointStatConfig_python +++ b/internal/test_unit/config/PointStatConfig_python @@ -219,9 +219,12 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// rank_corr_flag = FALSE; -tmp_dir = "/tmp"; -output_prefix = ""; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = ""; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_qty_inc_exc b/internal/test_unit/config/PointStatConfig_qty_inc_exc index 1eab2b184c..2345684e7a 100644 --- a/internal/test_unit/config/PointStatConfig_qty_inc_exc +++ b/internal/test_unit/config/PointStatConfig_qty_inc_exc @@ -209,8 +209,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_sid_inc_exc b/internal/test_unit/config/PointStatConfig_sid_inc_exc index a586064f53..9ab93b7417 100644 --- a/internal/test_unit/config/PointStatConfig_sid_inc_exc +++ b/internal/test_unit/config/PointStatConfig_sid_inc_exc @@ -156,8 +156,11 @@ seeps_p1_thresh = NA; duplicate_flag = NONE; obs_summary = NEAREST; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_ugrid_mpas_diag b/internal/test_unit/config/PointStatConfig_ugrid_mpas_diag index 886c6bb301..3c1a4054a6 100644 --- a/internal/test_unit/config/PointStatConfig_ugrid_mpas_diag +++ b/internal/test_unit/config/PointStatConfig_ugrid_mpas_diag @@ -160,8 +160,11 @@ ugrid_coordinates_file = "${MET_TEST_INPUT}/ugrid_data/mpas/static.40962_reduced duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_ugrid_mpas_out b/internal/test_unit/config/PointStatConfig_ugrid_mpas_out index c16deb0f7d..dcb7afe613 100644 --- a/internal/test_unit/config/PointStatConfig_ugrid_mpas_out +++ b/internal/test_unit/config/PointStatConfig_ugrid_mpas_out @@ -160,8 +160,11 @@ ugrid_coordinates_file = "${MET_TEST_INPUT}/ugrid_data/mpas/static.40962_reduced duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_ugrid_no_dataset b/internal/test_unit/config/PointStatConfig_ugrid_no_dataset index 9c7c7f5b3a..2cc3296b6e 100644 --- a/internal/test_unit/config/PointStatConfig_ugrid_no_dataset +++ b/internal/test_unit/config/PointStatConfig_ugrid_no_dataset @@ -160,8 +160,11 @@ ugrid_coordinates_file = "${MET_TEST_INPUT}/ugrid_data/mpas/static.40962_reduced duplicate_flag = NONE; rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = "${OUTPUT_PREFIX}"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${OUTPUT_PREFIX}"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/SID_CONUS_ADPSFC_ELEV.txt b/internal/test_unit/config/SID_CONUS_ADPSFC_ELEV.txt new file mode 100644 index 0000000000..03da3d6060 --- /dev/null +++ b/internal/test_unit/config/SID_CONUS_ADPSFC_ELEV.txt @@ -0,0 +1,2109 @@ +SID_CONUS_ADPSFC_ELEV +1L2(47.07002) +3CLO3(2.57002) +AAT(1492.32002) +AATC1(318.82002) +ABCC1(1419.32002) +ABEW1(182.57002) +ABMC1(1426.07002) +ABNW1(281.32002) +ABRC1(1455.82002) +ABTM8(1348.82002) +ACLN2(1838.32002) +ACMC1(43.07002) +ACRI1(1771.07002) +ACRU1(2216.82002) +ACV(72.57002) +ADRC1(307.07002) +AFHA3(1553.32002) +AFMA3(1278.57002) +AFRA3(901.07002) +AFRC1(2086.07002) +AFRI1(1386.32002) +AFSC1(1455.82002) +AFSN2(2029.82002) +AGDO3(672.82002) +AGKO3(1514.82002) +AGPC1(2767.82002) +AGTQ1(910.82002) +AGWC1(638.57002) +AIDC1(0.57002) +AJGW1(193.32002) +AJO(306.57002) +AKEC1(1041.07002) +ALDC1(553.57002) +ALFO3(1569.32002) +ALKN2(1922.32002) +ALLN2(2004.57002) +ALMA3(563.07002) +ALPC1(671.32002) +ALRN2(1626.57002) +ALW(501.57002) +AMBC1(2004.07002) +ANAC1(106.82002) +ANDC1(494.82002) +ANEC1(654.07002) +ANIC1(0.070023) +ANRO3(1916.07002) +ANSO3(1711.57002) +APC(73.82002) +APDN2(926.07002) +APIC1(1453.57002) +APKC1(1460.07002) +APLC1(941.07002) +APSW1(457.32002) +APYC1(1361.82002) +ARAO3(55.07002) +ARAU1(1446.82002) +ARAW1(675.82002) +ARFO3(1248.07002) +ARGC1(384.82002) +ARKI1(1354.82002) +ASFA3(1807.57002) +ASHW1(944.82002) +ASMC1(354.32002) +ASRC1(655.07002) +AST(11.82002) +ASYU1(2478.82002) +ATAI1(2067.57002) +ATFO3(1461.07002) +ATHC1(1339.82002) +ATLC1(254.07002) +ATLI1(2289.32002) +ATNC1(1160.57002) +ATRC1(1088.57002) +ATSC1(1496.57002) +AUBW1(95.82002) +AURO3(67.07002) +AVLC1(1727.57002) +AVNC1(0.57002) +AVX(23.57002) +AZRQ1(1107.82002) +BAB(104.07002) +BABC1(1253.57002) +BADM8(1806.57002) +BADU1(1144.32002) +BAEI1(2204.57002) +BAFO3(1320.57002) +BAGA3(1147.82002) +BAJC1(600.82002) +BALO3(1239.32002) +BAMC1(456.57002) +BANM8(1254.32002) +BANO3(34.57002) +BARQ1(964.07002) +BARQ2(1466.57002) +BASC1(1137.82002) +BASI1(2203.57002) +BASQ1(829.32002) +BATN2(1573.32002) +BBBC1(1706.57002) +BBFO3(1239.57002) +BBRA3(1741.82002) +BBYC1(3.57002) +BCDO3(1545.82002) +BCDW1(145.07002) +BCFO3(1313.82002) +BCNC1(1598.32002) +BCRQ1(1161.32002) +BCYC1(1381.82002) +BDDA3(1294.07002) +BDFO3(319.82002) +BDMC1(1065.07002) +BDOC1(1834.82002) +BDYC1(733.32002) +BEAM8(2414.82002) +BEBC1(133.32002) +BEDO3(1542.32002) +BEFM8(1915.07002) +BENC1(242.07002) +BERN2(2213.82002) +BETC1(2246.57002) +BEUO3(1317.32002) +BEWO3(1178.07002) +BFL(183.07002) +BFRI1(1574.57002) +BFYI1(1079.32002) +BGBC1(981.32002) +BGCO3(1128.07002) +BGFO3(1380.57002) +BGRM8(1342.32002) +BGVC1(744.07002) +BHAU1(1401.07002) +BHNC1(270.32002) +BIEQ1(903.82002) +BIGN2(2094.82002) +BIH(1884.57002) +BIIC1(795.07002) +BIRQ2(1121.82002) +BISM8(1311.07002) +BKBW1(135.82002) +BKCU1(1996.82002) +BKE(1193.57002) +BKFN2(2023.82002) +BKFO3(612.32002) +BKGC1(1070.32002) +BKLC1(1314.82002) +BKRC1(2257.82002) +BKRN2(2023.82002) +BKSI1(1887.32002) +BKVN2(763.07002) +BLAO3(1066.32002) +BLBC1(80.32002) +BLBO3(551.07002) +BLCC1(2231.32002) +BLCN2(1699.57002) +BLDQ1(1185.07002) +BLEN2(1710.07002) +BLH(131.57002) +BLI(61.07002) +BLKM8(1868.32002) +BLKO3(1159.07002) +BLMC1(2163.07002) +BLOM8(2219.07002) +BLPO3(1740.57002) +BLRC1(284.07002) +BLSC1(1622.32002) +BLTM8(1135.32002) +BLTQ1(952.57002) +BLU(1381.82002) +BLUN2(1525.82002) +BMEC1(864.07002) +BMFW1(1183.82002) +BMOC1(1081.07002) +BMTC1(534.82002) +BMUC1(1538.57002) +BNCC1(186.57002) +BNCN2(1573.57002) +BNDC1(284.07002) +BNDO3(1178.07002) +BNDW1(615.07002) +BNFO3(421.32002) +BNGC1(211.57002) +BNKC1(1359.82002) +BNO(1369.82002) +BNRI1(2203.57002) +BNTC1(1001.07002) +BNVC1(422.32002) +BOCC1(2054.82002) +BOFO3(1183.07002) +BOGC1(1867.07002) +BOI(970.57002) +BOKO3(110.57002) +BOLC1(1569.82002) +BONO3(566.07002) +BOOM8(1316.82002) +BORO3(1760.32002) +BOUN2(609.57002) +BOWC1(1768.32002) +BPAW1(1158.32002) +BPFC1(1638.32002) +BPKC1(1700.32002) +BPKN2(2249.82002) +BPMC1(1700.32002) +BPNC1(1378.82002) +BPOC1(2480.07002) +BQFO3(1635.57002) +BRAQ2(1663.07002) +BRBI1(1671.57002) +BRCN2(2287.57002) +BRCQ1(2131.82002) +BRDC1(335.82002) +BRHC1(711.32002) +BRLM8(2082.57002) +BRLN2(1719.82002) +BRMO3(1136.32002) +BRNQ1(820.32002) +BROC1(846.82002) +BROQ1(1142.57002) +BRRC1(643.32002) +BRRI1(1818.57002) +BRRM8(2132.82002) +BRUO3(331.82002) +BRWC1(85.57002) +BSCM8(1981.57002) +BSCN2(1305.07002) +BSDI1(1268.82002) +BSNC1(1460.07002) +BSPM8(1931.32002) +BSTU1(1783.57002) +BTFO3(1261.82002) +BTM(1918.32002) +BTRC1(1249.82002) +BTRI1(1875.57002) +BTTC1(54.32002) +BTYO3(1454.82002) +BUBC1(186.57002) +BUCO3(1200.57002) +BUCW1(409.32002) +BUFC1(1499.32002) +BUFN2(1468.32002) +BUFO3(856.07002) +BUGC1(1181.07002) +BULI1(1830.82002) +BULO3(890.32002) +BULQ1(1326.82002) +BULQ2(1297.07002) +BUMC1(1001.07002) +BUO(1001.07002) +BUPC1(1314.82002) +BUR(400.32002) +BUSW1(695.82002) +BVAQ1(852.82002) +BVDC1(1053.82002) +BVLQ1(1408.32002) +BVRC1(167.32002) +BVRO3(1345.32002) +BWFO3(1433.32002) +BWSO3(1555.82002) +BWSQ1(2318.82002) +BYCU1(2325.07002) +BYFO3(1374.57002) +BYI(1307.82002) +BZRC1(941.57002) +CAEC1(379.32002) +CAFO3(1428.07002) +CAHC1(611.32002) +CALU1(1709.82002) +CAMI1(1163.32002) +CANO3(129.07002) +CAPC1(352.57002) +CAPN2(1838.32002) +CASN2(1044.32002) +CATN2(1799.82002) +CAWN2(615.57002) +CAZC1(779.32002) +CBFI1(2468.07002) +CBRA3(206.57002) +CBUC1(1715.57002) +CCCC1(794.57002) +CCCQ1(1301.57002) +CCDI1(1551.82002) +CCEC1(804.07002) +CCEN2(637.82002) +CCHC1(402.07002) +CCR(86.07002) +CCRN2(1826.32002) +CCRO3(180.57002) +CCUN2(1877.57002) +CCZC1(123.32002) +CDAW1(717.32002) +CDCU1(2042.07002) +CDEC1(1110.57002) +CDGC1(561.32002) +CDLC1(463.32002) +CDMU1(1612.57002) +CEC(62.82002) +CECU1(2011.82002) +CEDN2(2100.57002) +CEDW1(575.82002) +CEEC1(295.07002) +CEFO3(1330.32002) +CEKC1(856.57002) +CENW1(145.07002) +CESC1(1699.82002) +CFCC1(1585.82002) +CFRC1(1483.32002) +CFWC1(85.57002) +CGDN2(1001.82002) +CGFO3(1276.82002) +CGFW1(859.57002) +CGVC1(2744.57002) +CGWO3(843.57002) +CHAC1(1432.82002) +CHEA3(1392.82002) +CHFQ1(1614.82002) +CHMC1(1823.82002) +CHMQ1(979.32002) +CHMQ2(824.82002) +CHOC1(1318.57002) +CHPQ1(1568.32002) +CHRI1(2024.07002) +CHRO3(208.32002) +CHSN2(2178.57002) +CHTC1(396.07002) +CHUM8(1922.32002) +CHWC1(611.32002) +CICC1(88.07002) +CIFO3(1533.82002) +CINW1(473.07002) +CISC1(1050.07002) +CJAW1(596.82002) +CLBC1(1135.82002) +CLFC1(568.07002) +CLFO3(1475.07002) +CLFU1(1752.82002) +CLHC1(380.82002) +CLKI1(1165.32002) +CLKO3(1197.07002) +CLLC1(153.07002) +CLLO3(1136.57002) +CLM(432.57002) +CLNC1(1473.32002) +CLSC1(-0.42998) +CLSW1(152.82002) +CLVM8(2188.07002) +CMA(58.32002) +CMAC1(69.82002) +CMBM8(1785.32002) +CMFW1(1133.07002) +CMNC1(1096.07002) +CMOC1(1000.82002) +CMPQ1(1745.82002) +CMVC1(1215.57002) +CNAC1(353.57002) +CNFC1(1453.82002) +CNFO3(262.32002) +CNGC1(488.82002) +CNIC1(605.07002) +CNJC1(153.07002) +CNO(269.82002) +CNSC1(1094.32002) +CNYC1(1463.32002) +COCC1(244.57002) +CODC1(494.82002) +COE(828.07002) +COEC1(494.82002) +COGC1(581.07002) +COIN2(2005.82002) +COKC1(1728.32002) +COLO3(1365.82002) +COMN2(2082.82002) +CONM8(1755.32002) +COPM8(1864.32002) +COVC1(989.32002) +COWC1(548.07002) +COXQ1(1930.57002) +COYN2(1868.07002) +COZI1(1938.32002) +CPCM8(1809.32002) +CPFO3(1733.57002) +CPLC1(2317.32002) +CPPW1(1380.57002) +CPWA3(1660.57002) +CQFO3(1421.57002) +CQLQ2(504.07002) +CQT(87.82002) +CRAQ1(842.07002) +CRCA3(1752.32002) +CRCW1(958.32002) +CRGC1(53.57002) +CRIC1(217.07002) +CRKI1(990.82002) +CRLC1(2654.82002) +CRLO3(1711.57002) +CRMI1(1867.82002) +CROQ1(1719.07002) +CRQ(29.32002) +CRSN2(1843.32002) +CRTI1(1867.82002) +CRVC1(2594.82002) +CRVO3(95.57002) +CRWA3(308.32002) +CRWC1(1561.07002) +CRWW1(145.07002) +CRXC1(99.07002) +CRYN2(653.57002) +CRZC1(1197.82002) +CSCI1(1635.57002) +CSCO3(1553.07002) +CSDI1(1635.57002) +CSFO3(1464.32002) +CSHW1(236.32002) +CSMC1(538.32002) +CSTC1(583.57002) +CSTO3(1574.82002) +CSUC1(446.57002) +CSVC1(410.07002) +CSWC1(1238.32002) +CSXC1(783.32002) +CSZC1(1587.82002) +CTB(1155.57002) +CTLN2(2114.07002) +CTNC1(879.32002) +CTOC1(149.32002) +CUGW1(699.82002) +CUMW1(674.32002) +CUTQ1(2228.57002) +CUUC1(1457.57002) +CVAC1(38.32002) +CVBC1(335.07002) +CVFO3(671.82002) +CVSC1(1020.32002) +CVSO3(161.57002) +CWFO3(1326.07002) +CWSN2(587.32002) +CWXW1(575.82002) +CXCC1(67.57002) +CYAC1(988.32002) +CYFI1(1494.07002) +CYFW1(555.57002) +CYMC1(875.32002) +CYOC1(410.07002) +CYVC1(1786.82002) +CZFO3(1790.57002) +CZZ(971.07002) +DACC1(559.07002) +DAG(774.07002) +DALM8(1921.32002) +DANO3(1310.82002) +DARW1(786.57002) +DBCQ2(1799.57002) +DBLC1(572.32002) +DCCW1(817.32002) +DCEN2(692.07002) +DCKN2(587.32002) +DCRM8(1575.07002) +DCUC1(303.07002) +DCWC1(85.57002) +DDWC1(462.57002) +DEAI1(977.07002) +DECC1(1031.07002) +DEDN2(1336.82002) +DEEM8(1716.82002) +DEFO3(828.32002) +DEHI1(1377.57002) +DEIC1(683.07002) +DEMC1(1070.32002) +DENC1(1013.07002) +DERM8(1780.07002) +DESC1(734.07002) +DESN2(1602.57002) +DEVC1(539.32002) +DEW(710.32002) +DGFC1(1118.82002) +DGRC1(291.82002) +DHDI1(2190.07002) +DHLM8(2060.57002) +DIAO3(1643.32002) +DIDN2(926.07002) +DIVM8(2339.57002) +DIXO3(126.07002) +DKFC1(1050.07002) +DKYC1(2509.57002) +DLBQ1(1262.82002) +DLCC1(1732.57002) +DLN(1711.07002) +DLS(362.07002) +DLTU1(1439.82002) +DLVC1(476.57002) +DMLC1(1737.07002) +DMRA3(1642.32002) +DNPC1(1544.57002) +DNRC1(2091.32002) +DNVC1(1511.57002) +DOGC1(1949.07002) +DOGQ1(1956.32002) +DOTW1(284.57002) +DOUW1(740.82002) +DPHC1(1381.82002) +DPKI1(1763.82002) +DPSA3(1472.07002) +DPYM8(1611.07002) +DRBM8(1755.57002) +DRBN2(2007.57002) +DRCN2(2111.07002) +DRYN2(1809.07002) +DRYW1(987.57002) +DSNC1(117.32002) +DUCC1(1508.57002) +DUCN2(692.07002) +DUDC1(864.07002) +DUIC1(1047.07002) +DUNO3(119.32002) +DVLO3(246.82002) +DVOC1(984.07002) +DVRC1(159.07002) +DVSC1(1766.07002) +DVT(476.32002) +DWAI1(818.82002) +DWRN2(1586.57002) +DYCN2(1777.32002) +DYLC1(1555.82002) +DYNN2(2159.32002) +EACQ2(1800.57002) +EAT(754.32002) +EBTC1(2394.32002) +ECHO3(209.32002) +ECKC1(832.82002) +ECSC1(556.82002) +EDOC1(433.32002) +EDW(732.32002) +EED(351.57002) +EELC1(989.32002) +EEPC1(1286.82002) +EGCC1(1578.82002) +EGKO3(213.32002) +EGLC1(520.07002) +EIMO3(1608.07002) +EKA(127.82002) +EKAN2(2042.07002) +EKO(1704.82002) +EKRI1(945.07002) +ELBI1(1045.57002) +ELCC1(-20.17998) +ELDA3(726.82002) +ELEW1(714.57002) +ELJC1(176.82002) +ELKC1(879.57002) +ELKQ2(858.32002) +ELN(835.07002) +ELRN2(2205.07002) +ELRQ1(1547.82002) +ELSQ2(659.07002) +ELXC1(43.32002) +ELY(2205.07002) +EMCM8(1324.32002) +EMFO3(1388.57002) +EMIO3(1200.57002) +EMRC1(897.32002) +EMTI1(945.32002) +ENCQ1(829.07002) +ENCW1(409.32002) +ENFO3(1243.32002) +ENMW1(259.07002) +ENTU1(1798.57002) +ENUW1(409.32002) +ENV(1440.82002) +ENVI1(1047.82002) +EORC1(552.82002) +EPH(429.82002) +EPKC1(628.32002) +ERAW1(740.57002) +ERCC1(422.07002) +ESCC1(258.32002) +ESEC1(514.57002) +ESOC1(258.32002) +ESPC1(822.07002) +ESRC1(348.07002) +EUG(165.07002) +EUL(728.57002) +EURM8(1327.32002) +EVAQ1(2190.32002) +EVFO3(699.57002) +EXQC1(242.82002) +EZRI1(2087.07002) +FADO3(378.07002) +FAFI1(1604.07002) +FAFO3(1193.57002) +FALN2(1196.82002) +FALQ1(1641.57002) +FAT(74.32002) +FBOC1(450.82002) +FBSC1(814.82002) +FCHC1(311.57002) +FCKO3(1761.57002) +FCRM8(2060.07002) +FEFO3(964.57002) +FERI1(1202.57002) +FFFO3(1454.82002) +FFXW1(695.82002) +FGFO3(1512.32002) +FGMC1(514.32002) +FGRC1(781.07002) +FHCC1(117.57002) +FHDC1(1733.32002) +FHFI1(1408.07002) +FHLC1(448.82002) +FHR(6.07002) +FIFW1(567.82002) +FINQ1(820.57002) +FISN2(1825.82002) +FISO3(1361.07002) +FISW1(1437.07002) +FKFO3(1401.57002) +FLAC1(1773.82002) +FLEI1(2262.57002) +FLFC1(2136.07002) +FLFI1(1594.57002) +FLFO3(1524.32002) +FMFO3(1386.82002) +FMLQR(968.57002) +FMNQ1(1929.57002) +FMOC1(1062.82002) +FMRC1(1406.57002) +FNWC1(1011.57002) +FNWO3(161.57002) +FNXA3(374.82002) +FOGO3(258.07002) +FOIC1(2086.07002) +FOSO3(385.57002) +FOXN2(1742.32002) +FPRO3(178.07002) +FPWU1(1060.82002) +FRAW1(281.07002) +FRCC1(216.07002) +FRCW1(1004.32002) +FRGC1(47.57002) +FRHM8(1917.32002) +FRIC1(238.32002) +FRIW1(259.07002) +FRKW1(197.07002) +FRLO3(1545.82002) +FRMM8(1202.57002) +FRSO3(145.82002) +FRTC1(1140.57002) +FSHC1(1180.82002) +FSLC1(140.82002) +FSNC1(56.82002) +FSSO3(238.07002) +FTAW1(817.82002) +FTDC1(204.32002) +FTFW1(961.32002) +FTMM8(1759.57002) +FTNC1(581.82002) +FTSC1(607.57002) +FUL(27.07002) +FVVN2(1477.82002) +FWFW1(1071.32002) +FWNN2(653.57002) +FWSC1(1706.57002) +FWSN2(653.57002) +FZWA3(1881.82002) +GAAM8(1989.57002) +GALN2(2015.32002) +GARI1(2175.07002) +GARW1(817.82002) +GASC1(486.57002) +GASO3(190.82002) +GAVI1(1554.57002) +GBDA3(282.57002) +GBRC1(870.32002) +GCAW1(668.57002) +GCDC1(493.82002) +GCHA3(1354.82002) +GCKQ1(1783.82002) +GCN(1863.82002) +GCRA3(1672.57002) +GDFO3(1022.82002) +GDLC1(1788.82002) +GDPN2(1100.07002) +GDRO3(356.07002) +GDRQ2(730.82002) +GDTA3(143.32002) +GDTC1(142.57002) +GECU1(1945.57002) +GEG(700.82002) +GEOC1(810.32002) +GERW1(349.32002) +GGDA3(300.07002) +GGRC1(418.07002) +GHDQ1(1684.07002) +GHFW1(883.57002) +GILO3(1089.82002) +GISC1(960.07002) +GKSC1(1508.57002) +GLAW1(930.32002) +GLDO3(1668.32002) +GLEQ1(898.82002) +GLFM8(1308.82002) +GLNI1(2600.32002) +GLSI1(2600.32002) +GMFW1(906.57002) +GMTC1(880.82002) +GNFC1(2143.82002) +GNLC1(2143.57002) +GNLW1(768.07002) +GNNC1(1126.07002) +GNSC1(265.82002) +GNTC1(1113.07002) +GODW1(1157.57002) +GOLW1(483.07002) +GOSC1(760.57002) +GOYC1(241.57002) +GPEN2(2015.32002) +GPFO3(212.57002) +GPI(1061.32002) +GPRM8(1772.82002) +GQEC1(486.57002) +GRBO3(1554.32002) +GRCA3(1672.57002) +GRCM8(1621.32002) +GRCW1(1108.07002) +GRFW1(734.07002) +GRHC1(348.07002) +GRMO3(140.57002) +GRNQ2(1708.57002) +GRNW1(1081.57002) +GROQ2(1410.57002) +GRRC1(1461.82002) +GRSC1(1757.32002) +GRSI1(2191.32002) +GRVN2(2024.07002) +GRWA3(1651.32002) +GRZO3(1067.32002) +GSFO3(1336.07002) +GSGN2(1310.82002) +GSKI1(1861.57002) +GSNM8(1719.07002) +GSPC1(745.82002) +GSTC1(36.07002) +GSTO3(1554.32002) +GSVC1(770.07002) +GTCC1(167.32002) +GTMC1(1137.82002) +GTOC1(475.32002) +GTOM8(1825.82002) +GVPC1(1070.32002) +GVYC1(2090.07002) +GWFW1(1146.57002) +GWWW1(349.32002) +GZFC1(1009.07002) +HABC1(1530.57002) +HAIC1(607.07002) +HAMA3(639.82002) +HANM8(1377.82002) +HATC1(1158.32002) +HAWM8(1442.32002) +HAYI1(828.07002) +HBFI1(1452.32002) +HBRC1(1777.82002) +HCNC1(1646.57002) +HCPC1(442.57002) +HCTC1(349.32002) +HDLC1(944.32002) +HDLI1(1332.32002) +HDZC1(740.07002) +HEMI1(1238.32002) +HESC1(1060.07002) +HFLC1(1041.07002) +HGFW1(1036.82002) +HHAI1(1963.07002) +HHDW1(674.32002) +HHFO3(975.07002) +HHR(13.32002) +HIBW1(791.07002) +HIDC1(187.07002) +HIMN2(2010.07002) +HIO(145.82002) +HIRO3(1172.07002) +HJO(58.82002) +HKFW1(284.57002) +HLCC1(1023.07002) +HLKC1(1656.32002) +HLLC1(1773.07002) +HLMO3(879.57002) +HLTI1(2393.82002) +HMGC1(1545.57002) +HMS(255.82002) +HNAO3(677.82002) +HNBO3(898.32002) +HNDO3(898.32002) +HNEO3(734.32002) +HNFO3(968.32002) +HNGC1(856.57002) +HNGO3(734.32002) +HNHO3(968.32002) +HNIO3(968.32002) +HNJO3(1185.82002) +HNSW1(259.07002) +HNTC1(1770.07002) +HNYM8(1181.07002) +HOAC1(830.57002) +HODO3(485.82002) +HOHU1(1687.57002) +HOMI1(758.07002) +HONC1(357.57002) +HOOM8(1596.32002) +HOTM8(1151.32002) +HOTN2(1305.57002) +HOWO3(1421.07002) +HOXO3(485.82002) +HPDC1(524.57002) +HPEC1(220.07002) +HPFI1(2544.07002) +HPRC1(803.32002) +HPRO3(898.32002) +HPWO3(1365.07002) +HQM(44.57002) +HQSI1(1016.57002) +HRHW1(351.32002) +HRI(212.57002) +HRLO3(1512.82002) +HRWM8(1348.32002) +HRZC1(664.57002) +HSEC1(331.07002) +HSFO3(763.82002) +HSGC1(819.07002) +HSKO3(341.57002) +HSPC1(67.57002) +HSQC1(2740.07002) +HTRC1(1377.07002) +HTSC1(1022.32002) +HUFW1(300.07002) +HUGI1(1369.57002) +HUSQ1(896.82002) +HUZI1(1748.57002) +HVSA3(312.32002) +HWCI1(1637.57002) +HWD(103.32002) +HWKC1(377.07002) +HWRW1(389.07002) +HYFC1(1034.57002) +HYFO3(900.82002) +HYNI1(2486.07002) +HYSC1(1879.57002) +ICKC1(2047.32002) +ICPC1(2047.32002) +IDA(1494.82002) +IDAC1(818.57002) +IDKC1(1357.82002) +IDOC1(338.32002) +IDPC1(2203.32002) +IDWC1(1406.82002) +IGM(1229.82002) +ILLQ2(1445.32002) +IMHO3(1278.07002) +IMTW1(1231.07002) +IMWN2(1889.82002) +INDI1(1864.32002) +INTC1(1166.57002) +IPL(-25.67998) +IPLC1(38.32002) +IRFO3(1380.82002) +ISPQ1(896.57002) +ISWC1(484.82002) +IWLC1(1068.57002) +IZA(402.07002) +JAPN2(2033.32002) +JBGC1(508.57002) +JBLC1(434.57002) +JCUN2(2033.32002) +JEAN2(1075.07002) +JER(1144.57002) +JESN2(1130.32002) +JETM8(1021.82002) +JKPI1(1925.07002) +JLNQ2(826.07002) +JNLC1(661.32002) +JOJO3(961.57002) +JPRC1(1704.82002) +JRFO3(1395.32002) +JRHQ1(1699.32002) +JRMA3(1379.07002) +JRMI1(1081.32002) +JSDC1(810.32002) +JSNC1(1564.32002) +JSPN2(1723.57002) +JSPU1(1827.07002) +JTAC1(1461.07002) +JUFW1(205.57002) +JULC1(1065.82002) +JUMQ2(654.32002) +JWBC1(1297.32002) +KADW1(1063.82002) +KBFO3(1309.07002) +KBNC1(1290.82002) +KCFW1(640.32002) +KCPC1(701.57002) +KCYC1(286.57002) +KEDW1(1140.82002) +KEEO3(1425.57002) +KELC1(575.07002) +KESC1(363.57002) +KFAW1(840.82002) +KFLW1(840.82002) +KIMO3(733.57002) +KLS(195.57002) +KMFW1(632.32002) +KMRO3(1515.32002) +KNNC1(454.82002) +KNSN2(1484.32002) +KNWC1(1179.32002) +KOSW1(645.07002) +KRCI1(1881.07002) +KRCM8(1661.07002) +KRKC1(1640.57002) +KRNC1(1508.07002) +KRTC1(1457.57002) +KSPC1(2283.07002) +KTLC1(230.07002) +KTLW1(840.82002) +KTTC1(109.57002) +KUSW1(770.82002) +KYCN2(1758.32002) +L13(11.32002) +LADN2(2014.07002) +LAFC1(1670.07002) +LAFN2(552.32002) +LAGC1(25.07002) +LAGO3(1095.32002) +LAHC1(179.82002) +LALN2(552.32002) +LAS(692.07002) +LAX(47.07002) +LAYC1(596.32002) +LBBM8(1124.32002) +LBCO3(935.57002) +LBDC1(129.82002) +LBFO3(1413.07002) +LBIC1(8.07002) +LBRW1(470.32002) +LCBC1(35.82002) +LCFW1(1113.57002) +LCHN2(1818.57002) +LDOI1(2287.57002) +LDRC1(1432.07002) +LDWM8(1151.82002) +LEBC1(1355.07002) +LECW1(954.82002) +LEFW1(946.07002) +LEGC1(459.07002) +LEGW1(201.32002) +LENN2(2023.82002) +LESQ1(2054.32002) +LEXC1(313.57002) +LFDQ1(892.07002) +LFRM8(1132.57002) +LGB(2.32002) +LGD(1105.82002) +LGFO3(698.32002) +LGRC1(207.32002) +LGWN2(535.07002) +LHCA3(428.57002) +LIBM8(1118.57002) +LICC1(72.32002) +LIDW1(446.32002) +LIMQ1(1592.32002) +LINM8(1754.82002) +LINQR(919.57002) +LKCC1(410.07002) +LKCO3(1706.32002) +LKN(1704.82002) +LKNC1(1292.07002) +LKSO3(615.07002) +LKTI1(1369.57002) +LKWA3(1426.57002) +LLEC1(931.32002) +LLFW1(1055.82002) +LLJ(2024.07002) +LMCN2(1746.57002) +LMCO3(1680.82002) +LMDN2(1001.82002) +LMDO3(996.07002) +LMHM8(2112.32002) +LMLN2(2125.57002) +LMRM8(2148.82002) +LMRN2(1001.82002) +LMT(1346.82002) +LNBW1(353.82002) +LNCM8(1754.82002) +LOAC1(201.07002) +LOBC1(2497.82002) +LOFO3(259.07002) +LOIN2(1958.82002) +LOKC1(1494.57002) +LOL(1286.07002) +LONN2(1940.82002) +LOSC1(129.82002) +LOSO3(865.32002) +LPAC1(153.07002) +LPC(152.07002) +LPDC1(981.07002) +LPFI1(1852.57002) +LPOC1(624.82002) +LPOW1(865.32002) +LPRC1(620.32002) +LPRU1(1974.32002) +LPSI1(1735.57002) +LPSW1(1075.32002) +LPTC1(1507.82002) +LPWO3(509.32002) +LPZC1(639.07002) +LRCM8(1755.57002) +LRLC1(889.32002) +LRRM8(2199.82002) +LSFW1(954.82002) +LSGC1(312.82002) +LSHC1(735.07002) +LSLC1(327.57002) +LSNC1(1249.82002) +LSPC1(1715.57002) +LSRC1(150.07002) +LSTC1(1126.07002) +LSV(704.82002) +LTAI1(1554.57002) +LTHC1(1029.07002) +LTJC1(605.07002) +LTLC1(984.07002) +LTRC1(205.82002) +LUBM8(1436.32002) +LUFI1(1109.57002) +LUKO3(1197.57002) +LUNN2(2077.82002) +LVGQ1(1881.07002) +LVK(246.82002) +LVMC1(165.32002) +LVPN2(587.32002) +LVTC1(2722.57002) +LVYN2(1973.32002) +LWDC1(422.07002) +LWDI1(2604.32002) +LWNW1(1214.07002) +LWS(597.82002) +MADC1(1039.57002) +MAE(86.57002) +MAEC1(487.57002) +MAFC1(236.57002) +MAMC1(2671.82002) +MANM8(1812.57002) +MANW1(809.32002) +MAPC1(603.57002) +MARW1(824.32002) +MAYI1(1925.32002) +MBBC1(951.57002) +MBCA3(628.07002) +MBCC1(123.32002) +MBMW1(824.32002) +MBUC1(129.07002) +MCCC1(1347.07002) +MCDO3(1538.82002) +MCDW1(261.82002) +MCE(40.57002) +MCFC1(1017.57002) +MCGC1(274.32002) +MCGN2(2217.32002) +MCKI1(1136.07002) +MCPA3(1150.57002) +MCUC1(1081.57002) +MDAC1(222.57002) +MDDC1(939.57002) +MDFI1(1785.07002) +MDFO3(636.82002) +MDHC1(1317.82002) +MDLA3(1073.32002) +MDLI1(2400.07002) +MDMI1(1306.57002) +MDRW1(709.07002) +MEAA3(1087.32002) +MEEC1(71.82002) +MEFO3(1123.32002) +MEFW1(1219.82002) +MFDU1(1857.07002) +MFDW1(222.32002) +MFLC1(1031.07002) +MFR(531.82002) +MGCA3(628.07002) +MGFO3(1204.32002) +MGMI1(1857.82002) +MGSW1(872.07002) +MHBC1(93.32002) +MHEC1(502.32002) +MHLA3(1162.57002) +MHMC1(589.82002) +MHS(1579.32002) +MHSI1(1858.32002) +MHSW1(1033.07002) +MHV(854.07002) +MHWO3(1816.07002) +MHYC1(2135.57002) +MIAC1(1017.57002) +MIDI1(2081.82002) +MIDW1(709.07002) +MIGC1(157.57002) +MILW1(799.07002) +MIPW1(148.07002) +MISI1(966.07002) +MITW1(730.57002) +MJBN2(1472.57002) +MJCC1(875.07002) +MKBI1(2332.07002) +MKEC1(2179.57002) +MKZO3(1345.32002) +MLCC1(1154.32002) +MLFO3(565.57002) +MLGC1(1052.82002) +MLHN2(776.32002) +MLKI1(2356.57002) +MLLO3(256.57002) +MLNC1(1052.82002) +MLP(1392.82002) +MMCW1(824.32002) +MMFO3(708.57002) +MMIA3(402.07002) +MMKC1(1335.32002) +MMRO3(708.82002) +MMTA3(1073.32002) +MMTC1(2246.82002) +MMV(79.82002) +MMWA3(572.82002) +MNAC1(1603.32002) +MNCC1(1230.07002) +MNCN2(2014.07002) +MNGC1(1483.32002) +MNHC1(1819.57002) +MNLC1(1124.07002) +MNNA3(1347.82002) +MNRN2(2015.32002) +MNSI1(2367.32002) +MNTN2(1659.07002) +MOAN2(703.07002) +MOD(14.07002) +MOFI1(1656.57002) +MOGN2(1805.82002) +MOIC1(377.82002) +MOKI1(2017.07002) +MOLC1(541.32002) +MOMN2(2123.57002) +MORN2(1633.07002) +MORQ1(846.32002) +MOSI1(866.32002) +MOSO3(1423.32002) +MOUC1(903.32002) +MOWC1(1625.32002) +MPEC1(76.82002) +MPLO3(203.57002) +MPOC1(535.82002) +MPSW1(1021.32002) +MRDC1(1483.32002) +MRFO3(1228.32002) +MRGI1(2231.57002) +MRIC1(535.82002) +MRKI1(1647.32002) +MRLN2(1973.32002) +MRNC1(422.07002) +MRSC1(452.57002) +MRSO3(747.07002) +MRWA3(470.07002) +MRY(19.57002) +MRYM8(1764.57002) +MRYN2(1185.82002) +MSAC1(1579.32002) +MSCI1(878.82002) +MSEC1(244.07002) +MSFO3(1358.07002) +MSJC1(1107.32002) +MSLQ1(1013.07002) +MSO(1372.82002) +MSPM8(1311.07002) +MSQN2(855.07002) +MSRC1(1579.32002) +MSRU1(1816.32002) +MSVA3(572.82002) +MSYC1(1090.82002) +MTAW1(874.07002) +MTCW1(897.57002) +MTHI1(833.07002) +MTHN2(2139.82002) +MTHO3(1177.57002) +MTIC1(377.82002) +MTKM8(1922.32002) +MTMC1(188.07002) +MTMI1(1739.32002) +MTQC1(840.57002) +MTR(19.57002) +MTRO3(1187.32002) +MTSC1(2103.32002) +MTSN2(1341.82002) +MTTC1(2090.07002) +MTZC1(600.32002) +MUDC1(981.32002) +MUDW1(171.82002) +MULM8(2247.82002) +MUO(833.07002) +MVDC1(1233.07002) +MVDN2(1712.82002) +MVEW1(100.32002) +MVLC1(1376.82002) +MWH(392.82002) +MWSA3(783.07002) +MYF(76.82002) +MYL(1746.07002) +MYMA3(321.07002) +MYRC1(2228.07002) +MYRI1(1217.57002) +MYV(22.32002) +MZTC1(1625.32002) +NADC1(168.82002) +NAPC1(254.07002) +NBKO3(318.32002) +NBRC1(75.07002) +NCKC1(1016.07002) +NCLO3(1594.32002) +NCSW1(1115.07002) +NEFW1(766.57002) +NEIQ1(1161.57002) +NFEM8(1524.82002) +NFFI1(2566.57002) +NFFW1(213.82002) +NFJM8(1673.32002) +NFKC1(1544.57002) +NFL(1250.57002) +NFRC1(854.57002) +NFRO3(698.32002) +NHPC1(446.57002) +NHRU1(1995.32002) +NID(850.07002) +NINM8(1348.82002) +NIPC1(384.82002) +NISW1(944.82002) +NKSW1(61.07002) +NKX(76.82002) +NLC(50.57002) +NLSC1(791.57002) +NLSN2(575.82002) +NMPI1(809.82002) +NMSC1(342.57002) +NOIM8(1320.82002) +NPFO3(798.07002) +NPXC1(1180.57002) +NRAC1(100.82002) +NRDC1(1031.82002) +NRKW1(173.57002) +NTCC1(562.82002) +NTDN2(1618.82002) +NTPO3(1709.57002) +NTRC1(1861.82002) +NUCI1(1300.32002) +NUQ(157.07002) +NUW(0.82002) +NVRM8(1714.07002) +NWRA3(901.07002) +NWRC1(27.82002) +NXP(715.57002) +NYAN2(1873.57002) +NYL(166.07002) +NYSO3(717.32002) +NZAC1(1279.32002) +NZCM8(1965.32002) +OAGW1(718.07002) +OAK(29.07002) +OAMC1(31.57002) +OASN2(1923.82002) +OBRC1(532.57002) +OCFW1(1255.32002) +OCHO3(1167.32002) +OCMO3(1415.07002) +OCNC1(63.07002) +OCTC1(259.07002) +OCWO3(1408.57002) +ODBN2(926.07002) +ODLC1(28.82002) +ODSW1(502.82002) +OGD(1454.82002) +OGDC1(949.07002) +OGOC1(616.07002) +OGVC1(1180.57002) +OHOI1(2151.32002) +OICC1(1010.07002) +OITC1(417.57002) +OJAC1(561.32002) +OJIC1(561.32002) +OKB(63.07002) +OKFO3(1515.57002) +OKNC1(1194.82002) +OKPC1(354.32002) +OLDQ1(1015.82002) +OLNM8(1374.32002) +OMFO3(613.07002) +OMFW1(1016.82002) +OMK(792.57002) +OMTC1(828.82002) +OMWW1(1021.32002) +ONCC1(2046.07002) +ONO(708.57002) +ONOC1(120.82002) +ONSC1(823.57002) +ONT(559.07002) +ONYC1(1312.32002) +OOFO3(1648.57002) +OORC1(1651.57002) +OPCA3(532.57002) +OPLC1(875.07002) +ORCO3(72.82002) +ORDC1(266.82002) +ORIC1(96.07002) +ORWN2(1356.57002) +OTOW1(313.82002) +OTTC1(119.07002) +OURC1(830.82002) +OVE(96.82002) +OVNM8(1549.07002) +OVRC1(2064.07002) +OWDC1(133.32002) +OWFO3(1061.07002) +OWNC1(2132.07002) +OWYN2(1817.07002) +OXR(58.32002) +OXSI1(1699.82002) +OYFO3(1607.57002) +P68(1960.07002) +P69(1202.57002) +PACW1(1036.82002) +PAE(39.82002) +PAFO3(594.32002) +PAHN2(1302.82002) +PALW1(446.57002) +PAMC1(937.32002) +PANN2(1759.32002) +PASQ1(1977.32002) +PBCC1(1310.32002) +PBFW1(100.32002) +PBUI1(1571.32002) +PCEC1(434.82002) +PCIC1(476.57002) +PCKC1(1277.57002) +PCKI1(1751.82002) +PCLC1(410.07002) +PCON2(1698.57002) +PCQC1(671.82002) +PCRW1(1591.82002) +PCYO3(1535.82002) +PDEC1(508.57002) +PDGC1(457.07002) +PDT(411.07002) +PDX(87.57002) +PEAC1(348.57002) +PEFO3(291.57002) +PEFW1(974.07002) +PELQR(1600.32002) +PEOW1(976.82002) +PEPC1(2030.57002) +PESW1(961.57002) +PFHC1(1397.57002) +PFRC1(278.07002) +PFTC1(414.57002) +PGRC1(600.32002) +PHGM8(1989.32002) +PHRC1(955.32002) +PHX(368.32002) +PIBC1(162.57002) +PIBN2(587.32002) +PICM8(1771.07002) +PIDC1(1031.82002) +PIEC1(1624.32002) +PIEI1(1096.57002) +PIFC1(1362.82002) +PIFW1(977.82002) +PIH(1370.57002) +PIHC1(982.57002) +PION2(1798.82002) +PIPA3(1543.82002) +PIRI1(1096.57002) +PISC1(80.57002) +PITC1(789.82002) +PIVC1(1426.07002) +PKCC1(680.07002) +PKFC1(537.07002) +PKFO3(819.32002) +PKSQ1(1594.57002) +PLAM8(1179.32002) +PLCC1(433.32002) +PLEC1(165.07002) +PLFI1(1057.32002) +PLIC1(877.07002) +PLKI1(1151.57002) +PLLC1(1530.57002) +PLMC1(29.32002) +PLRC1(924.82002) +PLTC1(307.07002) +PLVM8(1337.07002) +PMD(950.57002) +PMFW1(966.07002) +PMNM8(1294.57002) +PNCC1(2143.57002) +PNCQR(1110.32002) +PNFI1(1419.82002) +PNGO3(485.82002) +PNKW1(935.32002) +PNRI1(1034.07002) +PNTM8(1515.32002) +POEM8(1519.32002) +POLM8(1514.57002) +POMC1(389.57002) +PORQ1(1387.57002) +POSC1(1823.82002) +POTC1(762.32002) +POTI1(874.32002) +POWC1(213.82002) +POWO3(502.07002) +PPDN2(692.07002) +PPHC1(1055.32002) +PPPC1(842.82002) +PPRC1(442.57002) +PPRW1(1356.07002) +PPSC1(307.57002) +PRAI1(1557.82002) +PRB(350.82002) +PRBC1(350.82002) +PRBQ1(1576.07002) +PRC(1651.32002) +PRCI1(1175.07002) +PRCO3(1473.32002) +PRDM8(1302.82002) +PRFO3(741.07002) +PRGC1(1675.32002) +PRHC1(461.07002) +PRIQ1(1259.07002) +PRKA3(230.32002) +PRLI1(1820.32002) +PRMC1(937.32002) +PROO3(875.32002) +PRPC1(828.82002) +PRSN2(2211.57002) +PSAC1(291.82002) +PSC(182.07002) +PSCC1(2163.07002) +PSP(794.57002) +PSPC1(1721.57002) +PSQC1(258.32002) +PSRC1(2097.82002) +PSTA3(1651.32002) +PSTC1(1748.32002) +PSTM8(1481.07002) +PTEC1(231.57002) +PTFO3(1498.32002) +PTHC1(1095.07002) +PTHW1(1409.82002) +PTNM8(2195.32002) +PTPC1(19.57002) +PTV(193.82002) +PUGC1(119.07002) +PUW(835.82002) +PVRO3(1027.82002) +PWYC1(213.82002) +PYFO3(1003.32002) +PYLC1(1131.07002) +PYNC1(1193.32002) +PYPC1(566.32002) +PYTI1(729.32002) +QBAA3(1828.07002) +QBMA3(1816.82002) +QBRA3(1443.82002) +QBYQ2(1429.57002) +QCAC1(58.32002) +QCCO3(737.32002) +QCKA3(1214.57002) +QCNW1(289.07002) +QDPA3(2360.07002) +QFSA3(1933.57002) +QGDA3(1326.57002) +QGSA3(1711.57002) +QHAA3(351.57002) +QHBA3(1070.07002) +QHQA3(726.57002) +QHUA3(1535.57002) +QISA3(1651.32002) +QLGA3(1715.07002) +QMBA3(1292.32002) +QMLA3(1715.07002) +QMMA3(1291.57002) +QNFA3(1715.07002) +QNYC1(1504.57002) +QOKA3(1282.82002) +QPFO3(569.07002) +QRMO3(1703.32002) +QRTA3(1572.32002) +QSPA3(1214.57002) +QSTA3(1042.57002) +QTCW1(566.07002) +QTUA3(1863.82002) +QTWA3(1466.32002) +QTZC1(1234.57002) +QUEQ1(925.07002) +QUPA3(628.07002) +QWSA3(2150.82002) +QYJA3(1641.32002) +QYRC1(1504.57002) +RAL(309.57002) +RAWN2(1395.07002) +RAYQ1(956.82002) +RBG(319.32002) +RBL(108.82002) +RBTN2(1664.82002) +RBVN2(2048.57002) +RBYC1(370.07002) +RBYM8(1907.82002) +RCCW1(193.32002) +RCEC1(2297.32002) +RCFC1(47.57002) +RCHC1(846.82002) +RCPC1(1286.82002) +RCRO3(1587.57002) +RCSO3(1590.57002) +RDD(155.82002) +RDKI1(2303.32002) +RDLO3(478.07002) +RDM(929.07002) +RDOC1(0.32002) +RDVC1(667.32002) +REDO3(1123.07002) +REEO3(83.82002) +RENI1(1220.57002) +REO(1261.57002) +RFCN2(653.57002) +RFSC1(363.57002) +RFTI1(1347.82002) +RGTC1(984.07002) +RIV(457.07002) +RJSC1(395.32002) +RKBC1(277.07002) +RKHO3(287.32002) +RKPM8(1992.07002) +RLFO3(1389.57002) +RLGW1(1181.57002) +RLKC1(990.07002) +RLKN2(2027.57002) +RLYO3(1393.32002) +RMFO3(110.57002) +RMNC1(475.32002) +RMTC1(1179.32002) +RNDC1(1477.07002) +RNDN2(1723.32002) +RNFO3(1485.82002) +RNM(475.32002) +RNO(1777.32002) +RNT(54.82002) +ROCI1(1315.82002) +ROLC1(712.07002) +RONM8(1080.32002) +RORO3(1281.07002) +ROSQ1(762.57002) +ROVC1(1031.82002) +RPSA3(171.32002) +RRAC1(155.82002) +RRFI1(1704.57002) +RRKN2(1305.07002) +RRMC1(1592.32002) +RROO3(1333.82002) +RRRC1(520.57002) +RSBU1(1657.32002) +RSCN2(1826.57002) +RSFW1(159.82002) +RSHC1(1497.07002) +RSPC1(508.07002) +RTFO3(1374.57002) +RTHN2(2138.57002) +RTLC1(1440.07002) +RUBC1(2136.07002) +RUSC1(1113.32002) +RVDC1(1716.82002) +RVYC1(324.32002) +RWCC1(111.32002) +RWDN2(575.82002) +RXFO3(1092.07002) +RYNC1(549.07002) +RZVW1(562.82002) +SABC1(2896.07002) +SAC(-4.42998) +SAFO3(1148.32002) +SAHN2(575.82002) +SAN(56.82002) +SAPC1(-5.92998) +SARC1(75.07002) +SAUC1(558.32002) +SAYC1(410.07002) +SBA(142.57002) +SBFO3(880.32002) +SBIC1(0.070023) +SBKW1(76.82002) +SBMW1(677.57002) +SBP(318.82002) +SBPC1(318.82002) +SBTC1(1166.82002) +SBVC1(244.07002) +SBYC1(745.82002) +SCAQ1(2022.82002) +SCCN2(575.82002) +SCCQ1(2190.07002) +SCDO3(190.82002) +SCFI1(1328.57002) +SCFO3(1481.32002) +SCHC1(313.57002) +SCHI1(2118.82002) +SCHO3(1417.32002) +SCK(-4.17998) +SCKC1(0.32002) +SCOO3(190.82002) +SCRN2(1851.57002) +SCSC1(508.32002) +SCTI1(1774.82002) +SCWW1(278.07002) +SDB(1131.07002) +SDDC1(363.82002) +SDFO3(1570.82002) +SDLC1(796.82002) +SDM(179.82002) +SDMM8(1981.57002) +SDMO3(393.07002) +SDMW1(315.07002) +SDOC1(416.07002) +SDRC1(1128.82002) +SEA(76.82002) +SENW1(1094.82002) +SERC1(1940.57002) +SETC1(973.07002) +SEW(37.82002) +SEXC1(208.57002) +SEYC1(1762.32002) +SFBC1(1748.32002) +SFBO3(495.57002) +SFF(705.32002) +SFKC1(532.57002) +SFKO3(477.32002) +SFNW1(205.82002) +SFO(24.07002) +SFOC1(2.82002) +SFXC1(64.82002) +SGEC1(438.07002) +SGFO3(879.57002) +SGGU1(1359.32002) +SGHQ1(1781.82002) +SGNW1(1145.07002) +SGPC1(1180.82002) +SGQC1(396.07002) +SGRU1(1101.82002) +SGUU1(1050.07002) +SGX(258.32002) +SGYC1(962.32002) +SHDC1(364.82002) +SHFO3(1392.82002) +SHHC1(653.57002) +SHIC1(801.57002) +SHLQ2(1300.57002) +SHMC1(1483.32002) +SHN(70.57002) +SHNC1(669.82002) +SHPW1(817.57002) +SHQC1(746.82002) +SHRO3(1182.82002) +SHRQ1(1725.82002) +SHVC1(1642.82002) +SHWI1(1061.57002) +SIAN2(1673.32002) +SIDW1(638.57002) +SIGU1(2386.57002) +SIY(970.32002) +SJBC1(207.07002) +SJC(198.57002) +SKAM8(1843.07002) +SKFI1(1924.82002) +SKKW1(1143.82002) +SKLA3(1611.07002) +SKMW1(200.07002) +SKNC1(551.82002) +SKOQ1(2292.82002) +SKOW1(663.82002) +SKYW1(982.82002) +SLAC1(739.32002) +SLE(66.57002) +SLFC1(735.07002) +SLFO3(1415.07002) +SLKO3(1701.57002) +SLMC1(2231.32002) +SLON2(704.82002) +SLPC1(1020.82002) +SLRC1(175.82002) +SLTC1(1247.07002) +SLTO3(1370.32002) +SLVO3(1715.32002) +SLWC1(23.07002) +SMBA3(691.32002) +SMBC1(1007.32002) +SMDC1(1949.07002) +SMF(-5.92998) +SMFO3(1762.07002) +SMGC1(318.82002) +SMIO3(263.57002) +SMLO3(1565.07002) +SMN(1853.32002) +SMNN2(1422.07002) +SMNQ2(540.82002) +SMO(47.07002) +SMOC1(23.07002) +SMPC1(307.32002) +SMPN2(926.07002) +SMPW1(1063.82002) +SMRC1(364.82002) +SMRO3(1701.57002) +SMRQ1(1080.32002) +SMSC1(1148.32002) +SMTC1(10.57002) +SMTI1(1695.07002) +SMTM8(1580.82002) +SMVC1(354.32002) +SMWN2(1422.07002) +SMX(103.57002) +SMYI1(1853.32002) +SNA(100.82002) +SNFW1(516.07002) +SNS(168.82002) +SNSI1(1309.82002) +SNT(2352.07002) +SNWC1(1140.32002) +SOAC1(904.07002) +SOAO3(898.32002) +SOBO3(898.32002) +SOCO3(898.32002) +SODO3(898.32002) +SOEO3(898.32002) +SOFO3(898.32002) +SOGO3(898.32002) +SOUI1(1054.57002) +SOX(306.57002) +SPAI1(1559.57002) +SPB(127.57002) +SPCC1(2179.57002) +SPCW1(668.57002) +SPEW1(246.57002) +SPGC1(1728.32002) +SPGN2(1616.07002) +SPGW1(1299.57002) +SPLW1(1121.32002) +SPMN2(1956.82002) +SPMW1(1071.57002) +SPNQ1(1798.82002) +SPSO3(1200.57002) +SPWC1(1020.32002) +SPXC1(142.57002) +SQFO3(1127.32002) +SQLW1(473.07002) +SQPM8(1356.57002) +SQPW1(1036.32002) +SQSC1(932.32002) +SRAC1(2722.57002) +SRBN2(1001.82002) +SRBW1(476.07002) +SRCQ1(1787.32002) +SRFI1(1497.57002) +SRGM8(1348.07002) +SRIC1(24.32002) +SRMO3(631.07002) +SRTC1(712.32002) +SRUC1(398.32002) +SRXC1(607.07002) +SRYM8(1764.57002) +SSCN2(2178.57002) +SSPW1(927.07002) +STAC1(100.82002) +STAM8(1480.57002) +STAN2(2028.32002) +STCQ1(1379.32002) +STDQ1(882.82002) +STEC1(176.82002) +STFC1(624.07002) +STFO3(1623.82002) +STGM8(1348.07002) +STHC1(275.32002) +STKM8(1499.57002) +STMN2(1994.07002) +STMQR(1764.57002) +STNI1(2352.07002) +STPC1(1949.07002) +STQC1(1651.57002) +STRO3(1525.07002) +STRQ1(932.32002) +STRW1(1555.32002) +STS(206.57002) +STSM8(1263.07002) +STTM8(1454.07002) +STUC1(1748.32002) +STVM8(1521.32002) +STWO3(1598.57002) +STYC1(1105.32002) +SUAM8(1931.32002) +SUMM8(1771.07002) +SUNN2(1812.57002) +SUNQ1(2034.07002) +SVCO3(1629.57002) +SVFI1(1654.07002) +SVFO3(584.32002) +SVMO3(1556.57002) +SVNW1(1236.32002) +SVPI1(1787.57002) +SVRQ2(1122.82002) +SWAC1(697.82002) +SWBC1(1342.82002) +SWCW1(920.32002) +SWDC1(11.32002) +SWIC1(161.32002) +SWLC1(118.07002) +SWNN2(653.57002) +SWPI1(2391.82002) +SXT(599.07002) +SYDC1(354.32002) +SYNO3(229.32002) +SYSC1(999.82002) +SZKQ2(947.32002) +TABC1(351.57002) +TACA3(131.32002) +TACN2(1975.57002) +TANC1(841.32002) +TAPC1(1359.82002) +TAYI1(2006.32002) +TBRC1(1455.07002) +TBSU1(2418.32002) +TCAC1(944.32002) +TCFI1(1440.07002) +TCFO3(583.57002) +TCFW1(1023.07002) +TCKC1(628.32002) +TCLC1(671.82002) +TCM(36.07002) +TCMO3(1430.82002) +TCNC1(442.57002) +TCRA3(1343.57002) +TEKC1(924.82002) +TEKW1(834.07002) +TENQR(1728.82002) +TEPM8(2006.82002) +TERC1(261.07002) +TEXN2(1613.07002) +TFRU1(1778.07002) +TGCC1(2091.82002) +TGFI1(1741.57002) +THAM8(1298.57002) +THBW1(1494.32002) +THDC1(267.32002) +THFI1(2051.07002) +THLN2(1777.32002) +THMI1(1956.57002) +THRQ1(875.07002) +TIGC1(973.32002) +TIJC1(37.82002) +TILO3(711.32002) +TILQ1(2241.57002) +TILW1(473.07002) +TIW(28.82002) +TIXC1(38.32002) +TLHC1(903.32002) +TLMO3(300.07002) +TLRW1(297.82002) +TLYO3(1027.82002) +TMCM8(1866.07002) +TMFO3(1600.57002) +TMKO3(300.07002) +TMNC1(1306.57002) +TMRO3(1355.07002) +TNRC1(203.82002) +TOFO3(1349.82002) +TOHW1(1222.57002) +TOPI1(1758.57002) +TORC1(295.82002) +TPEO3(1482.07002) +TPFW1(973.07002) +TPGC1(311.07002) +TPH(1745.07002) +TPHC1(1306.57002) +TQIN2(2066.82002) +TRCM8(1184.82002) +TRFO3(513.57002) +TRFW1(1121.32002) +TRGW1(1060.82002) +TRHC1(944.32002) +TRII1(1680.07002) +TRM(238.32002) +TRMC1(590.07002) +TRMI1(1784.82002) +TRNW1(720.82002) +TROM8(1218.07002) +TRON2(926.32002) +TRTC1(2086.07002) +TRUC1(2108.32002) +TRVQ1(919.07002) +TSCC1(502.32002) +TSDC1(1357.82002) +TSHC1(1238.32002) +TSOW1(1088.07002) +TSP(1359.82002) +TTD(138.82002) +TTRC1(338.57002) +TUFO3(1224.32002) +TUSN2(1975.57002) +TVL(2128.57002) +TVWU1(1660.32002) +TWBI1(1064.82002) +TWCC1(1359.82002) +TWDC1(402.07002) +TWDN2(855.07002) +TWF(1307.57002) +TWLM8(1864.57002) +TWMC1(485.57002) +TWRW1(720.82002) +TYBO3(1545.07002) +TYEC1(940.57002) +TYLO3(1457.82002) +U24(1439.82002) +UAO(55.07002) +UCCC1(1048.57002) +UCLC1(167.32002) +UCRC1(363.32002) +UDWC1(930.32002) +UFDN2(926.32002) +UHLC1(1564.32002) +UIL(79.82002) +UKIO3(1290.57002) +ULVN2(1044.32002) +UMCQ2(1488.57002) +UMNC1(312.82002) +UMTO3(175.07002) +UNYO3(1447.82002) +UPSO3(780.82002) +UPWW1(1060.82002) +USEA3(906.57002) +VABC1(1653.57002) +VAMA3(609.07002) +VAQC1(231.57002) +VBPC1(1949.07002) +VCB(67.82002) +VCFO3(283.57002) +VDBC1(131.07002) +VDBN2(755.82002) +VDCA3(1423.32002) +VDPA3(1438.57002) +VENO3(373.57002) +VENU1(1796.57002) +VGAC1(2548.07002) +VGRC1(1054.07002) +VGT(755.82002) +VICC1(463.82002) +VICQ1(1745.82002) +VIOC1(1624.57002) +VIS(61.07002) +VKOC1(2950.57002) +VLCC1(563.32002) +VLKC1(588.07002) +VLYC1(1235.57002) +VNCU1(1903.32002) +VNNI1(2462.82002) +VNOC1(240.57002) +VNY(312.82002) +VOFN2(597.82002) +VSTC1(167.07002) +VTUC1(208.57002) +VUO(87.57002) +VVDN2(575.82002) +WAGI1(1912.32002) +WAHI1(850.57002) +WALC1(2288.07002) +WARO3(1291.32002) +WASC1(82.57002) +WATC1(1306.57002) +WATQ1(1796.07002) +WBA(1973.82002) +WBRI1(1641.57002) +WCGU1(1657.07002) +WCLN2(1851.57002) +WCWO3(898.32002) +WDEC1(311.07002) +WEAC1(975.07002) +WEDC1(96.07002) +WEEC1(1230.32002) +WEFI1(1396.07002) +WEHC1(561.32002) +WEIN2(718.07002) +WESC1(304.82002) +WFHC1(1379.82002) +WFSW1(162.32002) +WGRM8(1333.82002) +WGVN2(1532.82002) +WGWC1(1031.82002) +WHDI1(1700.82002) +WHHM8(1656.57002) +WHLA3(2070.82002) +WHSW1(872.57002) +WHTW1(1465.07002) +WIKA3(983.57002) +WIMQ1(946.07002) +WIWO3(1423.07002) +WJF(753.32002) +WKFO3(320.57002) +WKPA3(735.07002) +WLBC1(1010.07002) +WLCI1(2005.57002) +WLDN2(896.82002) +WLFQ2(990.32002) +WLKC1(-0.67998) +WLLM8(1381.32002) +WLLO3(959.57002) +WLMO3(741.07002) +WLYC1(442.57002) +WMC(1532.82002) +WMFO3(1044.32002) +WMSC1(856.82002) +WNDN2(831.07002) +WODI1(1614.07002) +WODM8(1915.07002) +WPKO3(770.32002) +WPOC1(344.57002) +WPRW1(680.82002) +WRIC1(1347.82002) +WRKC1(1359.82002) +WRMM8(2064.07002) +WRNQ1(936.32002) +WRPM8(1427.57002) +WRRC1(320.07002) +WRRU1(1359.32002) +WRSC1(450.82002) +WRSM8(2222.07002) +WRTN2(994.57002) +WSBO3(539.57002) +WSDC1(377.07002) +WSFM8(1925.32002) +WSFO3(1102.57002) +WSHC1(2118.57002) +WSJN2(926.32002) +WSPC1(512.57002) +WSRO3(737.57002) +WSTQ1(1803.32002) +WTFO3(1462.57002) +WTHC1(145.82002) +WTPC1(898.82002) +WTRC1(124.82002) +WTSO3(300.07002) +WUPA3(983.57002) +WVAA3(1488.82002) +WVI(149.32002) +WVTC1(2063.57002) +WWAC1(1016.07002) +WWDC1(1636.07002) +WWNC1(1729.32002) +WWRC1(1995.07002) +WYDW1(389.07002) +WYTC1(733.32002) +XXXC1(2379.07002) +YALW1(434.07002) +YBCA3(1672.57002) +YBGA3(1672.57002) +YBLC1(216.07002) +YCGN2(1345.57002) +YCPA3(1379.07002) +YCPC1(1335.32002) +YCVA3(1535.07002) +YCWA3(1659.07002) +YEFO3(695.32002) +YFCA3(1672.57002) +YFFI1(2410.82002) +YKA(844.07002) +YKAM8(1409.57002) +YKM(409.82002) +YLCA3(1659.07002) +YLPO3(1514.57002) +YMNA3(1403.57002) +YNFO3(273.32002) +YOBC1(1198.07002) +YPWA3(1651.32002) +YRKC1(404.07002) +YRV(1352.82002) +YSAC1(999.82002) +YSMA3(1672.57002) +YSUA3(1897.32002) +YTBA3(1672.57002) +YTPA3(1672.57002) +YUCA3(879.57002) +YUGA3(1672.57002) +YVR(1.82002) +YVVC1(1453.82002) +YWAC1(1729.32002) +YWPA3(1640.82002) +YWSA3(1672.57002) +YXC(1142.07002) +YXX(60.07002) +YYC(1065.07002) +YYF(1119.82002) +YYVC1(2450.32002) +ZBHA3(806.07002) +ZENC1(753.82002) +ZFWA3(744.82002) +ZIOU1(1600.57002) +ZONM8(1151.82002) diff --git a/internal/test_unit/config/SID_CONUS_ADPUPA_ELEV.txt b/internal/test_unit/config/SID_CONUS_ADPUPA_ELEV.txt new file mode 100644 index 0000000000..42eb4fd1fb --- /dev/null +++ b/internal/test_unit/config/SID_CONUS_ADPUPA_ELEV.txt @@ -0,0 +1,98 @@ +SID_CONUS_ADPUPA_ELEV +72206(4.07002) +72520(316.07002) +72597(531.82002) +72518(137.82002) +71600(0.070023) +71722(214.57002) +72764(541.57002) +71836(14.82002) +71908(729.57002) +71867(261.32002) +71913(0.070023) +71945(374.82002) +72250(4.82002) +72208(6.07002) +72632(307.07002) +74001(204.32002) +72403(115.82002) +72572(1486.57002) +72662(1025.82002) +72712(182.82002) +71845(355.57002) +76644(8.82002) +76595(2.32002) +72201(0.070023) +76225(1572.07002) +72230(169.57002) +72388(926.32002) +72318(640.32002) +72440(374.32002) +72528(201.82002) +72645(222.57002) +72776(1057.82002) +71934(220.07002) +72393(57.32002) +72305(2.82002) +72493(131.32002) +72456(300.32002) +72476(1638.57002) +72426(308.57002) +72501(17.57002) +72649(277.57002) +72786(670.57002) +72261(324.32002) +72364(1244.82002) +72340(103.57002) +72317(251.07002) +72451(770.32002) +74002(12.32002) +72562(887.82002) +72681(970.57002) +72694(66.57002) +72634(400.57002) +76743(12.82002) +72558(363.07002) +72797(79.82002) +71203(868.57002) +70398(22.57002) +78073(0.070023) +72210(3.82002) +72251(12.57002) +72240(2.07002) +72265(855.82002) +72327(169.82002) +72768(688.07002) +74455(210.82002) +71603(11.57002) +72659(395.82002) +71811(3.07002) +71816(74.82002) +76458(12.82002) +72202(1.57002) +72274(883.32002) +72235(103.07002) +78016(0.070023) +72402(3.32002) +71815(38.57002) +72747(346.82002) +71119(718.57002) +78526(42.07002) +72248(60.82002) +72215(263.32002) +72357(359.82002) +74560(189.07002) +74494(1.82002) +74389(77.32002) +71906(62.82002) +ASDE04(0.070023) +76394(433.07002) +72233(7.07002) +72214(25.82002) +72249(190.57002) +72293(76.82002) +74004(136.07002) +72363(1078.82002) +71109(97.82002) +71823(334.57002) +71907(5.32002) diff --git a/internal/test_unit/config/ref_config/GridStatConfig_03h b/internal/test_unit/config/ref_config/GridStatConfig_03h index 0a3daba7a1..278acf3be0 100644 --- a/internal/test_unit/config/ref_config/GridStatConfig_03h +++ b/internal/test_unit/config/ref_config/GridStatConfig_03h @@ -198,8 +198,9 @@ nc_pairs_flag = FALSE; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${MODEL}_F${FCST_TIME}_03h"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${MODEL}_F${FCST_TIME}_03h"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/ref_config/GridStatConfig_24h b/internal/test_unit/config/ref_config/GridStatConfig_24h index 8804e2d708..2d0c263303 100644 --- a/internal/test_unit/config/ref_config/GridStatConfig_24h +++ b/internal/test_unit/config/ref_config/GridStatConfig_24h @@ -198,8 +198,9 @@ nc_pairs_flag = FALSE; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "${MODEL}_F${FCST_TIME}_24h"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "${MODEL}_F${FCST_TIME}_24h"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/ref_config/PointStatConfig_ADPUPA b/internal/test_unit/config/ref_config/PointStatConfig_ADPUPA index 226be944df..2d98af4d87 100644 --- a/internal/test_unit/config/ref_config/PointStatConfig_ADPUPA +++ b/internal/test_unit/config/ref_config/PointStatConfig_ADPUPA @@ -182,8 +182,11 @@ output_flag = { duplicate_flag = NONE; rank_corr_flag = FALSE; -tmp_dir = "/tmp"; -output_prefix = "${MODEL}_F${FCST_TIME}_ADPUPA"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${MODEL}_F${FCST_TIME}_ADPUPA"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/ref_config/PointStatConfig_ONLYSF b/internal/test_unit/config/ref_config/PointStatConfig_ONLYSF index 9667c95b10..3f8a2a6367 100644 --- a/internal/test_unit/config/ref_config/PointStatConfig_ONLYSF +++ b/internal/test_unit/config/ref_config/PointStatConfig_ONLYSF @@ -192,8 +192,11 @@ output_flag = { duplicate_flag = NONE; rank_corr_flag = FALSE; -tmp_dir = "/tmp"; -output_prefix = "${MODEL}_F${FCST_TIME}_ONLYSF"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${MODEL}_F${FCST_TIME}_ONLYSF"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/ref_config/PointStatConfig_WINDS b/internal/test_unit/config/ref_config/PointStatConfig_WINDS index 87fe9c01bd..ffb0a2f06f 100644 --- a/internal/test_unit/config/ref_config/PointStatConfig_WINDS +++ b/internal/test_unit/config/ref_config/PointStatConfig_WINDS @@ -175,8 +175,11 @@ output_flag = { duplicate_flag = NONE; rank_corr_flag = FALSE; -tmp_dir = "/tmp"; -output_prefix = "${MODEL}_F${FCST_TIME}_WINDS"; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = "${MODEL}_F${FCST_TIME}_WINDS"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/t b/internal/test_unit/t deleted file mode 100755 index 8df021c329..0000000000 --- a/internal/test_unit/t +++ /dev/null @@ -1,114 +0,0 @@ -export 'CLIMO_MEAN_FILE=${MET_TEST_INPUT}/climatology_data/NCEP_1.0deg/cmean_1d.19790410' -export 'DESC=NO_WEIGHT' -export 'GRID_WEIGHT=NONE' -export 'OUTPUT_PREFIX=NO_WEIGHT' -/d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/../../share/met/../../bin/grid_stat \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/gfs/gfs_2012040900_F024.grib2 \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/gfsanl/gfsanl_4_20120410_0000_000.grb2 \ - /d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/config/GridStatConfig_grid_weight \ - -outdir /d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/../../test_output/grid_weight -v 1 -unset CLIMO_MEAN_FILE -unset DESC -unset GRID_WEIGHT -unset OUTPUT_PREFIX - - -export 'CLIMO_MEAN_FILE=${MET_TEST_INPUT}/climatology_data/NCEP_1.0deg/cmean_1d.19790410' -export 'DESC=COS_LAT_WEIGHT' -export 'GRID_WEIGHT=COS_LAT' -export 'OUTPUT_PREFIX=COS_LAT_WEIGHT' -/d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/../../share/met/../../bin/grid_stat \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/gfs/gfs_2012040900_F024.grib2 \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/gfsanl/gfsanl_4_20120410_0000_000.grb2 \ - /d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/config/GridStatConfig_grid_weight \ - -outdir /d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/../../test_output/grid_weight -v 1 -unset CLIMO_MEAN_FILE -unset DESC -unset GRID_WEIGHT -unset OUTPUT_PREFIX - - -export 'CLIMO_MEAN_FILE=${MET_TEST_INPUT}/climatology_data/NCEP_1.0deg/cmean_1d.19790410' -export 'DESC=AREA_WEIGHT' -export 'GRID_WEIGHT=AREA' -export 'OUTPUT_PREFIX=AREA_WEIGHT' -/d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/../../share/met/../../bin/grid_stat \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/gfs/gfs_2012040900_F024.grib2 \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/gfsanl/gfsanl_4_20120410_0000_000.grb2 \ - /d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/config/GridStatConfig_grid_weight \ - -outdir /d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/../../test_output/grid_weight -v 1 -unset CLIMO_MEAN_FILE -unset DESC -unset GRID_WEIGHT -unset OUTPUT_PREFIX - - -export 'CLIMO_MEAN_FILE=${MET_TEST_INPUT}/climatology_data/NCEP_1.0deg/cmean_1d.19790410' -export 'CLIMO_STDEV_FILE=${MET_TEST_INPUT}/climatology_data/NCEP_1.0deg/cstdv_1d.19790410' -export 'DESC=NO_WEIGHT' -export 'GRID_WEIGHT=NONE' -export 'OUTPUT_PREFIX=NO_WEIGHT' -/d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/../../share/met/../../bin/ensemble_stat \ - 6 \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep6/arw-sch-gep6_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep3/arw-tom-gep3_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep7/arw-tom-gep7_2012040912_F024.grib \ - /d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/config/EnsembleStatConfig_grid_weight \ - -grid_obs /d1/projects/MET/MET_test_data/unit_test/obs_data/laps/laps_2012041012_F000.grib \ - -outdir /d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/../../test_output/grid_weight -v 1 -unset CLIMO_MEAN_FILE -unset CLIMO_STDEV_FILE -unset DESC -unset GRID_WEIGHT -unset OUTPUT_PREFIX - - -export 'CLIMO_MEAN_FILE=${MET_TEST_INPUT}/climatology_data/NCEP_1.0deg/cmean_1d.19790410' -export 'CLIMO_STDEV_FILE=${MET_TEST_INPUT}/climatology_data/NCEP_1.0deg/cstdv_1d.19790410' -export 'DESC=COS_LAT_WEIGHT' -export 'GRID_WEIGHT=COS_LAT' -export 'OUTPUT_PREFIX=COS_LAT_WEIGHT' -/d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/../../share/met/../../bin/ensemble_stat \ - 6 \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep6/arw-sch-gep6_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep3/arw-tom-gep3_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep7/arw-tom-gep7_2012040912_F024.grib \ - /d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/config/EnsembleStatConfig_grid_weight \ - -grid_obs /d1/projects/MET/MET_test_data/unit_test/obs_data/laps/laps_2012041012_F000.grib \ - -outdir /d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/../../test_output/grid_weight -v 1 -unset CLIMO_MEAN_FILE -unset CLIMO_STDEV_FILE -unset DESC -unset GRID_WEIGHT -unset OUTPUT_PREFIX - - -export 'CLIMO_MEAN_FILE=${MET_TEST_INPUT}/climatology_data/NCEP_1.0deg/cmean_1d.19790410' -export 'CLIMO_STDEV_FILE=${MET_TEST_INPUT}/climatology_data/NCEP_1.0deg/cstdv_1d.19790410' -export 'DESC=AREA_WEIGHT' -export 'GRID_WEIGHT=AREA' -export 'OUTPUT_PREFIX=AREA_WEIGHT' -/d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/../../share/met/../../bin/ensemble_stat \ - 6 \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep6/arw-sch-gep6_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep3/arw-tom-gep3_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep7/arw-tom-gep7_2012040912_F024.grib \ - /d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/config/EnsembleStatConfig_grid_weight \ - -grid_obs /d1/projects/MET/MET_test_data/unit_test/obs_data/laps/laps_2012041012_F000.grib \ - -outdir /d1/personal/johnhg/MET/MET_development/MET-feature_2887_categorical_weights/internal/test_unit/../../test_output/grid_weight -v 1 -unset CLIMO_MEAN_FILE -unset CLIMO_STDEV_FILE -unset DESC -unset GRID_WEIGHT -unset OUTPUT_PREFIX - - diff --git a/internal/test_unit/xml/unit_point_stat.xml b/internal/test_unit/xml/unit_point_stat.xml index 2c90567c80..8e798e03ec 100644 --- a/internal/test_unit/xml/unit_point_stat.xml +++ b/internal/test_unit/xml/unit_point_stat.xml @@ -72,6 +72,26 @@ + + &MET_BIN;/point_stat + + BEG_DS -300 + END_DS 300 + OUTPUT_PREFIX GRIB1_NAM_GDAS_MPR_OBTYPE + CONFIG_DIR &CONFIG_DIR; + CLIMO_FILE "&DATA_DIR_MODEL;/grib1/gfs/gfs_2012040900_F012_gNam.grib" + + \ + &DATA_DIR_MODEL;/grib1/nam/nam_2012040900_F012.grib \ + &OUTPUT_DIR;/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + &CONFIG_DIR;/PointStatConfig_MPR_OBTYPE \ + -outdir &OUTPUT_DIR;/point_stat -v 1 + + + &OUTPUT_DIR;/point_stat/point_stat_GRIB1_NAM_GDAS_MPR_OBTYPE_120000L_20120409_120000V.stat + + + &MET_BIN;/point_stat diff --git a/internal/test_unit/xml/unit_point_weight.xml b/internal/test_unit/xml/unit_point_weight.xml new file mode 100644 index 0000000000..b034b54a3a --- /dev/null +++ b/internal/test_unit/xml/unit_point_weight.xml @@ -0,0 +1,148 @@ + + + + + + + + + + +]> + + + + + + &TEST_DIR; + true + + + &MET_BIN;/point_stat + + OUTPUT_PREFIX NO_WEIGHT + DESC NO_WEIGHT + POINT_WEIGHT NONE + CONFIG_DIR &CONFIG_DIR; + + \ + &DATA_DIR_MODEL;/grib2/sref_mn/sref_mean_2012040821_F015.grib2 \ + &OUTPUT_DIR;/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + &CONFIG_DIR;/PointStatConfig_point_weight \ + -outdir &OUTPUT_DIR;/point_weight -v 1 + + + &OUTPUT_DIR;/point_weight/point_stat_NO_WEIGHT_150000L_20120409_120000V.stat + + + + + &MET_BIN;/point_stat + + OUTPUT_PREFIX SID_WEIGHT + DESC SID_WEIGHT + POINT_WEIGHT SID + CONFIG_DIR &CONFIG_DIR; + + \ + &DATA_DIR_MODEL;/grib2/sref_mn/sref_mean_2012040821_F015.grib2 \ + &OUTPUT_DIR;/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + &CONFIG_DIR;/PointStatConfig_point_weight \ + -outdir &OUTPUT_DIR;/point_weight -v 1 + + + &OUTPUT_DIR;/point_weight/point_stat_SID_WEIGHT_150000L_20120409_120000V.stat + + + + + &MET_BIN;/point_stat + + OUTPUT_PREFIX PROB_NO_WEIGHT + DESC NO_WEIGHT + POINT_WEIGHT NONE + CONFIG_DIR &CONFIG_DIR; + + \ + &DATA_DIR_MODEL;/grib2/sref_pr/sref_prob_2012040821_F015.grib2 \ + &OUTPUT_DIR;/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + &CONFIG_DIR;/PointStatConfig_prob_point_weight \ + -outdir &OUTPUT_DIR;/point_weight -v 1 + + + &OUTPUT_DIR;/point_weight/point_stat_PROB_NO_WEIGHT_150000L_20120409_120000V.stat + + + + + &MET_BIN;/point_stat + + OUTPUT_PREFIX PROB_SID_WEIGHT + DESC SID_WEIGHT + POINT_WEIGHT SID + CONFIG_DIR &CONFIG_DIR; + + \ + &DATA_DIR_MODEL;/grib2/sref_pr/sref_prob_2012040821_F015.grib2 \ + &OUTPUT_DIR;/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + &CONFIG_DIR;/PointStatConfig_prob_point_weight \ + -outdir &OUTPUT_DIR;/point_weight -v 1 + + + &OUTPUT_DIR;/point_weight/point_stat_PROB_SID_WEIGHT_150000L_20120409_120000V.stat + + + + + &MET_BIN;/ensemble_stat + + OUTPUT_PREFIX NO_WEIGHT + DESC NO_WEIGHT + POINT_WEIGHT NONE + CONFIG_DIR &CONFIG_DIR; + + \ + 6 \ + &DATA_DIR_MODEL;/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-sch-gep6/arw-sch-gep6_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-tom-gep3/arw-tom-gep3_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-tom-gep7/arw-tom-gep7_2012040912_F024.grib \ + &CONFIG_DIR;/EnsembleStatConfig_point_weight \ + -point_obs &OUTPUT_DIR;/ascii2nc/gauge_2012041012_24hr.nc \ + -outdir &OUTPUT_DIR;/point_weight -v 1 + + + &OUTPUT_DIR;/point_weight/ensemble_stat_NO_WEIGHT_20120410_120000V.stat + + + + + &MET_BIN;/ensemble_stat + + OUTPUT_PREFIX SID_WEIGHT + DESC SID_WEIGHT + POINT_WEIGHT SID + CONFIG_DIR &CONFIG_DIR; + + \ + 6 \ + &DATA_DIR_MODEL;/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-sch-gep6/arw-sch-gep6_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-tom-gep3/arw-tom-gep3_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-tom-gep7/arw-tom-gep7_2012040912_F024.grib \ + &CONFIG_DIR;/EnsembleStatConfig_point_weight \ + -point_obs &OUTPUT_DIR;/ascii2nc/gauge_2012041012_24hr.nc \ + -outdir &OUTPUT_DIR;/point_weight -v 1 + + + &OUTPUT_DIR;/point_weight/ensemble_stat_SID_WEIGHT_20120410_120000V.stat + + + + + diff --git a/scripts/config/EnsembleStatConfig b/scripts/config/EnsembleStatConfig index bc84b81d8e..5353c92579 100644 --- a/scripts/config/EnsembleStatConfig +++ b/scripts/config/EnsembleStatConfig @@ -124,6 +124,8 @@ message_type_group_map = [ { key = "ONLYSF"; val = "ADPSFC,SFCSHP"; } ]; +obtype_as_group_val_flag = FALSE; + // // Ensemble bin sizes // May be set separately in each "obs.field" entry @@ -272,8 +274,10 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; -output_prefix = ""; -version = "V12.0.0"; +grid_weight_flag = NONE; +point_weight_flag = NONE; + +output_prefix = ""; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/config/GridStatConfig_APCP_12 b/scripts/config/GridStatConfig_APCP_12 index 2358000a81..3cbc179064 100644 --- a/scripts/config/GridStatConfig_APCP_12 +++ b/scripts/config/GridStatConfig_APCP_12 @@ -217,8 +217,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "APCP_12"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "APCP_12"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/config/GridStatConfig_APCP_24 b/scripts/config/GridStatConfig_APCP_24 index 39eaa7d220..383efc78c5 100644 --- a/scripts/config/GridStatConfig_APCP_24 +++ b/scripts/config/GridStatConfig_APCP_24 @@ -227,8 +227,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "APCP_24"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "APCP_24"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/config/GridStatConfig_POP_12 b/scripts/config/GridStatConfig_POP_12 index 6fb4775939..974a3a79b7 100644 --- a/scripts/config/GridStatConfig_POP_12 +++ b/scripts/config/GridStatConfig_POP_12 @@ -226,8 +226,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = "POP_12"; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = "POP_12"; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/config/GridStatConfig_all b/scripts/config/GridStatConfig_all index a165ef836d..f39e7e90cf 100644 --- a/scripts/config/GridStatConfig_all +++ b/scripts/config/GridStatConfig_all @@ -257,8 +257,9 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// grid_weight_flag = NONE; -tmp_dir = "/tmp"; -output_prefix = ""; -version = "V12.0.0"; + +tmp_dir = "/tmp"; +output_prefix = ""; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/config/PointStatConfig b/scripts/config/PointStatConfig index 3c79f15262..1f4140de1e 100644 --- a/scripts/config/PointStatConfig +++ b/scripts/config/PointStatConfig @@ -216,8 +216,11 @@ seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// rank_corr_flag = TRUE; -tmp_dir = "/tmp"; -output_prefix = ""; -version = "V12.0.0"; + +point_weight_flag = NONE; + +tmp_dir = "/tmp"; +output_prefix = ""; +version = "V12.0.0"; //////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/python/examples/read_ascii_numpy.py b/scripts/python/examples/read_ascii_numpy.py index 342121f2ff..061e1aa250 100644 --- a/scripts/python/examples/read_ascii_numpy.py +++ b/scripts/python/examples/read_ascii_numpy.py @@ -85,7 +85,6 @@ def set_dataplane_attrs(): user_fill_value = float(sys.argv[3]) except: log(f"{SCRIPT_NAME} Ignored argument {sys.argv[3]}") - pass log(f"{SCRIPT_NAME} Input File:\t{repr(input_file)}") log(f"{SCRIPT_NAME} Data Name:\t{repr(data_name)}") diff --git a/scripts/python/met/dataplane.py b/scripts/python/met/dataplane.py index a28661b365..4d94c0e712 100644 --- a/scripts/python/met/dataplane.py +++ b/scripts/python/met/dataplane.py @@ -25,6 +25,9 @@ def call_python(argv): sys.exit(1) met_base.log_message(f"User python command:\t{repr(' '.join(argv[1:]))}") + if not argv[1] or not argv[1].strip(): + met_base.quit_msg(f"User python command is empty") + sys.exit(1) # argv[1] contains the user defined python script pyembed_module_name = argv[1] @@ -178,7 +181,11 @@ def validate_met_data(met_data, fill_value=None): met_base.quit(f"{method_name} The met_data is None") sys.exit(1) - nx, ny = met_data.shape + if hasattr(met_data, 'shape'): + nx, ny = met_data.shape + else: + met_base.quit(f"{method_name} The met_data does not have the shape property") + sys.exit(1) met_fill_value = met_base.MET_FILL_VALUE if dataplane.is_xarray_dataarray(met_data): diff --git a/scripts/python/met/logger.py b/scripts/python/met/logger.py index a85de36d1f..1e7b30a798 100644 --- a/scripts/python/met/logger.py +++ b/scripts/python/met/logger.py @@ -25,10 +25,6 @@ def error_message(msg): for a_msg in msgs: logger.log_message(logger.append_error_prompt(a_msg)) - #@staticmethod - #def get_met_fill_value(): - # return logger.MET_FILL_VALUE - @staticmethod def info_message(msg): print(f'{logger.PROMPT} {logger.INFO_P} {msg}') @@ -78,8 +74,8 @@ def log_msg(self, msg): @staticmethod def get_numpy_filename(tmp_filename): - return logger.replace_extension(tmp_filename, "json", "npy") if tmp_filename.endswith(".json") else \ - logger.replace_extension(tmp_filename, "nc", "npy") if tmp_filename.endswith(".nc") else f'{tmp_filename}.npy' + file_ext = os.path.splitext(tmp_filename)[1] + return logger.replace_extension(tmp_filename, file_ext, ".npy") if file_ext else f'{tmp_filename}.npy' def is_debug_enabled(self, component_name=""): return met_base_tools.is_debug_enabled(component_name) @@ -99,22 +95,27 @@ class met_base_tools(object): ENV_MET_PYTHON_DEBUG = "MET_PYTHON_DEBUG" ENV_MET_PYTHON_TMP_FORMAT = "MET_PYTHON_TMP_FORMAT" + @staticmethod + def convert_byte_type_to_array(ndarray_data): + array_data = [] + if isinstance(ndarray_data[0], (np.ma.MaskedArray, np.ma.core.MaskedArray)): + for byte_data in ndarray_data: + array_data.append(byte_data.tobytes(fill_value=' ').decode('utf-8').rstrip()) + else: + for byte_data in ndarray_data: + array_data.append(byte_data.decode("utf-8").rstrip()) + return array_data + @staticmethod def convert_to_array(ndarray_data): is_byte_type = False if 0 < len(ndarray_data): is_byte_type = isinstance(ndarray_data[0], (bytes, np.bytes_)) - if isinstance(ndarray_data[0], np.ndarray): - if 0 < len(ndarray_data[0]): - is_byte_type = isinstance(ndarray_data[0][0], (bytes, np.bytes_)) + if not is_byte_type and isinstance(ndarray_data[0], np.ndarray) \ + and 0 < len(ndarray_data[0]): + is_byte_type = isinstance(ndarray_data[0][0], (bytes, np.bytes_)) if is_byte_type: - array_data = [] - if isinstance(ndarray_data[0], (np.ma.MaskedArray, np.ma.core.MaskedArray)): - for byte_data in ndarray_data: - array_data.append(byte_data.tobytes(fill_value=' ').decode('utf-8').rstrip()) - else: - for byte_data in ndarray_data: - array_data.append(byte_data.decode("utf-8").rstrip()) + array_data = met_base_tools.convert_byte_type_to_array(ndarray_data) elif isinstance(ndarray_data, (np.ma.MaskedArray, np.ma.core.MaskedArray)): array_data = ndarray_data.filled(fill_value=-9999).tolist() elif isinstance(ndarray_data, np.ndarray): diff --git a/scripts/python/met/mprbase.py b/scripts/python/met/mprbase.py index 0615171313..40cc36f7fb 100644 --- a/scripts/python/met/mprbase.py +++ b/scripts/python/met/mprbase.py @@ -6,6 +6,7 @@ class mpr_data(): # Read a text file with N columns and returns the list of N column data # Skip first "col_start" columns if col_start is not 0. + @staticmethod def read_mpr(input_file, col_last, col_start = 0, header=None, delim_whitespace=True, keep_default_na=False, skiprows=1, dtype='string'): diff --git a/scripts/python/met/point.py b/scripts/python/met/point.py index 05e3054ba3..46576c8e59 100644 --- a/scripts/python/met/point.py +++ b/scripts/python/met/point.py @@ -181,9 +181,6 @@ def check_point_data(self): if self.use_var_id: self.check_data_member_string(self.obs_var_table,'obs_var_table') - #def convert_to_numpy(self, value_list): - # return met_point_tools.convert_to_ndarray(value_list) - def dump(self): met_point_tools.print_point_data(self.get_point_data()) @@ -346,7 +343,7 @@ def write_point_data(self, tmp_filename): nc_point_obs.write_nc_file(tmp_filename, self) if met_base_tools.is_debug_enabled("point"): - met_base.log_message(f"Save to a temporary NetCDF file (point)") + met_base.log_message("Save to a temporary NetCDF file (point)") else: self.write_point_data_json_numpy(tmp_filename) @@ -417,8 +414,8 @@ def __init__(self, point_data): def check_csv_record(self, csv_point_data, index): method_name = f"{self.__class__.__name__}.check_csv_record()" error_msgs = [] - # names=['typ', 'sid', 'vld', 'lat', 'lon', 'elv', 'var', 'lvl', 'hgt', 'qc', 'obs'] - # dtype={'typ':'str', 'sid':'str', 'vld':'str', 'var':'str', 'qc':'str'} + # names: ['typ', 'sid', 'vld', 'lat', 'lon', 'elv', 'var', 'lvl', 'hgt', 'qc', 'obs'] + # dtype: {'typ':'str', 'sid':'str', 'vld':'str', 'var':'str', 'qc':'str'} if 11 > len(csv_point_data): error_msgs.append(f"{method_name} {index}-th data: missing columns. should be 11 columns, not {len(csv_point_data)} columns") elif 11 < len(csv_point_data): @@ -488,7 +485,7 @@ def convert_point_data(self): self.use_var_id = not self.is_grib_code() index = 0 - #names=['typ', 'sid', 'vld', 'lat', 'lon', 'elv', 'var', 'lvl', 'hgt', 'qc', 'obs'] + #name: ['typ', 'sid', 'vld', 'lat', 'lon', 'elv', 'var', 'lvl', 'hgt', 'qc', 'obs'] for csv_point_record in self.point_data: # Build header map. hdr_typ_str = csv_point_record[0] @@ -539,7 +536,7 @@ def convert_point_data(self): obs_qty_map[qc_str] = qc_id qc_cnt += 1 - # names=['typ', 'sid', 'vld', 'lat', 'lon', 'elv', 'var', 'lvl', 'hgt', 'qc', 'obs'] + # names: ['typ', 'sid', 'vld', 'lat', 'lon', 'elv', 'var', 'lvl', 'hgt', 'qc', 'obs'] self.obs_vid[index] = var_id self.obs_hid[index] = hdr_idx self.obs_lvl[index] = self.get_num_value(csv_point_record[7]) @@ -627,21 +624,21 @@ def read_data(self, args): # - set self.input_name # # Here is a template - ''' - if isinstance(args, dict): - in_filename = args.get('in_name',None) - elif isinstance(args, list): - in_filename = args[0] - else: - in_filename = args - self.input_name = in_filename - ''' + # + # if isinstance(args, dict): + # in_filename = args.get('in_name',None) + # elif isinstance(args, list): + # in_filename = args[0] + # else: + # in_filename = args + # self.input_name = in_filename pass class dummy_point_obs(met_point_obs): def read_data(self, args): + # Do nothing to return an empty point_obs pass @@ -689,7 +686,7 @@ def print_data(key, data_array, show_count=COUNT_SHOW): @staticmethod def print_point_data(met_point_data, print_subset=True): - method_name = f"met_point_tools.print_point_data()" + method_name = "met_point_tools.print_point_data()" print(' === MET point data by python embedding ===') if print_subset: met_point_tools.print_data('nhdr',met_point_data['nhdr']) @@ -714,26 +711,26 @@ def print_point_data(met_point_data, print_subset=True): met_point_tools.print_data('obs_val',met_point_data['obs_val']) else: print(f'{method_name} All',met_point_data) - print(f" nhdr: met_point_data['nhdr']") - print(f" nobs: met_point_data['nobs']") - print(f" use_var_id: met_point_data['use_var_id']") - print(f" hdr_typ: met_point_data['hdr_typ']") - print(f"hdr_typ_table: met_point_data['hdr_typ_table']") - print(f" hdr_sid: met_point_data['hdr_sid']") - print(f"hdr_sid_table: met_point_data['hdr_sid_table']") - print(f" hdr_vld: met_point_data['hdr_vld']") - print(f"hdr_vld_table: met_point_data['hdr_vld_table']") - print(f" hdr_lat: met_point_data['hdr_lat']") - print(f" hdr_lon: met_point_data['hdr_lon']") - print(f" hdr_elv: met_point_data['hdr_elv']") - print(f" obs_hid: met_point_data['obs_hid']") - print(f" obs_vid: met_point_data['obs_vid']") - print(f"obs_var_table: met_point_data['obs_var_table']") - print(f" obs_qty: met_point_data['obs_qty']") - print(f"obs_qty_table: met_point_data['obs_qty_table']") - print(f" obs_lvl: met_point_data['obs_lvl']") - print(f" obs_hgt: met_point_data['obs_hgt']") - print(f" obs_val: met_point_data['obs_val']") + print(" nhdr: met_point_data['nhdr']") + print(" nobs: met_point_data['nobs']") + print(" use_var_id: met_point_data['use_var_id']") + print(" hdr_typ: met_point_data['hdr_typ']") + print("hdr_typ_table: met_point_data['hdr_typ_table']") + print(" hdr_sid: met_point_data['hdr_sid']") + print("hdr_sid_table: met_point_data['hdr_sid_table']") + print(" hdr_vld: met_point_data['hdr_vld']") + print("hdr_vld_table: met_point_data['hdr_vld_table']") + print(" hdr_lat: met_point_data['hdr_lat']") + print(" hdr_lon: met_point_data['hdr_lon']") + print(" hdr_elv: met_point_data['hdr_elv']") + print(" obs_hid: met_point_data['obs_hid']") + print(" obs_vid: met_point_data['obs_vid']") + print("obs_var_table: met_point_data['obs_var_table']") + print(" obs_qty: met_point_data['obs_qty']") + print("obs_qty_table: met_point_data['obs_qty_table']") + print(" obs_lvl: met_point_data['obs_lvl']") + print(" obs_hgt: met_point_data['obs_hgt']") + print(" obs_val: met_point_data['obs_val']") print(' === MET point data by python embedding ===') diff --git a/src/basic/vx_config/config_constants.h b/src/basic/vx_config/config_constants.h index 7bba9e759e..9f1366a681 100644 --- a/src/basic/vx_config/config_constants.h +++ b/src/basic/vx_config/config_constants.h @@ -462,6 +462,17 @@ enum class GridWeightType { //////////////////////////////////////////////////////////////////////// +// +// Enumeration for point_weight_flag configuration parameter +// + +enum class PointWeightType { + None, // Apply no point weighting + SID // Apply station ID weighting +}; + +//////////////////////////////////////////////////////////////////////// + // // Enumeration for grid_decomp_flag configuration parameter // @@ -538,6 +549,7 @@ static const char conf_key_model[] = "model"; static const char conf_key_desc[] = "desc"; static const char conf_key_obtype[] = "obtype"; static const char conf_key_output_flag[] = "output_flag"; +static const char conf_key_obtype_as_group_val_flag[] = "obtype_as_group_val_flag"; static const char conf_key_obs_window[] = "obs_window"; static const char conf_key_beg[] = "beg"; static const char conf_key_end[] = "end"; @@ -753,6 +765,7 @@ static const char conf_key_topo_mask[] = "topo_mask"; static const char conf_key_topo_mask_flag[] = "topo_mask.flag"; static const char conf_key_use_obs_thresh[] = "use_obs_thresh"; static const char conf_key_interp_fcst_thresh[] = "interp_fcst_thresh"; +static const char conf_key_point_weight_flag[] = "point_weight_flag"; // // Grid-Stat specific parameter key names @@ -1300,6 +1313,9 @@ static const char conf_val_bca[] = "BCA"; static const char conf_val_cos_lat[] = "COS_LAT"; static const char conf_val_area[] = "AREA"; +// Point weight flag values +static const char conf_val_sid[] = "SID"; + // Duplicate flag values static const char conf_val_unique[] = "UNIQUE"; diff --git a/src/basic/vx_config/config_util.cc b/src/basic/vx_config/config_util.cc index 5cce67dfcb..a4323a23b1 100644 --- a/src/basic/vx_config/config_util.cc +++ b/src/basic/vx_config/config_util.cc @@ -600,16 +600,14 @@ StringArray parse_conf_message_type(Dictionary *dict, bool error_out) { /////////////////////////////////////////////////////////////////////////////// StringArray parse_conf_sid_list(Dictionary *dict, const char *conf_key) { - StringArray sa, cur, sid_sa; - ConcatString mask_name; + StringArray sid_sa; const char *method_name = "parse_conf_sid_list() -> "; - sa = parse_conf_string_array(dict, conf_key, method_name); + StringArray sa(parse_conf_string_array(dict, conf_key, method_name)); - // Parse station ID's to exclude from each entry + // Append to the list of station ID's for(int i=0; i " + mlog << Debug(4) << method_name << "parsing station ID masking file \"" << tmp_file << "\"\n"; // Open the mask station id file specified + ifstream in; in.open(tmp_file.c_str()); if(!in) { - mlog << Error << "\nparse_sid_mask() -> " + mlog << Error << "\n" << method_name << "Can't open the station ID masking file \"" << tmp_file << "\".\n\n"; exit(1); @@ -665,7 +659,7 @@ void parse_sid_mask(const ConcatString &mask_sid_str, // Store the first entry as the name of the mask in >> sid_str; - mask_name = sid_str; + mask_sid.set_name(sid_str); // Store the rest of the entries as masking station ID's while(in >> sid_str) mask_sid.add(sid_str.c_str()); @@ -673,9 +667,9 @@ void parse_sid_mask(const ConcatString &mask_sid_str, // Close the input file in.close(); - mlog << Debug(4) << "parse_sid_mask() -> " + mlog << Debug(4) << method_name << "parsed " << mask_sid.n() << " station ID's for the \"" - << mask_name << "\" mask from file \"" << tmp_file << "\"\n"; + << mask_sid.name() << "\" mask from file \"" << tmp_file << "\"\n"; } // Process list of strings else { @@ -683,19 +677,19 @@ void parse_sid_mask(const ConcatString &mask_sid_str, // Print a warning if the string contains a dot which suggests // the user was trying to specify a file name. if(check_reg_exp("[.]", mask_sid_str.c_str())) { - mlog << Warning << "\nparse_sid_mask() -> " + mlog << Warning << "\n" << method_name << "unable to process \"" << mask_sid_str << "\" as a file name and processing it as a single " << "station ID mask instead.\n\n"; } - mlog << Debug(4) << "parse_sid_mask() -> " + mlog << Debug(4) << method_name << "storing single station ID mask \"" << mask_sid_str << "\"\n"; // Check for embedded whitespace or slashes if(check_reg_exp(ws_reg_exp, mask_sid_str.c_str()) || check_reg_exp("[/]", mask_sid_str.c_str())) { - mlog << Error << "\nparse_sid_mask() -> " + mlog << Error << "\n" << method_name << "masking station ID string can't contain whitespace or " << "slashes \"" << mask_sid_str << "\".\n\n"; exit(1); @@ -708,15 +702,16 @@ void parse_sid_mask(const ConcatString &mask_sid_str, // One elements means no colon was specified if(sa.n() == 1) { mask_sid.add_css(sa[0]); - mask_name = ( mask_sid.n() == 1 ? mask_sid[0] : "MASK_SID" ); + mask_sid.set_name((mask_sid.n() == 1 ? + mask_sid.sid_map().begin()->first : "MASK_SID")); } // Two elements means one colon was specified else if(sa.n() == 2) { - mask_name = sa[0]; mask_sid.add_css(sa[1]); + mask_sid.set_name(sa[0]); } else { - mlog << Error << "\nparse_sid_mask() -> " + mlog << Error << "\n" << method_name << "masking station ID string may contain at most one colon to " << "specify the mask name \"" << mask_sid_str << "\".\n\n"; exit(1); @@ -724,14 +719,26 @@ void parse_sid_mask(const ConcatString &mask_sid_str, } - // Sort the mask_sid's - mask_sid.sort(); - - return; + return mask_sid; } /////////////////////////////////////////////////////////////////////////////// +StringArray parse_sid_mask_as_list(const ConcatString &mask_sid_str) { + + MaskSID ms = parse_sid_mask(mask_sid_str); + + StringArray sa; + for(const auto &pair : ms.sid_map()) sa.add(pair.first); + + return sa; +} + +/////////////////////////////////////////////////////////////////////////////// +// +// Code for MaskLatLon struct +// +/////////////////////////////////////////////////////////////////////////////// void MaskLatLon::clear() { name.clear(); @@ -764,7 +771,6 @@ MaskLatLon &MaskLatLon::operator=(const MaskLatLon &a) noexcept { return *this; } - /////////////////////////////////////////////////////////////////////////////// vector parse_conf_llpnt_mask(Dictionary *dict) { @@ -2189,9 +2195,10 @@ HiRAInfo parse_conf_hira(Dictionary *dict) { GridWeightType parse_conf_grid_weight_flag(Dictionary *dict) { GridWeightType t = GridWeightType::None; int v; + const char *method_name = "parse_conf_grid_weight_flag() -> "; if(!dict) { - mlog << Error << "\nparse_conf_grid_weight_flag() -> " + mlog << Error << "\n" << method_name << "empty dictionary!\n\n"; exit(1); } @@ -2204,7 +2211,7 @@ GridWeightType parse_conf_grid_weight_flag(Dictionary *dict) { else if(v == conf_const.lookup_int(conf_val_cos_lat)) t = GridWeightType::Cos_Lat; else if(v == conf_const.lookup_int(conf_val_area)) t = GridWeightType::Area; else { - mlog << Error << "\nparse_conf_grid_weight_flag() -> " + mlog << Error << "\n" << method_name << "Unexpected config file value of " << v << " for \"" << conf_key_grid_weight_flag << "\".\n\n"; exit(1); @@ -2215,6 +2222,35 @@ GridWeightType parse_conf_grid_weight_flag(Dictionary *dict) { /////////////////////////////////////////////////////////////////////////////// +PointWeightType parse_conf_point_weight_flag(Dictionary *dict) { + PointWeightType t = PointWeightType::None; + int v; + const char *method_name = "parse_conf_point_weight_flag() -> "; + + if(!dict) { + mlog << Error << "\n" << method_name + << "empty dictionary!\n\n"; + exit(1); + } + + // Get the integer flag value for the current entry + v = dict->lookup_int(conf_key_point_weight_flag); + + // Convert integer to enumerated GridWeightType + if(v == conf_const.lookup_int(conf_val_none)) t = PointWeightType::None; + else if(v == conf_const.lookup_int(conf_val_sid)) t = PointWeightType::SID; + else { + mlog << Error << "\n" << method_name + << "Unexpected config file value of " << v << " for \"" + << conf_key_point_weight_flag << "\".\n\n"; + exit(1); + } + + return t; +} + +/////////////////////////////////////////////////////////////////////////////// + DuplicateType parse_conf_duplicate_flag(Dictionary *dict) { DuplicateType t = DuplicateType::None; int v; diff --git a/src/basic/vx_config/config_util.h b/src/basic/vx_config/config_util.h index 15de1e00f0..885fa6fb2e 100644 --- a/src/basic/vx_config/config_util.h +++ b/src/basic/vx_config/config_util.h @@ -55,10 +55,8 @@ extern StringArray parse_conf_message_type( extern StringArray parse_conf_sid_list( Dictionary *dict, const char *); -extern void parse_sid_mask( - const ConcatString &, - StringArray &, - ConcatString &); +extern MaskSID parse_sid_mask(const ConcatString &); +extern StringArray parse_sid_mask_as_list(const ConcatString &); extern std::vector parse_conf_llpnt_mask(Dictionary *dict); extern StringArray parse_conf_obs_qty_inc(Dictionary *dict); @@ -105,6 +103,7 @@ extern InterpInfo parse_conf_interp(Dictionary *dict, const char *); extern NbrhdInfo parse_conf_nbrhd(Dictionary *dict, const char *); extern HiRAInfo parse_conf_hira(Dictionary *dict); extern GridWeightType parse_conf_grid_weight_flag(Dictionary *dict); +extern PointWeightType parse_conf_point_weight_flag(Dictionary *dict); extern DuplicateType parse_conf_duplicate_flag(Dictionary *dict); extern ObsSummary parse_conf_obs_summary(Dictionary *dict); extern ConcatString parse_conf_tmp_dir(Dictionary *dict); diff --git a/src/basic/vx_math/hist.cc b/src/basic/vx_math/hist.cc index d0bcd924e1..c5d2c89133 100644 --- a/src/basic/vx_math/hist.cc +++ b/src/basic/vx_math/hist.cc @@ -51,7 +51,7 @@ Histogram::~Histogram() { -if ( Count ) { delete [] Count; Count = (int *) nullptr; } +Count.clear(); } @@ -93,7 +93,7 @@ void Histogram::init_from_scratch() { -Count = (int *) nullptr; +Count.clear(); Nbins = 0; @@ -120,9 +120,7 @@ void Histogram::clear() { -int j; - -for (j=0; j #include @@ -28,7 +29,7 @@ class Histogram { private: - int * Count; + std::vector Count; int Nbins; diff --git a/src/basic/vx_math/legendre.cc b/src/basic/vx_math/legendre.cc index 6a7b78e269..f04741135f 100644 --- a/src/basic/vx_math/legendre.cc +++ b/src/basic/vx_math/legendre.cc @@ -117,9 +117,9 @@ void Legendre::init_from_scratch() { -P = 0; +P.clear(); -PP = 0; +PP.clear(); clear(); @@ -135,9 +135,9 @@ void Legendre::clear() { -if ( P ) { delete [] P; P = nullptr; } +P.clear(); -if ( PP ) { delete [] PP; PP = nullptr; } +PP.clear(); X = 0.0; @@ -201,9 +201,9 @@ clear(); MaxDegree = N; -P = new double [N + 1]; +P.resize(N + 1); -PP = new double [N + 1]; +PP.resize(N + 1); calc(0.0); diff --git a/src/basic/vx_math/legendre.h b/src/basic/vx_math/legendre.h index 4d0265801f..b9af82db02 100644 --- a/src/basic/vx_math/legendre.h +++ b/src/basic/vx_math/legendre.h @@ -19,6 +19,10 @@ #define __VX_LEGENDRE_H__ +//////////////////////////////////////////////////////////////////////// + +#include + //////////////////////////////////////////////////////////////////////// @@ -37,9 +41,9 @@ class Legendre { double X; // last x value - double * P; // allocated + std::vector P; // allocated - double * PP; // allocated + std::vector PP; // allocated public: diff --git a/src/basic/vx_math/ptile.cc b/src/basic/vx_math/ptile.cc index e3253631f6..3618ae9ad4 100644 --- a/src/basic/vx_math/ptile.cc +++ b/src/basic/vx_math/ptile.cc @@ -215,11 +215,10 @@ if ( n <= 1 ) return 0; int i, j, ties_current, ties_total, tie_rank_start = 0, tie_rank_end; double tie_rank_mean; RankInfo *rank_info = (RankInfo *) nullptr; -double *ordered_array = (double *) nullptr; +vector ordered_array(n); double prev_v, v; rank_info = new RankInfo [n]; -ordered_array = new double [n]; // Each RankInfo structure contains a index value from 0 to n-1 and a pointer // to the data to be ranked @@ -296,7 +295,6 @@ if(ties_current != 0) { } if(rank_info) { delete [] rank_info; rank_info = (RankInfo *) nullptr; } -if(ordered_array) { delete [] ordered_array; ordered_array = (double *) nullptr; } return ties_total; diff --git a/src/basic/vx_util/Makefile.am b/src/basic/vx_util/Makefile.am index b0daa451e9..db0896bbd6 100644 --- a/src/basic/vx_util/Makefile.am +++ b/src/basic/vx_util/Makefile.am @@ -61,6 +61,7 @@ libvx_util_a_SOURCES = ascii_table.cc ascii_table.h \ empty_string.h \ polyline.h polyline.cc \ mask_poly.h mask_poly.cc \ + mask_sid.h mask_sid.cc \ read_fortran_binary.h read_fortran_binary.cc \ met_buffer.h met_buffer.cc \ smart_buffer.h smart_buffer.cc \ diff --git a/src/basic/vx_util/Makefile.in b/src/basic/vx_util/Makefile.in index 4c05def519..2a7015be79 100644 --- a/src/basic/vx_util/Makefile.in +++ b/src/basic/vx_util/Makefile.in @@ -129,13 +129,14 @@ am__libvx_util_a_SOURCES_DIST = ascii_table.cc ascii_table.h \ interp_util.h two_to_one.cc two_to_one.h get_filenames.cc \ get_filenames.h util_constants.h bool_to_string.h \ empty_string.h polyline.h polyline.cc mask_poly.h mask_poly.cc \ - read_fortran_binary.h read_fortran_binary.cc met_buffer.h \ - met_buffer.cc smart_buffer.h smart_buffer.cc vx_util.h \ - CircularTemplate.h CircularTemplate.cc GridTemplate.h \ - GridTemplate.cc GridPoint.h GridPoint.cc GridOffset.h \ - GridOffset.cc observation.h observation.cc stat_column_defs.h \ - handle_openmp.h handle_openmp.cc RectangularTemplate.h \ - RectangularTemplate.cc python_line.h python_line.cc + mask_sid.h mask_sid.cc read_fortran_binary.h \ + read_fortran_binary.cc met_buffer.h met_buffer.cc \ + smart_buffer.h smart_buffer.cc vx_util.h CircularTemplate.h \ + CircularTemplate.cc GridTemplate.h GridTemplate.cc GridPoint.h \ + GridPoint.cc GridOffset.h GridOffset.cc observation.h \ + observation.cc stat_column_defs.h handle_openmp.h \ + handle_openmp.cc RectangularTemplate.h RectangularTemplate.cc \ + python_line.h python_line.cc @ENABLE_PYTHON_TRUE@am__objects_1 = \ @ENABLE_PYTHON_TRUE@ libvx_util_a-python_line.$(OBJEXT) am__objects_2 = $(am__objects_1) @@ -172,6 +173,7 @@ am_libvx_util_a_OBJECTS = libvx_util_a-ascii_table.$(OBJEXT) \ libvx_util_a-get_filenames.$(OBJEXT) \ libvx_util_a-polyline.$(OBJEXT) \ libvx_util_a-mask_poly.$(OBJEXT) \ + libvx_util_a-mask_sid.$(OBJEXT) \ libvx_util_a-read_fortran_binary.$(OBJEXT) \ libvx_util_a-met_buffer.$(OBJEXT) \ libvx_util_a-smart_buffer.$(OBJEXT) \ @@ -230,6 +232,7 @@ am__depfiles_remade = ./$(DEPDIR)/libvx_util_a-CircularTemplate.Po \ ./$(DEPDIR)/libvx_util_a-main.Po \ ./$(DEPDIR)/libvx_util_a-make_path.Po \ ./$(DEPDIR)/libvx_util_a-mask_poly.Po \ + ./$(DEPDIR)/libvx_util_a-mask_sid.Po \ ./$(DEPDIR)/libvx_util_a-memory.Po \ ./$(DEPDIR)/libvx_util_a-met_buffer.Po \ ./$(DEPDIR)/libvx_util_a-normalize.Po \ @@ -508,6 +511,7 @@ libvx_util_a_SOURCES = ascii_table.cc ascii_table.h \ empty_string.h \ polyline.h polyline.cc \ mask_poly.h mask_poly.cc \ + mask_sid.h mask_sid.cc \ read_fortran_binary.h read_fortran_binary.cc \ met_buffer.h met_buffer.cc \ smart_buffer.h smart_buffer.cc \ @@ -602,6 +606,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-make_path.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-mask_poly.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-mask_sid.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-memory.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-met_buffer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-normalize.Po@am__quote@ # am--include-marker @@ -1128,6 +1133,20 @@ libvx_util_a-mask_poly.obj: mask_poly.cc @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_util_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libvx_util_a-mask_poly.obj `if test -f 'mask_poly.cc'; then $(CYGPATH_W) 'mask_poly.cc'; else $(CYGPATH_W) '$(srcdir)/mask_poly.cc'; fi` +libvx_util_a-mask_sid.o: mask_sid.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_util_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libvx_util_a-mask_sid.o -MD -MP -MF $(DEPDIR)/libvx_util_a-mask_sid.Tpo -c -o libvx_util_a-mask_sid.o `test -f 'mask_sid.cc' || echo '$(srcdir)/'`mask_sid.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvx_util_a-mask_sid.Tpo $(DEPDIR)/libvx_util_a-mask_sid.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mask_sid.cc' object='libvx_util_a-mask_sid.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_util_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libvx_util_a-mask_sid.o `test -f 'mask_sid.cc' || echo '$(srcdir)/'`mask_sid.cc + +libvx_util_a-mask_sid.obj: mask_sid.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_util_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libvx_util_a-mask_sid.obj -MD -MP -MF $(DEPDIR)/libvx_util_a-mask_sid.Tpo -c -o libvx_util_a-mask_sid.obj `if test -f 'mask_sid.cc'; then $(CYGPATH_W) 'mask_sid.cc'; else $(CYGPATH_W) '$(srcdir)/mask_sid.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvx_util_a-mask_sid.Tpo $(DEPDIR)/libvx_util_a-mask_sid.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mask_sid.cc' object='libvx_util_a-mask_sid.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_util_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libvx_util_a-mask_sid.obj `if test -f 'mask_sid.cc'; then $(CYGPATH_W) 'mask_sid.cc'; else $(CYGPATH_W) '$(srcdir)/mask_sid.cc'; fi` + libvx_util_a-read_fortran_binary.o: read_fortran_binary.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_util_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libvx_util_a-read_fortran_binary.o -MD -MP -MF $(DEPDIR)/libvx_util_a-read_fortran_binary.Tpo -c -o libvx_util_a-read_fortran_binary.o `test -f 'read_fortran_binary.cc' || echo '$(srcdir)/'`read_fortran_binary.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvx_util_a-read_fortran_binary.Tpo $(DEPDIR)/libvx_util_a-read_fortran_binary.Po @@ -1440,6 +1459,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/libvx_util_a-main.Po -rm -f ./$(DEPDIR)/libvx_util_a-make_path.Po -rm -f ./$(DEPDIR)/libvx_util_a-mask_poly.Po + -rm -f ./$(DEPDIR)/libvx_util_a-mask_sid.Po -rm -f ./$(DEPDIR)/libvx_util_a-memory.Po -rm -f ./$(DEPDIR)/libvx_util_a-met_buffer.Po -rm -f ./$(DEPDIR)/libvx_util_a-normalize.Po @@ -1531,6 +1551,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libvx_util_a-main.Po -rm -f ./$(DEPDIR)/libvx_util_a-make_path.Po -rm -f ./$(DEPDIR)/libvx_util_a-mask_poly.Po + -rm -f ./$(DEPDIR)/libvx_util_a-mask_sid.Po -rm -f ./$(DEPDIR)/libvx_util_a-memory.Po -rm -f ./$(DEPDIR)/libvx_util_a-met_buffer.Po -rm -f ./$(DEPDIR)/libvx_util_a-normalize.Po diff --git a/src/basic/vx_util/mask_sid.cc b/src/basic/vx_util/mask_sid.cc new file mode 100644 index 0000000000..7c888bfda3 --- /dev/null +++ b/src/basic/vx_util/mask_sid.cc @@ -0,0 +1,161 @@ +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* +// ** Copyright UCAR (c) 1992 - 2024 +// ** University Corporation for Atmospheric Research (UCAR) +// ** National Center for Atmospheric Research (NCAR) +// ** Research Applications Lab (RAL) +// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* + +/////////////////////////////////////////////////////////////////////////////// + +#include "vx_util.h" + +#include "mask_sid.h" + +using namespace std; + +/////////////////////////////////////////////////////////////////////////////// +// +// Code for MaskSID struct +// +/////////////////////////////////////////////////////////////////////////////// + +MaskSID::MaskSID() { + init_from_scratch(); +} + +//////////////////////////////////////////////////////////////////////// + +MaskSID::~MaskSID() { + clear(); +} + +//////////////////////////////////////////////////////////////////////// + +MaskSID::MaskSID(const MaskSID &m) { + + init_from_scratch(); + + assign(m); +} + +//////////////////////////////////////////////////////////////////////// + +MaskSID & MaskSID::operator=(const MaskSID &m) noexcept { + + if(this == &m) return *this; + + assign(m); + + return *this; +} + +//////////////////////////////////////////////////////////////////////// + +void MaskSID::init_from_scratch() { + + clear(); + + return; +} + +//////////////////////////////////////////////////////////////////////// + +void MaskSID::clear() { + Name.clear(); + HasWeights = false; + SIDMap.clear(); +} + +//////////////////////////////////////////////////////////////////////// + +void MaskSID::assign(const MaskSID & m) { + Name = m.Name; + HasWeights = m.HasWeights; + SIDMap = m.SIDMap; + + return; +} + +/////////////////////////////////////////////////////////////////////////////// + +bool MaskSID::operator==(const MaskSID &m) const { + bool match = true; + + if(!(Name == m.Name ) || + !(SIDMap == m.SIDMap)) { + match = false; + } + + return match; +} + +/////////////////////////////////////////////////////////////////////////////// + +const std::map & MaskSID::sid_map() const { + return SIDMap; +} + +/////////////////////////////////////////////////////////////////////////////// + +void MaskSID::set_name(const string &s) { + Name = s; + + return; +} + +/////////////////////////////////////////////////////////////////////////////// + +void MaskSID::add(const string &text) { + ConcatString sid(text); + + // Default weight value of 1.0 + double weight = 1.0; + + // Check for optional weight + StringArray sa(sid.split("(")); + if(sa.n() > 1) { + sid = sa[0]; + weight = stod(sa[1]); + HasWeights = true; + } + + // Add station ID map entry + if(SIDMap.count(sid) == 0) SIDMap[sid] = weight; + + return; +} + +/////////////////////////////////////////////////////////////////////////////// + +void MaskSID::add_css(const string &text) { + StringArray sa; + sa.add_css(text); + for(int i=0; i 0; +} + +/////////////////////////////////////////////////////////////////////////////// + +bool MaskSID::has_sid(const string &s, double &weight) const { + bool found = false; + + if(SIDMap.count(s) == 0) { + weight = bad_data_double; + } + else { + found = true; + weight = SIDMap.at(s); + } + + return found; +} + +/////////////////////////////////////////////////////////////////////////////// + diff --git a/src/basic/vx_util/mask_sid.h b/src/basic/vx_util/mask_sid.h new file mode 100644 index 0000000000..81b7071f37 --- /dev/null +++ b/src/basic/vx_util/mask_sid.h @@ -0,0 +1,71 @@ +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* +// ** Copyright UCAR (c) 1992 - 2024 +// ** University Corporation for Atmospheric Research (UCAR) +// ** National Center for Atmospheric Research (NCAR) +// ** Research Applications Lab (RAL) +// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* +//////////////////////////////////////////////////////////////////////// + +#ifndef __MASK_SID_H__ +#define __MASK_SID_H__ + +#include "vx_util.h" + +//////////////////////////////////////////////////////////////////////// +// +// Class to store masking station id information +// +//////////////////////////////////////////////////////////////////////// + +class MaskSID { + + void init_from_scratch(); + + void assign(const MaskSID &); + + // Mask name + ConcatString Name; + + // Boolean for non-default weights + bool HasWeights; + + // Mapping of SID name to weight value + std::map SIDMap; + + public: + + MaskSID(); + ~MaskSID(); + MaskSID(const MaskSID &); + MaskSID & operator=(const MaskSID &) noexcept; + + void clear(); + bool operator==(const MaskSID &) const; + + int n() const; + std::string name() const; + bool has_weights() const; + const std::map & sid_map() const; + + void set_name(const std::string &); + + // Formatted as: station_name(numeric_weight) + void add(const std::string &); + void add_css(const std::string &); + bool has_sid(const std::string &) const ; + bool has_sid(const std::string &, double &) const; +}; + +//////////////////////////////////////////////////////////////////////// + +inline int MaskSID::n() const { return (int) SIDMap.size(); } +inline std::string MaskSID::name() const { return Name; } +inline bool MaskSID::has_weights() const { return HasWeights; } + +//////////////////////////////////////////////////////////////////////// + +#endif // __MASK_SID_H__ + +//////////////////////////////////////////////////////////////////////// + diff --git a/src/basic/vx_util/num_array.cc b/src/basic/vx_util/num_array.cc index cb5046c8a6..06452934f3 100644 --- a/src/basic/vx_util/num_array.cc +++ b/src/basic/vx_util/num_array.cc @@ -123,7 +123,7 @@ void NumArray::init_from_scratch() { clear(); - + return; } @@ -171,7 +171,7 @@ void NumArray::assign(const NumArray & a) clear(); e = a.e; - + Sorted = a.Sorted; return; @@ -209,7 +209,7 @@ void NumArray::dump(ostream & out, int depth) const int j; for (j=0; j data (n); + vector data_loc (n); + vector data_rank (n); + if ( data.size() < n || data_loc.size() < n || data_rank.size() < n) { + mlog << Error << "\nint NumArray::rank_array() -> " << "memory allocation error\n\n"; - + exit ( 1 ); - + } // @@ -679,20 +677,13 @@ int NumArray::rank_array(int &ties) // Compute the rank of the data and store the ranks in the data_rank array // Keep track of the number of ties in the ranks. // - ties = do_rank(data, data_rank, n_vld); + ties = do_rank(data.data(), data_rank.data(), n_vld); // // Store the data_rank values // for(i=0; i time_values(tim_buf_size); - if( get_nc_data(nc_time_var, time_values) ) { + if( get_nc_data(nc_time_var, time_values.data()) ) { bool no_leap_year = get_att_no_leap_year(valid_time_var); if( time_dim_count > 1 ) { double latest_time = bad_data_double; @@ -381,7 +381,6 @@ bool NcCfFile::open(const char * filepath) } } else ValidTime.add(0); //Initialize - delete [] time_values; } NcVar init_time_var = get_var(_ncFile, "forecast_reference_time"); @@ -504,14 +503,13 @@ bool NcCfFile::open(const char * filepath) if (IS_VALID_NC_P(z_var)) { int z_count = get_data_size(z_var); - auto z_values = new double[z_count]; + vector z_values(z_count); - if( get_nc_data(z_var, z_values) ) { + if( get_nc_data(z_var, z_values.data()) ) { for(int i=0; i d(plane_size); size_t dim_size; LongArray offsets; @@ -1125,7 +1123,7 @@ bool NcCfFile::getData(NcVar * v, const LongArray & a, DataPlane & plane) const offsets[y_slot] = 0; lengths[y_slot] = ny; - get_nc_data(v, d, lengths, offsets); + get_nc_data(v, d.data(), lengths, offsets); int offset = 0; if( x_slot > y_slot ) { @@ -1163,8 +1161,6 @@ bool NcCfFile::getData(NcVar * v, const LongArray & a, DataPlane & plane) const } /* for x */ } - delete [] d; - // done mlog << Debug(6) << method_name << "took " << get_exe_duration(start_clock) << " seconds\n"; diff --git a/src/libcode/vx_data2d_nc_met/get_met_grid.cc b/src/libcode/vx_data2d_nc_met/get_met_grid.cc index 90a6cd798b..0c428c6ab2 100644 --- a/src/libcode/vx_data2d_nc_met/get_met_grid.cc +++ b/src/libcode/vx_data2d_nc_met/get_met_grid.cc @@ -699,10 +699,9 @@ void get_semilatlon_var(NcFile *ncfile, const char * var_name, NumArray &out_na) // Store the requested data in the specified NumArray object long count = get_data_size(&nc_var); - double * data_values = new double[ count ]; - get_nc_data(&nc_var, data_values); + vector data_values(count); + get_nc_data(&nc_var, data_values.data()); for(int i=0; i data_array(cell_count); + vector double_array(cell_count); clock_time = clock(); - get_nc_data(v, double_array, dim, cur); - copy_nc_data_as_double(data_array, double_array, x_slot, y_slot, Nx, Ny, + get_nc_data(v, double_array.data(), dim, cur); + copy_nc_data_as_double(data_array.data(), double_array.data(), x_slot, y_slot, Nx, Ny, missing_value, fill_value); nc_time = clock(); if (mlog.verbosity_level() >= 7) { double duration_sec = (double)(nc_time - clock_time)/CLOCKS_PER_SEC; - check_nc_data_2d(data_array, Nx, Ny, missing_value); + check_nc_data_2d(data_array.data(), Nx, Ny, missing_value); mlog << Debug(7) << method_name_short << "took " << duration_sec << " seconds to read NetCDF data\n"; } - plane.set_block(data_array, Nx, Ny); + plane.set_block(data_array.data(), Nx, Ny); if (mlog.verbosity_level() >= 7) { double duration_sec = (double)(clock() - nc_time)/CLOCKS_PER_SEC; @@ -612,9 +612,6 @@ plane.set_size(Nx, Ny); << " seconds to fill data plane\n"; } - if (data_array) delete[] data_array; - if (double_array) delete[] double_array; - // // done // diff --git a/src/libcode/vx_data2d_nc_wrf/wrf_file.cc b/src/libcode/vx_data2d_nc_wrf/wrf_file.cc index 5279ca49f7..56820aea09 100644 --- a/src/libcode/vx_data2d_nc_wrf/wrf_file.cc +++ b/src/libcode/vx_data2d_nc_wrf/wrf_file.cc @@ -849,7 +849,7 @@ plane.set_size(Nx, Ny); // // get the data // -double d[Ny]; +vector d(Ny); LongArray offsets; LongArray lengths; @@ -863,7 +863,7 @@ lengths[y_slot] = Ny; int type_id = GET_NC_TYPE_ID_P(v); for (x=0; x time_values(tim_buf_size); if(2 == time_dim_count) { for(int i=0; i 1 ) { double latest_time = bad_data_double; @@ -396,7 +396,6 @@ bool UGridFile::open_metadata(const char * filepath) } } else ValidTime.add(0); //Initialize - delete [] time_values; } // Pull out the grid. This must be done after pulling out the dimension @@ -440,14 +439,13 @@ bool UGridFile::open_metadata(const char * filepath) if (IS_VALID_NC_P(z_var)) { int z_count = (int) get_data_size(z_var); - double *z_values = new double[z_count]; + vector z_values(z_count); - if( get_nc_data(z_var, z_values) ) { + if( get_nc_data(z_var, z_values.data()) ) { for(int i=0; i d(plane_size); int length; size_t dim_size; @@ -726,7 +724,7 @@ bool UGridFile::getData(NcVar * v, const LongArray & a, DataPlane & plane) const } } - get_nc_data(v, d, lengths, offsets); + get_nc_data(v, d.data(), lengths, offsets); double min_value = 10e10; double max_value = -min_value; @@ -744,8 +742,6 @@ bool UGridFile::getData(NcVar * v, const LongArray & a, DataPlane & plane) const } // for x - if (nullptr != d) delete [] d; - // done ConcatString log_message; for (int idx=0; idx _lat(face_count); + vector _lon(face_count); if (IS_INVALID_NC_P(_latVar)) { mlog << Error << "\n" << method_name << "latitude variable is missing\n\n"; exit(1); } - else if (!get_nc_data(_latVar,_lat)) { + else if (!get_nc_data(_latVar,_lat.data())) { mlog << Error << "\n" << method_name << "fail to read latitude values\n\n"; exit(1); } @@ -922,7 +918,7 @@ void UGridFile::read_netcdf_grid() mlog << Error << "\n" << method_name << "longitude variable is missing\n\n"; exit(1); } - else if (!get_nc_data(_lonVar,_lon)) { + else if (!get_nc_data(_lonVar,_lon.data())) { mlog << Error << "\n" << method_name << "fail to read latitude values\n\n"; exit(1); } @@ -943,7 +939,7 @@ void UGridFile::read_netcdf_grid() // Convert longitude from degrees east to west for (int idx=0; idx hdr_typ_idx_block(buf_size); + vector hdr_sid_idx_block(buf_size); + vector hdr_vld_idx_block(buf_size); + vector hdr_lat_block(buf_size); + vector hdr_lon_block(buf_size); + vector hdr_elv_block(buf_size); LongArray offsets; // = { 0, 0 }; LongArray lengths; // = { 1, 1 }; @@ -685,7 +685,7 @@ void NetcdfObsVars::read_header_data(MetPointHeader &hdr_data) { else { // Get the corresponding header message type (index, not string) if(!get_nc_data(&hdr_typ_var, - hdr_typ_idx_block, lengths_1D, offsets_1D)) { + hdr_typ_idx_block.data(), lengths_1D, offsets_1D)) { mlog << Error << "\n" << method_name << "trouble getting hdr_typ\n\n"; exit(1); @@ -693,7 +693,7 @@ void NetcdfObsVars::read_header_data(MetPointHeader &hdr_data) { // Get the corresponding header station id (index, not string) if(!get_nc_data(&hdr_sid_var, - hdr_sid_idx_block, lengths_1D, offsets_1D)) { + hdr_sid_idx_block.data(), lengths_1D, offsets_1D)) { mlog << Error << "\n" << method_name << "trouble getting hdr_sid\n\n"; exit(1); @@ -701,7 +701,7 @@ void NetcdfObsVars::read_header_data(MetPointHeader &hdr_data) { // Get the corresponding header valid time (index, not string) if(!get_nc_data(&hdr_vld_var, - hdr_vld_idx_block, lengths_1D, offsets_1D)) { + hdr_vld_idx_block.data(), lengths_1D, offsets_1D)) { mlog << Error << "\n" << method_name << "trouble getting hdr_vld\n\n"; exit(1); @@ -711,19 +711,19 @@ void NetcdfObsVars::read_header_data(MetPointHeader &hdr_data) { // Get the header for this observation // if(!get_nc_data(&hdr_lat_var, - hdr_lat_block, lengths_1D, offsets_1D)) { + hdr_lat_block.data(), lengths_1D, offsets_1D)) { mlog << Error << "\n" << method_name << "trouble getting hdr_lat\n\n"; exit(1); } if(!get_nc_data(&hdr_lon_var, - hdr_lon_block, lengths_1D, offsets_1D)) { + hdr_lon_block.data(), lengths_1D, offsets_1D)) { mlog << Error << "\n" << method_name << "trouble getting hdr_lon\n\n"; exit(1); } if(!get_nc_data(&hdr_elv_var, - hdr_elv_block, lengths_1D, offsets_1D)) { + hdr_elv_block.data(), lengths_1D, offsets_1D)) { mlog << Error << "\n" << method_name << "trouble getting hdr_elv\n\n"; exit(1); @@ -739,13 +739,6 @@ void NetcdfObsVars::read_header_data(MetPointHeader &hdr_data) { } } - delete[] hdr_typ_idx_block; - delete[] hdr_sid_idx_block; - delete[] hdr_vld_idx_block; - delete[] hdr_lat_block; - delete[] hdr_lon_block; - delete[] hdr_elv_block; - if (!has_array_vars) { int tmp_dim_size; @@ -860,40 +853,40 @@ bool NetcdfObsVars::read_obs_data(int buf_size, int offset, } } else { - int *obs_hid_buf = new int[buf_size]; - int *obs_vid_buf = new int[buf_size]; - float *obs_lvl_buf = new float[buf_size]; - float *obs_hgt_buf = new float[buf_size]; - float *obs_val_buf = new float[buf_size]; + vector obs_hid_buf(buf_size); + vector obs_vid_buf(buf_size); + vector obs_lvl_buf(buf_size); + vector obs_hgt_buf(buf_size); + vector obs_val_buf(buf_size); lengths[1] = 1; - if(!get_nc_data(&obs_hid_var, obs_hid_buf, lengths, offsets)) { + if(!get_nc_data(&obs_hid_var, obs_hid_buf.data(), lengths, offsets)) { mlog << Error << "\n" << method_name << "can't read the record for observation " << "index " << offset << "\n\n"; result = false; } if(!get_nc_data((IS_INVALID_NC(obs_gc_var) ? &obs_vid_var : &obs_gc_var), - obs_vid_buf, lengths, offsets)) { + obs_vid_buf.data(), lengths, offsets)) { mlog << Error << "\n" << method_name << "can't read the record (vid or gc) for observation " << "index " << offset << "\n\n"; result = false; } - if(!get_nc_data(&obs_lvl_var, obs_lvl_buf, lengths, offsets)) { + if(!get_nc_data(&obs_lvl_var, obs_lvl_buf.data(), lengths, offsets)) { mlog << Error << "\n" << method_name << "can't read the record (lvl) for observation " << "index " << offset << "\n\n"; result = false; } - if(!get_nc_data(&obs_hgt_var, obs_hgt_buf, lengths, offsets)) { + if(!get_nc_data(&obs_hgt_var, obs_hgt_buf.data(), lengths, offsets)) { mlog << Error << "\n" << method_name << "can't read the record (hgt) for observation " << "index " << offset << "\n\n"; result = false; } - if(!get_nc_data(&obs_val_var, obs_val_buf, lengths, offsets)) { + if(!get_nc_data(&obs_val_var, obs_val_buf.data(), lengths, offsets)) { mlog << Error << "\n" << method_name << "can't read the record (val) for observation " << "index " << offset << "\n\n"; @@ -918,11 +911,6 @@ bool NetcdfObsVars::read_obs_data(int buf_size, int offset, } } - delete[] obs_hid_buf; - delete[] obs_vid_buf; - delete[] obs_lvl_buf; - delete[] obs_hgt_buf; - delete[] obs_val_buf; } return result; } @@ -955,9 +943,9 @@ void NetcdfObsVars::read_pb_hdr_data(MetPointHeader &hdr_data) { // Read PB report type int buf_size = ((pb_hdr_count > NC_BUFFER_SIZE_32K) ? NC_BUFFER_SIZE_32K : pb_hdr_count); - int *hdr_prpt_typ_block = new int[buf_size]; - int *hdr_irpt_typ_block = new int[buf_size]; - int *hdr_inst_typ_block = new int[buf_size]; + vector hdr_prpt_typ_block(buf_size); + vector hdr_irpt_typ_block(buf_size); + vector hdr_inst_typ_block(buf_size); for(int i_start=0; i_start NC_BUFFER_SIZE_32K) buf_size2 = NC_BUFFER_SIZE_32K; @@ -967,7 +955,7 @@ void NetcdfObsVars::read_pb_hdr_data(MetPointHeader &hdr_data) { if (has_hdr_prpt_typ_var) { // Get the corresponding header PB message type (string) if(!get_nc_data(&hdr_prpt_typ_var, - hdr_prpt_typ_block, lengths, offsets)) { + hdr_prpt_typ_block.data(), lengths, offsets)) { mlog << Error << "\n" << method_name << "trouble getting hdr_prpt_typ\n\n"; exit(1); @@ -977,7 +965,7 @@ void NetcdfObsVars::read_pb_hdr_data(MetPointHeader &hdr_data) { if (has_hdr_irpt_typ_var) { // Get the corresponding header In message type (string) if(!get_nc_data(&hdr_irpt_typ_var, - hdr_irpt_typ_block, lengths, offsets)) { + hdr_irpt_typ_block.data(), lengths, offsets)) { mlog << Error << "\n" << method_name << "trouble getting hdr_irpt_typ\n\n"; exit(1); @@ -987,7 +975,7 @@ void NetcdfObsVars::read_pb_hdr_data(MetPointHeader &hdr_data) { if (has_hdr_inst_typ_var) { // Get the corresponding header instrument type (string) if(!get_nc_data(&hdr_inst_typ_var, - hdr_inst_typ_block, lengths, offsets)) { + hdr_inst_typ_block.data(), lengths, offsets)) { mlog << Error << "\n" << method_name << "trouble getting hdr_inst_typ\n\n"; exit(1); @@ -1001,10 +989,6 @@ void NetcdfObsVars::read_pb_hdr_data(MetPointHeader &hdr_data) { } } - delete[] hdr_prpt_typ_block; - delete[] hdr_irpt_typ_block; - delete[] hdr_inst_typ_block; - } /////////////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_nc_util/nc_utils.cc b/src/libcode/vx_nc_util/nc_utils.cc index f773d5178b..36b71cd509 100644 --- a/src/libcode/vx_nc_util/nc_utils.cc +++ b/src/libcode/vx_nc_util/nc_utils.cc @@ -240,10 +240,9 @@ double get_att_value_double(const NcAtt *att) { void get_att_value_doubles(const NcAtt *att, NumArray &value) { value.erase(); - double *values = new double[att->getAttLength()]; - att->getValues(values); + vector values(att->getAttLength()); + att->getValues(values.data()); for(unsigned int i=0; i<=att->getAttLength(); i++) value.add(values[i]); - if(values) { delete [] values; values = 0; } return; } @@ -1397,8 +1396,8 @@ bool get_nc_data(NcVar *var, float *data) { switch ( type_id ) { case NcType::nc_DOUBLE: { - double *packed_data = new double[cell_count]; - if (get_nc_data_t(var, packed_data)) { + vector packed_data(cell_count); + if (get_nc_data_t(var, packed_data.data())) { double fill_value; bool has_fill_value = get_var_fill_value(var, fill_value); for (int idx=0; idx packed_data(cell_count, (long long)bad_data_int); - var->getVar(packed_data); - copy_nc_data_(var, data, packed_data, cell_count, + var->getVar(packed_data.data()); + copy_nc_data_(var, data, packed_data.data(), cell_count, "int64", add_offset, scale_factor); - delete [] packed_data; } break; case NcType::nc_INT: { - int *packed_data = new int[cell_count]; + vector packed_data(cell_count); - var->getVar(packed_data); - copy_nc_data_(var, data, packed_data, cell_count, + var->getVar(packed_data.data()); + copy_nc_data_(var, data, packed_data.data(), cell_count, "int", add_offset, scale_factor); - delete [] packed_data; } break; case NcType::nc_SHORT: { short missing_value; bool has_missing = get_var_fill_value(var, missing_value); - short *packed_data = new short[cell_count]; + vector packed_data(cell_count); - var->getVar(packed_data); + var->getVar(packed_data.data()); if (unsigned_value) { - unsigned short *ushort_data = new unsigned short[cell_count]; + vector ushort_data(cell_count); for (int idx=0; idx packed_data(cell_count); - var->getVar(packed_data); - copy_nc_data_(var, data, packed_data, cell_count, + var->getVar(packed_data.data()); + copy_nc_data_(var, data, packed_data.data(), cell_count, "unsigned short", add_offset, scale_factor); - delete [] packed_data; } break; case NcType::nc_BYTE: { ncbyte missing_value; bool has_missing = get_var_fill_value(var, missing_value); - ncbyte *packed_data = new ncbyte[cell_count]; + vector packed_data(cell_count); - var->getVar(packed_data); + var->getVar(packed_data.data()); if (unsigned_value) { - unsigned char *ubyte_data = new unsigned char[cell_count]; + vector ubyte_data(cell_count); for (int idx=0; idx packed_data(cell_count); - var->getVar(packed_data); - copy_nc_data_(var, data, packed_data, cell_count, + var->getVar(packed_data.data()); + copy_nc_data_(var, data, packed_data.data(), cell_count, "unsigned char", add_offset, scale_factor); - delete [] packed_data; } break; default: @@ -1601,9 +1590,9 @@ bool get_nc_data(NcVar *var, double *data) { switch ( type_id ) { case NcType::nc_FLOAT: { - float *packed_data = new float[cell_count]; + vector packed_data(cell_count); - var->getVar(packed_data); + var->getVar(packed_data.data()); float fill_value; bool has_fill_value = get_var_fill_value(var, fill_value); @@ -1612,96 +1601,87 @@ bool get_nc_data(NcVar *var, double *data) { data[idx] = bad_data_double; else data[idx] = (double)packed_data[idx]; } - delete [] packed_data; } break; case NcType::nc_INT64: { - long long *packed_data = new long long[cell_count]; + vector packed_data(cell_count); - var->getVar(packed_data); - copy_nc_data_(var, data, packed_data, cell_count, + var->getVar(packed_data.data()); + copy_nc_data_(var, data, packed_data.data(), cell_count, "int64", add_offset, scale_factor); - delete [] packed_data; } break; case NcType::nc_INT: { - int *packed_data = new int[cell_count]; + vector packed_data(cell_count); - var->getVar(packed_data); - copy_nc_data_(var, data, packed_data, cell_count, + var->getVar(packed_data.data()); + copy_nc_data_(var, data, packed_data.data(), cell_count, "int", add_offset, scale_factor); - delete [] packed_data; } break; case NcType::nc_SHORT: { short missing_value; bool has_missing = get_var_fill_value(var, missing_value); - short *packed_data = new short[cell_count]; - var->getVar(packed_data); + vector packed_data(cell_count); + var->getVar(packed_data.data()); if (unsigned_value) { - unsigned short *ushort_data = new unsigned short[cell_count]; + vector ushort_data(cell_count); for (int idx=0; idx packed_data(cell_count); - var->getVar(packed_data); - copy_nc_data_(var, data, packed_data, cell_count, + var->getVar(packed_data.data()); + copy_nc_data_(var, data, packed_data.data(), cell_count, "ushort", add_offset, scale_factor); - delete [] packed_data; } break; case NcType::nc_BYTE: { ncbyte missing_value; bool has_missing = get_var_fill_value(var, missing_value); - ncbyte *packed_data = new ncbyte[cell_count]; + vector packed_data(cell_count); - var->getVar(packed_data); + var->getVar(packed_data.data()); if (unsigned_value) { - unsigned char *ubyte_data = new unsigned char[cell_count]; + vector ubyte_data(cell_count); for (int idx=0; idx packed_data(cell_count); - var->getVar(packed_data); - copy_nc_data_(var, data, packed_data, cell_count, + var->getVar(packed_data.data()); + copy_nc_data_(var, data, packed_data.data(), cell_count, "ncubyte", add_offset, scale_factor); - delete [] packed_data; } break; default: @@ -1770,14 +1750,13 @@ bool get_nc_data(NcVar *var, uchar *data, bool allow_conversion) { << "INFO: Unexpected conversion from 'ncbyte' for variable \"" << GET_NC_NAME_P(var) << "\".\n\n"; } - ncbyte *signed_data = new ncbyte[cell_count]; - return_status = get_nc_data_t(var, signed_data); + vector signed_data(cell_count); + return_status = get_nc_data_t(var, signed_data.data()); if (return_status) { for (int idx=0; idx short_data(cell_count); + if (return_status = get_nc_data_t(var, short_data.data())) { for (int idx=0; idx values(data_size); - if (get_nc_data(var, values)) { + if (get_nc_data(var, values.data())) { unixtime ut; int sec_per_unit; bool no_leap_year = get_att_no_leap_year(var); @@ -1943,7 +1921,6 @@ int get_index_at_nc_data(NcVar *var, double value, const string dim_name, bool i } } } - if (values) delete [] values; ConcatString value_str; if (is_time && (value > 10000000.)) value_str << unix_to_yyyymmdd_hhmmss(value); @@ -2818,65 +2795,45 @@ void copy_nc_atts(NcVar *var_from, NcVar *var_to, const bool all_attrs) { void copy_nc_data_char(NcVar *var_from, NcVar *var_to, int data_size) { //const string method_name = "copy_nc_data_char"; - char *data = new char[data_size]; - var_from->getVar(data); - var_to->putVar(data); - // mlog << Error << "\n" << method_name << " -> error writing the variable " - // << GET_NC_NAME_P(var_to) << " to the netCDF file\n\n"; - // exit(1); - delete[] data; + vector data(data_size); + var_from->getVar(data.data()); + var_to->putVar(data.data()); } //////////////////////////////////////////////////////////////////////// void copy_nc_data_double(NcVar *var_from, NcVar *var_to, int data_size) { //const string method_name = "copy_nc_data_double"; - double *data = new double[data_size]; - var_from->getVar(data); - var_to->putVar(data); - // mlog << Error << "\n" << method_name << " -> error writing the variable " - // << GET_NC_NAME_P(var_to) << " to the netCDF file\n\n"; - // exit(1); - delete[] data; + vector data(data_size); + var_from->getVar(data.data()); + var_to->putVar(data.data()); } //////////////////////////////////////////////////////////////////////// void copy_nc_data_float(NcVar *var_from, NcVar *var_to, int data_size) { //const string method_name = "copy_nc_data_float"; - float *data = new float[data_size]; - var_from->getVar(data); - var_to->putVar(data); - // mlog << Error << "\n" << method_name << " -> error writing the variable " - // << GET_NC_NAME_P(var_to) << " to the netCDF file\n\n"; - // exit(1); - delete[] data; + vector data(data_size); + var_from->getVar(data.data()); + var_to->putVar(data.data()); } //////////////////////////////////////////////////////////////////////// void copy_nc_data_int(NcVar *var_from, NcVar *var_to, int data_size) { //const string method_name = "copy_nc_data_int"; - int *data = new int[data_size]; - var_from->getVar(data); - var_to->putVar(data); - // mlog << Error << "\n" << method_name << " -> error writing the variable " - // << GET_NC_NAME_P(var_to) << " to the netCDF file\n\n"; - // exit(1); - delete[] data; + vector data(data_size); + var_from->getVar(data.data()); + var_to->putVar(data.data()); } //////////////////////////////////////////////////////////////////////// void copy_nc_data_short(NcVar *var_from, NcVar *var_to, int data_size) { //const string method_name = "copy_nc_data_double"; - short *data = new short[data_size]; - var_from->getVar(data); - var_to->putVar(data); - // mlog << Error << "\n" << method_name << " -> error writing the variable " - // << GET_NC_NAME_P(var_to) << " to the netCDF file\n\n"; - // exit(1); - delete[] data; + vector data(data_size); + var_from->getVar(data.data()); + var_to->putVar(data.data()); } //////////////////////////////////////////////////////////////////////// @@ -2886,9 +2843,6 @@ void copy_nc_data_string(NcVar *var_from, NcVar *var_to, int data_size) { string *data = new string[data_size]; var_from->getVar(data); var_to->putVar(data); - // mlog << Error << "\n" << method_name << " -> error writing the variable " - // << GET_NC_NAME_P(var_to) << " to the netCDF file\n\n"; - // exit(1); delete[] data; } diff --git a/src/libcode/vx_nc_util/write_netcdf.cc b/src/libcode/vx_nc_util/write_netcdf.cc index 6a747cf7df..e156f85ce7 100644 --- a/src/libcode/vx_nc_util/write_netcdf.cc +++ b/src/libcode/vx_nc_util/write_netcdf.cc @@ -113,8 +113,8 @@ void write_netcdf_latlon_1d(NcFile *f_out, NcDim *lat_dim, NcDim *lon_dim, NcVar lat_var; NcVar lon_var; // Allocate space for lat/lon values - float *lat_data = new float [grid.ny()]; - float *lon_data = new float [grid.nx()]; + vector lat_data(grid.ny()); + vector lon_data(grid.nx()); // Define Variables lat_var = f_out->addVar("lat", ncFloat, *lat_dim); @@ -142,13 +142,10 @@ void write_netcdf_latlon_1d(NcFile *f_out, NcDim *lat_dim, NcDim *lon_dim, } // Write the lat data - put_nc_data(&lat_var, &lat_data[0], lat_dim->getSize(), 0); + put_nc_data(&lat_var, lat_data.data(), lat_dim->getSize(), 0); // Write the lon data - put_nc_data(&lon_var, &lon_data[0], lon_dim->getSize(), 0); - - if ( lat_data ) { delete [] lat_data; lat_data = nullptr; } - if ( lon_data ) { delete [] lon_data; lon_data = nullptr; } + put_nc_data(&lon_var, lon_data.data(), lon_dim->getSize(), 0); return; } @@ -164,8 +161,8 @@ void write_netcdf_latlon_2d(NcFile *f_out, NcDim *lat_dim, NcDim *lon_dim, long counts[2] = {grid.ny(), grid.nx()}; long offsets[2] = {0 , 0}; // Allocate space for lat/lon values - float *lat_data = new float [grid.nx()*grid.ny()]; - float *lon_data = new float [grid.nx()*grid.ny()]; + vector lat_data(grid.nx()*grid.ny()); + vector lon_data(grid.nx()*grid.ny()); // Define Variables dims.push_back(*lat_dim); @@ -196,13 +193,10 @@ void write_netcdf_latlon_2d(NcFile *f_out, NcDim *lat_dim, NcDim *lon_dim, } // Write the lat data - put_nc_data(&lat_var, &lat_data[0], counts, offsets); + put_nc_data(&lat_var, lat_data.data(), counts, offsets); // Write the lon data - put_nc_data(&lon_var, &lon_data[0], counts, offsets); - - if ( lat_data ) { delete [] lat_data; lat_data = nullptr; } - if ( lon_data ) { delete [] lon_data; lon_data = nullptr; } + put_nc_data(&lon_var, lon_data.data(), counts, offsets); return; } @@ -216,7 +210,7 @@ void write_netcdf_grid_weight(NcFile *f_out, NcDim *lat_dim, NcDim *lon_dim, vector dims; vector count; // Allocate space for weight values - float *wgt_data = new float [wgt_dp.nx()*wgt_dp.ny()]; + vector wgt_data(wgt_dp.nx()*wgt_dp.ny()); // Define Variables dims.push_back(*lat_dim); @@ -256,10 +250,9 @@ void write_netcdf_grid_weight(NcFile *f_out, NcDim *lat_dim, NcDim *lon_dim, // Write the weights count.push_back(wgt_dp.ny()); count.push_back(wgt_dp.nx()); - put_nc_data_with_dims(&wgt_var, &wgt_data[0], wgt_dp.ny(), wgt_dp.nx()); + put_nc_data_with_dims(&wgt_var, wgt_data.data(), wgt_dp.ny(), wgt_dp.nx()); // Clean up - if(wgt_data) { delete [] wgt_data; wgt_data = (float *) nullptr; } return; } diff --git a/src/libcode/vx_python3_utils/wchar_argv.cc b/src/libcode/vx_python3_utils/wchar_argv.cc index a51eea0675..ff26b0d215 100644 --- a/src/libcode/vx_python3_utils/wchar_argv.cc +++ b/src/libcode/vx_python3_utils/wchar_argv.cc @@ -13,11 +13,11 @@ //////////////////////////////////////////////////////////////////////// +#include #include #include #include #include -#include #include "wchar_argv.h" #include "concat_string.h" @@ -96,9 +96,9 @@ void Wchar_Argv::init_from_scratch() { -W_Buf = 0; +W_Buf = nullptr; -W_Argv = 0; +W_Argv = nullptr; return; @@ -132,33 +132,27 @@ void Wchar_Argv::set(const StringArray & a) { -int j, k, N; -int len; -char * s = nullptr; -char ** av = nullptr; +int k = 0; +int len = 0; ConcatString c; const char *method_name = "Wchar_Argv::set() -> "; -len = 0; - -for (j=0; j<(a.n()); ++j) { +for (int j=0; j<(a.n()); ++j) { len += a.length(j); } -N = len + a.n(); +int N = len + a.n(); -s = new char [N]; +char * s = new char [N]; -av = new char * [a.n()]; +char ** av = new char * [a.n()]; memset(s, 0, N); -k = 0; - -for (j=0; j<(a.n()); ++j) { +for (int j=0; j<(a.n()); ++j) { av[j] = s + k; @@ -196,27 +190,24 @@ void Wchar_Argv::set(int _argc, char ** _argv) clear(); -int j, k; -int argv_len; -int * len = nullptr; +int k; +int *len = new int [_argc]; Argc = _argc; -len = new int [Argc]; - - // // total length of the argument string ... // -argv_len = 0; +int argv_len = 0; -for (j=0; j<_argc; ++j) { +for (int j=0; j<_argc; ++j) { - len[j] = m_strlen(_argv[j]); // we're using the len array here because - // we don't want to call m_strlen more than - // once on each argv value + // we're using the len array here because + // we don't want to call m_strlen more than + // once on each argv value + len[j] = (_argv == nullptr) ? 0 : len[j] = m_strlen(_argv[j]); argv_len += len[j]; @@ -235,7 +226,7 @@ for (j=0; j<_argc; ++j) { W_Buf = new wchar_t [argv_len]; -for (j=0; j " << "mbstowcs failed for string \"" << _argv[j] << "\"\n\n"; @@ -273,7 +264,7 @@ W_Argv = new wchar_t * [Argc]; k = 0; -for (j=0; j val(Nxy); // Compute the requested percentile of intensity for(int i=0; i Index(2*data.ny()); - if ( !Index ) { + if ( Index.size() < 2*data.ny() ) { mlog << Error << "\nShapedata::convex_hull() -> " << "memory allocation error\n\n"; @@ -889,8 +884,6 @@ Polyline ShapeData::convex_hull_old() const // done // - delete [] Index; Index = (int *) nullptr; - return hull; } @@ -1898,7 +1891,7 @@ void ShapeData::threshold(SingleThresh t) { /////////////////////////////////////////////////////////////////////////////// -void ShapeData::set_to_1_or_0() +void ShapeData::set_to_1_or_0() { int j; double v; diff --git a/src/libcode/vx_stat_out/stat_columns.cc b/src/libcode/vx_stat_out/stat_columns.cc index ac8530f6a5..c805d447fd 100644 --- a/src/libcode/vx_stat_out/stat_columns.cc +++ b/src/libcode/vx_stat_out/stat_columns.cc @@ -1548,6 +1548,7 @@ void write_mpr_row(StatHdrColumns &shc, const PairDataPoint *pd_ptr, STATOutputType out_type, AsciiTable &stat_at, int &stat_row, AsciiTable &txt_at, int &txt_row, + bool update_obtype, bool update_thresh) { // MPR line type @@ -1567,6 +1568,9 @@ void write_mpr_row(StatHdrColumns &shc, const PairDataPoint *pd_ptr, // Write a line for each matched pair for(int i=0; in_obs; i++) { + // MET #2893 write individual obs message type + if(update_obtype) shc.set_obtype(pd_ptr->typ_sa[i].c_str()); + // Set the observation valid time shc.set_obs_valid_beg(pd_ptr->vld_ta[i]); shc.set_obs_valid_end(pd_ptr->vld_ta[i]); @@ -1645,6 +1649,7 @@ void write_seeps_mpr_row(StatHdrColumns &shc, const PairDataPoint *pd_ptr, STATOutputType out_type, AsciiTable &stat_at, int &stat_row, AsciiTable &txt_at, int &txt_row, + bool update_obtype, bool update_thresh) { // SEEPS line type @@ -1668,6 +1673,9 @@ void write_seeps_mpr_row(StatHdrColumns &shc, const PairDataPoint *pd_ptr, if(!pd_ptr->seeps_mpr[i] || is_bad_data(pd_ptr->seeps_mpr[i]->score)) continue; + // MET #2893 write individual obs message type + if(update_obtype) shc.set_obtype(pd_ptr->typ_sa[i].c_str()); + // Set the observation valid time shc.set_obs_valid_beg(pd_ptr->vld_ta[i]); shc.set_obs_valid_end(pd_ptr->vld_ta[i]); @@ -1899,7 +1907,8 @@ void write_phist_row(StatHdrColumns &shc, const PairDataEnsemble *pd_ptr, void write_orank_row(StatHdrColumns &shc, const PairDataEnsemble *pd_ptr, STATOutputType out_type, AsciiTable &stat_at, int &stat_row, - AsciiTable &txt_at, int &txt_row) { + AsciiTable &txt_at, int &txt_row, + bool update_obtype) { // Observation Rank line type shc.set_line_type(stat_orank_str); @@ -1913,6 +1922,9 @@ void write_orank_row(StatHdrColumns &shc, const PairDataEnsemble *pd_ptr, // Write a line for each ensemble pair for(int i=0; in_obs; i++) { + // MET #2893 write individual obs message type + if(update_obtype) shc.set_obtype(pd_ptr->typ_sa[i].c_str()); + // Set the observation valid time shc.set_obs_valid_beg(pd_ptr->vld_ta[i]); shc.set_obs_valid_end(pd_ptr->vld_ta[i]); diff --git a/src/libcode/vx_stat_out/stat_columns.h b/src/libcode/vx_stat_out/stat_columns.h index 7eb21c6fa0..e8998e1fa4 100644 --- a/src/libcode/vx_stat_out/stat_columns.h +++ b/src/libcode/vx_stat_out/stat_columns.h @@ -106,13 +106,13 @@ extern void write_dmap_row (StatHdrColumns &, const DMAPInfo &, STATOutputType, AsciiTable &, int &, AsciiTable &, int &); extern void write_mpr_row (StatHdrColumns &, const PairDataPoint *, STATOutputType, AsciiTable &, int &, AsciiTable &, int &, - bool update_thresh = true); + bool update_obtype, bool update_thresh = true); extern void write_seeps_row (StatHdrColumns &, const SeepsAggScore *, STATOutputType, AsciiTable &, int &, AsciiTable &, int &, bool update_thresh = true); extern void write_seeps_mpr_row (StatHdrColumns &, const PairDataPoint *, STATOutputType, AsciiTable &, int &, AsciiTable &, int &, - bool update_thresh = true); + bool update_obtype, bool update_thresh = true); extern void write_isc_row (StatHdrColumns &, const ISCInfo &, STATOutputType, AsciiTable &, int &, AsciiTable &, int &); extern void write_ecnt_row (StatHdrColumns &, const ECNTInfo &, STATOutputType, @@ -124,7 +124,8 @@ extern void write_rhist_row (StatHdrColumns &, const PairDataEnsemble *, STATOut extern void write_phist_row (StatHdrColumns &, const PairDataEnsemble *, STATOutputType, AsciiTable &, int &, AsciiTable &, int &); extern void write_orank_row (StatHdrColumns &, const PairDataEnsemble *, STATOutputType, - AsciiTable &, int &, AsciiTable &, int &); + AsciiTable &, int &, AsciiTable &, int &, + bool update_obtype = false); extern void write_ssvar_row (StatHdrColumns &, const PairDataEnsemble *, double, STATOutputType, AsciiTable &, int &, AsciiTable &, int &); extern void write_relp_row (StatHdrColumns &, const PairDataEnsemble *, STATOutputType, diff --git a/src/libcode/vx_statistics/apply_mask.cc b/src/libcode/vx_statistics/apply_mask.cc index c299d8d3d0..3777adc5f0 100644 --- a/src/libcode/vx_statistics/apply_mask.cc +++ b/src/libcode/vx_statistics/apply_mask.cc @@ -138,7 +138,7 @@ void parse_grid_weight(const Grid &grid, const GridWeightType t, w = grid.calc_area(x, y); } else { - w = default_grid_weight; + w = default_weight; } // Store the current weight diff --git a/src/libcode/vx_statistics/contable.h b/src/libcode/vx_statistics/contable.h index ebdbf2d454..0227e90146 100644 --- a/src/libcode/vx_statistics/contable.h +++ b/src/libcode/vx_statistics/contable.h @@ -85,7 +85,7 @@ class ContingencyTable { void set_entry(int row, int col, double value); // Increment table entries - void inc_entry(int row, int col, double weight=1.0); + void inc_entry(int row, int col, double weight=default_weight); // Get values double total() const; @@ -160,8 +160,8 @@ class Nx2ContingencyTable : public ContingencyTable { double threshold(int index) const; // 0 <= index <= Nrows // Increment table entries - void inc_event (double value, double weight=1.0); - void inc_nonevent (double value, double weight=1.0); + void inc_event (double value, double weight=default_weight); + void inc_nonevent (double value, double weight=default_weight); // Get table entries double event_total_by_thresh(double) const; @@ -237,11 +237,11 @@ class TTContingencyTable : public ContingencyTable { void set_fy_oy(double); // Increment table entries - void inc_fn_on(double weight=1.0); - void inc_fy_on(double weight=1.0); + void inc_fn_on(double weight=default_weight); + void inc_fy_on(double weight=default_weight); - void inc_fn_oy(double weight=1.0); - void inc_fy_oy(double weight=1.0); + void inc_fn_oy(double weight=default_weight); + void inc_fy_oy(double weight=default_weight); // Get table entries double fn_on() const; diff --git a/src/libcode/vx_statistics/pair_base.cc b/src/libcode/vx_statistics/pair_base.cc index c26d2d3459..a3b383f9fa 100644 --- a/src/libcode/vx_statistics/pair_base.cc +++ b/src/libcode/vx_statistics/pair_base.cc @@ -81,9 +81,9 @@ void PairBase::clear() { IsPointVx = false; mask_name.clear(); - mask_area_ptr = (MaskPlane *) nullptr; // Not allocated - mask_sid_ptr = (StringArray *) nullptr; // Not allocated - mask_llpnt_ptr = (MaskLatLon *) nullptr; // Not allocated + mask_area_ptr = (MaskPlane *) nullptr; // Not allocated + mask_sid_ptr = (MaskSID *) nullptr; // Not allocated + mask_llpnt_ptr = (MaskLatLon *) nullptr; // Not allocated cdf_info_ptr = (const ClimoCDFInfo *) nullptr; // Not allocated @@ -104,6 +104,7 @@ void PairBase::clear() { ocsd_na.clear(); ocdf_na.clear(); + typ_sa.clear(); sid_sa.clear(); lat_na.clear(); lon_na.clear(); @@ -133,9 +134,9 @@ void PairBase::erase() { IsPointVx = false; mask_name.erase(); - mask_area_ptr = (MaskPlane *) nullptr; // Not allocated - mask_sid_ptr = (StringArray *) nullptr; // Not allocated - mask_llpnt_ptr = (MaskLatLon *) nullptr; // Not allocated + mask_area_ptr = (MaskPlane *) nullptr; // Not allocated + mask_sid_ptr = (MaskSID *) nullptr; // Not allocated + mask_llpnt_ptr = (MaskLatLon *) nullptr; // Not allocated cdf_info_ptr = (const ClimoCDFInfo *) nullptr; // Not allocated @@ -155,6 +156,7 @@ void PairBase::erase() { ocsd_na.erase(); ocdf_na.erase(); + typ_sa.clear(); // no erase option sid_sa.clear(); // no erase option lat_na.erase(); lon_na.erase(); @@ -205,9 +207,9 @@ void PairBase::extend(int n) { //////////////////////////////////////////////////////////////////////// -void PairBase::set_mask_name(const char *c) { +void PairBase::set_mask_name(const string &s) { - mask_name = c; + mask_name = s; return; } @@ -223,9 +225,9 @@ void PairBase::set_mask_area_ptr(MaskPlane *mp_ptr) { //////////////////////////////////////////////////////////////////////// -void PairBase::set_mask_sid_ptr(StringArray *sid_ptr) { +void PairBase::set_mask_sid_ptr(MaskSID *ms_ptr) { - mask_sid_ptr = sid_ptr; + mask_sid_ptr = ms_ptr; return; } @@ -427,7 +429,7 @@ void PairBase::compute_climo_cdf() { //////////////////////////////////////////////////////////////////////// -bool PairBase::add_point_obs(const char *sid, +bool PairBase::add_point_obs(const char *typ, const char *sid, double lat, double lon, double x, double y, unixtime ut, double lvl, double elv, double o, const char *qc, @@ -476,6 +478,7 @@ bool PairBase::add_point_obs(const char *sid, } else { station_values_t val; + val.typ = string(typ); val.sid = string(sid); val.lat = lat; val.lon = lon; @@ -497,6 +500,7 @@ bool PairBase::add_point_obs(const char *sid, } if(obs_summary == ObsSummary::None) { + typ_sa.add(typ); sid_sa.add(sid); lat_na.add(lat); lon_na.add(lon); @@ -520,7 +524,7 @@ bool PairBase::add_point_obs(const char *sid, //////////////////////////////////////////////////////////////////////// -void PairBase::set_point_obs(int i_obs, const char *sid, +void PairBase::set_point_obs(int i_obs, const char *typ, const char *sid, double lat, double lon, double x, double y, unixtime ut, double lvl, double elv, double o, const char *qc, @@ -534,6 +538,7 @@ void PairBase::set_point_obs(int i_obs, const char *sid, exit(1); } + typ_sa.set(i_obs, typ); sid_sa.set(i_obs, sid); lat_na.set(i_obs, lat); lon_na.set(i_obs, lon); @@ -751,6 +756,7 @@ void PairBase::calc_obs_summary(){ // Store summarized value in the map svt.summary_val = ob.val; + typ_sa.add (svt.typ.c_str()); sid_sa.add (svt.sid.c_str()); lat_na.add (svt.lat); lon_na.add (svt.lon); @@ -775,6 +781,49 @@ void PairBase::calc_obs_summary(){ //////////////////////////////////////////////////////////////////////// +void PairBase::set_point_weight(const PointWeightType wgt_flag) { + + const char *method_name = "PairBase::set_point_weight() -> "; + + if(!IsPointVx || wgt_flag == PointWeightType::None) return; + + // Apply the SID point weight type + if(wgt_flag == PointWeightType::SID && + mask_sid_ptr != nullptr) { + + mlog << Debug(4) + << "Applying point weights for the \"" + << mask_sid_ptr->name() << "\" station ID masking region.\n"; + + // Print warning if no weights are provided + if(!mask_sid_ptr->has_weights()) { + mlog << Warning << "\n" << method_name + << "station ID point weighting requested but no weights " + << "were defined in the \"" << mask_sid_ptr->name() + << "\" station ID mask. Using default weights of " + << default_weight << ".\n\n"; + } + + // Loop through the point observations + for(int i_obs=0; i_obshas_sid(sid_sa[i_obs], wgt)) { + wgt_na.set(i_obs, wgt); + } + else { + mlog << Warning << "\n" << method_name + << "no match found for station id: " + << sid_sa[i_obs] << "\n\n"; + } + } + } + + return; +} + +//////////////////////////////////////////////////////////////////////// + void PairBase::add_grid_obs(double o, const ClimoPntInfo &cpi, double wgt) { @@ -1293,13 +1342,15 @@ void VxPairBase::set_mask_area(int i_mask, const char *name, //////////////////////////////////////////////////////////////////////// void VxPairBase::set_mask_sid(int i_mask, const char *name, - StringArray *sid_ptr) { + MaskSID *ms_ptr) { + + if(!ms_ptr) return; for(int i_msg_typ=0; i_msg_typset_mask_name(name); - pb_ptr[n]->set_mask_sid_ptr(sid_ptr); + pb_ptr[n]->set_mask_sid_ptr(ms_ptr); } } @@ -1511,6 +1562,20 @@ void VxPairBase::calc_obs_summary() { //////////////////////////////////////////////////////////////////////// +void VxPairBase::set_point_weight(const PointWeightType wgt_flag) { + + if(n_vx == 0) { + mlog << Warning << "\nVxPairBase::set_point_weight() -> " + << "set_size() has not been called yet!\n\n"; + } + + for(auto &x : pb_ptr) x->set_point_weight(wgt_flag); + + return; +} + +//////////////////////////////////////////////////////////////////////// + bool VxPairBase::is_keeper_sid( const char *pnt_obs_str, const char *hdr_sid_str) { bool keep = true; @@ -1864,7 +1929,7 @@ bool VxPairBase::is_keeper_mask( } // Otherwise, check for the masking SID list else if( pb_ptr[n]->mask_sid_ptr != nullptr && - !pb_ptr[n]->mask_sid_ptr->has(hdr_sid_str)) { + !pb_ptr[n]->mask_sid_ptr->has_sid(hdr_sid_str)) { if(mlog.verbosity_level() >= REJECT_DEBUG_LEVEL) { mlog << Debug(REJECT_DEBUG_LEVEL) diff --git a/src/libcode/vx_statistics/pair_base.h b/src/libcode/vx_statistics/pair_base.h index af92385f5c..a734d1af31 100644 --- a/src/libcode/vx_statistics/pair_base.h +++ b/src/libcode/vx_statistics/pair_base.h @@ -36,6 +36,7 @@ struct station_values_t { void clear(); + std::string typ; std::string sid; double lat; double lon; @@ -75,10 +76,10 @@ class PairBase { ////////////////////////////////////////////////////////////////// // Masking area applied to the forecast and climo fields - ConcatString mask_name; + ConcatString mask_name; MaskPlane *mask_area_ptr; // Pointer to the masking MaskPlane // which is not allocated - StringArray *mask_sid_ptr; // Pointer to masking station ID list + MaskSID *mask_sid_ptr; // Pointer to masking station ID list // which is not allocated MaskLatLon *mask_llpnt_ptr; // Pointer to Lat/Lon thresholds // which is not allocated @@ -110,6 +111,7 @@ class PairBase { NumArray ocdf_na; // Observation climatology cumulative distribution function [n_obs] // Point Observation Information + StringArray typ_sa; // Message type [n_obs] StringArray sid_sa; // Station ID [n_obs] NumArray lat_na; // Latitude [n_obs] NumArray lon_na; // Longitude [n_obs] @@ -137,9 +139,9 @@ class PairBase { bool is_point_vx() const; - void set_mask_name(const char *); + void set_mask_name(const std::string &); void set_mask_area_ptr(MaskPlane *); - void set_mask_sid_ptr(StringArray *); + void set_mask_sid_ptr(MaskSID *); void set_mask_llpnt_ptr(MaskLatLon *); void set_climo_cdf_info_ptr(const ClimoCDFInfo *); @@ -168,17 +170,21 @@ class PairBase { ob_val_t compute_median(std::string sng_key); ob_val_t compute_percentile(std::string sng_key, int perc); - bool add_point_obs(const char *, double, double, double, double, + bool add_point_obs(const char *, const char *, + double, double, double, double, unixtime, double, double, double, const char *, const ClimoPntInfo &, double); - void set_point_obs(int, const char *, double, double, double, double, + void set_point_obs(int, const char *, const char *, + double, double, double, double, unixtime, double, double, double, const char *, const ClimoPntInfo &, double); - void add_grid_obs(double, const ClimoPntInfo &, double); + void add_grid_obs(double, + const ClimoPntInfo &, double); - void add_grid_obs(double, double, double, const ClimoPntInfo &, double); + void add_grid_obs(double, double, double, + const ClimoPntInfo &, double); void add_climo(double, const ClimoPntInfo &); @@ -192,6 +198,7 @@ class PairBase { void calc_obs_summary(); + void set_point_weight(const PointWeightType); }; //////////////////////////////////////////////////////////////////////// @@ -349,7 +356,7 @@ class VxPairBase { void set_msg_typ(int, const char *); void set_msg_typ_vals(int, const StringArray &); void set_mask_area(int, const char *, MaskPlane *); - void set_mask_sid(int, const char *, StringArray *); + void set_mask_sid(int, const char *, MaskSID *); void set_mask_llpnt(int, const char *, MaskLatLon *); void set_interp(int i_interp, const char *interp_mthd_str, int width, @@ -375,6 +382,7 @@ class VxPairBase { void print_obs_summary() const; void calc_obs_summary(); + void set_point_weight(const PointWeightType); bool is_keeper_sid(const char *, const char *); bool is_keeper_var(const char *, const char *, int); diff --git a/src/libcode/vx_statistics/pair_data_ensemble.cc b/src/libcode/vx_statistics/pair_data_ensemble.cc index af9f80de15..0d80abce1a 100644 --- a/src/libcode/vx_statistics/pair_data_ensemble.cc +++ b/src/libcode/vx_statistics/pair_data_ensemble.cc @@ -1170,8 +1170,7 @@ void VxPairDataEnsemble::add_point_obs(float *hdr_arr, int *hdr_typ_arr, const char *hdr_sid_str, unixtime hdr_ut, const char *obs_qty, float *obs_arr, - Grid &gr, const char *var_name, - const DataPlane *wgt_dp) { + const Grid &gr, const char *var_name) { // Check the observation VarInfo file type if(obs_info->file_type() != FileType_Gb1) { @@ -1303,17 +1302,13 @@ void VxPairDataEnsemble::add_point_obs(float *hdr_arr, int *hdr_typ_arr, gr, obs_x, obs_y, obs_v, obs_lvl, obs_hgt, cpi)) continue; - // Compute weight for current point - double wgt_v = (wgt_dp == nullptr ? - default_grid_weight : - wgt_dp->get(x, y)); - // Add the observation value // Weight is from the nearest grid point int n = three_to_one(i_msg_typ, i_mask, i_interp); - if(!pd[n].add_point_obs(hdr_sid_str, hdr_lat, hdr_lon, - obs_x, obs_y, hdr_ut, obs_lvl, obs_hgt, - obs_v, obs_qty, cpi, wgt_v)) { + if(!pd[n].add_point_obs(hdr_typ_str, hdr_sid_str, + hdr_lat, hdr_lon, obs_x, obs_y, + hdr_ut, obs_lvl, obs_hgt, + obs_v, obs_qty, cpi, default_weight)) { if(mlog.verbosity_level() >= REJECT_DEBUG_LEVEL) { mlog << Debug(REJECT_DEBUG_LEVEL) diff --git a/src/libcode/vx_statistics/pair_data_ensemble.h b/src/libcode/vx_statistics/pair_data_ensemble.h index f621c23abf..6f14825b11 100644 --- a/src/libcode/vx_statistics/pair_data_ensemble.h +++ b/src/libcode/vx_statistics/pair_data_ensemble.h @@ -216,8 +216,8 @@ class VxPairDataEnsemble : public VxPairBase { void set_skip_const(bool); void add_point_obs(float *, int *, const char *, const char *, - unixtime, const char *, float *, Grid &, - const char * = 0, const DataPlane * = 0); + unixtime, const char *, float *, const Grid &, + const char *); void add_ens(int, bool mn, Grid &); }; diff --git a/src/libcode/vx_statistics/pair_data_point.cc b/src/libcode/vx_statistics/pair_data_point.cc index a22194a297..85595d69d3 100644 --- a/src/libcode/vx_statistics/pair_data_point.cc +++ b/src/libcode/vx_statistics/pair_data_point.cc @@ -156,7 +156,8 @@ void PairDataPoint::assign(const PairDataPoint &pd) { ClimoPntInfo cpi(pd.fcmn_na[i], pd.fcsd_na[i], pd.ocmn_na[i], pd.ocsd_na[i]); - if(add_point_pair(pd.sid_sa[i].c_str(), pd.lat_na[i], pd.lon_na[i], + if(add_point_pair(pd.typ_sa[i].c_str(), pd.sid_sa[i].c_str(), + pd.lat_na[i], pd.lon_na[i], pd.x_na[i], pd.y_na[i], pd.vld_ta[i], pd.lvl_na[i], pd.elv_na[i], pd.f_na[i], pd.o_na[i], pd.o_qc_sa[i].c_str(), @@ -176,13 +177,14 @@ void PairDataPoint::assign(const PairDataPoint &pd) { //////////////////////////////////////////////////////////////////////// -bool PairDataPoint::add_point_pair(const char *sid, double lat, double lon, +bool PairDataPoint::add_point_pair(const char *typ, const char *sid, + double lat, double lon, double x, double y, unixtime ut, double lvl, double elv, double f, double o, const char *qc, const ClimoPntInfo &cpi, double wgt) { - if(!add_point_obs(sid, lat, lon, x, y, ut, lvl, elv, o, qc, + if(!add_point_obs(typ, sid, lat, lon, x, y, ut, lvl, elv, o, qc, cpi, wgt)) return false; f_na.add(f); @@ -233,7 +235,8 @@ void PairDataPoint::set_seeps_score(SeepsScore *seeps, int index) { //////////////////////////////////////////////////////////////////////// -void PairDataPoint::set_point_pair(int i_obs, const char *sid, +void PairDataPoint::set_point_pair(int i_obs, + const char *typ, const char *sid, double lat, double lon, double x, double y, unixtime ut, double lvl, double elv, @@ -248,7 +251,7 @@ void PairDataPoint::set_point_pair(int i_obs, const char *sid, exit(1); } - set_point_obs(i_obs, sid, lat, lon, x, y, ut, lvl, elv, + set_point_obs(i_obs, typ, sid, lat, lon, x, y, ut, lvl, elv, o, qc, cpi, wgt); f_na.set(i_obs, f); @@ -380,8 +383,8 @@ PairDataPoint PairDataPoint::subset_pairs_cnt_thresh( // Handle point data if(is_point_vx()) { - if(out_pd.add_point_pair(sid_sa[i].c_str(), lat_na[i], - lon_na[i], x_na[i], y_na[i], + if(out_pd.add_point_pair(typ_sa[i].c_str(), sid_sa[i].c_str(), + lat_na[i], lon_na[i], x_na[i], y_na[i], vld_ta[i], lvl_na[i], elv_na[i], f_na[i], o_na[i], o_qc_sa[i].c_str(), cpi, wgt_na[i])) { @@ -503,8 +506,7 @@ void VxPairDataPoint::set_size(int types, int masks, int interps) { void VxPairDataPoint::add_point_obs(float *hdr_arr, const char *hdr_typ_str, const char *hdr_sid_str, unixtime hdr_ut, const char *obs_qty, float *obs_arr, - Grid &gr, const char *var_name, - const DataPlane *wgt_dp) { + const Grid &gr, const char *var_name) { // Increment the number of tries count n_try++; @@ -553,11 +555,7 @@ void VxPairDataPoint::add_point_obs(float *hdr_arr, const char *hdr_typ_str, obs_info->is_specific_humidity(); bool precip_flag = fcst_info->is_precipitation() && obs_info->is_precipitation(); - int precip_interval = bad_data_int; - if(precip_flag) { - if(wgt_dp) precip_interval = wgt_dp->accum(); - else precip_interval = fcst_dpa[0].accum(); - } + int precip_interval = fcst_dpa[0].accum(); bool has_seeps = false; SeepsScore *seeps = nullptr; @@ -623,17 +621,12 @@ void VxPairDataPoint::add_point_obs(float *hdr_arr, const char *hdr_typ_str, continue; } - // Compute weight for current point - double wgt_v = (wgt_dp == nullptr ? - default_grid_weight : - wgt_dp->get(x, y)); - // Add the forecast, climatological, and observation data // Weight is from the nearest grid point int n = three_to_one(i_msg_typ, i_mask, i_interp); - if(!pd[n].add_point_pair(hdr_sid_str, + if(!pd[n].add_point_pair(hdr_typ_str, hdr_sid_str, hdr_lat, hdr_lon, obs_x, obs_y, hdr_ut, obs_lvl, - obs_hgt, fcst_v, obs_v, obs_qty, cpi, wgt_v)) { + obs_hgt, fcst_v, obs_v, obs_qty, cpi, default_weight)) { if(mlog.verbosity_level() >= REJECT_DEBUG_LEVEL) { mlog << Debug(REJECT_DEBUG_LEVEL) @@ -954,7 +947,7 @@ void subset_wind_pairs(const PairDataPoint &pd_u, const PairDataPoint &pd_v, // Loop over the pairs for(i=0; i track_lat_data(track.n_points()); + vector track_lon_data(track.n_points()); for(int i = 0; i < track.n_points(); i++) { mlog << Debug(5) << track[i].serialize() << "\n"; @@ -71,11 +71,9 @@ void write_tc_track_lat_lon(NcFile* nc_out, vector counts; counts.push_back(track.n_points()); - track_lat_var.putVar(offsets, counts, track_lat_data); - track_lon_var.putVar(offsets, counts, track_lon_data); + track_lat_var.putVar(offsets, counts, track_lat_data.data()); + track_lon_var.putVar(offsets, counts, track_lon_data.data()); - delete[] track_lat_data; - delete[] track_lon_data; } //////////////////////////////////////////////////////////////////////// @@ -139,7 +137,7 @@ void write_tc_rmw(NcFile* nc_out, add_att(&track_mrd_var, "units", "nautical_miles"); add_att(&track_mrd_var, "standard_name", "radius_max_wind"); - double* track_mrd_data = new double[track.n_points()]; + vector track_mrd_data(track.n_points()); for(int i = 0; i < track.n_points(); i++) { track_mrd_data[i] = track[i].mrd(); @@ -151,9 +149,8 @@ void write_tc_rmw(NcFile* nc_out, vector counts; counts.push_back(track.n_points()); - track_mrd_var.putVar(offsets, counts, track_mrd_data); + track_mrd_var.putVar(offsets, counts, track_mrd_data.data()); - delete[] track_mrd_data; } //////////////////////////////////////////////////////////////////////// @@ -281,7 +278,7 @@ void def_tc_pressure(NcFile* nc_out, NcVar pressure_var; - double* pressure_data = new double[pressure_levels.size()]; + vector pressure_data(pressure_levels.size()); // Define variable pressure_var = nc_out->addVar("pressure", ncDouble, pressure_dim); @@ -300,10 +297,7 @@ void def_tc_pressure(NcFile* nc_out, k--; } - put_nc_data(&pressure_var, &pressure_data[0]); - - // Cleanup - if(pressure_data) { delete [] pressure_data; pressure_data = (double *) 0; } + put_nc_data(&pressure_var, pressure_data.data()); return; } @@ -317,8 +311,8 @@ void def_tc_range_azimuth(NcFile* nc_out, NcVar range_var; NcVar azimuth_var; - double* range_data = new double[grid.range_n()]; - double* azimuth_data = new double[grid.azimuth_n()]; + vector range_data(grid.range_n()); + vector azimuth_data(grid.azimuth_n()); // Define variables range_var = nc_out->addVar("range", ncDouble, range_dim); @@ -352,12 +346,8 @@ void def_tc_range_azimuth(NcFile* nc_out, } // Write coordinates - put_nc_data(&range_var, &range_data[0]); - put_nc_data(&azimuth_var, &azimuth_data[0]); - - // Cleanup - if(range_data) { delete [] range_data; range_data = (double *) 0; } - if(azimuth_data) { delete [] azimuth_data; azimuth_data = (double *) 0; } + put_nc_data(&range_var, range_data.data()); + put_nc_data(&azimuth_var, azimuth_data.data()); return; } @@ -669,8 +659,7 @@ void write_tc_data_rev(NcFile* nc_out, const TcrmwGrid& grid, vector offsets; vector counts; - - double* data_rev; + vector data_rev(grid.range_n() * grid.azimuth_n()); offsets.clear(); offsets.push_back(i_point); @@ -682,9 +671,6 @@ void write_tc_data_rev(NcFile* nc_out, const TcrmwGrid& grid, counts.push_back(grid.range_n()); counts.push_back(grid.azimuth_n()); - data_rev = new double[ - grid.range_n() * grid.azimuth_n()]; - for(int ir = 0; ir < grid.range_n(); ir++) { for(int ia = 0; ia < grid.azimuth_n(); ia++) { int i = ir * grid.azimuth_n() + ia; @@ -693,9 +679,8 @@ void write_tc_data_rev(NcFile* nc_out, const TcrmwGrid& grid, } } - var.putVar(offsets, counts, data_rev); + var.putVar(offsets, counts, data_rev.data()); - delete[] data_rev; } //////////////////////////////////////////////////////////////////////// @@ -706,8 +691,8 @@ void write_tc_azi_mean_data(NcFile* nc_out, const TcrmwGrid& grid, vector offsets; vector counts; - double* data_rev; - double* data_azi_mean; + vector data_rev(grid.range_n() * grid.azimuth_n()); + vector data_azi_mean(grid.range_n(), 0.0); offsets.clear(); offsets.push_back(i_point); @@ -717,10 +702,6 @@ void write_tc_azi_mean_data(NcFile* nc_out, const TcrmwGrid& grid, counts.push_back(1); counts.push_back(grid.range_n()); - data_rev = new double[ - grid.range_n() * grid.azimuth_n()]; - data_azi_mean = new double[grid.range_n()]; - for(int ir = 0; ir < grid.range_n(); ir++) { data_azi_mean[ir] = 0.; for(int ia = 0; ia < grid.azimuth_n(); ia++) { @@ -735,10 +716,8 @@ void write_tc_azi_mean_data(NcFile* nc_out, const TcrmwGrid& grid, data_azi_mean[ir] /= grid.azimuth_n(); } - var.putVar(offsets, counts, data_azi_mean); + var.putVar(offsets, counts, data_azi_mean.data()); - delete[] data_rev; - delete[] data_azi_mean; } //////////////////////////////////////////////////////////////////////// @@ -761,8 +740,7 @@ extern void write_tc_pressure_level_data( vector offsets_3d; vector counts_3d; - - double* data_rev; + vector data_rev(grid.range_n() * grid.azimuth_n()); offsets_3d.clear(); offsets_3d.push_back(i_point); @@ -776,9 +754,6 @@ extern void write_tc_pressure_level_data( counts_3d.push_back(grid.range_n()); counts_3d.push_back(grid.azimuth_n()); - data_rev = new double[ - grid.range_n() * grid.azimuth_n()]; - for(int ir = 0; ir < grid.range_n(); ir++) { for(int ia = 0; ia < grid.azimuth_n(); ia++) { int i = ir * grid.azimuth_n() + ia; @@ -787,9 +762,8 @@ extern void write_tc_pressure_level_data( } } - var.putVar(offsets_3d, counts_3d, data_rev); + var.putVar(offsets_3d, counts_3d, data_rev.data()); - delete[] data_rev; } //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/core/ensemble_stat/ensemble_stat.cc b/src/tools/core/ensemble_stat/ensemble_stat.cc index 475a1bd52a..68cfe50cc1 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat.cc +++ b/src/tools/core/ensemble_stat/ensemble_stat.cc @@ -77,6 +77,8 @@ // 044 06/17/24 Halley Gotway MET #2856 Reinitialize climo_cdf pointer // 045 07/05/24 Halley Gotway MET #2924 Support forecast climatology. // 046 10/08/24 Halley Gotway MET #2887 Compute weighted contingency tables. +// 047 10/14/24 Halley Gotway MET #2279 Add point_weight_flag option. +// 048 10/15/24 Halley Gotway MET #2893 Write individual pair OBTYPE. // //////////////////////////////////////////////////////////////////////// @@ -825,10 +827,11 @@ void process_point_vx() { // Process each point observation NetCDF file for(i=0; i obs_v (nxy, bad_data_float); + vector obs_rank (nxy, bad_data_int ); + vector obs_pit (nxy, bad_data_float); + vector ens_vld (nxy, bad_data_int ); + vector ens_mean (nxy, bad_data_float); // Loop over all the pairs for(i=0; i msg_typ_group_map; StringArray msg_typ_sfc; + bool obtype_as_group_val_flag; // Mapping of mask names to MaskPlanes std::map mask_area_map; // Mapping of mask names to Station ID lists - std::map mask_sid_map; + std::map mask_sid_map; gsl_rng *rng_ptr; // GSL random number generator (allocated) - GridWeightType grid_weight_flag; // Grid weighting flag - ConcatString tmp_dir; // Directory for temporary files + GridWeightType grid_weight_flag; // Grid weighting flag + PointWeightType point_weight_flag; // Point weighting flag + ConcatString output_prefix; // String to customize output file name ConcatString version; // Config file version diff --git a/src/tools/core/grid_stat/grid_stat.cc b/src/tools/core/grid_stat/grid_stat.cc index f3013e4091..45afc74615 100644 --- a/src/tools/core/grid_stat/grid_stat.cc +++ b/src/tools/core/grid_stat/grid_stat.cc @@ -2088,7 +2088,7 @@ void get_mask_points(const GridStatVxOpt &vx_opt, if(ocsd_ptr) apply_mask(*ocsd_ptr, mask_mp, pd.ocsd_na); else pd.ocsd_na.add_const(bad_data_double, pd.n_obs); if(wgt_ptr) apply_mask(*wgt_ptr, mask_mp, pd.wgt_na); - else pd.wgt_na.add_const(default_grid_weight, pd.n_obs); + else pd.wgt_na.add_const(default_weight, pd.n_obs); if(ocmn_ptr && ocsd_ptr) pd.compute_climo_cdf(); @@ -2743,8 +2743,7 @@ void write_nc(const ConcatString &field_name, const DataPlane &dp, n_masks = (apply_mask ? conf_info.vx_opt[i_vx].get_n_mask() : 1); // Allocate memory - float *data = (float *) nullptr; - data = new float [grid.nxy()]; + vector data(grid.nxy()); // Set the NetCDF compression level int deflate_level = compress_level; @@ -3001,7 +3000,7 @@ void write_nc(const ConcatString &field_name, const DataPlane &dp, } // end for x // Write out the data - if(!put_nc_data_with_dims(&nc_var, &data[0], grid.ny(), grid.nx())) { + if(!put_nc_data_with_dims(&nc_var, data.data(), grid.ny(), grid.nx())) { mlog << Error << "\nwrite_nc() -> " << "error writing NetCDF variable name " << var_name << "\n\n"; @@ -3010,9 +3009,6 @@ void write_nc(const ConcatString &field_name, const DataPlane &dp, } // end for i - // Deallocate and clean up - if(data) { delete [] data; data = (float *) nullptr; } - return; } @@ -3046,9 +3042,6 @@ void write_nbrhd_nc(const DataPlane &fcst_dp, const DataPlane &obs_dp, // Store the apply_mask option apply_mask = conf_info.vx_opt[i_vx].nc_info.do_apply_mask; - float *fcst_data = (float *) nullptr; - float *obs_data = (float *) nullptr; - NcVar fcst_var; NcVar obs_var; @@ -3081,8 +3074,8 @@ void write_nbrhd_nc(const DataPlane &fcst_dp, const DataPlane &obs_dp, if(!fcst_flag && !obs_flag) return; // Allocate memory for the forecast and observation fields - fcst_data = new float [grid.nxy()]; - obs_data = new float [grid.nxy()]; + vector fcst_data(grid.nxy()); + vector obs_data (grid.nxy()); // Add the forecast variable if(fcst_flag) { @@ -3161,7 +3154,7 @@ void write_nbrhd_nc(const DataPlane &fcst_dp, const DataPlane &obs_dp, // Write out the forecast field if(fcst_flag) { - if(!put_nc_data_with_dims(&fcst_var, &fcst_data[0], grid.ny(), grid.nx())) { + if(!put_nc_data_with_dims(&fcst_var, fcst_data.data(), grid.ny(), grid.nx())) { mlog << Error << "\nwrite_nbrhd_nc() -> " << "error with the fcst_var->put for forecast variable " << fcst_var_name << "\n\n"; @@ -3171,7 +3164,7 @@ void write_nbrhd_nc(const DataPlane &fcst_dp, const DataPlane &obs_dp, // Write out the observation field if(obs_flag) { - if(!put_nc_data_with_dims(&obs_var, &obs_data[0], grid.ny(), grid.nx())) { + if(!put_nc_data_with_dims(&obs_var, obs_data.data(), grid.ny(), grid.nx())) { mlog << Error << "\nwrite_nbrhd_nc() -> " << "error with the obs_var->put for observation variable " << obs_var_name << "\n\n"; @@ -3179,10 +3172,6 @@ void write_nbrhd_nc(const DataPlane &fcst_dp, const DataPlane &obs_dp, } } - // Deallocate and clean up - if(fcst_data) { delete [] fcst_data; fcst_data = (float *) nullptr; } - if(obs_data) { delete [] obs_data; obs_data = (float *) nullptr; } - return; } diff --git a/src/tools/core/mode/mode_exec.cc b/src/tools/core/mode/mode_exec.cc index 2463b97ab9..db43b97ebe 100644 --- a/src/tools/core/mode/mode_exec.cc +++ b/src/tools/core/mode/mode_exec.cc @@ -2378,7 +2378,8 @@ void ModeExecutive::write_poly_netcdf(NcFile *f_out, ObjPolyType poly_type) // // Store the points for each polyline // - for(i=0, n_pts=0; iocmn_na[j], pd_ptr->ocsd_na[j]); // Store the observation value - hira_pd.add_point_obs(pd_ptr->sid_sa[j].c_str(), + hira_pd.add_point_obs( + pd_ptr->typ_sa[j].c_str(), pd_ptr->sid_sa[j].c_str(), pd_ptr->lat_na[j], pd_ptr->lon_na[j], pd_ptr->x_na[j], pd_ptr->y_na[j], pd_ptr->vld_ta[j], pd_ptr->lvl_na[j], pd_ptr->elv_na[j], @@ -1965,7 +1978,11 @@ void do_hira_ens(int i_vx, const PairDataPoint *pd_ptr) { write_orank_row(shc, &hira_pd, conf_info.vx_opt[i_vx].output_flag[i_orank], stat_at, i_stat_row, - txt_at[i_orank], i_txt_row[i_orank]); + txt_at[i_orank], i_txt_row[i_orank], + conf_info.obtype_as_group_val_flag); + + // Reset the obtype column + shc.set_obtype(pd_ptr->msg_typ.c_str()); // Reset the observation valid time shc.set_obs_valid_beg(conf_info.vx_opt[i_vx].vx_pd.beg_ut); @@ -2107,7 +2124,9 @@ void do_hira_prob(int i_vx, const PairDataPoint *pd_ptr) { } // Store the fractional coverage pair - hira_pd.add_point_pair(pd_ptr->sid_sa[k].c_str(), + hira_pd.add_point_pair( + pd_ptr->typ_sa[k].c_str(), + pd_ptr->sid_sa[k].c_str(), pd_ptr->lat_na[k], pd_ptr->lon_na[k], pd_ptr->x_na[k], pd_ptr->y_na[k], pd_ptr->vld_ta[k], pd_ptr->lvl_na[k], pd_ptr->elv_na[k], @@ -2155,7 +2174,12 @@ void do_hira_prob(int i_vx, const PairDataPoint *pd_ptr) { write_mpr_row(shc, &hira_pd, conf_info.vx_opt[i_vx].output_flag[i_mpr], stat_at, i_stat_row, - txt_at[i_mpr], i_txt_row[i_mpr], false); + txt_at[i_mpr], i_txt_row[i_mpr], + conf_info.obtype_as_group_val_flag, + false); + + // Reset the obtype column + shc.set_obtype(pd_ptr->msg_typ.c_str()); // Reset the observation valid time shc.set_obs_valid_beg(conf_info.vx_opt[i_vx].vx_pd.beg_ut); diff --git a/src/tools/core/point_stat/point_stat_conf_info.cc b/src/tools/core/point_stat/point_stat_conf_info.cc index c8ea7c4f70..cfd5e10432 100644 --- a/src/tools/core/point_stat/point_stat_conf_info.cc +++ b/src/tools/core/point_stat/point_stat_conf_info.cc @@ -69,8 +69,10 @@ void PointStatConfInfo::clear() { topo_use_obs_thresh.clear(); topo_interp_fcst_thresh.clear(); msg_typ_group_map.clear(); + obtype_as_group_val_flag = false; mask_area_map.clear(); mask_sid_map.clear(); + point_weight_flag = PointWeightType::None; tmp_dir.clear(); output_prefix.clear(); version.clear(); @@ -151,6 +153,9 @@ void PointStatConfInfo::process_config(GrdFileType ftype) { // Conf: model model = parse_conf_string(&conf, conf_key_model); + // Conf: point_weight_flag + point_weight_flag = parse_conf_point_weight_flag(&conf); + // Conf: tmp_dir tmp_dir = parse_conf_tmp_dir(&conf); @@ -174,6 +179,10 @@ void PointStatConfInfo::process_config(GrdFileType ftype) { // Conf: message_type_group_map msg_typ_group_map = parse_conf_message_type_group_map(&conf); + // Conf: obtype_as_group_val_flag + obtype_as_group_val_flag = + conf.lookup_bool(conf_key_obtype_as_group_val_flag); + // Conf: fcst.field and obs.field fdict = conf.lookup_array(conf_key_fcst_field); odict = conf.lookup_array(conf_key_obs_field); @@ -378,7 +387,6 @@ void PointStatConfInfo::process_flags() { void PointStatConfInfo::process_masks(const Grid &grid) { int i, j; MaskPlane mp; - StringArray sid; ConcatString name; mlog << Debug(2) @@ -444,9 +452,9 @@ void PointStatConfInfo::process_masks(const Grid &grid) { mlog << Debug(3) << "Processing station ID mask: " << vx_opt[i].mask_sid[j] << "\n"; - parse_sid_mask(vx_opt[i].mask_sid[j], sid, name); - sid_map[vx_opt[i].mask_sid[j]] = name; - mask_sid_map[name] = sid; + MaskSID ms = parse_sid_mask(vx_opt[i].mask_sid[j]); + sid_map[vx_opt[i].mask_sid[j]] = ms.name(); + mask_sid_map[ms.name()] = ms; } // Store the name for the current station ID mask diff --git a/src/tools/core/point_stat/point_stat_conf_info.h b/src/tools/core/point_stat/point_stat_conf_info.h index 95bf59a7a7..9db3081dd7 100644 --- a/src/tools/core/point_stat/point_stat_conf_info.h +++ b/src/tools/core/point_stat/point_stat_conf_info.h @@ -235,12 +235,15 @@ class PointStatConfInfo { // Message type groups that should be processed together std::map msg_typ_group_map; + bool obtype_as_group_val_flag; // Mapping of mask names to DataPlanes std::map mask_area_map; // Mapping of mask names to Station ID lists - std::map mask_sid_map; + std::map mask_sid_map; + + PointWeightType point_weight_flag; // Point weighting flag ConcatString tmp_dir; // Directory for temporary files ConcatString output_prefix; // String to customize output file name diff --git a/src/tools/core/series_analysis/series_analysis.cc b/src/tools/core/series_analysis/series_analysis.cc index fa2d4a8ef7..e5c3a62fe8 100644 --- a/src/tools/core/series_analysis/series_analysis.cc +++ b/src/tools/core/series_analysis/series_analysis.cc @@ -970,7 +970,7 @@ void process_scores() { (ocsd_flag ? ocsd_dp(x, y) : bad_data_double)); pd_block[i].add_grid_pair(fcst_dp(x, y), obs_dp(x, y), - cpi, default_grid_weight); + cpi, default_weight); } // end for i } // end for i_series @@ -2273,7 +2273,7 @@ void write_stat_data() { if(deflate_level < 0) deflate_level = conf_info.get_compression_level(); // Allocate memory to store data values for each grid point - float *data = new float [grid.nx()*grid.ny()]; + vector data(grid.nx()*grid.ny()); // Write output for each stat_data map entry for(auto &key : stat_data_keys) { @@ -2300,7 +2300,7 @@ void write_stat_data() { } // end for x // Write out the data - if(!put_nc_data_with_dims(&nc_var, &data[0], grid.ny(), grid.nx())) { + if(!put_nc_data_with_dims(&nc_var, data.data(), grid.ny(), grid.nx())) { mlog << Error << "\nwrite_stat_data() -> " << R"(error writing ")" << key << R"(" data to the output file.)" << "\n\n"; @@ -2308,9 +2308,6 @@ void write_stat_data() { } } - // Clean up - if(data) { delete [] data; data = (float *) nullptr; } - return; } diff --git a/src/tools/core/stat_analysis/aggr_stat_line.cc b/src/tools/core/stat_analysis/aggr_stat_line.cc index 3c6dcd3f22..98df91caad 100644 --- a/src/tools/core/stat_analysis/aggr_stat_line.cc +++ b/src/tools/core/stat_analysis/aggr_stat_line.cc @@ -1728,8 +1728,8 @@ void aggr_wind_lines(LineDataFile &f, STATAnalysisJob &job, // Append the unit vectors with no climatological values // ClimoPntInfo cpi; - m[key].pd_u.add_grid_pair(uf, uo, cpi, default_grid_weight); - m[key].pd_v.add_grid_pair(vf, vo, cpi, default_grid_weight); + m[key].pd_u.add_grid_pair(uf, uo, cpi, default_weight); + m[key].pd_v.add_grid_pair(vf, vo, cpi, default_weight); // // Keep track of the unique header column entries @@ -1837,8 +1837,8 @@ void aggr_mpr_wind_lines(LineDataFile &f, STATAnalysisJob &job, aggr.hdr_sa.add(hdr); ClimoPntInfo u_cpi(ufcmn, ufcsd, uocmn, uocsd); ClimoPntInfo v_cpi(vfcmn, vfcsd, vocmn, vocsd); - aggr.pd_u.add_grid_pair(uf, uo, u_cpi, default_grid_weight); - aggr.pd_v.add_grid_pair(vf, vo, v_cpi, default_grid_weight); + aggr.pd_u.add_grid_pair(uf, uo, u_cpi, default_weight); + aggr.pd_v.add_grid_pair(vf, vo, v_cpi, default_weight); // // Add the new map entry @@ -1903,8 +1903,8 @@ void aggr_mpr_wind_lines(LineDataFile &f, STATAnalysisJob &job, m[key].hdr_sa.add(hdr); ClimoPntInfo u_cpi(ufcmn, ufcsd, uocmn, uocsd); ClimoPntInfo v_cpi(vfcmn, vfcsd, vocmn, vocsd); - m[key].pd_u.add_grid_pair(uf, uo, u_cpi, default_grid_weight); - m[key].pd_v.add_grid_pair(vf, vo, v_cpi, default_grid_weight); + m[key].pd_u.add_grid_pair(uf, uo, u_cpi, default_weight); + m[key].pd_v.add_grid_pair(vf, vo, v_cpi, default_weight); } } @@ -2053,8 +2053,8 @@ void aggr_mpr_wind_lines(LineDataFile &f, STATAnalysisJob &job, double vo; convert_u_v_to_unit(it->second.pd_u.o_na[i], it->second.pd_v.o_na[i], uo, vo); - aggr.pd_u.add_grid_pair(uf, uo, cpi, default_grid_weight); - aggr.pd_v.add_grid_pair(vf, vo, cpi, default_grid_weight); + aggr.pd_u.add_grid_pair(uf, uo, cpi, default_weight); + aggr.pd_v.add_grid_pair(vf, vo, cpi, default_weight); } // @@ -2135,7 +2135,7 @@ void aggr_mpr_lines(LineDataFile &f, STATAnalysisJob &job, aggr.pd.ocmn_na.add(cur.obs_climo_mean); aggr.pd.ocsd_na.add(cur.obs_climo_stdev); aggr.pd.ocdf_na.add(cur.obs_climo_cdf); - aggr.pd.wgt_na.add(default_grid_weight); + aggr.pd.wgt_na.add(default_weight); aggr.fcst_var = cur.fcst_var; aggr.obs_var = cur.obs_var; @@ -2166,7 +2166,7 @@ void aggr_mpr_lines(LineDataFile &f, STATAnalysisJob &job, m[key].pd.ocmn_na.add(cur.obs_climo_mean); m[key].pd.ocsd_na.add(cur.obs_climo_stdev); m[key].pd.ocdf_na.add(cur.obs_climo_cdf); - m[key].pd.wgt_na.add(default_grid_weight); + m[key].pd.wgt_na.add(default_weight); // // Only aggregate consistent variable names @@ -3049,7 +3049,7 @@ void aggr_orank_lines(LineDataFile &f, STATAnalysisJob &job, // ClimoPntInfo cpi(cur.fcst_climo_mean, cur.fcst_climo_stdev, cur.obs_climo_mean, cur.obs_climo_stdev); - m[key].ens_pd.add_grid_obs(cur.obs, cpi, default_grid_weight); + m[key].ens_pd.add_grid_obs(cur.obs, cpi, default_weight); m[key].ens_pd.skip_ba.add(false); m[key].ens_pd.n_pair++; m[key].ens_pd.r_na.add(cur.rank); diff --git a/src/tools/core/stat_analysis/parse_stat_line.cc b/src/tools/core/stat_analysis/parse_stat_line.cc index 3e3c5ae1f3..80a4dd7102 100644 --- a/src/tools/core/stat_analysis/parse_stat_line.cc +++ b/src/tools/core/stat_analysis/parse_stat_line.cc @@ -61,7 +61,6 @@ void parse_fho_ctable(STATLine &l, TTContingencyTable &ct) { double h_rate = atof(l.get_item("H_RATE")); double o_rate = atof(l.get_item("O_RATE")); - // MET #2887: JHG multiple by the sum of the weights here instead? double fy = n_pairs * f_rate; double fy_oy = n_pairs * h_rate; double oy = n_pairs * o_rate; diff --git a/src/tools/core/wavelet_stat/wavelet_stat.cc b/src/tools/core/wavelet_stat/wavelet_stat.cc index 70f55ed870..89d05ce6ae 100644 --- a/src/tools/core/wavelet_stat/wavelet_stat.cc +++ b/src/tools/core/wavelet_stat/wavelet_stat.cc @@ -953,13 +953,6 @@ int get_tile_tot_count() { void do_intensity_scale(const NumArray &f_na, const NumArray &o_na, ISCInfo *&isc_info, int i_vx, int i_tile) { - double *f_dat = (double *) nullptr; // Raw and thresholded binary fields - double *o_dat = (double *) nullptr; // Raw and thresholded binary fields - double *f_dwt = (double *) nullptr; // Discrete wavelet transformations - double *o_dwt = (double *) nullptr; // Discrete wavelet transformations - double *f_scl = (double *) nullptr; // Binary field decomposed by scale - double *o_scl = (double *) nullptr; // Binary field decomposed by scale - double *diff = (double *) nullptr; // Difference field double mse, fen, oen, mad; int n, ns, n_isc; int bnd, row, col; @@ -999,13 +992,13 @@ void do_intensity_scale(const NumArray &f_na, const NumArray &o_na, } // Allocate space - f_dat = new double [n]; - o_dat = new double [n]; - f_dwt = new double [n]; - o_dwt = new double [n]; - f_scl = new double [n]; - o_scl = new double [n]; - diff = new double [n]; + vector f_dat(n); // Raw and thresholded binary fields + vector o_dat(n); // Raw and thresholded binary fields + vector f_dwt(n); // Discrete wavelet transformations + vector o_dwt(n); // Discrete wavelet transformations + vector f_scl(n); // Binary field decomposed by scale + vector o_scl(n); // Binary field decomposed by scale + vector diff (n); // Difference field // Initialize f_dat and o_dat for(i=0; i data(n); dp.data_range(dmin, dmax); mlog << Debug(2) @@ -319,7 +319,7 @@ void write_nc_bin(const DataPlane &dp, int i_cdf, double cdf_y) { } // Write out the gridded field of CDF X-values - if(!put_nc_data(&cdf_x_var, &data[0], lengths, offsets)) { + if(!put_nc_data(&cdf_x_var, data.data(), lengths, offsets)) { mlog << Error << "\nwrite_nc_bin() -> " << "error writing NetCDF variable name \"" << var_name << "\" for the " << i_cdf @@ -327,9 +327,6 @@ void write_nc_bin(const DataPlane &dp, int i_cdf, double cdf_y) { exit(1); } - // Deallocate and clean up - if(data) { delete [] data; data = (float *) nullptr; } - return; } diff --git a/src/tools/other/ascii2nc/ascii2nc.cc b/src/tools/other/ascii2nc/ascii2nc.cc index 940e12cedf..c8fb632dda 100644 --- a/src/tools/other/ascii2nc/ascii2nc.cc +++ b/src/tools/other/ascii2nc/ascii2nc.cc @@ -743,18 +743,18 @@ void set_mask_poly(const StringArray & a) { //////////////////////////////////////////////////////////////////////// void set_mask_sid(const StringArray & a) { - ConcatString mask_name; // List the station ID mask mlog << Debug(1) << "Station ID Mask: " << a[0] << "\n"; - parse_sid_mask(a[0], mask_sid, mask_name); + MaskSID ms = parse_sid_mask(a[0]); + for(const auto &pair : ms.sid_map()) mask_sid.add(pair.first); // List the length of the station ID mask mlog << Debug(2) - << "Parsed Station ID Mask: " << mask_name - << " containing " << mask_sid.n_elements() << " points\n"; + << "Parsed Station ID Mask (" << ms.name() + << ") containing " << mask_sid.n() << " stations\n"; } //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/gen_ens_prod/gen_ens_prod.cc b/src/tools/other/gen_ens_prod/gen_ens_prod.cc index 9f36c55ad3..d552e90405 100644 --- a/src/tools/other/gen_ens_prod/gen_ens_prod.cc +++ b/src/tools/other/gen_ens_prod/gen_ens_prod.cc @@ -821,14 +821,14 @@ void write_ens_nc(GenEnsProdVarInfo *ens_info, int n_ens_vld, DataPlane prob_dp, nbrhd_dp; // Allocate memory for storing ensemble data - float *ens_mean = new float [nxy]; - float *ens_stdev = new float [nxy]; - float *ens_minus = new float [nxy]; - float *ens_plus = new float [nxy]; - float *ens_min = new float [nxy]; - float *ens_max = new float [nxy]; - float *ens_range = new float [nxy]; - int *ens_vld = new int [nxy]; + vector ens_mean (nxy); + vector ens_stdev (nxy); + vector ens_minus (nxy); + vector ens_plus (nxy); + vector ens_min (nxy); + vector ens_max (nxy); + vector ens_range (nxy); + vector ens_vld (nxy); // Store the threshold for the ratio of valid data points t = conf_info.vld_data_thresh; @@ -865,56 +865,56 @@ void write_ens_nc(GenEnsProdVarInfo *ens_info, int n_ens_vld, // Add the ensemble mean, if requested if(ens_info->nc_info.do_mean) { - write_ens_var_float(ens_info, ens_mean, ens_dp, + write_ens_var_float(ens_info, ens_mean.data(), ens_dp, "ENS_MEAN", "Ensemble Mean"); } // Add the ensemble standard deviation, if requested if(ens_info->nc_info.do_stdev) { - write_ens_var_float(ens_info, ens_stdev, ens_dp, + write_ens_var_float(ens_info, ens_stdev.data(), ens_dp, "ENS_STDEV", "Ensemble Standard Deviation"); } // Add the ensemble mean minus one standard deviation, if requested if(ens_info->nc_info.do_minus) { - write_ens_var_float(ens_info, ens_minus, ens_dp, + write_ens_var_float(ens_info, ens_minus.data(), ens_dp, "ENS_MINUS", "Ensemble Mean Minus 1 Standard Deviation"); } // Add the ensemble mean plus one standard deviation, if requested if(ens_info->nc_info.do_plus) { - write_ens_var_float(ens_info, ens_plus, ens_dp, + write_ens_var_float(ens_info, ens_plus.data(), ens_dp, "ENS_PLUS", "Ensemble Mean Plus 1 Standard Deviation"); } // Add the ensemble minimum value, if requested if(ens_info->nc_info.do_min) { - write_ens_var_float(ens_info, ens_min, ens_dp, + write_ens_var_float(ens_info, ens_min.data(), ens_dp, "ENS_MIN", "Ensemble Minimum"); } // Add the ensemble maximum value, if requested if(ens_info->nc_info.do_max) { - write_ens_var_float(ens_info, ens_max, ens_dp, + write_ens_var_float(ens_info, ens_max.data(), ens_dp, "ENS_MAX", "Ensemble Maximum"); } // Add the ensemble range, if requested if(ens_info->nc_info.do_range) { - write_ens_var_float(ens_info, ens_range, ens_dp, + write_ens_var_float(ens_info, ens_range.data(), ens_dp, "ENS_RANGE", "Ensemble Range"); } // Add the ensemble valid data count, if requested if(ens_info->nc_info.do_vld) { - write_ens_var_int(ens_info, ens_vld, ens_dp, + write_ens_var_int(ens_info, ens_vld.data(), ens_dp, "ENS_VLD", "Ensemble Valid Data Count"); } @@ -1061,16 +1061,6 @@ void write_ens_nc(GenEnsProdVarInfo *ens_info, int n_ens_vld, } // end for it } - // Deallocate and clean up - if(ens_mean) { delete [] ens_mean; ens_mean = (float *) nullptr; } - if(ens_stdev) { delete [] ens_stdev; ens_stdev = (float *) nullptr; } - if(ens_minus) { delete [] ens_minus; ens_minus = (float *) nullptr; } - if(ens_plus) { delete [] ens_plus; ens_plus = (float *) nullptr; } - if(ens_min) { delete [] ens_min; ens_min = (float *) nullptr; } - if(ens_max) { delete [] ens_max; ens_max = (float *) nullptr; } - if(ens_range) { delete [] ens_range; ens_range = (float *) nullptr; } - if(ens_vld) { delete [] ens_vld; ens_vld = (int *) nullptr; } - return; } diff --git a/src/tools/other/gen_vx_mask/gen_vx_mask.cc b/src/tools/other/gen_vx_mask/gen_vx_mask.cc index 98b15a212a..83fe7cc568 100644 --- a/src/tools/other/gen_vx_mask/gen_vx_mask.cc +++ b/src/tools/other/gen_vx_mask/gen_vx_mask.cc @@ -401,9 +401,8 @@ void get_data_plane(const ConcatString &file_name, } // Attempt to open the data file - Met2dDataFileFactory mtddf_factory; - Met2dDataFile *mtddf_ptr = (Met2dDataFile *) nullptr; - mtddf_ptr = mtddf_factory.new_met_2d_data_file(file_name.c_str(), ftype); + Met2dDataFile *mtddf_ptr = Met2dDataFileFactory::new_met_2d_data_file( + file_name.c_str(), ftype); if(!mtddf_ptr) { mlog << Error << "\nget_data_plane() -> " << "can't open input file \"" << file_name << "\"\n\n"; @@ -423,9 +422,7 @@ void get_data_plane(const ConcatString &file_name, if(local_cs.length() > 0) { // Allocate new VarInfo object - VarInfoFactory vi_factory; - VarInfo *vi_ptr = (VarInfo *) nullptr; - vi_ptr = vi_factory.new_var_info(mtddf_ptr->file_type()); + VarInfo *vi_ptr = VarInfoFactory::new_var_info(mtddf_ptr->file_type()); if(!vi_ptr) { mlog << Error << "\nget_data_plane() -> " << "can't allocate new VarInfo pointer.\n\n"; @@ -444,7 +441,8 @@ void get_data_plane(const ConcatString &file_name, } // Dump the range of data values read - double dmin, dmax; + double dmin; + double dmax; dp.data_range(dmin, dmax); mlog << Debug(3) << "Read field \"" << vi_ptr->magic_str() << "\" from \"" @@ -471,7 +469,6 @@ bool get_gen_vx_mask_config_str(MetNcMetDataFile *mnmdf_ptr, ConcatString &config_str) { bool status = false; ConcatString tool; - int i; // Check for null pointer if(!mnmdf_ptr) return status; @@ -483,7 +480,7 @@ bool get_gen_vx_mask_config_str(MetNcMetDataFile *mnmdf_ptr, if(tool != program_name) return status; // Loop through the NetCDF variables - for(i=0; iMetNc->Nvars; i++) { + for(int i=0; iMetNc->Nvars; i++) { // Skip the lat/lon variables if(mnmdf_ptr->MetNc->Var[i].name == "lat" || @@ -515,7 +512,7 @@ void get_shapefile_strings() { << dbf_filename << "\n"; // Open the database file - if(!(f.open(dbf_filename.c_str()))) { + if(!f.open(dbf_filename.c_str())) { mlog << Error << "\nget_shapefile_strings() -> " << "unable to open database file \"" << dbf_filename << "\"\n\n"; @@ -582,7 +579,7 @@ void get_shapefile_records() { } // Open shapefile - if(!(f.open(shape_filename))) { + if(!f.open(shape_filename)) { mlog << Error << "\nget_shapefile_records() -> " << "unable to open shape file \"" << shape_filename << "\"\n\n"; @@ -667,13 +664,14 @@ bool is_shape_str_match(const int i_shape, const StringArray &names, const Strin //////////////////////////////////////////////////////////////////////// void apply_poly_mask(DataPlane & dp) { - int x, y, n_in; + int n_in = 0; bool inside; - double lat, lon; + double lat; + double lon; // Check the Lat/Lon of each grid point being inside the polyline - for(x=0,n_in=0; x::const_iterator poly_it; for(poly_it = poly_list.begin(); @@ -1285,7 +1295,7 @@ void apply_shape_mask(DataPlane & dp) { DataPlane combine(const DataPlane &dp_data, const DataPlane &dp_mask, SetLogic logic) { - int x, y, n_in; + int n_in = 0; bool v_data, v_mask; double v; DataPlane dp; @@ -1309,8 +1319,8 @@ DataPlane combine(const DataPlane &dp_data, const DataPlane &dp_mask, dp.set_size(grid.nx(), grid.ny()); // Process each point - for(x=0,n_in=0; x mask_data(grid.nx()*grid.ny()); // Loop through each grid point - for(x=0; x " << "error with mask_var->put\n\n"; - // Delete allocated memory - if(mask_data) { delete[] mask_data; mask_data = (float *) nullptr; } exit(1); } - // Delete allocated memory - if(mask_data) { delete[] mask_data; mask_data = (float *) nullptr; } - delete f_out; f_out = (NcFile *) nullptr; diff --git a/src/tools/other/gsi_tools/gsidens2orank.cc b/src/tools/other/gsi_tools/gsidens2orank.cc index 39edb87cc5..d7d4b5bee4 100644 --- a/src/tools/other/gsi_tools/gsidens2orank.cc +++ b/src/tools/other/gsi_tools/gsidens2orank.cc @@ -269,9 +269,9 @@ void process_conv_data(ConvData &d, int i_mem) { // Store the current observation info ClimoPntInfo cpi(bad_data_double, bad_data_double, bad_data_double, bad_data_double); - ens_pd.add_point_obs(d.sid.c_str(), d.lat, d.lon, + ens_pd.add_point_obs(d.obtype.c_str(), d.sid.c_str(), d.lat, d.lon, bad_data_double, bad_data_double, d.obs_ut, d.prs, - d.elv, d.obs, na_str, cpi, default_grid_weight); + d.elv, d.obs, na_str, cpi, default_weight); // Initialize ensemble members and mean to bad data for(i=0; i hdr_lat_arr (nlocs); + vector hdr_lon_arr (nlocs); + vector hdr_elv_arr (nlocs); + vector obs_pres_arr (nlocs); + vector obs_hght_arr (nlocs); + vector hdr_time_arr (nlocs); char *hdr_vld_block = new char[nlocs*ndatetime]; char *hdr_msg_types = nullptr; char *hdr_station_ids = nullptr; @@ -592,9 +592,9 @@ void process_ioda_file(int i_pb) { for (int i=0; i ibuf(n_data, 0); mlog << Debug(2) << "Processing Lidar points\t= " << n_data << "\n"; @@ -379,17 +379,13 @@ mlog << Debug(2) << "Processing Lidar points\t= " << n_data << "\n"; // populate the hdr_typ variable // -memset(ibuf, 0, n_data*sizeof(int)); - -obs_vars->hdr_typ_var.putVar(ibuf); +obs_vars->hdr_typ_var.putVar(ibuf.data()); // // populate the hdr_sid variable // -memset(ibuf, 0, n_data*sizeof(int)); - -obs_vars->hdr_sid_var.putVar(ibuf); +obs_vars->hdr_sid_var.putVar(ibuf.data()); nc_point_obs.add_header_strings(hdr_typ_string, na_str); // @@ -401,13 +397,9 @@ nc_point_obs.add_header_strings(hdr_typ_string, na_str); float ff[2]; -float *fhdr_lat_buf = new float[n_data]; -float *fhdr_lon_buf = new float[n_data]; -float *fhdr_elv_buf = new float[n_data]; - -memset(fhdr_lat_buf, 0, n_data * sizeof(float)); -memset(fhdr_lon_buf, 0, n_data * sizeof(float)); -memset(fhdr_elv_buf, 0, n_data * sizeof(float)); +vector fhdr_lat_buf(n_data, 0.0); +vector fhdr_lon_buf(n_data, 0.0); +vector fhdr_elv_buf(n_data, 0.0); for (j=0; jhdr_lat_var.putVar(fhdr_lat_buf); -obs_vars->hdr_lon_var.putVar(fhdr_lon_buf); -obs_vars->hdr_elv_var.putVar(fhdr_elv_buf); +obs_vars->hdr_lat_var.putVar(fhdr_lat_buf.data()); +obs_vars->hdr_lon_var.putVar(fhdr_lon_buf.data()); +obs_vars->hdr_elv_var.putVar(fhdr_elv_buf.data()); -delete [] fhdr_lat_buf; -delete [] fhdr_lon_buf; -delete [] fhdr_elv_buf; - // // populate the hdr_vld variable // @@ -441,8 +429,6 @@ unixtime t; get_hdf_var_info(hdf_sd_id, hdf_time_name, info); -memset(ibuf, 0, n_data*sizeof(int)); - for (j=0; jhdr_vld_var.putVar(ibuf); +obs_vars->hdr_vld_var.putVar(ibuf.data()); -delete[] ibuf; - // // populate the obs_arr variable // @@ -585,7 +569,7 @@ void write_nc_record(const float * f, int qc_value) snprintf(junk, sizeof(junk), "%d", qc_value); nc_point_obs.write_observation(f, junk); } - + return; } diff --git a/src/tools/other/madis2nc/madis2nc.cc b/src/tools/other/madis2nc/madis2nc.cc index 63626c6908..8831dde2aa 100644 --- a/src/tools/other/madis2nc/madis2nc.cc +++ b/src/tools/other/madis2nc/madis2nc.cc @@ -3737,18 +3737,18 @@ void set_mask_poly(const StringArray & a) { //////////////////////////////////////////////////////////////////////// void set_mask_sid(const StringArray & a) { - ConcatString mask_name; // List the station ID mask mlog << Debug(1) << "Station ID Mask: " << a[0] << "\n"; - parse_sid_mask(a[0], mask_sid, mask_name); + MaskSID ms = parse_sid_mask(a[0]); + for(const auto &pair : ms.sid_map()) mask_sid.add(pair.first); // List the length of the station ID mask mlog << Debug(2) - << "Parsed Station ID Mask: " << mask_name - << " containing " << mask_sid.n_elements() << " points\n"; + << "Parsed Station ID Mask (" << ms.name() + << ") containing " << mask_sid.n() << " stations\n"; } //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/mode_time_domain/mtd_nc_output.cc b/src/tools/other/mode_time_domain/mtd_nc_output.cc index 351dac497e..4d8190771f 100644 --- a/src/tools/other/mode_time_domain/mtd_nc_output.cc +++ b/src/tools/other/mode_time_domain/mtd_nc_output.cc @@ -215,11 +215,11 @@ NcVar lon_var = add_var(&out, lon_name, ncFloat, ny_dim, nx_dim); add_att(&lat_var, "long_name", "Latitude"); add_att(&lon_var, "long_name", "Longitude"); -float * lat_data = new float [nx*ny]; -float * lon_data = new float [nx*ny]; +vector lat_data(nx*ny); +vector lon_data(nx*ny); -Lat = lat_data; -Lon = lon_data; +Lat = lat_data.data(); +Lon = lon_data.data(); for (y=0; y out_data(n3); const string name = ( is_fcst ? fcst_clus_id_name : obs_clus_id_name ); @@ -363,7 +357,7 @@ add_att(&var, "_FillValue", bad_data_int); const int n_objects = ( is_fcst ? (e.n_fcst_simples()) : (e.n_obs_simples()) ); -remap = new int [n_objects + 1]; +vector remap(n_objects + 1); remap[0] = 0; @@ -378,26 +372,20 @@ for (j=1; j<=n_objects; ++j) { } -op = out_data; - for (j=0; j " << "error writing data to the output file.\n\n"; exit(1); @@ -1726,7 +1726,7 @@ void write_nc_data_int(const DataPlane &dp, const Grid &grid, NcVar *data_var) { } // end for x // Write out the data - if(!put_nc_data_with_dims(data_var, &data.data()[0], grid.ny(), grid.nx())) { + if(!put_nc_data_with_dims(data_var, data.data(), grid.ny(), grid.nx())) { mlog << Error << "\nwrite_nc_data_int() -> " << "error writing data to the output file.\n\n"; exit(1); diff --git a/src/tools/other/regrid_data_plane/regrid_data_plane.cc b/src/tools/other/regrid_data_plane/regrid_data_plane.cc index 28ec4704ea..0306c670a6 100644 --- a/src/tools/other/regrid_data_plane/regrid_data_plane.cc +++ b/src/tools/other/regrid_data_plane/regrid_data_plane.cc @@ -390,7 +390,7 @@ void open_nc(const Grid &grid, ConcatString run_cs) { void write_nc_data(const DataPlane &dp, const Grid &grid, NcVar *data_var) { // Allocate memory to store data values for each grid point - float *data = new float [grid.nx()*grid.ny()]; + vector data(grid.nx()*grid.ny()); // Store the data int grid_nx = grid.nx(); @@ -403,15 +403,12 @@ void write_nc_data(const DataPlane &dp, const Grid &grid, NcVar *data_var) { } // end for x // Write out the data - if(!put_nc_data_with_dims(data_var, &data[0], grid.ny(), grid.nx())) { + if(!put_nc_data_with_dims(data_var, data.data(), grid.ny(), grid.nx())) { mlog << Error << "\nwrite_nc_data() -> " << "error writing data to the output file.\n\n"; exit(1); } - // Clean up - if(data) { delete [] data; data = (float *) nullptr; } - return; } diff --git a/src/tools/other/shift_data_plane/shift_data_plane.cc b/src/tools/other/shift_data_plane/shift_data_plane.cc index 40e2f742bc..7f5e56da5b 100644 --- a/src/tools/other/shift_data_plane/shift_data_plane.cc +++ b/src/tools/other/shift_data_plane/shift_data_plane.cc @@ -336,7 +336,7 @@ void write_netcdf(const DataPlane &dp, const Grid &grid, add_att(&data_var, "smoothing_shape", gtf.enum2String(Shape)); // Allocate memory to store data values for each grid point - float *data = new float [grid.nx()*grid.ny()]; + vector data(grid.nx()*grid.ny()); // Store the data for(int x=0; x " << "error writing data to the output file.\n\n"; exit(1); } // Clean up - if(data) { delete [] data; data = (float *) nullptr; } if(f_out) { delete f_out; f_out = (NcFile *) nullptr; } diff --git a/src/tools/tc_utils/tc_diag/tc_diag.cc b/src/tools/tc_utils/tc_diag/tc_diag.cc index c4b76a7cdd..1644333772 100644 --- a/src/tools/tc_utils/tc_diag/tc_diag.cc +++ b/src/tools/tc_utils/tc_diag/tc_diag.cc @@ -1331,14 +1331,11 @@ void copy_time_vars(NcFile *to_nc, NcFile *from_nc, int i_time) { } // Allocate buffer - double *buf = new double[buf_size]; + vector buf(buf_size); // Copy the data for this time slice - get_nc_data(&from_var, buf); - to_var.putVar(offsets, counts, buf); - - // Cleanup - if(buf) { delete[] buf; buf = (double *) nullptr; } + get_nc_data(&from_var, buf.data()); + to_var.putVar(offsets, counts, buf.data()); } // end for i @@ -1665,7 +1662,7 @@ void OutFileInfo::write_nc_diag() { // Allocate space int n_prs_data = vld_dim.getSize() * prs_dim.getSize(); - float *prs_data = new float [n_prs_data]; + vector prs_data(n_prs_data); ConcatString diag_name; // Loop over the pressure diagnostic names @@ -1698,7 +1695,7 @@ void OutFileInfo::write_nc_diag() { } // end for j // Write the data - write_nc_diag_prs_vals(prs_diag[i], prs_data); + write_nc_diag_prs_vals(prs_diag[i], prs_data.data()); } // end for i @@ -1708,9 +1705,6 @@ void OutFileInfo::write_nc_diag() { write_nc_diag_vals(*it, diag_custom_map.at(*it)); } - // Clean up - if(prs_data) { delete [] prs_data; prs_data = (float *) nullptr; } - return; } @@ -2198,8 +2192,8 @@ void TmpFileInfo::setup_nc_file(const DomainInfo &di, // Define latitude and longitude arrays TcrmwData d = di.data; int nra = d.range_n * d.azimuth_n; - double *lat_arr = new double[nra]; - double *lon_arr = new double[nra]; + vector lat_arr(nra); + vector lon_arr(nra); // Set grid center d.lat_center = pnt_ptr->lat(); @@ -2262,19 +2256,15 @@ void TmpFileInfo::setup_nc_file(const DomainInfo &di, lat_var, lon_var); // Compute lat and lon coordinate arrays - compute_lat_lon(ra_grid, lat_arr, lon_arr); + compute_lat_lon(ra_grid, lat_arr.data(), lon_arr.data()); // Write coordinate arrays - write_tc_data(tmp_out, ra_grid, 0, lat_var, lat_arr); - write_tc_data(tmp_out, ra_grid, 0, lon_var, lon_arr); + write_tc_data(tmp_out, ra_grid, 0, lat_var, lat_arr.data()); + write_tc_data(tmp_out, ra_grid, 0, lon_var, lon_arr.data()); // Write track point values write_tc_track_point(tmp_out, vld_dim, *pnt_ptr); - // Clean up - if(lat_arr) { delete[] lat_arr; lat_arr = (double *) nullptr; } - if(lon_arr) { delete[] lon_arr; lon_arr = (double *) nullptr; } - return; } diff --git a/src/tools/tc_utils/tc_dland/tc_dland.cc b/src/tools/tc_utils/tc_dland/tc_dland.cc index 0a563b5e30..97c1e21d25 100644 --- a/src/tools/tc_utils/tc_dland/tc_dland.cc +++ b/src/tools/tc_utils/tc_dland/tc_dland.cc @@ -203,7 +203,6 @@ void process_land_data() { void process_distances() { int n, x, y, c, npts, nlog, imin; double lat, lon; - float *dland = (float *) nullptr; // Instantiate the grid Grid grid(GridData); @@ -250,7 +249,7 @@ void process_distances() { add_att(&dland_var, "_FillValue", bad_data_float); // Allocate memory to store the data values for each grid point - dland = new float [grid.nx()*grid.ny()]; + vector dland(grid.nx()*grid.ny()); // Dump out grid info mlog << Debug(2) @@ -294,16 +293,13 @@ void process_distances() { // Write the computed distances to the output file mlog << Debug(3) << "Writing distance to land variable.\n"; - if(!put_nc_data_with_dims(&dland_var, &dland[0], grid.ny(), grid.nx())) { - if(dland) { delete [] dland; dland = (float *) nullptr; } + if(!put_nc_data_with_dims(&dland_var, dland.data(), grid.ny(), grid.nx())) { + delete f_out; mlog << Error << "\nprocess_distances() -> " << "error with dland_var->put\n\n"; exit(1); } - // Delete allocated memory - if(dland) { delete [] dland; dland = (float *) nullptr; } - // Close the output NetCDF file delete f_out; f_out = (NcFile *) nullptr; diff --git a/src/tools/tc_utils/tc_gen/tc_gen.cc b/src/tools/tc_utils/tc_gen/tc_gen.cc index 7c6a44c16e..c02f65e9b4 100644 --- a/src/tools/tc_utils/tc_gen/tc_gen.cc +++ b/src/tools/tc_utils/tc_gen/tc_gen.cc @@ -2412,10 +2412,9 @@ void write_nc(GenCTCInfo &gci) { unixtime valid_end = (unixtime) 0; // Allocate memory - float *data = (float *) nullptr; int nx = gci.NcOutGrid->nx(); int ny = gci.NcOutGrid->ny(); - data = new float [nx*ny]; + vector data(nx*ny, 0.0); // Loop over vector of output types for(i=0; i " << "error writing NetCDF variable name " << var_name << "\n\n"; @@ -2543,9 +2539,6 @@ void write_nc(GenCTCInfo &gci) { } } - // Deallocate and clean up - if(data) { delete [] data; data = (float *) nullptr; } - return; }