From 8bd8830b63d85391c626ebab598c052a6b52ea3e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 10:12:12 -0600 Subject: [PATCH] Update develop-ref after MET#2959 (#2961) 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) --------- 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: metplus-bot <97135045+metplus-bot@users.noreply.github.com> --- .github/jobs/set_job_controls.sh | 2 +- .../build_docker_and_trigger_metplus.yml | 2 +- .github/workflows/compilation_options.yml | 4 + .github/workflows/sonarqube.yml | 2 +- Makefile.in | 1 + configure | 27 +- configure.ac | 20 +- data/Makefile.in | 1 + data/climo/Makefile.in | 1 + data/climo/seeps/Makefile.in | 1 + data/colortables/Makefile.in | 1 + data/colortables/NCL_colortables/Makefile.in | 1 + data/config/Makefile.in | 1 + data/map/Makefile.in | 1 + data/map/admin_by_country/Makefile.in | 1 + data/poly/HMT_masks/Makefile.in | 1 + data/poly/Makefile.in | 1 + data/poly/NCEP_masks/Makefile.in | 1 + data/ps/Makefile.in | 1 + data/table_files/Makefile.in | 1 + data/tc_data/Makefile.in | 1 + docs/Users_Guide/installation.rst | 10 +- docs/Users_Guide/reformat_point.rst | 15 +- internal/scripts/docker/Dockerfile | 2 +- internal/scripts/docker/Dockerfile.copy | 2 +- internal/scripts/docker/Dockerfile.sonarqube | 2 +- .../scripts/installation/compile_MET_all.sh | 28 +- .../config/Point2GridConfig_tlat_tlon | 6 + .../test_unit/xml/unit_plot_data_plane.xml | 14 + internal/test_unit/xml/unit_point2grid.xml | 19 + internal/test_util/Makefile.in | 1 + internal/test_util/basic/Makefile.in | 1 + .../test_util/basic/vx_config/Makefile.in | 1 + internal/test_util/basic/vx_log/Makefile.in | 1 + internal/test_util/basic/vx_util/Makefile.in | 1 + internal/test_util/libcode/Makefile.in | 1 + .../test_util/libcode/vx_data2d/Makefile.in | 1 + .../libcode/vx_data2d_factory/Makefile.in | 1 + .../libcode/vx_data2d_grib/Makefile.in | 1 + .../libcode/vx_data2d_nc_cf/Makefile.in | 1 + .../libcode/vx_data2d_nc_met/Makefile.in | 1 + .../test_util/libcode/vx_geodesy/Makefile.in | 1 + .../test_util/libcode/vx_grid/Makefile.in | 1 + .../test_util/libcode/vx_nc_util/Makefile.in | 1 + .../test_util/libcode/vx_physics/Makefile.in | 1 + .../libcode/vx_plot_util/Makefile.in | 1 + internal/test_util/libcode/vx_ps/Makefile.in | 1 + .../libcode/vx_python3_utils/Makefile.in | 1 + .../libcode/vx_series_data/Makefile.in | 1 + .../test_util/libcode/vx_solar/Makefile.in | 1 + .../test_util/libcode/vx_tc_util/Makefile.in | 1 + internal/test_util/tools/Makefile.in | 1 + internal/test_util/tools/other/Makefile.in | 1 + .../tools/other/mode_time_domain/Makefile.in | 1 + scripts/Rscripts/Makefile.in | 1 + scripts/Rscripts/include/Makefile.in | 1 + scripts/python/Makefile.in | 1 + scripts/python/examples/Makefile.in | 1 + scripts/python/met/Makefile.in | 1 + scripts/python/pyembed/Makefile.in | 1 + scripts/python/tc_diag/Makefile.in | 1 + scripts/python/tc_diag/atcf_tools/Makefile.in | 1 + scripts/python/tc_diag/config/Makefile.in | 1 + scripts/python/tc_diag/diag_lib/Makefile.in | 1 + .../python/tc_diag/tc_diag_driver/Makefile.in | 1 + scripts/python/utility/Makefile.in | 1 + src/Makefile.in | 1 + src/basic/Makefile.in | 1 + src/basic/enum_to_string/Makefile.in | 1 + src/basic/vx_cal/Makefile.in | 1 + src/basic/vx_config/Makefile.in | 1 + src/basic/vx_log/Makefile.in | 1 + src/basic/vx_log/vx_log.h | 9 + src/basic/vx_math/Makefile.in | 1 + src/basic/vx_math/is_bad_data.h | 26 +- src/basic/vx_util/Makefile.in | 1 + src/basic/vx_util_math/Makefile.in | 1 + src/libcode/Makefile.in | 1 + src/libcode/vx_afm/Makefile.in | 1 + src/libcode/vx_analysis_util/Makefile.in | 1 + src/libcode/vx_bool_calc/Makefile.in | 1 + src/libcode/vx_color/Makefile.in | 1 + src/libcode/vx_data2d/Makefile.in | 1 + src/libcode/vx_data2d/data2d_utils.cc | 48 +++ src/libcode/vx_data2d/data2d_utils.h | 8 + src/libcode/vx_data2d/data_class.cc | 14 +- src/libcode/vx_data2d/var_info.cc | 21 +- src/libcode/vx_data2d_factory/Makefile.in | 1 + src/libcode/vx_data2d_grib/Makefile.in | 1 + src/libcode/vx_data2d_grib2/Makefile.in | 1 + src/libcode/vx_data2d_nc_cf/Makefile.in | 1 + src/libcode/vx_data2d_nc_cf/data2d_nc_cf.cc | 10 +- src/libcode/vx_data2d_nc_cf/nc_cf_file.cc | 362 ++++++++++-------- src/libcode/vx_data2d_nc_cf/nc_cf_file.h | 12 +- src/libcode/vx_data2d_nc_met/Makefile.in | 1 + src/libcode/vx_data2d_nc_wrf/Makefile.in | 1 + src/libcode/vx_data2d_python/Makefile.in | 1 + src/libcode/vx_data2d_ugrid/Makefile.in | 1 + src/libcode/vx_geodesy/Makefile.in | 1 + src/libcode/vx_gis/Makefile.in | 1 + src/libcode/vx_gnomon/Makefile.in | 1 + src/libcode/vx_grid/Makefile.in | 1 + src/libcode/vx_gsl_prob/Makefile.in | 1 + src/libcode/vx_nav/Makefile.in | 1 + src/libcode/vx_nc_obs/Makefile.in | 1 + src/libcode/vx_nc_util/Makefile.in | 1 + src/libcode/vx_nc_util/nc_utils.hpp | 171 ++++++--- src/libcode/vx_pb_util/Makefile.in | 1 + src/libcode/vx_physics/Makefile.in | 1 + src/libcode/vx_plot_util/Makefile.in | 1 + src/libcode/vx_pointdata_python/Makefile.in | 1 + src/libcode/vx_ps/Makefile.in | 1 + src/libcode/vx_pxm/Makefile.in | 1 + src/libcode/vx_python3_utils/Makefile.in | 1 + src/libcode/vx_regrid/Makefile.in | 1 + src/libcode/vx_render/Makefile.in | 1 + src/libcode/vx_seeps/Makefile.in | 1 + src/libcode/vx_series_data/Makefile.in | 1 + src/libcode/vx_shapedata/Makefile.in | 1 + src/libcode/vx_solar/Makefile.in | 1 + src/libcode/vx_stat_out/Makefile.in | 1 + src/libcode/vx_statistics/Makefile.in | 1 + src/libcode/vx_statistics/apply_mask.cc | 37 +- src/libcode/vx_statistics/contable_stats.cc | 6 +- src/libcode/vx_summary/Makefile.in | 1 + src/libcode/vx_tc_util/Makefile.in | 1 + src/libcode/vx_time_series/Makefile.in | 1 + src/tools/Makefile.in | 1 + src/tools/core/Makefile.in | 1 + src/tools/core/ensemble_stat/Makefile.in | 1 + src/tools/core/grid_stat/Makefile.in | 1 + src/tools/core/mode/Makefile.in | 1 + src/tools/core/mode_analysis/Makefile.in | 1 + src/tools/core/pcp_combine/Makefile.in | 1 + src/tools/core/point_stat/Makefile.in | 1 + src/tools/core/series_analysis/Makefile.in | 1 + src/tools/core/stat_analysis/Makefile.in | 1 + src/tools/core/wavelet_stat/Makefile.in | 1 + src/tools/dev_utils/Makefile.in | 1 + src/tools/dev_utils/shapefiles/Makefile.in | 1 + src/tools/other/Makefile.in | 1 + src/tools/other/ascii2nc/Makefile.in | 1 + src/tools/other/gen_ens_prod/Makefile.in | 1 + src/tools/other/gen_vx_mask/Makefile.in | 1 + src/tools/other/gen_vx_mask/gen_vx_mask.cc | 37 +- src/tools/other/gis_utils/Makefile.in | 1 + src/tools/other/grid_diag/Makefile.in | 1 + src/tools/other/gsi_tools/Makefile.in | 1 + src/tools/other/ioda2nc/Makefile.in | 1 + src/tools/other/lidar2nc/Makefile.in | 1 + src/tools/other/madis2nc/Makefile.in | 1 + src/tools/other/mode_graphics/Makefile.in | 1 + src/tools/other/mode_time_domain/3d_conv.cc | 46 +-- src/tools/other/mode_time_domain/Makefile.in | 1 + src/tools/other/modis_regrid/Makefile.in | 1 + src/tools/other/pb2nc/Makefile.in | 1 + src/tools/other/plot_data_plane/Makefile.in | 1 + src/tools/other/plot_point_obs/Makefile.in | 1 + .../plot_point_obs_conf_info.cc | 19 +- src/tools/other/point2grid/Makefile.in | 1 + src/tools/other/point2grid/point2grid.cc | 340 +++++++++------- src/tools/other/regrid_data_plane/Makefile.in | 1 + src/tools/other/shift_data_plane/Makefile.in | 1 + src/tools/other/wwmca_tool/Makefile.in | 1 + src/tools/tc_utils/Makefile.in | 1 + src/tools/tc_utils/rmw_analysis/Makefile.in | 1 + src/tools/tc_utils/tc_diag/Makefile.in | 1 + src/tools/tc_utils/tc_dland/Makefile.in | 1 + src/tools/tc_utils/tc_gen/Makefile.in | 1 + src/tools/tc_utils/tc_pairs/Makefile.in | 1 + src/tools/tc_utils/tc_rmw/Makefile.in | 1 + src/tools/tc_utils/tc_stat/Makefile.in | 1 + 172 files changed, 948 insertions(+), 514 deletions(-) create mode 100644 internal/test_unit/config/Point2GridConfig_tlat_tlon diff --git a/.github/jobs/set_job_controls.sh b/.github/jobs/set_job_controls.sh index 10f3b4c21e..aa72ad4162 100755 --- a/.github/jobs/set_job_controls.sh +++ b/.github/jobs/set_job_controls.sh @@ -6,7 +6,7 @@ run_unit_tests=false run_diff=false run_update_truth=false met_base_repo=met-base -met_base_tag=v3.2 +met_base_tag=v3.3 input_data_version=develop truth_data_version=develop diff --git a/.github/workflows/build_docker_and_trigger_metplus.yml b/.github/workflows/build_docker_and_trigger_metplus.yml index 13606d5ed3..7d7dcce29c 100644 --- a/.github/workflows/build_docker_and_trigger_metplus.yml +++ b/.github/workflows/build_docker_and_trigger_metplus.yml @@ -29,7 +29,7 @@ jobs: env: SOURCE_BRANCH: ${{ steps.get_branch_name.outputs.branch_name }}-lite MET_BASE_REPO: met-base - MET_BASE_TAG: v3.2 + MET_BASE_TAG: v3.3 - name: Push Docker Image run: .github/jobs/push_docker_image.sh diff --git a/.github/workflows/compilation_options.yml b/.github/workflows/compilation_options.yml index 7a8dc73cf0..cf6c5fc97a 100644 --- a/.github/workflows/compilation_options.yml +++ b/.github/workflows/compilation_options.yml @@ -63,6 +63,10 @@ jobs: config: '--enable-mode_graphics' - jobid: 'job8' config: '--enable-modis' + - jobid: 'job9' + config: '--enable-all MET_CXX_STANDARD=11' + - jobid: 'job10' + config: '--enable-all MET_CXX_STANDARD=14' fail-fast: false steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 6a6627fb69..b476a488b6 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -61,7 +61,7 @@ jobs: run: .github/jobs/build_sonarqube_image.sh env: MET_BASE_REPO: met-base - MET_BASE_TAG: v3.2 + MET_BASE_TAG: v3.3 SOURCE_BRANCH: ${{ steps.get_branch_name.outputs.branch_name }} WD_REFERENCE_BRANCH: ${{ github.event.inputs.reference_branch }} SONAR_SCANNER_VERSION: 5.0.1.3006 diff --git a/Makefile.in b/Makefile.in index 582d2a65c8..0ae957d7b3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -256,6 +256,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/configure b/configure index 40672ec913..758f3502f6 100755 --- a/configure +++ b/configure @@ -797,6 +797,7 @@ MET_ATLAS MET_PROJLIB MET_PROJINC MET_PROJ +MET_CXX_STANDARD OPENMP_CFLAGS am__fastdepCC_FALSE am__fastdepCC_TRUE @@ -933,6 +934,7 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +MET_CXX_STANDARD MET_PROJ MET_PROJINC MET_PROJLIB @@ -1667,6 +1669,9 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + MET_CXX_STANDARD + Specify the version of the supported C++ standard. Values may be + 11, 14, or 17. Default value is 17. MET_PROJ Where proj lib and include subdirectories are located. If they are installed in /usr/local, you don't have to specify them. MET_PROJINC Where proj include files are located. Use if the libraries and @@ -5317,6 +5322,26 @@ printf "%s\n" "$ac_cv_prog_c_openmp" >&6; } CPPFLAGS="${CPPFLAGS} ${OPENMP_CFLAGS}" LDFLAGS="${LDFLAGS} ${OPENMP_CFLAGS}" +# +# Look for a specified C++ Standard +# + +# Configure the variable. The help text will appear if the user uses "configure --help". + + + +# Set a default value + +if (test -z "$MET_CXX_STANDARD"); then + MET_CXX_STANDARD=17 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: c++17 will be used as the C++ standard" >&5 +printf "%s\n" "$as_me: c++17 will be used as the C++ standard" >&6;} +elif (test -n "$MET_CXX_STANDARD"); then + MET_CXX_STANDARD=${MET_CXX_STANDARD} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: MET_CXX_STANDARD will be set" >&5 +printf "%s\n" "$as_me: MET_CXX_STANDARD will be set" >&6;} +fi + # # Look for the Proj library. # @@ -6988,7 +7013,7 @@ fi CPPFLAGS=$CPPFLAGS' -DMET_BASE="\"$(pkgdatadir)\""' # Add -std=c++11 to CXXFLAGS -CXXFLAGS=$CXXFLAGS' -std=c++11' +CXXFLAGS=$CXXFLAGS' -std=c++'$MET_CXX_STANDARD # Define other variables for the makefiles diff --git a/configure.ac b/configure.ac index 2f8159d58c..03436847af 100644 --- a/configure.ac +++ b/configure.ac @@ -15,6 +15,24 @@ AC_OPENMP() CPPFLAGS="${CPPFLAGS} ${OPENMP_CFLAGS}" LDFLAGS="${LDFLAGS} ${OPENMP_CFLAGS}" +# +# Look for a specified C++ Standard +# + +# Configure the variable. The help text will appear if the user uses "configure --help". + +AC_ARG_VAR([MET_CXX_STANDARD], [Specify the version of the supported C++ standard. Values may be 11, 14, or 17. Default value is 17.]) + +# Set a default value + +if (test -z "$MET_CXX_STANDARD"); then + MET_CXX_STANDARD=17 + AC_MSG_NOTICE([c++17 will be used as the C++ standard]) +elif (test -n "$MET_CXX_STANDARD"); then + MET_CXX_STANDARD=${MET_CXX_STANDARD} + AC_MSG_NOTICE([MET_CXX_STANDARD will be set]) +fi + # # Look for the Proj library. # @@ -1160,7 +1178,7 @@ AM_CONDITIONAL([ENABLE_DEVELOPMENT], [test -n "$MET_DEVELOPMENT"]) CPPFLAGS=$CPPFLAGS' -DMET_BASE="\"$(pkgdatadir)\""' # Add -std=c++11 to CXXFLAGS -CXXFLAGS=$CXXFLAGS' -std=c++11' +CXXFLAGS=$CXXFLAGS' -std=c++'$MET_CXX_STANDARD # Define other variables for the makefiles diff --git a/data/Makefile.in b/data/Makefile.in index 262e9e43cc..43aab3f3d9 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -260,6 +260,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/climo/Makefile.in b/data/climo/Makefile.in index c6415ac06c..0030bfbd90 100644 --- a/data/climo/Makefile.in +++ b/data/climo/Makefile.in @@ -230,6 +230,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/climo/seeps/Makefile.in b/data/climo/seeps/Makefile.in index 761a867e6b..f40096bb49 100644 --- a/data/climo/seeps/Makefile.in +++ b/data/climo/seeps/Makefile.in @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/colortables/Makefile.in b/data/colortables/Makefile.in index 82b6b46710..05fcc3df5a 100644 --- a/data/colortables/Makefile.in +++ b/data/colortables/Makefile.in @@ -260,6 +260,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/colortables/NCL_colortables/Makefile.in b/data/colortables/NCL_colortables/Makefile.in index df79826d8d..1d174cffda 100644 --- a/data/colortables/NCL_colortables/Makefile.in +++ b/data/colortables/NCL_colortables/Makefile.in @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/config/Makefile.in b/data/config/Makefile.in index e88150a766..6ff5c30139 100644 --- a/data/config/Makefile.in +++ b/data/config/Makefile.in @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/map/Makefile.in b/data/map/Makefile.in index a34c9c189f..12e4540ca0 100644 --- a/data/map/Makefile.in +++ b/data/map/Makefile.in @@ -260,6 +260,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/map/admin_by_country/Makefile.in b/data/map/admin_by_country/Makefile.in index 3f36ae61fb..825f9576c6 100644 --- a/data/map/admin_by_country/Makefile.in +++ b/data/map/admin_by_country/Makefile.in @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/poly/HMT_masks/Makefile.in b/data/poly/HMT_masks/Makefile.in index 7284d8de7d..305405cc2a 100644 --- a/data/poly/HMT_masks/Makefile.in +++ b/data/poly/HMT_masks/Makefile.in @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/poly/Makefile.in b/data/poly/Makefile.in index 36890cca0a..04906070f5 100644 --- a/data/poly/Makefile.in +++ b/data/poly/Makefile.in @@ -260,6 +260,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/poly/NCEP_masks/Makefile.in b/data/poly/NCEP_masks/Makefile.in index acda936d43..4ecea4b0d0 100644 --- a/data/poly/NCEP_masks/Makefile.in +++ b/data/poly/NCEP_masks/Makefile.in @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/ps/Makefile.in b/data/ps/Makefile.in index c017420485..2677c7fb04 100644 --- a/data/ps/Makefile.in +++ b/data/ps/Makefile.in @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/table_files/Makefile.in b/data/table_files/Makefile.in index 08d91b866e..5f82cc573e 100644 --- a/data/table_files/Makefile.in +++ b/data/table_files/Makefile.in @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/data/tc_data/Makefile.in b/data/tc_data/Makefile.in index 9ef1261884..eee63e1885 100644 --- a/data/tc_data/Makefile.in +++ b/data/tc_data/Makefile.in @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/docs/Users_Guide/installation.rst b/docs/Users_Guide/installation.rst index 4540d341b4..2494abe520 100644 --- a/docs/Users_Guide/installation.rst +++ b/docs/Users_Guide/installation.rst @@ -247,7 +247,7 @@ Environment Variable Descriptions containing the bin, include, lib, and share directories for Python. **MET_PYTHON_CC** - Format is -I followed by the directory containing - the Python include files (ex. -I/usr/local/python3/include/python3.10). + the Python include files (e.g. -I/usr/local/python3/include/python3.10). This information may be obtained by running :code:`python3-config --cflags`; however, this command can, on certain systems, @@ -257,7 +257,7 @@ Environment Variable Descriptions the Python library files then a space, then -l followed by the necessary Python libraries to link to - (ex. -L/usr/local/python3/lib/\\ -lpython3.10\\ + (e.g. -L/usr/local/python3/lib/\\ -lpython3.10\\ -lpthread\\ -ldl\\ -lutil\\ -lm). The backslashes are necessary in the example shown because of the spaces, which will be @@ -285,7 +285,11 @@ Environment Variable Descriptions without a specified value of cores to use. The automated MET testing scripts in the Docker environment have been successful with a value of - 5 (ex. export MAKE_ARGS=”-j 5”). + 5 (e.g. export MAKE_ARGS=”-j 5”). + + **export MET_CXX_STANDARD** - Specify the version of the supported + C++ standard. Values may be 11, 14, or 17. The default value is 17. + (e.g. export MET_CXX_STANDARD=11). External Library Handling in compile_MET_all.sh diff --git a/docs/Users_Guide/reformat_point.rst b/docs/Users_Guide/reformat_point.rst index fb0a7b2766..ae9691745f 100644 --- a/docs/Users_Guide/reformat_point.rst +++ b/docs/Users_Guide/reformat_point.rst @@ -1092,9 +1092,22 @@ Optional Arguments for point2grid 16. The **-compress level** option indicates the desired level of compression (deflate level) for NetCDF variables. The valid level is between 0 and 9. The value of "level" will override the default setting of 0 from the configuration file or the environment variable MET_NC_COMPRESS. Setting the compression level to 0 will make no compression for the NetCDF output. Lower number is for fast compression and higher number is for better compression. Only 4 interpolation methods are applied to the field variables; MIN/MAX/MEDIAN/UW_MEAN. The GAUSSIAN method is applied to the probability variable only. Unlike regrad_data_plane, MAX method is applied to the file variable and Gaussian method to the probability variable with the MAXGAUSS method. If the probability variable is not requested, MAXGAUSS method is the same as MAX method. - + For the GOES-16 and GOES-17 data, the computing lat/long is time consuming. The computed coordinate (lat/long) is saved to a temporary NetCDF file, as described in :numref:`Contributor's Guide Section %s `. The computing lat/long step can be skipped if the coordinate file is given through the environment variable MET_GEOSTATIONARY_DATA. The grid mapping to the target grid is saved to MET_TMP_DIR to save the execution time. Once this file is created, the MET_GEOSTATIONARY_DATA is ignored. The grid mapping file should be deleted manually in order to apply a new MET_GEOSTATIONARY_DATA environment variable or to re-generate the grid mapping file. An example of call point2grid to process GOES-16 AOD data is shown below: + +The grid name or the grid definition can be given with the -field option when the grid information is missing from the input NetCDF file for the latitude_longitude projection. The latitude and longitude variable names should be defined by the user, and the grid information from the set_attr_grid is ignored in this case + +.. code-block:: none + + point2grid \ + iceh.2018-01-03.c00.tlat_tlon.nc \ + G231 \ + point2grid_cice_to_G231.nc \ + -config Point2GridConfig_tlat_tlon \ + -field 'name="hi_d"; level="(0,*,*)"; set_attr_grid="latlon 1440 1080 -79.80672 60.28144 0.04 0.04";' \ + -v 1 + .. code-block:: none point2grid \ diff --git a/internal/scripts/docker/Dockerfile b/internal/scripts/docker/Dockerfile index c5daf58492..c7a2ca5bdd 100644 --- a/internal/scripts/docker/Dockerfile +++ b/internal/scripts/docker/Dockerfile @@ -1,5 +1,5 @@ ARG MET_BASE_REPO=met-base -ARG MET_BASE_TAG=v3.2 +ARG MET_BASE_TAG=v3.3 FROM dtcenter/${MET_BASE_REPO}:${MET_BASE_TAG} MAINTAINER John Halley Gotway diff --git a/internal/scripts/docker/Dockerfile.copy b/internal/scripts/docker/Dockerfile.copy index 4d3d9476cd..51ae55ec3a 100644 --- a/internal/scripts/docker/Dockerfile.copy +++ b/internal/scripts/docker/Dockerfile.copy @@ -1,5 +1,5 @@ ARG MET_BASE_REPO=met-base-unit-test -ARG MET_BASE_TAG=v3.2 +ARG MET_BASE_TAG=v3.3 FROM dtcenter/${MET_BASE_REPO}:${MET_BASE_TAG} MAINTAINER John Halley Gotway diff --git a/internal/scripts/docker/Dockerfile.sonarqube b/internal/scripts/docker/Dockerfile.sonarqube index 75dc3c952c..e1e935d857 100644 --- a/internal/scripts/docker/Dockerfile.sonarqube +++ b/internal/scripts/docker/Dockerfile.sonarqube @@ -1,5 +1,5 @@ ARG MET_BASE_REPO=met-base -ARG MET_BASE_TAG=v3.2 +ARG MET_BASE_TAG=v3.3 FROM dtcenter/${MET_BASE_REPO}:${MET_BASE_TAG} MAINTAINER John Halley Gotway diff --git a/internal/scripts/installation/compile_MET_all.sh b/internal/scripts/installation/compile_MET_all.sh index 6524aa8563..2497e582a8 100755 --- a/internal/scripts/installation/compile_MET_all.sh +++ b/internal/scripts/installation/compile_MET_all.sh @@ -640,7 +640,11 @@ if [ $COMPILE_ECKIT -eq 1 ]; then # Need to obtain ecbuild before installing eckit - vrs="3.5.0" + if [[ ! -z ${MET_CXX_STANDARD} && ${MET_CXX_STANDARD} -le 14 ]]; then + vrs="3.5.0" + elif [[ -z ${MET_CXX_STANDARD} ]]; then + vrs="3.7.0" + fi echo echo "Compiling ECBUILD at `date`" @@ -652,9 +656,13 @@ if [ $COMPILE_ECKIT -eq 1 ]; then run_cmd "mkdir build; cd build" run_cmd "cmake ../ -DCMAKE_INSTALL_PREFIX=${LIB_DIR} > $(pwd)/ecbuild.cmake.log 2>&1" run_cmd "make ${MAKE_ARGS} install > $(pwd)/ecbuild.make_install.log 2>&1" - - vrs="1.20.2" + if [[ ! -z ${MET_CXX_STANDARD} && ${MET_CXX_STANDARD} -le 14 ]]; then + vrs="1.20.2" + elif [[ -z ${MET_CXX_STANDARD} ]]; then + vrs="1.24.4" + fi + echo echo "Compiling ECKIT at `date`" mkdir -p ${LIB_DIR}/eckit @@ -671,7 +679,11 @@ fi # Compile ATLAS if [ $COMPILE_ATLAS -eq 1 ]; then - vrs="0.30.0" + if [[ ! -z ${MET_CXX_STANDARD} && ${MET_CXX_STANDARD} -le 14 ]]; then + vrs="0.30.0" + elif [[ -z ${MET_CXX_STANDARD} ]]; then + vrs="0.35.0" + fi echo echo "Compiling ATLAS at `date`" @@ -862,9 +874,11 @@ if [ -z ${MET_PROJ} ]; then export MET_PROJ=${LIB_DIR} fi -export MET_PYTHON_BIN_EXE=${MET_PYTHON_BIN_EXE:=${MET_PYTHON}/bin/python3} -export MET_PYTHON_LD -export MET_PYTHON_CC +if [[ ! -z ${MET_PYTHON_CC} || ! -z ${MET_PYTHON_LD} ]]; then + export MET_PYTHON_BIN_EXE=${MET_PYTHON_BIN_EXE:=${MET_PYTHON}/bin/python3} + export MET_PYTHON_LD + export MET_PYTHON_CC +fi # add flags to user-defined LDFLAGS for MacOS if [[ $machine != "Mac" ]]; then diff --git a/internal/test_unit/config/Point2GridConfig_tlat_tlon b/internal/test_unit/config/Point2GridConfig_tlat_tlon new file mode 100644 index 0000000000..66f2f854b4 --- /dev/null +++ b/internal/test_unit/config/Point2GridConfig_tlat_tlon @@ -0,0 +1,6 @@ +file_type = NETCDF_NCCF; + +var_name_map = [ + { key = "lat_vname"; val = "TLAT"; }, + { key = "lon_vname"; val = "TLON"; } +]; diff --git a/internal/test_unit/xml/unit_plot_data_plane.xml b/internal/test_unit/xml/unit_plot_data_plane.xml index 5c56a389d8..599bfd0742 100644 --- a/internal/test_unit/xml/unit_plot_data_plane.xml +++ b/internal/test_unit/xml/unit_plot_data_plane.xml @@ -680,4 +680,18 @@ + + &MET_BIN;/plot_data_plane + \ + &DATA_DIR_MODEL;/nccf/MITLL.ProxyEchoTopsCalibratedMosaic.20200831_235328_v_20200831_235328.nc \ + &OUTPUT_DIR;/plot_data_plane/EchoTops_set_attr_grid.ps \ + 'name="ProxyEchoTopsCalibratedMosaic"; level="(0,*,*)"; set_attr_grid="latlon 8008 4004 -90 -180 0.04 0.04";' \ + -title "Global Synthetic Weather Radar EchoTops" \ + -v 1 + + + &OUTPUT_DIR;/plot_data_plane/EchoTops_set_attr_grid.ps + + + diff --git a/internal/test_unit/xml/unit_point2grid.xml b/internal/test_unit/xml/unit_point2grid.xml index aa9a1d0410..840fbdc7ea 100644 --- a/internal/test_unit/xml/unit_point2grid.xml +++ b/internal/test_unit/xml/unit_point2grid.xml @@ -356,4 +356,23 @@ + + &MET_BIN;/point2grid + + MET_TMP_DIR &OUTPUT_DIR;/point2grid + + \ + &DATA_DIR_MODEL;/cice/iceh.2018-01-03.c00.tlat_tlon.nc \ + G231 \ + &OUTPUT_DIR;/point2grid/point2grid_cice_to_G231.nc \ + -config &CONFIG_DIR;/Point2GridConfig_tlat_tlon \ + -field 'name="hi_d"; level="(0,*,*)"; set_attr_grid="latlon 180 360 -80 -180 1 1";' \ + -v 1 + + + &OUTPUT_DIR;/point2grid/point2grid_cice_to_G231.nc + + + + diff --git a/internal/test_util/Makefile.in b/internal/test_util/Makefile.in index 91fbb38a04..32c2b09cef 100644 --- a/internal/test_util/Makefile.in +++ b/internal/test_util/Makefile.in @@ -230,6 +230,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/basic/Makefile.in b/internal/test_util/basic/Makefile.in index 8f7a6ae5f5..eacf3b24c2 100644 --- a/internal/test_util/basic/Makefile.in +++ b/internal/test_util/basic/Makefile.in @@ -230,6 +230,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/basic/vx_config/Makefile.in b/internal/test_util/basic/vx_config/Makefile.in index 259d6dae5e..11f8c27d32 100644 --- a/internal/test_util/basic/vx_config/Makefile.in +++ b/internal/test_util/basic/vx_config/Makefile.in @@ -255,6 +255,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/basic/vx_log/Makefile.in b/internal/test_util/basic/vx_log/Makefile.in index 0913f22a00..bc602758e2 100644 --- a/internal/test_util/basic/vx_log/Makefile.in +++ b/internal/test_util/basic/vx_log/Makefile.in @@ -224,6 +224,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/basic/vx_util/Makefile.in b/internal/test_util/basic/vx_util/Makefile.in index ebbef0522c..7c4663e135 100644 --- a/internal/test_util/basic/vx_util/Makefile.in +++ b/internal/test_util/basic/vx_util/Makefile.in @@ -262,6 +262,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/Makefile.in b/internal/test_util/libcode/Makefile.in index 4d4f244b34..38acababa3 100644 --- a/internal/test_util/libcode/Makefile.in +++ b/internal/test_util/libcode/Makefile.in @@ -234,6 +234,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_data2d/Makefile.in b/internal/test_util/libcode/vx_data2d/Makefile.in index f659f7c81a..25f644ed86 100644 --- a/internal/test_util/libcode/vx_data2d/Makefile.in +++ b/internal/test_util/libcode/vx_data2d/Makefile.in @@ -230,6 +230,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_data2d_factory/Makefile.in b/internal/test_util/libcode/vx_data2d_factory/Makefile.in index 1d93387de5..31ea2c180b 100644 --- a/internal/test_util/libcode/vx_data2d_factory/Makefile.in +++ b/internal/test_util/libcode/vx_data2d_factory/Makefile.in @@ -228,6 +228,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_data2d_grib/Makefile.in b/internal/test_util/libcode/vx_data2d_grib/Makefile.in index 5591f6439b..892f5eca9e 100644 --- a/internal/test_util/libcode/vx_data2d_grib/Makefile.in +++ b/internal/test_util/libcode/vx_data2d_grib/Makefile.in @@ -221,6 +221,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_data2d_nc_cf/Makefile.in b/internal/test_util/libcode/vx_data2d_nc_cf/Makefile.in index 52429cc106..749c25c8c9 100644 --- a/internal/test_util/libcode/vx_data2d_nc_cf/Makefile.in +++ b/internal/test_util/libcode/vx_data2d_nc_cf/Makefile.in @@ -220,6 +220,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_data2d_nc_met/Makefile.in b/internal/test_util/libcode/vx_data2d_nc_met/Makefile.in index 25fc3da12e..b02eb106d7 100644 --- a/internal/test_util/libcode/vx_data2d_nc_met/Makefile.in +++ b/internal/test_util/libcode/vx_data2d_nc_met/Makefile.in @@ -222,6 +222,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_geodesy/Makefile.in b/internal/test_util/libcode/vx_geodesy/Makefile.in index 63e759c489..f196c88c92 100644 --- a/internal/test_util/libcode/vx_geodesy/Makefile.in +++ b/internal/test_util/libcode/vx_geodesy/Makefile.in @@ -218,6 +218,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_grid/Makefile.in b/internal/test_util/libcode/vx_grid/Makefile.in index 05203d024a..9f7c65ed86 100644 --- a/internal/test_util/libcode/vx_grid/Makefile.in +++ b/internal/test_util/libcode/vx_grid/Makefile.in @@ -220,6 +220,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_nc_util/Makefile.in b/internal/test_util/libcode/vx_nc_util/Makefile.in index ad865d558f..af0e249f7b 100644 --- a/internal/test_util/libcode/vx_nc_util/Makefile.in +++ b/internal/test_util/libcode/vx_nc_util/Makefile.in @@ -225,6 +225,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_physics/Makefile.in b/internal/test_util/libcode/vx_physics/Makefile.in index 02f6ef57ae..20b0102618 100644 --- a/internal/test_util/libcode/vx_physics/Makefile.in +++ b/internal/test_util/libcode/vx_physics/Makefile.in @@ -218,6 +218,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_plot_util/Makefile.in b/internal/test_util/libcode/vx_plot_util/Makefile.in index 6a950df3aa..7f6bdd6dbc 100644 --- a/internal/test_util/libcode/vx_plot_util/Makefile.in +++ b/internal/test_util/libcode/vx_plot_util/Makefile.in @@ -219,6 +219,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_ps/Makefile.in b/internal/test_util/libcode/vx_ps/Makefile.in index d288997194..78db014c97 100644 --- a/internal/test_util/libcode/vx_ps/Makefile.in +++ b/internal/test_util/libcode/vx_ps/Makefile.in @@ -218,6 +218,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_python3_utils/Makefile.in b/internal/test_util/libcode/vx_python3_utils/Makefile.in index 3d3d12cefb..b416b84940 100644 --- a/internal/test_util/libcode/vx_python3_utils/Makefile.in +++ b/internal/test_util/libcode/vx_python3_utils/Makefile.in @@ -225,6 +225,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_series_data/Makefile.in b/internal/test_util/libcode/vx_series_data/Makefile.in index 94871489e0..ff1dd2b402 100644 --- a/internal/test_util/libcode/vx_series_data/Makefile.in +++ b/internal/test_util/libcode/vx_series_data/Makefile.in @@ -220,6 +220,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_solar/Makefile.in b/internal/test_util/libcode/vx_solar/Makefile.in index a7026539c3..9912971dc5 100644 --- a/internal/test_util/libcode/vx_solar/Makefile.in +++ b/internal/test_util/libcode/vx_solar/Makefile.in @@ -218,6 +218,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/libcode/vx_tc_util/Makefile.in b/internal/test_util/libcode/vx_tc_util/Makefile.in index daf8dce673..a7d3c13818 100644 --- a/internal/test_util/libcode/vx_tc_util/Makefile.in +++ b/internal/test_util/libcode/vx_tc_util/Makefile.in @@ -243,6 +243,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/tools/Makefile.in b/internal/test_util/tools/Makefile.in index e84bca7acf..c22646fb06 100644 --- a/internal/test_util/tools/Makefile.in +++ b/internal/test_util/tools/Makefile.in @@ -230,6 +230,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/tools/other/Makefile.in b/internal/test_util/tools/other/Makefile.in index c054cf412f..8e6a1799bd 100644 --- a/internal/test_util/tools/other/Makefile.in +++ b/internal/test_util/tools/other/Makefile.in @@ -230,6 +230,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/internal/test_util/tools/other/mode_time_domain/Makefile.in b/internal/test_util/tools/other/mode_time_domain/Makefile.in index 3e70894414..c87b755d7d 100644 --- a/internal/test_util/tools/other/mode_time_domain/Makefile.in +++ b/internal/test_util/tools/other/mode_time_domain/Makefile.in @@ -245,6 +245,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/scripts/Rscripts/Makefile.in b/scripts/Rscripts/Makefile.in index fa8e805787..e53f9fe2df 100644 --- a/scripts/Rscripts/Makefile.in +++ b/scripts/Rscripts/Makefile.in @@ -260,6 +260,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/scripts/Rscripts/include/Makefile.in b/scripts/Rscripts/include/Makefile.in index 5d625c4e28..d62ae95412 100644 --- a/scripts/Rscripts/include/Makefile.in +++ b/scripts/Rscripts/include/Makefile.in @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/scripts/python/Makefile.in b/scripts/python/Makefile.in index e45eb05cd4..670db075a0 100644 --- a/scripts/python/Makefile.in +++ b/scripts/python/Makefile.in @@ -232,6 +232,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/scripts/python/examples/Makefile.in b/scripts/python/examples/Makefile.in index b994ccfd57..cdf8f0feb4 100644 --- a/scripts/python/examples/Makefile.in +++ b/scripts/python/examples/Makefile.in @@ -204,6 +204,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/scripts/python/met/Makefile.in b/scripts/python/met/Makefile.in index 6a7570efa2..d8541387db 100644 --- a/scripts/python/met/Makefile.in +++ b/scripts/python/met/Makefile.in @@ -204,6 +204,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/scripts/python/pyembed/Makefile.in b/scripts/python/pyembed/Makefile.in index b8fef31f8b..1ffd7a4eb5 100644 --- a/scripts/python/pyembed/Makefile.in +++ b/scripts/python/pyembed/Makefile.in @@ -260,6 +260,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/scripts/python/tc_diag/Makefile.in b/scripts/python/tc_diag/Makefile.in index 9d098740ad..6cda357496 100644 --- a/scripts/python/tc_diag/Makefile.in +++ b/scripts/python/tc_diag/Makefile.in @@ -262,6 +262,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/scripts/python/tc_diag/atcf_tools/Makefile.in b/scripts/python/tc_diag/atcf_tools/Makefile.in index fec6217c14..67b691d180 100644 --- a/scripts/python/tc_diag/atcf_tools/Makefile.in +++ b/scripts/python/tc_diag/atcf_tools/Makefile.in @@ -204,6 +204,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/scripts/python/tc_diag/config/Makefile.in b/scripts/python/tc_diag/config/Makefile.in index cc4019b28f..df494ac1c5 100644 --- a/scripts/python/tc_diag/config/Makefile.in +++ b/scripts/python/tc_diag/config/Makefile.in @@ -204,6 +204,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/scripts/python/tc_diag/diag_lib/Makefile.in b/scripts/python/tc_diag/diag_lib/Makefile.in index aa48ed0c5f..64b9c40add 100644 --- a/scripts/python/tc_diag/diag_lib/Makefile.in +++ b/scripts/python/tc_diag/diag_lib/Makefile.in @@ -204,6 +204,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/scripts/python/tc_diag/tc_diag_driver/Makefile.in b/scripts/python/tc_diag/tc_diag_driver/Makefile.in index b4468d4bb2..41d0c24e56 100644 --- a/scripts/python/tc_diag/tc_diag_driver/Makefile.in +++ b/scripts/python/tc_diag/tc_diag_driver/Makefile.in @@ -204,6 +204,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/scripts/python/utility/Makefile.in b/scripts/python/utility/Makefile.in index 0b977854db..bb8de463d2 100644 --- a/scripts/python/utility/Makefile.in +++ b/scripts/python/utility/Makefile.in @@ -204,6 +204,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/Makefile.in b/src/Makefile.in index 175bb0381a..05916e66b0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -230,6 +230,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/basic/Makefile.in b/src/basic/Makefile.in index 1df9e615ba..a5e04f07e1 100644 --- a/src/basic/Makefile.in +++ b/src/basic/Makefile.in @@ -232,6 +232,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/basic/enum_to_string/Makefile.in b/src/basic/enum_to_string/Makefile.in index 6c1a9607bf..69c57f75cf 100644 --- a/src/basic/enum_to_string/Makefile.in +++ b/src/basic/enum_to_string/Makefile.in @@ -249,6 +249,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/basic/vx_cal/Makefile.in b/src/basic/vx_cal/Makefile.in index a80d944f0a..bf9c15aa6c 100644 --- a/src/basic/vx_cal/Makefile.in +++ b/src/basic/vx_cal/Makefile.in @@ -256,6 +256,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/basic/vx_config/Makefile.in b/src/basic/vx_config/Makefile.in index 5fddc64397..61940aed88 100644 --- a/src/basic/vx_config/Makefile.in +++ b/src/basic/vx_config/Makefile.in @@ -304,6 +304,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/basic/vx_log/Makefile.in b/src/basic/vx_log/Makefile.in index 272dddb3ca..9b4c7969ca 100644 --- a/src/basic/vx_log/Makefile.in +++ b/src/basic/vx_log/Makefile.in @@ -235,6 +235,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/basic/vx_log/vx_log.h b/src/basic/vx_log/vx_log.h index ce8a8132cb..0ae10c3811 100644 --- a/src/basic/vx_log/vx_log.h +++ b/src/basic/vx_log/vx_log.h @@ -26,6 +26,15 @@ //////////////////////////////////////////////////////////////////////// +inline double get_exe_duration(clock_t start_clock, clock_t end_clock) { + return ((double)(end_clock - start_clock)) / CLOCKS_PER_SEC; +} + +inline double get_exe_duration(clock_t start_clock) { + return get_exe_duration(start_clock, clock()); +} + +//////////////////////////////////////////////////////////////////////// #endif // __VX_LOG_H__ diff --git a/src/basic/vx_math/Makefile.in b/src/basic/vx_math/Makefile.in index f42012d3ea..28c953fbbf 100644 --- a/src/basic/vx_math/Makefile.in +++ b/src/basic/vx_math/Makefile.in @@ -249,6 +249,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/basic/vx_math/is_bad_data.h b/src/basic/vx_math/is_bad_data.h index d8d7b334c3..80af0916ef 100644 --- a/src/basic/vx_math/is_bad_data.h +++ b/src/basic/vx_math/is_bad_data.h @@ -48,7 +48,7 @@ inline int is_bad_data(float a) { } inline int is_bad_data(char a) { - return(a == bad_data_char); + return (a == bad_data_char); } inline int is_eq(double a, double b, double tol) { @@ -60,6 +60,30 @@ inline int is_eq(double a, double b) { return is_eq(a, b, default_tol); } +inline int is_eq(double a, int b) { + return is_eq(a, (double)b); +} + +inline int is_eq(int a, double b) { + return is_eq((double)a, b); +} + +inline int is_eq(double a, unixtime b) { + return is_eq(a, (double)b); +} + +inline int is_eq(unixtime a, double b) { + return is_eq((double)a, b); +} + +inline int is_eq(float a, float b) { + return is_eq((double)a, (double)b); +} + +template +inline int is_eq(T a, T b) { + return (a == b); +} //////////////////////////////////////////////////////////////////////// diff --git a/src/basic/vx_util/Makefile.in b/src/basic/vx_util/Makefile.in index 83579ba1b4..4c05def519 100644 --- a/src/basic/vx_util/Makefile.in +++ b/src/basic/vx_util/Makefile.in @@ -354,6 +354,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/basic/vx_util_math/Makefile.in b/src/basic/vx_util_math/Makefile.in index bd06680091..b742f23078 100644 --- a/src/basic/vx_util_math/Makefile.in +++ b/src/basic/vx_util_math/Makefile.in @@ -234,6 +234,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/Makefile.in b/src/libcode/Makefile.in index 5a7e7eb12d..f7629e1481 100644 --- a/src/libcode/Makefile.in +++ b/src/libcode/Makefile.in @@ -242,6 +242,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_afm/Makefile.in b/src/libcode/vx_afm/Makefile.in index 27f3023563..5498f8a896 100644 --- a/src/libcode/vx_afm/Makefile.in +++ b/src/libcode/vx_afm/Makefile.in @@ -243,6 +243,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_analysis_util/Makefile.in b/src/libcode/vx_analysis_util/Makefile.in index 10bbb3aea6..fe6a3bb1a4 100644 --- a/src/libcode/vx_analysis_util/Makefile.in +++ b/src/libcode/vx_analysis_util/Makefile.in @@ -250,6 +250,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_bool_calc/Makefile.in b/src/libcode/vx_bool_calc/Makefile.in index 07bead994d..531f87fa08 100644 --- a/src/libcode/vx_bool_calc/Makefile.in +++ b/src/libcode/vx_bool_calc/Makefile.in @@ -245,6 +245,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_color/Makefile.in b/src/libcode/vx_color/Makefile.in index 08977daff3..217fc0590c 100644 --- a/src/libcode/vx_color/Makefile.in +++ b/src/libcode/vx_color/Makefile.in @@ -262,6 +262,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_data2d/Makefile.in b/src/libcode/vx_data2d/Makefile.in index 947fb3d73f..ead0ee6915 100644 --- a/src/libcode/vx_data2d/Makefile.in +++ b/src/libcode/vx_data2d/Makefile.in @@ -247,6 +247,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_data2d/data2d_utils.cc b/src/libcode/vx_data2d/data2d_utils.cc index 6284ca434b..6fc68a93cc 100644 --- a/src/libcode/vx_data2d/data2d_utils.cc +++ b/src/libcode/vx_data2d/data2d_utils.cc @@ -24,6 +24,54 @@ using namespace std; //////////////////////////////////////////////////////////////////////// +bool build_grid_by_grid_string(const char *grid_str, Grid &grid, + const char *caller_name, bool do_warning) { + bool status = false; + + if (nullptr != grid_str && m_strlen(grid_str) > 0) { + // Parse as a white-space separated string + + StringArray sa; + sa.parse_wsss(grid_str); + + // Search for a named grid + if (sa.n() == 1 && find_grid_by_name(sa[0].c_str(), grid)) { + status = true; + mlog << Debug(3) << "Use the grid named \"" << grid_str << "\".\n"; + } + // Parse grid definition + else if (sa.n() > 1 && parse_grid_def(sa, grid)) { + status = true; + mlog << Debug(3) << "Use the grid defined by string \"" + << grid_str << "\".\n"; + } + else if (do_warning) { + mlog << Warning << "\nbuild_grid_by_grid_string() by " << caller_name + << " unsupported " << conf_key_set_attr_grid + << " definition string (" << grid_str + << ")!\n\n"; + } + } + + return status; +} + +//////////////////////////////////////////////////////////////////////// + +bool build_grid_by_grid_string(const ConcatString &grid_str, Grid &grid, + const char *caller_name, bool do_warning) { + bool status = false; + + if(grid_str.nonempty()) { + status = build_grid_by_grid_string(grid_str.c_str(), grid, + caller_name, do_warning); + } + + return status; +} + +//////////////////////////////////////////////////////////////////////// + bool derive_wdir(const DataPlane &u2d, const DataPlane &v2d, DataPlane &wdir2d) { int x, y; diff --git a/src/libcode/vx_data2d/data2d_utils.h b/src/libcode/vx_data2d/data2d_utils.h index 317eb92f72..24299475d3 100644 --- a/src/libcode/vx_data2d/data2d_utils.h +++ b/src/libcode/vx_data2d/data2d_utils.h @@ -20,6 +20,14 @@ //////////////////////////////////////////////////////////////////////// +extern bool build_grid_by_grid_string(const char *attr_grid, Grid &grid, + const char *caller_name=nullptr, + bool do_warning=true); + +extern bool build_grid_by_grid_string(const ConcatString &attr_grid, Grid &grid, + const char *caller_name=nullptr, + bool do_warning=true); + extern bool derive_wdir(const DataPlane &u2d, const DataPlane &v2d, DataPlane &wdir); diff --git a/src/libcode/vx_data2d/data_class.cc b/src/libcode/vx_data2d/data_class.cc index 23ff40f93f..f364e34e42 100644 --- a/src/libcode/vx_data2d/data_class.cc +++ b/src/libcode/vx_data2d/data_class.cc @@ -257,13 +257,21 @@ mlog << Debug(3) << "Resetting grid definition from \"" // Make sure the grid dimensions do not change // - if ( raw_nx() != grid.nx() || raw_ny() != grid.ny() ) { + if ( raw_nx() <= 0 && raw_ny() <= 0 ) { - mlog << Error << "\nMet2dDataFile::set_grid() -> " + mlog << Warning << "\nMet2dDataFile::set_grid() -> " << "When resetting the grid definition to \"" << grid.serialize() << "\", the grid dimensions " - << "cannot change (" << grid.nx() << ", " << grid.ny() + << "are changed (" << grid.nx() << ", " << grid.ny() << ") != (" << raw_nx() << ", " << raw_ny() << ").\n\n"; + } + else if ( raw_nx() != grid.nx() || raw_ny() != grid.ny() ) { + + mlog << Error << "\nMet2dDataFile::set_grid() -> " + << "When resetting the grid definition to \"" + << grid.serialize() << "\", the grid dimensions " + << "cannot change to (" << grid.nx() << ", " << grid.ny() + << ") from (" << raw_nx() << ", " << raw_ny() << ").\n\n"; exit ( 1 ); diff --git a/src/libcode/vx_data2d/var_info.cc b/src/libcode/vx_data2d/var_info.cc index a1775a7275..2c92c6bf69 100644 --- a/src/libcode/vx_data2d/var_info.cc +++ b/src/libcode/vx_data2d/var_info.cc @@ -26,6 +26,7 @@ #include "vx_cal.h" #include "vx_math.h" #include "vx_log.h" +#include "data2d_utils.h" using namespace std; @@ -541,25 +542,7 @@ void VarInfo::set_dict(Dictionary &dict) { // Parse set_attr grid s = parse_set_attr_string(dict, conf_key_set_attr_grid); - if(s.nonempty()) { - - // Parse as a white-space separated string - StringArray sa; - sa.parse_wsss(s); - - // Search for a named grid - if(sa.n() == 1 && find_grid_by_name(sa[0].c_str(), SetAttrGrid)) { - } - // Parse grid definition - else if(sa.n() > 1 && parse_grid_def(sa, SetAttrGrid)) { - } - else { - mlog << Warning << "\nVarInfo::set_dict() -> " - << "unsupported " << conf_key_set_attr_grid - << " definition string (" << s - << ")!\n\n"; - } - } + build_grid_by_grid_string(s, SetAttrGrid, "VarInfo::set_dict(Dictionary &dict) ->"); // Parse set_attr times s = parse_set_attr_string(dict, conf_key_set_attr_init); diff --git a/src/libcode/vx_data2d_factory/Makefile.in b/src/libcode/vx_data2d_factory/Makefile.in index e9254cb32b..ee7e40e244 100644 --- a/src/libcode/vx_data2d_factory/Makefile.in +++ b/src/libcode/vx_data2d_factory/Makefile.in @@ -248,6 +248,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_data2d_grib/Makefile.in b/src/libcode/vx_data2d_grib/Makefile.in index 684bfa9d81..c844d9278b 100644 --- a/src/libcode/vx_data2d_grib/Makefile.in +++ b/src/libcode/vx_data2d_grib/Makefile.in @@ -245,6 +245,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_data2d_grib2/Makefile.in b/src/libcode/vx_data2d_grib2/Makefile.in index e26d1e102b..ed24c03da3 100644 --- a/src/libcode/vx_data2d_grib2/Makefile.in +++ b/src/libcode/vx_data2d_grib2/Makefile.in @@ -238,6 +238,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_data2d_nc_cf/Makefile.in b/src/libcode/vx_data2d_nc_cf/Makefile.in index cd972c6936..fb06b420b5 100644 --- a/src/libcode/vx_data2d_nc_cf/Makefile.in +++ b/src/libcode/vx_data2d_nc_cf/Makefile.in @@ -240,6 +240,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_data2d_nc_cf/data2d_nc_cf.cc b/src/libcode/vx_data2d_nc_cf/data2d_nc_cf.cc index 8c4373a62c..cc77b7f17a 100644 --- a/src/libcode/vx_data2d_nc_cf/data2d_nc_cf.cc +++ b/src/libcode/vx_data2d_nc_cf/data2d_nc_cf.cc @@ -159,11 +159,14 @@ bool MetNcCFDataFile::data_plane(VarInfo &vinfo, DataPlane &plane) { // Not sure why we do this - NcVarInfo *data_var = (NcVarInfo *)nullptr; - VarInfoNcCF *vinfo_nc = (VarInfoNcCF *)&vinfo; + auto data_var = (NcVarInfo *)nullptr; + auto vinfo_nc = (VarInfoNcCF *)&vinfo; static const string method_name = "MetNcCFDataFile::data_plane(VarInfo &, DataPlane &) -> "; + Grid grid_attr = vinfo.grid_attr(); + _file->update_grid(grid_attr); + // Initialize the data plane plane.clear(); @@ -339,6 +342,9 @@ int MetNcCFDataFile::data_plane_array(VarInfo &vinfo, static const string method_name = "MetNcCFDataFile::data_plane_array(VarInfo &, DataPlaneArray &) -> "; + Grid grid_attr = vinfo.grid_attr(); + _file->update_grid(grid_attr); + // Initialize plane_array.clear(); diff --git a/src/libcode/vx_data2d_nc_cf/nc_cf_file.cc b/src/libcode/vx_data2d_nc_cf/nc_cf_file.cc index 3038965ab6..a739c5ae0d 100644 --- a/src/libcode/vx_data2d_nc_cf/nc_cf_file.cc +++ b/src/libcode/vx_data2d_nc_cf/nc_cf_file.cc @@ -57,8 +57,6 @@ static ConcatString y_dim_var_name; static double get_nc_var_att_double(const NcVar *nc_var, const char *att_name, bool is_required=true); -#define USE_BUFFER 1 - //////////////////////////////////////////////////////////////////////// @@ -136,6 +134,9 @@ void NcCfFile::close() _dims = (NcDim **)nullptr; } + grid_ready = false; + has_attr_grid = false; + _numDims = 0; _dimNames.clear(); @@ -213,8 +214,8 @@ bool NcCfFile::open(const char * filepath) // Pull out the variables int max_dim_count = 0; - NcVar *z_var = (NcVar *)nullptr; - NcVar *valid_time_var = (NcVar *)nullptr; + auto z_var = (NcVar *)nullptr; + auto valid_time_var = (NcVar *)nullptr; ConcatString att_value; StringArray varNames; @@ -311,7 +312,7 @@ bool NcCfFile::open(const char * filepath) // Parse the units for the time variable. ut = sec_per_unit = 0; if (get_var_units(valid_time_var, units)) { - if (units.length() == 0) { + if (units.empty()) { mlog << Warning << "\n" << method_name << "the \"time\" variable must contain a \"units\" attribute. " << "Using valid time of 0\n\n"; @@ -324,7 +325,7 @@ bool NcCfFile::open(const char * filepath) } NcVar bounds_time_var; - NcVar *nc_time_var = (NcVar *)nullptr; + auto nc_time_var = (NcVar *)nullptr; bool use_bounds_var = false; ConcatString bounds_var_name; nc_time_var = valid_time_var; @@ -341,10 +342,10 @@ bool NcCfFile::open(const char * filepath) if (bounds_att) delete bounds_att; // Determine the number of times present. - int n_times = (int) get_data_size(valid_time_var); + int n_times = get_data_size(valid_time_var); int tim_buf_size = n_times; if (use_bounds_var) tim_buf_size *= 2; - double *time_values = new double[tim_buf_size]; + auto time_values = new double[tim_buf_size]; if( get_nc_data(nc_time_var, time_values) ) { bool no_leap_year = get_att_no_leap_year(valid_time_var); @@ -403,7 +404,7 @@ bool NcCfFile::open(const char * filepath) // Parse the units for the time variable. if (get_var_units(&init_time_var, units)) { - if (units.length() == 0) { + if (units.empty()) { mlog << Warning << "\n" << method_name << "the \"forecast_reference_time\" variable must contain a \"units\" attribute.\n\n"; ut = sec_per_unit = 0; @@ -418,8 +419,8 @@ bool NcCfFile::open(const char * filepath) ut = sec_per_unit = 0; } - double time_value = get_nc_time(&init_time_var,(int)0); - InitTime = (unixtime)ut + sec_per_unit * time_value; + double time_value = get_nc_time(&init_time_var,0); + InitTime = ut + (unixtime)(sec_per_unit * time_value); } // Pull out the grid. This must be done after pulling out the dimension @@ -436,7 +437,8 @@ bool NcCfFile::open(const char * filepath) StringArray z_dims; StringArray t_dims; StringArray dimNames; - string var_x_dim_name, var_y_dim_name; + string var_x_dim_name; + string var_y_dim_name; if (IS_VALID_NC_P(_xDim)) var_x_dim_name = GET_NC_NAME_P(_xDim); if (IS_VALID_NC_P(_yDim)) var_y_dim_name = GET_NC_NAME_P(_yDim); for (int j=0; jx_slot) && (j != var->y_slot)) ) { - ++count; - if ( var == nullptr || ((j != var->x_slot) && (j != var->y_slot)) ) - { + if (has_attr_grid) { + mlog << Debug(3) << "\n" << method_name + << "star found in unknown slot (" << j << ") for " << GET_NC_NAME_P(v) << "\n\n"; + } + else { mlog << Error << "\n" << method_name << "star found in bad slot (" << j << ") for " << GET_NC_NAME_P(v) << "\n\n"; + exit(1); } } @@ -1011,13 +1041,22 @@ bool NcCfFile::getData(NcVar * v, const LongArray & a, DataPlane & plane) const } // check slots - additional logic to satisfy Fortify Null Dereference - int x_slot_tmp = 0; - int y_slot_tmp = 0; + int x_slot_tmp = 0; + int y_slot_tmp = 0; if (var == nullptr || var->x_slot < 0 || var->y_slot < 0) { - mlog << Error << "\n" << method_name - << "bad x|y|z slot\n\n"; - exit(1); + if (has_attr_grid) { + mlog << Warning << "\n" << method_name + << "bad x|y|z slot (" << var->x_slot << "|" << var->y_slot + << "|" << var->z_slot << "|" << var->t_slot <<")\n\n"; + x_slot_tmp = dim_count - 1; + y_slot_tmp = dim_count - 2; + } + else { + mlog << Error << "\n" << method_name + << "bad x|y|z slot\n\n"; + exit(1); + } } else { x_slot_tmp = var->x_slot; @@ -1116,7 +1155,7 @@ bool NcCfFile::getData(NcVar * v, const LongArray & a, DataPlane & plane) const // done mlog << Debug(6) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + << get_exe_duration(start_clock) << " seconds\n"; return true; } @@ -1462,9 +1501,9 @@ void NcCfFile::read_netcdf_grid() !((_xDim && _yDim) || (x_dim_var_name.nonempty() && y_dim_var_name.nonempty()))) { - mlog << Error << "\nNcCfFile::read_netcdf_grid() -> " + mlog << Warning << "\nNcCfFile::read_netcdf_grid() -> " << "Couldn't figure out projection from information in netCDF file.\n\n"; - exit(1); + return; } return; @@ -1478,7 +1517,7 @@ void NcCfFile::read_netcdf_grid() Grid NcCfFile::build_grid_from_lat_lon_vars(NcVar *lat_var, NcVar *lon_var, const long lat_counts, const long lon_counts) { Grid grid_ll; - bool swap_to_north; + bool swap_to_north = false; LatLonData data = get_data_from_lat_lon_vars(lat_var, lon_var, lat_counts, lon_counts, swap_to_north); @@ -1506,9 +1545,9 @@ void NcCfFile::get_grid_from_grid_mapping(const NcVarAtt *grid_mapping_att) bool status = get_att_value_chars(grid_mapping_att, mapping_name); if (!status) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Cannot extract grid mapping name from netCDF file.\n\n"; - exit(1); + return; } NcVar *grid_mapping_var = nullptr; @@ -1522,12 +1561,12 @@ void NcCfFile::get_grid_from_grid_mapping(const NcVarAtt *grid_mapping_att) } } /* endfor - i */ - if ((grid_mapping_var == 0) || (IS_INVALID_NC_P(grid_mapping_var))) + if ((nullptr == grid_mapping_var) || (IS_INVALID_NC_P(grid_mapping_var))) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Cannot extract grid mapping variable (" << mapping_name << ") from netCDF file.\n\n"; - exit(1); + return; } // Get the name of the grid mapping @@ -1536,9 +1575,10 @@ void NcCfFile::get_grid_from_grid_mapping(const NcVarAtt *grid_mapping_att) if (IS_INVALID_NC_P(grid_mapping_name_att)) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Cannot get coordinate system name from netCDF file.\n\n"; - exit(1); + if (grid_mapping_name_att) delete grid_mapping_name_att; + return; } //string grid_mapping_name = grid_mapping_name_att->getValues(att->as_string(0); @@ -1606,10 +1646,10 @@ void NcCfFile::get_grid_from_grid_mapping(const NcVarAtt *grid_mapping_att) } else { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Unknown grid mapping name (" << grid_mapping_name << ") found in netCDF file.\n\n"; - exit(1); + return; } } @@ -1673,9 +1713,9 @@ void NcCfFile::get_grid_mapping_lambert_azimuthal_equal_area(const NcVar *grid_m x_coord_units_name == "meters") x_coord_to_m_cf = 1.0; else if (x_coord_units_name == "km") x_coord_to_m_cf = 1000.0; else { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "The X coordinates must be in meters or kilometers for MET.\n\n"; - exit(1); + return; } } } @@ -1698,9 +1738,9 @@ void NcCfFile::get_grid_mapping_lambert_azimuthal_equal_area(const NcVar *grid_m y_coord_units_name == "meters" ) y_coord_to_m_cf = 1.0; else if (y_coord_units_name == "km") y_coord_to_m_cf = 1000.0; else { - mlog << Error << "\n" << method_name << " -> " - << "The X coordinates must be in meters or kilometers for MET.\n\n"; - exit(1); + mlog << Warning << "\n" << method_name << " -> " + << "The Y coordinates must be in meters or kilometers for MET.\n\n"; + return; } } } @@ -1737,11 +1777,11 @@ void NcCfFile::get_grid_mapping_lambert_azimuthal_equal_area(const NcVar *grid_m double curr_delta = fabs(x_values[i] - x_values[i-1]); if (fabs(curr_delta - dx_m_a) > DELTA_TOLERANCE) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "MET can only process Lambert Azimuthal Equal Area files " << "where the delta along the x-axis is constant (" << curr_delta << " != " << dx_m_a << ")\n\n"; - exit(1); + return; } } @@ -1750,11 +1790,11 @@ void NcCfFile::get_grid_mapping_lambert_azimuthal_equal_area(const NcVar *grid_m double curr_delta = fabs(y_values[i] - y_values[i-1]); if (fabs(curr_delta - dy_m_a) > DELTA_TOLERANCE) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "MET can only process Lambert Azimuthal Equal Area files " << "where the delta along the y-axis is constant (" << curr_delta << " != " << dy_m_a << ")\n\n"; - exit(1); + return; } } @@ -1806,11 +1846,11 @@ void NcCfFile::get_grid_mapping_lambert_azimuthal_equal_area(const NcVar *grid_m if(!is_bad_data(false_easting) && !is_eq(false_easting, 0.0)) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "MET cannot process Lambert Azimuthal Equal Area files " << "with non-zero false_easting (" << false_easting << ").\n\n"; - exit(1); + return; } // false_northing @@ -1820,11 +1860,11 @@ void NcCfFile::get_grid_mapping_lambert_azimuthal_equal_area(const NcVar *grid_m if(!is_bad_data(false_northing) && !is_eq(false_northing, 0.0)) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "MET cannot process Lambert Azimuthal Equal Area files " << "with non-zero false_northing (" << false_northing << ").\n\n"; - exit(1); + return; } // Calculate the pin indices. The pin will be located at the grid's reference @@ -1845,6 +1885,8 @@ void NcCfFile::get_grid_mapping_lambert_azimuthal_equal_area(const NcVar *grid_m grid.set(data); if (dy_m < 0) grid.set_swap_to_north(true); + grid_ready = true; + } @@ -1863,10 +1905,10 @@ void NcCfFile::get_grid_mapping_lambert_conformal_conic(const NcVar *grid_mappin grid_mapping_var, (string)"standard_parallel"); if (IS_INVALID_NC_P(std_parallel_att)) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Cannot get standard_parallel attribute from " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // longitude_of_central_meridian @@ -1875,10 +1917,10 @@ void NcCfFile::get_grid_mapping_lambert_conformal_conic(const NcVar *grid_mappin grid_mapping_var, (string)"longitude_of_central_meridian"); if (IS_INVALID_NC_P(central_lon_att)) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Cannot get longitude_of_central_meridian attribute from " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // latitude_of_projection_origin @@ -1887,10 +1929,10 @@ void NcCfFile::get_grid_mapping_lambert_conformal_conic(const NcVar *grid_mappin grid_mapping_var, (string)"latitude_of_projection_origin"); if (IS_INVALID_NC_P(proj_origin_lat_att)) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Cannot get latitude_of_projection_origin attribute from " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // Look for the x/y dimensions and x/y coordinate variables @@ -1899,9 +1941,9 @@ void NcCfFile::get_grid_mapping_lambert_conformal_conic(const NcVar *grid_mappin if (get_data_size(_xCoordVar) != (int) GET_NC_SIZE_P(_xDim) || get_data_size(_yCoordVar) != (int) GET_NC_SIZE_P(_yDim)) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Coordinate variables don't match dimension sizes in netCDF file.\n\n"; - exit(1); + return; } // Make sure that the coordinate variables are given in meters. If we get @@ -1925,9 +1967,9 @@ void NcCfFile::get_grid_mapping_lambert_conformal_conic(const NcVar *grid_mappin x_coord_units_name == "meters") x_coord_to_m_cf = 1.0; else if (x_coord_units_name == "km") x_coord_to_m_cf = 1000.0; else { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "The X coordinates must be in meters or kilometers for MET.\n\n"; - exit(1); + return; } } } @@ -1949,9 +1991,9 @@ void NcCfFile::get_grid_mapping_lambert_conformal_conic(const NcVar *grid_mappin y_coord_units_name == "meters" ) y_coord_to_m_cf = 1.0; else if (y_coord_units_name == "km") y_coord_to_m_cf = 1000.0; else { - mlog << Error << "\n" << method_name << " -> " - << "The X coordinates must be in meters or kilometers for MET.\n\n"; - exit(1); + mlog << Warning << "\n" << method_name << " -> " + << "The Y coordinates must be in meters or kilometers for MET.\n\n"; + return; } } } @@ -1983,9 +2025,9 @@ void NcCfFile::get_grid_mapping_lambert_conformal_conic(const NcVar *grid_mappin if (fabs(dx_m_a - dy_m_a) > DELTA_TOLERANCE) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "MET can only process Lambert Conformal files where the x-axis and y-axis deltas are the same\n\n"; - exit(1); + return; } // As a sanity check, make sure that the deltas are constant through the @@ -1996,9 +2038,9 @@ void NcCfFile::get_grid_mapping_lambert_conformal_conic(const NcVar *grid_mappin double curr_delta = fabs(x_values[i] - x_values[i-1]); if (fabs(curr_delta - dx_m_a) > DELTA_TOLERANCE) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "MET can only process Lambert Conformal files where the delta along the x-axis is constant\n\n"; - exit(1); + return; } } @@ -2007,9 +2049,9 @@ void NcCfFile::get_grid_mapping_lambert_conformal_conic(const NcVar *grid_mappin double curr_delta = fabs(y_values[i] - y_values[i-1]); if (fabs(curr_delta - dy_m_a) > DELTA_TOLERANCE) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "MET can only process Lambert Conformal files where the delta along the y-axis is constant\n\n"; - exit(1); + return; } } @@ -2051,6 +2093,7 @@ void NcCfFile::get_grid_mapping_lambert_conformal_conic(const NcVar *grid_mappin grid.set(data); if (dy_m < 0) grid.set_swap_to_north(true); + grid_ready = true; if(std_parallel_att) delete std_parallel_att; if(central_lon_att) delete central_lon_att; @@ -2144,32 +2187,32 @@ void NcCfFile::get_grid_mapping_latitude_longitude(const NcVar *grid_mapping_var if (_xDim == nullptr) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Didn't find X dimension (degrees_east) in netCDF file.\n\n"; - exit(1); + return; } if (_yDim == nullptr) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Didn't find Y dimension (degrees_north) in netCDF file.\n\n"; - exit(1); + return; } if (_xCoordVar == nullptr) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Didn't find X coord variable (" << GET_NC_NAME_P(_xDim) << ") in netCDF file.\n\n"; - exit(1); + return; } if (_yCoordVar == nullptr) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Didn't find Y coord variable (" << GET_NC_NAME_P(_yDim) << ") in netCDF file.\n\n"; - exit(1); + return; } long lon_counts = _xDim->getSize(); @@ -2177,9 +2220,9 @@ void NcCfFile::get_grid_mapping_latitude_longitude(const NcVar *grid_mapping_var if (get_data_size(_xCoordVar) != lon_counts || get_data_size(_yCoordVar) != lat_counts) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Coordinate variables don't match dimension sizes in netCDF file.\n\n"; - exit(1); + return; } get_grid_from_lat_lon_vars(_yCoordVar, _xCoordVar, lat_counts, lon_counts); @@ -2277,17 +2320,17 @@ void NcCfFile::get_grid_mapping_polar_stereographic(const NcVar *grid_mapping_va << "This is an ellipsoidal earth.\n\n"; } else if(!has_scale_factor && !has_standard_parallel) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "The attribute \"scale_factor_at_projection_origin\" and \"standard_parallel\" of the " << GET_NC_NAME_P(grid_mapping_var) << " variable do not exist.\n\n"; - exit(1); + return; } else if(has_scale_factor && !is_eq(proj_origin_scale_factor, 1.0)) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "Unexpected attribute value of " << proj_origin_scale_factor << " for the scale_factor_at_projection_origin attribute of the " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // Look for the x/y dimensions and x/y coordinate variables @@ -2296,9 +2339,9 @@ void NcCfFile::get_grid_mapping_polar_stereographic(const NcVar *grid_mapping_va if (get_data_size(_xCoordVar) != (int) GET_NC_SIZE_P(_xDim) || get_data_size(_yCoordVar) != (int) GET_NC_SIZE_P(_yDim)) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "Coordinate variables don't match dimension sizes in netCDF file.\n\n"; - exit(1); + return; } // Make sure that the coordinate variables are given in meters. If we get @@ -2322,10 +2365,10 @@ void NcCfFile::get_grid_mapping_polar_stereographic(const NcVar *grid_mapping_va x_coord_units_name == "meters") x_coord_to_m_cf = 1.0; else if ( x_coord_units_name == "km") x_coord_to_m_cf = 1000.0; else { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "The X coordinates (" << x_coord_units_name << ") must be in meters or kilometers for MET.\n\n"; - exit(1); + return; } } } @@ -2347,9 +2390,9 @@ void NcCfFile::get_grid_mapping_polar_stereographic(const NcVar *grid_mapping_va y_coord_units_name == "meters" ) y_coord_to_m_cf = 1.0; else if ( y_coord_units_name == "km") y_coord_to_m_cf = 1000.0; else { - mlog << Error << "\n" << method_name - << "The X coordinates must be in meters or kilometers for MET.\n\n"; - exit(1); + mlog << Warning << "\n" << method_name + << "The Y coordinates must be in meters or kilometers for MET.\n\n"; + return; } } } @@ -2381,9 +2424,9 @@ void NcCfFile::get_grid_mapping_polar_stereographic(const NcVar *grid_mapping_va if (fabs(dx_m_a - dy_m_a) > DELTA_TOLERANCE) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "MET can only process Polar Stereographic files where the x-axis and y-axis deltas are the same.\n\n"; - exit(1); + return; } if (is_eq(semi_major_axis, bad_data_double)) @@ -2470,6 +2513,7 @@ void NcCfFile::get_grid_mapping_polar_stereographic(const NcVar *grid_mapping_va data.dump(); grid.set(data); + grid_ready = true; //Note: do not set grid.set_swap_to_north() @@ -2611,10 +2655,10 @@ void NcCfFile::get_grid_mapping_rotated_latitude_longitude(const NcVar *grid_map grid_mapping_var, (string)"grid_north_pole_latitude"); if (IS_INVALID_NC_P(grid_np_lat_att)) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Cannot get grid_north_pole_latitude attribute from " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // grid_north_pole_longitude @@ -2623,10 +2667,10 @@ void NcCfFile::get_grid_mapping_rotated_latitude_longitude(const NcVar *grid_map grid_mapping_var, (string)"grid_north_pole_longitude"); if (IS_INVALID_NC_P(grid_np_lon_att)) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Cannot get grid_north_pole_longitude attribute from " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // Look for the grid_latitude and grid_longitude dimensions @@ -2703,32 +2747,32 @@ void NcCfFile::get_grid_mapping_rotated_latitude_longitude(const NcVar *grid_map if (_xDim == nullptr) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Didn't find X dimension (degrees_east) in netCDF file.\n\n"; - exit(1); + return; } if (_yDim == nullptr) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Didn't find Y dimension (degrees_north) in netCDF file.\n\n"; - exit(1); + return; } if (_xCoordVar == nullptr) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Didn't find X coord variable (" << GET_NC_NAME_P(_xDim) << ") in netCDF file.\n\n"; - exit(1); + return; } if (_yCoordVar == nullptr) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Didn't find Y coord variable (" << GET_NC_NAME_P(_yDim) << ") in netCDF file.\n\n"; - exit(1); + return; } long lon_counts = _xDim->getSize(); @@ -2736,9 +2780,9 @@ void NcCfFile::get_grid_mapping_rotated_latitude_longitude(const NcVar *grid_map if (get_data_size(_xCoordVar) != lon_counts || get_data_size(_yCoordVar) != lat_counts) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Coordinate variables don't match dimension sizes in netCDF file.\n\n"; - exit(1); + return; } // Store spacing in LatLon data structure @@ -2832,10 +2876,10 @@ void NcCfFile::get_grid_mapping_geostationary( grid_mapping_var, (string)"perspective_point_height"); if (IS_INVALID_NC_P(perspective_point_height_att)) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "-> Cannot get perspective_point_height attribute from " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // semi_major_axis @@ -2843,10 +2887,10 @@ void NcCfFile::get_grid_mapping_geostationary( grid_mapping_var, (string)"semi_major_axis"); if (IS_INVALID_NC_P(semi_major_axis_att)) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "-> Cannot get semi_major_axis attribute from " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // semi_minor_axis @@ -2854,10 +2898,10 @@ void NcCfFile::get_grid_mapping_geostationary( grid_mapping_var, (string)"semi_minor_axis"); if (IS_INVALID_NC_P(semi_minor_axis_att)) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "-> Cannot get semi_minor_axis attribute from " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // inverse_flattening @@ -2865,10 +2909,10 @@ void NcCfFile::get_grid_mapping_geostationary( grid_mapping_var, (string)"inverse_flattening"); if (IS_INVALID_NC_P(inverse_flattening_att)) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "-> Cannot get inverse_flattening attribute from " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // latitude_of_projection_origin @@ -2876,10 +2920,10 @@ void NcCfFile::get_grid_mapping_geostationary( grid_mapping_var, (string)"latitude_of_projection_origin"); if (IS_INVALID_NC_P(proj_origin_lat_att)) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "-> Cannot get latitude_of_projection_origin attribute from " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // longitude_of_projection_origin @@ -2887,10 +2931,10 @@ void NcCfFile::get_grid_mapping_geostationary( grid_mapping_var, (string)"longitude_of_projection_origin"); if (IS_INVALID_NC_P(proj_origin_lon_att)) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "-> Cannot get longitude_of_projection_origin attribute from " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // sweep_angle_axis @@ -2898,10 +2942,10 @@ void NcCfFile::get_grid_mapping_geostationary( grid_mapping_var, (string)"sweep_angle_axis"); if (IS_INVALID_NC_P(sweep_angle_axis_att)) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "-> Cannot get sweep_angle_axis attribute from " << GET_NC_NAME_P(grid_mapping_var) << " variable.\n\n"; - exit(1); + return; } // Look for the x/y dimensions and x/y coordinate variables @@ -2910,21 +2954,21 @@ void NcCfFile::get_grid_mapping_geostationary( bool do_exit = false; if (_xDim == nullptr) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "-> Didn't find X dimension (projection_x_coordinate) in netCDF file.\n\n"; do_exit = true; } if (_yDim == nullptr) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "-> Didn't find Y dimension (projection_y_coordinate) in netCDF file.\n\n"; do_exit = true; } if (_xCoordVar == nullptr) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "-> Didn't find X coord variable (" << GET_NC_NAME_P(_xDim) << ") in netCDF file.\n\n"; do_exit = true; @@ -2932,7 +2976,7 @@ void NcCfFile::get_grid_mapping_geostationary( if (_yCoordVar == nullptr) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "-> Didn't find Y coord variable (" << GET_NC_NAME_P(_yDim) << ") in netCDF file.\n\n"; do_exit = true; @@ -2941,12 +2985,12 @@ void NcCfFile::get_grid_mapping_geostationary( if (get_data_size(_xCoordVar) != (int) GET_NC_SIZE_P(_xDim) || get_data_size(_yCoordVar) != (int) GET_NC_SIZE_P(_yDim)) { - mlog << Error << "\n" << method_name + mlog << Warning << "\n" << method_name << "-> Coordinate variables don't match dimension sizes in netCDF file.\n\n"; do_exit = true; } - if (do_exit) exit(1); + if (do_exit) return; // Figure out the dx/dy and x/y pin values from the dimension variables @@ -2955,7 +2999,6 @@ void NcCfFile::get_grid_mapping_geostationary( get_nc_data(_xCoordVar, x_values); - long y_counts = GET_NC_SIZE_P(_yDim); double y_values[y_counts]; @@ -2977,7 +3020,7 @@ void NcCfFile::get_grid_mapping_geostationary( NcVar *var_y_bound = (NcVar *)nullptr; for (int j=0; j 0) { data.x_image_bounds = new double[bound_count]; data.y_image_bounds = new double[bound_count]; - if (0 != var_x_bound) get_nc_data(var_x_bound, data.x_image_bounds); - if (0 != var_y_bound) get_nc_data(var_y_bound, data.y_image_bounds); + if (nullptr != var_x_bound) get_nc_data(var_x_bound, data.x_image_bounds); + if (nullptr != var_y_bound) get_nc_data(var_y_bound, data.y_image_bounds); } double flatten = 1.0/data.inverse_flattening; @@ -3034,6 +3077,7 @@ void NcCfFile::get_grid_mapping_geostationary( // Note: Computing lat/lon was deferred because it took 1 minutes grid.set(data); + grid_ready = true; if (perspective_point_height_att) delete perspective_point_height_att; if (semi_major_axis_att) delete semi_major_axis_att; @@ -3112,19 +3156,19 @@ bool NcCfFile::get_grid_from_coordinates(const NcVar *data_var) { } if (_xCoordVar == nullptr) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Didn't find X coord variable (" << x_dim_var_name << ") in netCDF file.\n\n"; if (coordinates_att) delete coordinates_att; - return true; + return false; } if (_yCoordVar == nullptr) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Didn't find Y coord variable (" << y_dim_var_name << ") in netCDF file.\n\n"; if (coordinates_att) delete coordinates_att; - return true; + return false; } StringArray dimNames; @@ -3153,10 +3197,10 @@ bool NcCfFile::get_grid_from_coordinates(const NcVar *data_var) { if ((x_size != lon_counts && x_size != latlon_counts) || (y_size != lat_counts && x_size != latlon_counts)) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Coordinate variables don't match dimension sizes in netCDF file.\n\n"; if (coordinates_att) delete coordinates_att; - exit(1); + return false; } if (coordinates_att) { @@ -3280,18 +3324,18 @@ bool NcCfFile::get_grid_from_dimensions() if (_xCoordVar == nullptr) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Didn't find X coord variable (" << GET_NC_NAME_P(_xDim) << ") in netCDF file.\n\n"; - exit(1); + return false; } if (_yCoordVar == nullptr) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Didn't find Y coord variable (" << GET_NC_NAME_P(_yDim) << ") in netCDF file.\n\n"; - exit(1); + return false; } long lat_counts = GET_NC_SIZE_P(_yDim); @@ -3327,19 +3371,25 @@ void NcCfFile::get_grid_from_lat_lon_vars(NcVar *lat_var, NcVar *lon_var, LatLonData NcCfFile::get_data_from_lat_lon_vars(NcVar *lat_var, NcVar *lon_var, const long lat_counts, const long lon_counts, bool &swap_to_north) { - static const string method_name = "get_data_from_lat_lon_vars()"; + static const string method_name = "NcCfFile::get_data_from_lat_lon_vars()"; // Figure out the dlat/dlon values from the dimension variables + LatLonData data; + data.name = latlon_proj_type; + data.Nlat = (int)lat_counts; + data.Nlon = (int)lon_counts; + long x_size = get_data_size(lon_var); long y_size = get_data_size(lat_var); long latlon_counts = lon_counts*lat_counts; bool two_dim_coord = (x_size == latlon_counts) && (y_size == latlon_counts ); + if( !two_dim_coord && (x_size != lon_counts || y_size != lat_counts)) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Coordinate variables don't match dimension sizes in netCDF file.\n\n"; - exit(1); + return data; } double lat_values[lat_counts]; @@ -3365,6 +3415,8 @@ LatLonData NcCfFile::get_data_from_lat_lon_vars(NcVar *lat_var, NcVar *lon_var, get_nc_data(lat_var,lat_values); get_nc_data(lon_var,lon_values); } + data.lat_ll = lat_values[0]; + data.lon_ll = rescale_lon(-lon_values[0]); // Calculate dlat and dlon assuming they are constant. @@ -3376,6 +3428,9 @@ LatLonData NcCfFile::get_data_from_lat_lon_vars(NcVar *lat_var, NcVar *lon_var, << " lon[" << (lon_counts-1) << "]=" << lon_values[lon_counts-1] << " dlon=" << dlon << "\n"; + data.delta_lat = dlat; + data.delta_lon = dlon; + ConcatString point_nccf; bool skip_sanity_check = get_att_value_string(_ncFile, nc_att_met_point_nccf, point_nccf); if (!skip_sanity_check) { @@ -3406,7 +3461,7 @@ LatLonData NcCfFile::get_data_from_lat_lon_vars(NcVar *lat_var, NcVar *lon_var, << i-1 << "]=" << lat_values[i-1] << " lat[" << i << "]=" << lat_values[i] << " " << fabs(curr_delta - dlat) << " > " << degree_tolerance << "\n"; - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "MET can only process Latitude/Longitude files where the latitudes are evenly spaced (dlat=" << dlat <<", delta[" << i << "]=" << curr_delta << ")\n\n"; sanity_check_failed = true; @@ -3426,7 +3481,7 @@ LatLonData NcCfFile::get_data_from_lat_lon_vars(NcVar *lat_var, NcVar *lon_var, << i-1 << "]=" << lon_values[i-1] << " lon[" << i << "]=" << lon_values[i] << " " << fabs(curr_delta - dlon) << " > " << degree_tolerance << "\n"; - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "MET can only process Latitude/Longitude files where the longitudes are evenly spaced (dlon=" << dlon <<", delta[" << i << "]=" << curr_delta << ")\n\n"; sanity_check_failed = true; @@ -3435,9 +3490,9 @@ LatLonData NcCfFile::get_data_from_lat_lon_vars(NcVar *lat_var, NcVar *lon_var, } if (sanity_check_failed) { - mlog << Error << "\n" << method_name << " -> " + mlog << Warning << "\n" << method_name << " -> " << "Please check the input data is the lat/lon projection\n\n"; - exit(1); + return data; } } @@ -3450,16 +3505,6 @@ LatLonData NcCfFile::get_data_from_lat_lon_vars(NcVar *lat_var, NcVar *lon_var, // guaranteed anywhere that I see. But if this is not the case, then we // will probably also need to reorder the data itself. - LatLonData data; - - data.name = latlon_proj_type; - data.lat_ll = lat_values[0]; - data.lon_ll = rescale_lon(-lon_values[0]); - data.delta_lat = dlat; - data.delta_lon = dlon; - data.Nlat = lat_counts; - data.Nlon = lon_counts; - if (dlat < 0) { swap_to_north = true; data.delta_lat = -dlat; @@ -3468,6 +3513,7 @@ LatLonData NcCfFile::get_data_from_lat_lon_vars(NcVar *lat_var, NcVar *lon_var, else { swap_to_north = false; } + grid_ready = true; return data; diff --git a/src/libcode/vx_data2d_nc_cf/nc_cf_file.h b/src/libcode/vx_data2d_nc_cf/nc_cf_file.h index 5e29896459..f6f0b8b3fa 100644 --- a/src/libcode/vx_data2d_nc_cf/nc_cf_file.h +++ b/src/libcode/vx_data2d_nc_cf/nc_cf_file.h @@ -56,18 +56,18 @@ class NcCfFile { int getNx() const { - if (_xDim == 0) + if (_xDim == nullptr) return 0; - return GET_NC_SIZE_P(_xDim); + return (int)GET_NC_SIZE_P(_xDim); } int getNy() const { - if (_yDim == 0) + if (_yDim == nullptr) return 0; - return GET_NC_SIZE_P(_yDim); + return (int)GET_NC_SIZE_P(_yDim); } NcVarInfo *get_time_var_info() const { return _time_var_info; } @@ -112,6 +112,8 @@ class NcCfFile { bool getData(const char *, const LongArray &, DataPlane &, NcVarInfo *&) const; + bool update_grid(const Grid &); + Grid build_grid_from_lat_lon_vars(netCDF::NcVar *lat_var, netCDF::NcVar *lon_var, const long lat_counts, const long lon_counts); NcVarInfo* find_var_name(const char * var_name) const; @@ -122,6 +124,8 @@ class NcCfFile { static const double DELTA_TOLERANCE; netCDF::NcFile * _ncFile; // allocated + bool grid_ready; + bool has_attr_grid; // // dimensions diff --git a/src/libcode/vx_data2d_nc_met/Makefile.in b/src/libcode/vx_data2d_nc_met/Makefile.in index e160b86a38..a40eb0c86a 100644 --- a/src/libcode/vx_data2d_nc_met/Makefile.in +++ b/src/libcode/vx_data2d_nc_met/Makefile.in @@ -242,6 +242,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_data2d_nc_wrf/Makefile.in b/src/libcode/vx_data2d_nc_wrf/Makefile.in index dbe34976c3..682fe818bc 100644 --- a/src/libcode/vx_data2d_nc_wrf/Makefile.in +++ b/src/libcode/vx_data2d_nc_wrf/Makefile.in @@ -242,6 +242,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_data2d_python/Makefile.in b/src/libcode/vx_data2d_python/Makefile.in index cf782561fc..6367816286 100644 --- a/src/libcode/vx_data2d_python/Makefile.in +++ b/src/libcode/vx_data2d_python/Makefile.in @@ -246,6 +246,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_data2d_ugrid/Makefile.in b/src/libcode/vx_data2d_ugrid/Makefile.in index 7712baafe9..b6f107c162 100644 --- a/src/libcode/vx_data2d_ugrid/Makefile.in +++ b/src/libcode/vx_data2d_ugrid/Makefile.in @@ -240,6 +240,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_geodesy/Makefile.in b/src/libcode/vx_geodesy/Makefile.in index 25a281b257..d3160d305f 100644 --- a/src/libcode/vx_geodesy/Makefile.in +++ b/src/libcode/vx_geodesy/Makefile.in @@ -234,6 +234,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_gis/Makefile.in b/src/libcode/vx_gis/Makefile.in index a382caa1d3..dd666ba6cd 100644 --- a/src/libcode/vx_gis/Makefile.in +++ b/src/libcode/vx_gis/Makefile.in @@ -243,6 +243,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_gnomon/Makefile.in b/src/libcode/vx_gnomon/Makefile.in index adec4f8fb1..62729f1c9f 100644 --- a/src/libcode/vx_gnomon/Makefile.in +++ b/src/libcode/vx_gnomon/Makefile.in @@ -234,6 +234,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_grid/Makefile.in b/src/libcode/vx_grid/Makefile.in index 99bb769bf1..c42467a57a 100644 --- a/src/libcode/vx_grid/Makefile.in +++ b/src/libcode/vx_grid/Makefile.in @@ -276,6 +276,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_gsl_prob/Makefile.in b/src/libcode/vx_gsl_prob/Makefile.in index e3ca39e845..298ff0f95d 100644 --- a/src/libcode/vx_gsl_prob/Makefile.in +++ b/src/libcode/vx_gsl_prob/Makefile.in @@ -242,6 +242,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_nav/Makefile.in b/src/libcode/vx_nav/Makefile.in index e91a581ff9..75018bdc9b 100644 --- a/src/libcode/vx_nav/Makefile.in +++ b/src/libcode/vx_nav/Makefile.in @@ -234,6 +234,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_nc_obs/Makefile.in b/src/libcode/vx_nc_obs/Makefile.in index b88b793888..709b4c356d 100644 --- a/src/libcode/vx_nc_obs/Makefile.in +++ b/src/libcode/vx_nc_obs/Makefile.in @@ -244,6 +244,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_nc_util/Makefile.in b/src/libcode/vx_nc_util/Makefile.in index f2f564ff93..8079c5d628 100644 --- a/src/libcode/vx_nc_util/Makefile.in +++ b/src/libcode/vx_nc_util/Makefile.in @@ -242,6 +242,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_nc_util/nc_utils.hpp b/src/libcode/vx_nc_util/nc_utils.hpp index c9024a471d..7298a7e4d8 100644 --- a/src/libcode/vx_nc_util/nc_utils.hpp +++ b/src/libcode/vx_nc_util/nc_utils.hpp @@ -236,46 +236,100 @@ void apply_scale_factor_(T *data, const int cell_count, clock_t start_clock = clock(); const char *method_name = "apply_scale_factor(T) "; - if (cell_count > 0) { - int idx; - int positive_cnt = 0; - int unpacked_count = 0; - T min_value, max_value; - T raw_min_val, raw_max_val; + if (cell_count <= 0) return; + + T min_value; + T max_value; + T raw_min_val; + T raw_max_val; + int idx = 0; + int positive_cnt = 0; + int unpacked_count = 0; + + if (has_fill_value) { + // Set met_fill_value (-9999) for FillValues (missing values) + for (; idx data[idx]) raw_min_val = data[idx]; + if (raw_max_val < data[idx]) raw_max_val = data[idx]; + data[idx] = (data[idx] * scale_factor) + add_offset; + if (data[idx] > 0) positive_cnt++; + if (min_value > data[idx]) min_value = data[idx]; + if (max_value < data[idx]) max_value = data[idx]; + unpacked_count++; } + } + mlog << Debug(debug_level) << method_name << var_name + << "(data_type=" << typeid(data[0]).name() << "): unpacked data: count=" + << unpacked_count << " out of " << cell_count + << ", scale_factor=" << scale_factor<< " add_offset=" << add_offset + << ". FillValue(" << data_type << ")=" << nc_fill_value << "\n"; + mlog << Debug(debug_level) << method_name + << " data range [" << min_value << " - " << max_value + << "] raw data: [" << raw_min_val << " - " << raw_max_val + << "] Positive count: " << positive_cnt << "\n"; - raw_min_val = raw_max_val = data[idx]; - min_value = max_value = (data[idx] * scale_factor) + add_offset; - for (; idx data[idx]) raw_min_val = data[idx]; - if (raw_max_val < data[idx]) raw_max_val = data[idx]; - data[idx] = (data[idx] * scale_factor) + add_offset; - if (data[idx] > 0) positive_cnt++; - if (min_value > data[idx]) min_value = data[idx]; - if (max_value < data[idx]) max_value = data[idx]; - unpacked_count++; - } + mlog << Debug(debug_level) << method_name << " took " + << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + return; +} + +//////////////////////////////////////////////////////////////////////// + +template +void update_missing_values(T *data, const long cell_count, + const T nc_fill_value, const T met_fill_value, + const char *data_type, const char *var_name) { + int missing_count = 0; + const int debug_level = 7; + clock_t start_clock = clock(); + const char *method_name = "update_missing_values(T) "; + + if (cell_count <= 0) return; + + T max_value; + T min_value; + long idx = 0; + int positive_cnt = 0; + + // Set met_fill_value (-9999) for FillValues (missing values) + for (; idx data[idx]) min_value = data[idx]; + if (max_value < data[idx]) max_value = data[idx]; + } + } + mlog << Debug(debug_level) << method_name << var_name + << "(data_type=" << typeid(data[0]).name() << "): FillValue(" << data_type << ")=" << nc_fill_value << "\n"; + mlog << Debug(debug_level) << method_name + << " data range [" << min_value << " - " << max_value + << "] Positive count: " << positive_cnt << "\n"; + if (0 < missing_count) { + mlog << Debug(3) << method_name << var_name + << "(data_type=" << typeid(data[0]).name() << "): found " << missing_count << " FillValues out of " << cell_count << "\n"; } mlog << Debug(debug_level) << method_name << " took " << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; @@ -311,18 +365,23 @@ bool get_nc_data_(netCDF::NcVar *var, T *data, const T met_missing) { bool return_status = get_nc_data_t(var, data); if (return_status) { + T nc_missing; + const int cell_count = get_data_size(var); + bool has_missing_attr = get_var_fill_value(var, nc_missing); + if (!has_missing_attr) nc_missing = met_missing; + //scale_factor and add_offset if (has_add_offset_attr(var) || has_scale_factor_attr(var)) { - T nc_missing; - const int cell_count = get_data_size(var); double add_offset = get_var_add_offset(var); double scale_factor = get_var_scale_factor(var); - bool has_missing_attr = get_var_fill_value(var, nc_missing); - if (!has_missing_attr) nc_missing = met_missing; apply_scale_factor_(data, cell_count, add_offset, scale_factor, nc_missing, met_missing, has_missing_attr, "", GET_NC_NAME_P(var).c_str()); } + else if (has_missing_attr) { + update_missing_values(data, cell_count, nc_missing, met_missing, + "", GET_NC_NAME_P(var).c_str()); + } } return return_status; } @@ -330,7 +389,7 @@ bool get_nc_data_(netCDF::NcVar *var, T *data, const T met_missing) { //////////////////////////////////////////////////////////////////////// template -bool get_nc_data_(netCDF::NcVar *var, T *data, T bad_data, const LongArray &dims, const LongArray &curs) { +bool get_nc_data_(netCDF::NcVar *var, T *data, T met_missing, const LongArray &dims, const LongArray &curs) { bool return_status = false; const char *method_name = "get_nc_data_(T, *dims, *curs) "; @@ -371,7 +430,7 @@ bool get_nc_data_(netCDF::NcVar *var, T *data, T bad_data, const LongArray &dims } for (int idx1=0; idx1getVar(start, count, data); return_status = true; + T nc_missing; + bool has_missing_attr = get_var_fill_value(var, nc_missing); + if (!has_missing_attr) nc_missing = met_missing; + //scale_factor and add_offset if (has_add_offset_attr(var) || has_scale_factor_attr(var)) { - T nc_missing; double add_offset = get_var_add_offset(var); double scale_factor = get_var_scale_factor(var); - bool has_missing_attr = get_var_fill_value(var, nc_missing); - if (!has_missing_attr) nc_missing = bad_data; apply_scale_factor_(data, data_size, add_offset, scale_factor, - nc_missing, bad_data, has_missing_attr, + nc_missing, met_missing, has_missing_attr, "", GET_NC_NAME_P(var).c_str()); } + else if (has_missing_attr) { + update_missing_values(data, data_size, nc_missing, met_missing, + "", GET_NC_NAME_P(var).c_str()); + } } return return_status; } @@ -437,17 +501,22 @@ bool get_nc_data_(netCDF::NcVar *var, T *data, T met_missing, const long dim, co var->getVar(start, count, data); return_status = true; + T nc_missing; + bool has_missing_attr = get_var_fill_value(var, nc_missing); + if (!has_missing_attr) nc_missing = met_missing; + //scale_factor and add_offset if (has_add_offset_attr(var) || has_scale_factor_attr(var)) { - T nc_missing; double add_offset = get_var_add_offset(var); double scale_factor = get_var_scale_factor(var); - bool has_missing_attr = get_var_fill_value(var, nc_missing); - if (!has_missing_attr) nc_missing = met_missing; apply_scale_factor_(data, dim, add_offset, scale_factor, nc_missing, met_missing, has_missing_attr, "", GET_NC_NAME_P(var).c_str()); } + else if (has_missing_attr) { + update_missing_values(data, dim, nc_missing, met_missing, + "", GET_NC_NAME_P(var).c_str()); + } } return return_status; } @@ -456,7 +525,7 @@ bool get_nc_data_(netCDF::NcVar *var, T *data, T met_missing, const long dim, co // read a single data template -bool get_nc_data_(netCDF::NcVar *var, T *data, T bad_data, const LongArray &curs) { +bool get_nc_data_(netCDF::NcVar *var, T *data, T met_missing, const LongArray &curs) { bool return_status = false; //const char *method_name = "get_nc_data_(*curs) "; @@ -470,7 +539,7 @@ bool get_nc_data_(netCDF::NcVar *var, T *data, T bad_data, const LongArray &curs } // Retrieve the NetCDF value from the NetCDF variable. - return_status = get_nc_data_(var, data, bad_data, dims, curs); + return_status = get_nc_data_(var, data, met_missing, dims, curs); } return return_status; } diff --git a/src/libcode/vx_pb_util/Makefile.in b/src/libcode/vx_pb_util/Makefile.in index 4155cbd87d..c60be5fb82 100644 --- a/src/libcode/vx_pb_util/Makefile.in +++ b/src/libcode/vx_pb_util/Makefile.in @@ -240,6 +240,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_physics/Makefile.in b/src/libcode/vx_physics/Makefile.in index 4a92b393e6..88c09d0f76 100644 --- a/src/libcode/vx_physics/Makefile.in +++ b/src/libcode/vx_physics/Makefile.in @@ -234,6 +234,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_plot_util/Makefile.in b/src/libcode/vx_plot_util/Makefile.in index b04ac2aff8..16cd426cde 100644 --- a/src/libcode/vx_plot_util/Makefile.in +++ b/src/libcode/vx_plot_util/Makefile.in @@ -239,6 +239,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_pointdata_python/Makefile.in b/src/libcode/vx_pointdata_python/Makefile.in index 9df1cb65f5..e2ff7db4d5 100644 --- a/src/libcode/vx_pointdata_python/Makefile.in +++ b/src/libcode/vx_pointdata_python/Makefile.in @@ -241,6 +241,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_ps/Makefile.in b/src/libcode/vx_ps/Makefile.in index 9f1f61d8d9..3b1c14b3e7 100644 --- a/src/libcode/vx_ps/Makefile.in +++ b/src/libcode/vx_ps/Makefile.in @@ -244,6 +244,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_pxm/Makefile.in b/src/libcode/vx_pxm/Makefile.in index 9f78c084cc..b3053d4199 100644 --- a/src/libcode/vx_pxm/Makefile.in +++ b/src/libcode/vx_pxm/Makefile.in @@ -241,6 +241,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_python3_utils/Makefile.in b/src/libcode/vx_python3_utils/Makefile.in index 625aeafb9a..6c9138d22f 100644 --- a/src/libcode/vx_python3_utils/Makefile.in +++ b/src/libcode/vx_python3_utils/Makefile.in @@ -247,6 +247,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_regrid/Makefile.in b/src/libcode/vx_regrid/Makefile.in index dacbe937e9..67e3833844 100644 --- a/src/libcode/vx_regrid/Makefile.in +++ b/src/libcode/vx_regrid/Makefile.in @@ -236,6 +236,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_render/Makefile.in b/src/libcode/vx_render/Makefile.in index 54ad601137..647a42f006 100644 --- a/src/libcode/vx_render/Makefile.in +++ b/src/libcode/vx_render/Makefile.in @@ -258,6 +258,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_seeps/Makefile.in b/src/libcode/vx_seeps/Makefile.in index 0fabf3df09..510e05b214 100644 --- a/src/libcode/vx_seeps/Makefile.in +++ b/src/libcode/vx_seeps/Makefile.in @@ -234,6 +234,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_series_data/Makefile.in b/src/libcode/vx_series_data/Makefile.in index 897d818054..6344467e44 100644 --- a/src/libcode/vx_series_data/Makefile.in +++ b/src/libcode/vx_series_data/Makefile.in @@ -237,6 +237,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_shapedata/Makefile.in b/src/libcode/vx_shapedata/Makefile.in index 290ee7582f..9702c46133 100644 --- a/src/libcode/vx_shapedata/Makefile.in +++ b/src/libcode/vx_shapedata/Makefile.in @@ -250,6 +250,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_solar/Makefile.in b/src/libcode/vx_solar/Makefile.in index 3d12890618..ada5952624 100644 --- a/src/libcode/vx_solar/Makefile.in +++ b/src/libcode/vx_solar/Makefile.in @@ -236,6 +236,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_stat_out/Makefile.in b/src/libcode/vx_stat_out/Makefile.in index d12b414cf1..77d31a4ea1 100644 --- a/src/libcode/vx_stat_out/Makefile.in +++ b/src/libcode/vx_stat_out/Makefile.in @@ -236,6 +236,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_statistics/Makefile.in b/src/libcode/vx_statistics/Makefile.in index dbd2500d6a..ef3c09e5e9 100644 --- a/src/libcode/vx_statistics/Makefile.in +++ b/src/libcode/vx_statistics/Makefile.in @@ -261,6 +261,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_statistics/apply_mask.cc b/src/libcode/vx_statistics/apply_mask.cc index 03e31e97c7..bd12b1a25b 100644 --- a/src/libcode/vx_statistics/apply_mask.cc +++ b/src/libcode/vx_statistics/apply_mask.cc @@ -89,21 +89,8 @@ Grid parse_grid_string(const char *grid_str) { Grid grid; StringArray sa; - // Parse as a white-space separated string - sa.parse_wsss(grid_str); - - // Search for a named grid - if(sa.n() == 1 && find_grid_by_name(sa[0].c_str(), grid)) { - mlog << Debug(3) << "Use the grid named \"" - << grid_str << "\".\n"; - } - // Parse grid definition - else if(sa.n() > 1 && parse_grid_def(sa, grid)) { - mlog << Debug(3) << "Use the grid defined by string \"" - << grid_str << "\".\n"; - } - // Extract the grid from a gridded data file - else { + if (!build_grid_by_grid_string(grid_str, grid, "parse_grid_strin", false)) { + // Extract the grid from a gridded data file mlog << Debug(3) << "Use the grid defined by file \"" << grid_str << "\".\n"; @@ -228,24 +215,8 @@ void parse_grid_mask(const ConcatString &mask_grid_str, Grid &grid) { // Check for empty input string if(mask_grid_str.empty()) return; - // Parse mask_grid_str as a white-space separated string - StringArray sa; - sa.parse_wsss(mask_grid_str); - - // Named grid - if(sa.n() == 1 && find_grid_by_name(mask_grid_str.c_str(), grid)) { - mlog << Debug(3) - << "Use the grid named \"" << mask_grid_str << "\".\n"; - } - // Grid specification string - else if(sa.n() > 1 && parse_grid_def(sa, grid)) { - mlog << Debug(3) - << "Use the grid defined by string \"" << mask_grid_str - << "\".\n"; - } - // Extract the grid from a gridded data file - else { - + if (!build_grid_by_grid_string(mask_grid_str, grid, "parse_grid_mask", false)) { + // Extract the grid from a gridded data file mlog << Debug(3) << "Use the grid defined by file \"" << mask_grid_str << "\".\n"; diff --git a/src/libcode/vx_statistics/contable_stats.cc b/src/libcode/vx_statistics/contable_stats.cc index 7e7194c11d..7e7b8b4783 100644 --- a/src/libcode/vx_statistics/contable_stats.cc +++ b/src/libcode/vx_statistics/contable_stats.cc @@ -309,8 +309,8 @@ double TTContingencyTable::bagss() const { ha = (double) oy() - (fy_on() / lf) * lw; } - num = ha - (oy() * oy() / n()); - den = 2.0*oy() - ha - (oy() * oy() / n()); + num = ha - ((double) oy() * oy() / n()); + den = 2.0*oy() - ha - ((double) oy() * oy() / n()); if(is_eq(den, 0.0)) v = bad_data_double; else v = num/den; @@ -698,7 +698,7 @@ double TTContingencyTable::sedi_ci(double alpha, double &cl, double &cu) const { double v, h, f, b, se, mf, mh; - v = edi(); + v = sedi(); f = (double) fy_on() / (fy_on() + fn_on()); h = pod_yes(); b = baser(); diff --git a/src/libcode/vx_summary/Makefile.in b/src/libcode/vx_summary/Makefile.in index 6c057f2622..42cac04abd 100644 --- a/src/libcode/vx_summary/Makefile.in +++ b/src/libcode/vx_summary/Makefile.in @@ -256,6 +256,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_tc_util/Makefile.in b/src/libcode/vx_tc_util/Makefile.in index 747df71532..faae6b3f1d 100644 --- a/src/libcode/vx_tc_util/Makefile.in +++ b/src/libcode/vx_tc_util/Makefile.in @@ -270,6 +270,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/libcode/vx_time_series/Makefile.in b/src/libcode/vx_time_series/Makefile.in index a5eacf5ac7..a7bed2cf24 100644 --- a/src/libcode/vx_time_series/Makefile.in +++ b/src/libcode/vx_time_series/Makefile.in @@ -238,6 +238,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/Makefile.in b/src/tools/Makefile.in index c9b6f05b61..6862443abb 100644 --- a/src/tools/Makefile.in +++ b/src/tools/Makefile.in @@ -232,6 +232,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/core/Makefile.in b/src/tools/core/Makefile.in index 6e18774f39..cacc9eabec 100644 --- a/src/tools/core/Makefile.in +++ b/src/tools/core/Makefile.in @@ -240,6 +240,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/core/ensemble_stat/Makefile.in b/src/tools/core/ensemble_stat/Makefile.in index a960e21483..0c0f147c70 100644 --- a/src/tools/core/ensemble_stat/Makefile.in +++ b/src/tools/core/ensemble_stat/Makefile.in @@ -225,6 +225,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/core/grid_stat/Makefile.in b/src/tools/core/grid_stat/Makefile.in index 30cc717d27..97b6321c73 100644 --- a/src/tools/core/grid_stat/Makefile.in +++ b/src/tools/core/grid_stat/Makefile.in @@ -224,6 +224,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/core/mode/Makefile.in b/src/tools/core/mode/Makefile.in index 10f09a3200..55999c4871 100644 --- a/src/tools/core/mode/Makefile.in +++ b/src/tools/core/mode/Makefile.in @@ -243,6 +243,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/core/mode_analysis/Makefile.in b/src/tools/core/mode_analysis/Makefile.in index 334137147a..1c7c1f441d 100644 --- a/src/tools/core/mode_analysis/Makefile.in +++ b/src/tools/core/mode_analysis/Makefile.in @@ -225,6 +225,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/core/pcp_combine/Makefile.in b/src/tools/core/pcp_combine/Makefile.in index 44b0f69c50..f866be8cc3 100644 --- a/src/tools/core/pcp_combine/Makefile.in +++ b/src/tools/core/pcp_combine/Makefile.in @@ -222,6 +222,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/core/point_stat/Makefile.in b/src/tools/core/point_stat/Makefile.in index 81735f1efb..4efc7d8ba8 100644 --- a/src/tools/core/point_stat/Makefile.in +++ b/src/tools/core/point_stat/Makefile.in @@ -224,6 +224,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/core/series_analysis/Makefile.in b/src/tools/core/series_analysis/Makefile.in index 2e26c49701..fd4915a5a5 100644 --- a/src/tools/core/series_analysis/Makefile.in +++ b/src/tools/core/series_analysis/Makefile.in @@ -226,6 +226,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/core/stat_analysis/Makefile.in b/src/tools/core/stat_analysis/Makefile.in index 168c3da589..e1b0bda93d 100644 --- a/src/tools/core/stat_analysis/Makefile.in +++ b/src/tools/core/stat_analysis/Makefile.in @@ -231,6 +231,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/core/wavelet_stat/Makefile.in b/src/tools/core/wavelet_stat/Makefile.in index 96490833a2..5826b4102e 100644 --- a/src/tools/core/wavelet_stat/Makefile.in +++ b/src/tools/core/wavelet_stat/Makefile.in @@ -225,6 +225,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/dev_utils/Makefile.in b/src/tools/dev_utils/Makefile.in index e9b745a97f..46d98a6aeb 100644 --- a/src/tools/dev_utils/Makefile.in +++ b/src/tools/dev_utils/Makefile.in @@ -368,6 +368,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/dev_utils/shapefiles/Makefile.in b/src/tools/dev_utils/shapefiles/Makefile.in index f5454f70fb..62ec442a56 100644 --- a/src/tools/dev_utils/shapefiles/Makefile.in +++ b/src/tools/dev_utils/shapefiles/Makefile.in @@ -219,6 +219,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/Makefile.in b/src/tools/other/Makefile.in index 7574bf3ce1..010a792155 100644 --- a/src/tools/other/Makefile.in +++ b/src/tools/other/Makefile.in @@ -252,6 +252,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/ascii2nc/Makefile.in b/src/tools/other/ascii2nc/Makefile.in index ccc217163a..d7d75fb04a 100644 --- a/src/tools/other/ascii2nc/Makefile.in +++ b/src/tools/other/ascii2nc/Makefile.in @@ -274,6 +274,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/gen_ens_prod/Makefile.in b/src/tools/other/gen_ens_prod/Makefile.in index 8586403cb6..4f070ce15d 100644 --- a/src/tools/other/gen_ens_prod/Makefile.in +++ b/src/tools/other/gen_ens_prod/Makefile.in @@ -225,6 +225,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/gen_vx_mask/Makefile.in b/src/tools/other/gen_vx_mask/Makefile.in index 0454fcc726..4203003677 100644 --- a/src/tools/other/gen_vx_mask/Makefile.in +++ b/src/tools/other/gen_vx_mask/Makefile.in @@ -222,6 +222,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ 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 7612f0d7d2..98b15a212a 100644 --- a/src/tools/other/gen_vx_mask/gen_vx_mask.cc +++ b/src/tools/other/gen_vx_mask/gen_vx_mask.cc @@ -177,24 +177,8 @@ void process_command_line(int argc, char **argv) { void process_input_grid(DataPlane &dp) { - // Parse the input grid as a white-space separated string - StringArray sa; - sa.parse_wsss(input_gridname); - - // Search for a named grid - if(sa.n() == 1 && find_grid_by_name(sa[0].c_str(), grid)) { - mlog << Debug(3) - << "Use input grid named \"" << input_gridname << "\".\n"; - } - // Parse grid definition - else if(sa.n() > 1 && parse_grid_def(sa, grid)) { - mlog << Debug(3) - << "Use input grid defined by string \"" << input_gridname - << "\".\n"; - } - // Extract the grid from a gridded data file - else { - + if (!build_grid_by_grid_string(input_gridname, grid, "process_input_grid", false)) { + // Extract the grid from a gridded data file mlog << Debug(3) << "Use input grid defined by file \"" << input_gridname << "\".\n"; @@ -284,22 +268,7 @@ void process_mask_file(DataPlane &dp) { // For the grid mask type, support named grids and grid // specification strings if(mask_type == MaskType::Grid) { - - // Parse the mask file as a white-space separated string - StringArray sa; - sa.parse_wsss(mask_filename); - - // Search for a named grid - if(sa.n() == 1 && find_grid_by_name(sa[0].c_str(), grid_mask)) { - mlog << Debug(3) - << "Use mask grid named \"" << mask_filename << "\".\n"; - } - // Parse grid definition - else if(sa.n() > 1 && parse_grid_def(sa, grid_mask)) { - mlog << Debug(3) - << "Use mask grid defined by string \"" << mask_filename - << "\".\n"; - } + build_grid_by_grid_string(mask_filename, grid_mask, "process_mask_file", false); } // Parse as a gridded data file if not already set diff --git a/src/tools/other/gis_utils/Makefile.in b/src/tools/other/gis_utils/Makefile.in index aa3780a9bc..0afd97e00c 100644 --- a/src/tools/other/gis_utils/Makefile.in +++ b/src/tools/other/gis_utils/Makefile.in @@ -234,6 +234,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/grid_diag/Makefile.in b/src/tools/other/grid_diag/Makefile.in index c93be79561..65e3b5196f 100644 --- a/src/tools/other/grid_diag/Makefile.in +++ b/src/tools/other/grid_diag/Makefile.in @@ -224,6 +224,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/gsi_tools/Makefile.in b/src/tools/other/gsi_tools/Makefile.in index c7f068cfd9..455195d757 100644 --- a/src/tools/other/gsi_tools/Makefile.in +++ b/src/tools/other/gsi_tools/Makefile.in @@ -261,6 +261,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/ioda2nc/Makefile.in b/src/tools/other/ioda2nc/Makefile.in index 37f335deae..cff7fbea89 100644 --- a/src/tools/other/ioda2nc/Makefile.in +++ b/src/tools/other/ioda2nc/Makefile.in @@ -237,6 +237,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/lidar2nc/Makefile.in b/src/tools/other/lidar2nc/Makefile.in index e5d3703780..ad7371e7f2 100644 --- a/src/tools/other/lidar2nc/Makefile.in +++ b/src/tools/other/lidar2nc/Makefile.in @@ -237,6 +237,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/madis2nc/Makefile.in b/src/tools/other/madis2nc/Makefile.in index c6eb822fc3..e70b8e0d65 100644 --- a/src/tools/other/madis2nc/Makefile.in +++ b/src/tools/other/madis2nc/Makefile.in @@ -224,6 +224,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/mode_graphics/Makefile.in b/src/tools/other/mode_graphics/Makefile.in index ead2e5dcb4..abc9301ea0 100644 --- a/src/tools/other/mode_graphics/Makefile.in +++ b/src/tools/other/mode_graphics/Makefile.in @@ -245,6 +245,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/mode_time_domain/3d_conv.cc b/src/tools/other/mode_time_domain/3d_conv.cc index d204ee61b0..1ecbe0b68a 100644 --- a/src/tools/other/mode_time_domain/3d_conv.cc +++ b/src/tools/other/mode_time_domain/3d_conv.cc @@ -154,8 +154,6 @@ struct DataHandle { { - int j; - _out.put('\n'); _out << " DataHandle:\n"; @@ -168,13 +166,13 @@ struct DataHandle { _out << " plane_loaded = ["; - for (j=0; j 0) { - - // Parse as a white-space separated string - sa.parse_wsss(plot_grid_string); - - // Search for a named grid - if(sa.n() == 1 && find_grid_by_name(sa[0].c_str(), grid)) { - mlog << Debug(3) << "Use the grid named \"" - << plot_grid_string << "\".\n"; - } - // Parse grid definition - else if(sa.n() > 1 && parse_grid_def(sa, grid)) { - mlog << Debug(3) << "Use the grid defined by string \"" - << plot_grid_string << "\".\n"; - } - // Extract the grid from a gridded data file - else { + if (!build_grid_by_grid_string(plot_grid_string, grid, + "PlotPointObsConfInfo::process_config -> ", false)) { + // Extract the grid from a gridded data file mlog << Debug(3) << "Use the grid defined by file \"" << plot_grid_string << "\".\n"; diff --git a/src/tools/other/point2grid/Makefile.in b/src/tools/other/point2grid/Makefile.in index 17f72484ab..9c8efa6ea4 100644 --- a/src/tools/other/point2grid/Makefile.in +++ b/src/tools/other/point2grid/Makefile.in @@ -236,6 +236,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/point2grid/point2grid.cc b/src/tools/other/point2grid/point2grid.cc index de7d284fc1..73210e4b27 100644 --- a/src/tools/other/point2grid/point2grid.cc +++ b/src/tools/other/point2grid/point2grid.cc @@ -30,7 +30,7 @@ #include #include -#include +#include #include "main.h" #include "vx_log.h" @@ -424,6 +424,7 @@ static void process_data_file() { // Get the obs type before opening NetCDF obs_type = get_obs_type(nc_in); goes_data = (obs_type == TYPE_GOES || obs_type == TYPE_GOES_ADP); + if (obs_type == TYPE_UNKNOWN && ftype == FileType_NcCF) obs_type = TYPE_NCCF; if (obs_type == TYPE_NCCF) setenv(nc_att_met_point_nccf, "yes", 1); // Read the input data file @@ -594,14 +595,33 @@ bool get_nc_data_string_array(NcFile *nc, const char *var_name, static int get_obs_type(NcFile *nc) { int obs_type = TYPE_UNKNOWN; + MetConfig config; ConcatString att_val_scene_id; ConcatString att_val_project; ConcatString input_type; static const char *method_name = "get_obs_type() -> "; - bool has_project = get_global_att(nc, (string)"project", att_val_project); - bool has_scene_id = get_global_att(nc, (string)"scene_id", att_val_scene_id); - if( has_scene_id && has_project && att_val_project == "GOES" ) { + bool has_attr_grid = false; + auto vinfo = VarInfoFactory::new_var_info(FileType_NcCF); + for(int i=0; iclear(); + // Populate the VarInfo object using the config string + config.read_string(FieldSA[i].c_str()); + vinfo->set_dict(config); + if (vinfo->grid_attr().is_set()) { + has_attr_grid = true; + break; + } + } + if (vinfo) { delete vinfo; vinfo = (VarInfo *) nullptr; } + + if (has_attr_grid) { + obs_type = TYPE_NCCF; + input_type = "OBS_NCCF"; + } + else if (get_global_att(nc, (string)"scene_id", att_val_scene_id) + && get_global_att(nc, (string)"project", att_val_project) + && att_val_project == "GOES" ) { obs_type = TYPE_GOES; input_type = "GOES"; if (!adp_filename.empty()) { @@ -693,12 +713,15 @@ std::set prepare_qoes_qc_array() { void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarInfo *vinfo, const Grid &to_grid) { - int idx, hdr_idx; + int hdr_idx; int var_idx_or_gc; ConcatString vname; - DataPlane fr_dp, to_dp; - DataPlane cnt_dp, mask_dp; - DataPlane prob_dp, prob_mask_dp; + DataPlane fr_dp; + DataPlane to_dp; + DataPlane cnt_dp; + DataPlane mask_dp; + DataPlane prob_dp; + DataPlane prob_mask_dp; bool has_prob_thresh = !prob_cat_thresh.check(bad_data_double); @@ -807,7 +830,7 @@ void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarI } else { bool not_found_grib_code = true; - for (idx=0; idxobs_ids[idx]) { not_found_grib_code = false; break; @@ -824,7 +847,7 @@ void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarI if (exit_by_field_name_error) { ConcatString log_msg; if (use_var_id) { - for (idx=0; idxobs_ids[idx])) { grib_codes.add(obs_data->obs_ids[idx]); if (0 < idx) log_msg << ", "; @@ -855,7 +878,9 @@ void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarI // Check the time range. Apply the time window bool valid_time_from_config = true; - unixtime valid_beg_ut, valid_end_ut, obs_time; + unixtime valid_beg_ut; + unixtime valid_end_ut; + unixtime obs_time; valid_time_array.clear(); valid_time = vinfo->valid(); @@ -865,7 +890,7 @@ void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarI valid_beg_ut = valid_end_ut = valid_time; if (!is_bad_data(conf_info.beg_ds)) valid_beg_ut += conf_info.beg_ds; if (!is_bad_data(conf_info.end_ds)) valid_end_ut += conf_info.end_ds; - for(idx=0; idx valid_time) valid_time = obs_time; } @@ -915,7 +940,7 @@ void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarI int filtered_by_time = 0; int filtered_by_msg_type = 0; int filtered_by_qc = 0; - for (idx=0; idx < nobs; idx++) { + for (int idx=0; idx < nobs; idx++) { if (var_idx_or_gc == obs_data->obs_ids[idx]) { var_count2++; hdr_idx = obs_data->obs_hids[idx]; @@ -1104,7 +1129,7 @@ void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarI log_msg << ", by msg_type: " << filtered_by_msg_type; if (0 < filtered_by_msg_type) { log_msg << " ["; - for(idx=0; idx 0) log_msg << ","; log_msg << conf_info.message_type[idx]; } @@ -1113,7 +1138,7 @@ void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarI log_msg << ", by QC: " << filtered_by_qc; if (0 < filtered_by_qc) { log_msg << " ["; - for(idx=0; idx 0) log_msg << ","; log_msg << qc_flags[idx]; } @@ -1179,7 +1204,7 @@ static void process_point_file(NcFile *nc_in, MetConfig &config, VarInfo *vinfo, nc_point_obs.close(); mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + << get_exe_duration(start_clock) << " seconds\n"; } @@ -1216,7 +1241,7 @@ static void process_point_python(const string python_command, MetConfig &config, met_point_file.close(); mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + << get_exe_duration(start_clock) << " seconds\n"; return; } @@ -1234,10 +1259,10 @@ static void process_point_nccf_file(NcFile *nc_in, MetConfig &config, bool *skip_times = nullptr; double *valid_times = nullptr; int filtered_by_time = 0; + int time_from_size = 1; clock_t start_clock = clock(); bool opt_all_attrs = false; Grid fr_grid = fr_mtddf->grid(); - int from_size = fr_grid.nx() * fr_grid.ny(); static const char *method_name = "process_point_nccf_file() -> "; NcVar var_lat; @@ -1247,10 +1272,10 @@ static void process_point_nccf_file(NcFile *nc_in, MetConfig &config, ConcatString lon_vname = conf_info.get_var_name(conf_key_lon_vname); if (lat_vname != conf_key_lat_vname && lon_vname != conf_key_lon_vname) { - if (lat_vname != conf_key_lat_vname && has_var(nc_in, lat_vname.c_str())) { + if (has_var(nc_in, lat_vname.c_str())) { var_lat = get_nc_var(nc_in, lat_vname.c_str()); } - if (lon_vname != conf_key_lon_vname && has_var(nc_in, lon_vname.c_str())) { + if (has_var(nc_in, lon_vname.c_str())) { var_lon = get_nc_var(nc_in, lon_vname.c_str()); } if (IS_INVALID_NC(var_lat)) { @@ -1270,7 +1295,7 @@ static void process_point_nccf_file(NcFile *nc_in, MetConfig &config, // Find lat/lon variables from the coordinates attribue if (0 < FieldSA.n() && !user_defined_latlon) { ConcatString coordinates_value; - VarInfoNcCF var_info = VarInfoNcCF(*(VarInfoNcCF *)vinfo); + auto var_info = VarInfoNcCF(*(VarInfoNcCF *)vinfo); // Initialize var_info.clear(); // Populate the VarInfo object using the config string @@ -1322,8 +1347,9 @@ static void process_point_nccf_file(NcFile *nc_in, MetConfig &config, if( IS_VALID_NC(time_var) ) { if( 1 < get_dim_count(&time_var) ) { double max_time = bad_data_double; - skip_times = new bool[from_size]; - valid_times = new double[from_size]; + time_from_size = get_data_size(&time_var); + skip_times = new bool[time_from_size]; + valid_times = new double[time_from_size]; if (get_nc_data(&time_var, valid_times)) { int sec_per_unit = 0; bool no_leap_year = false; @@ -1334,7 +1360,7 @@ static void process_point_nccf_file(NcFile *nc_in, MetConfig &config, if (!is_bad_data(conf_info.end_ds)) valid_end_ut += conf_info.end_ds; ref_ut = get_reference_unixtime(&time_var, sec_per_unit, no_leap_year); } - for (int i=0; i 0 ) { tmp_time = add_to_unixtime(ref_ut, sec_per_unit, valid_times[i], no_leap_year); @@ -1405,7 +1431,10 @@ static void process_point_nccf_file(NcFile *nc_in, MetConfig &config, // List range of data values if(mlog.verbosity_level() >= 2) { - double fr_dmin, fr_dmax, to_dmin, to_dmax; + double fr_dmin; + double fr_dmax; + double to_dmin; + double to_dmax; fr_dp.data_range(fr_dmin, fr_dmax); to_dp.data_range(to_dmin, to_dmax); mlog << Debug(2) << "Range of data (" << FieldSA[i] << ")\n" @@ -1428,7 +1457,8 @@ static void process_point_nccf_file(NcFile *nc_in, MetConfig &config, bool has_prob_thresh = !prob_cat_thresh.check(bad_data_double); if (has_prob_thresh || do_gaussian_filter) { - DataPlane prob_dp, prob_mask_dp; + DataPlane prob_dp; + DataPlane prob_mask_dp; ConcatString vname_prob = vname; vname_prob << "_prob_" << prob_cat_thresh.get_abbr_str(); int nx = to_dp.nx(); @@ -1477,12 +1507,12 @@ static void process_point_nccf_file(NcFile *nc_in, MetConfig &config, cellMapping = (IntArray *) nullptr; if( 0 < filtered_by_time ) { mlog << Debug(2) << method_name << "Filtered by time: " << filtered_by_time - << " out of " << from_size + << " out of " << time_from_size << " [" << unix_to_yyyymmdd_hhmmss(valid_beg_ut) << " to " << unix_to_yyyymmdd_hhmmss(valid_end_ut) << "]\n"; } mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + << get_exe_duration(start_clock) << " seconds\n"; return; } @@ -1506,9 +1536,6 @@ static void regrid_nc_variable(NcFile *nc_in, Met2dDataFile *fr_mtddf, exit(1); } - int from_lat_cnt = fr_grid.ny(); - int from_lon_cnt = fr_grid.nx(); - int from_data_size = from_lat_cnt * from_lon_cnt; if(!fr_mtddf->data_plane(*vinfo, fr_dp)) { mlog << Error << "\n" << method_name << "Trouble reading data \"" @@ -1516,106 +1543,112 @@ static void regrid_nc_variable(NcFile *nc_in, Met2dDataFile *fr_mtddf, << InputFilename << "\"\n\n"; exit(1); } - else { - bool is_to_north = !fr_grid.get_swap_to_north(); - auto from_data = new float[from_data_size]; - for (int xIdx=0; xIdx= 4) { - if (from_min_value > data_value) from_min_value = data_value; - if (from_max_value < data_value) from_max_value = data_value; - } + int from_index; + int no_map_cnt = 0; + int missing_cnt = 0; + int non_missing_cnt = 0; + double data_value; + IntArray cellArray; + NumArray dataArray; + double from_min_value = 10e10; + double from_max_value = -10e10; + int to_lat_cnt = to_grid.ny(); + int to_lon_cnt = to_grid.nx(); + + missing_cnt = non_missing_cnt = 0; + to_dp.set_constant(bad_data_double); + + for (int xIdx=0; xIdx= 9) { - double to_lat, to_lon; - to_grid.xy_to_latlon(xIdx,yIdx, to_lat, to_lon); - to_lon *= -1; - if (1 == data_cnt) - mlog << Debug(9) << method_name - << "value: " << to_value << " to (" << to_lon << ", " << to_lat - << ") from offset " << from_index << ".\n"; - else - mlog << Debug(9) << method_name - << "value: " << to_value - << ", max: " << dataArray.max() - << ", min: " << dataArray.min() - << ", mean: " << dataArray.sum()/data_cnt - << " from " << data_cnt << " (out of " << cellArray.n() - << ") data values to (" << to_lon << ", " << to_lat << ").\n"; - } + dataArray.add(data_value); + non_missing_cnt++; + if(mlog.verbosity_level() >= 4) { + if (from_min_value > data_value) from_min_value = data_value; + if (from_max_value < data_value) from_max_value = data_value; } } - else { - no_map_cnt++; + + if (0 < dataArray.n()) { + double to_value; + int data_cnt = dataArray.n(); + if (1 == data_cnt) to_value = dataArray[0]; + else if (RGInfo.method == InterpMthd::Min) to_value = dataArray.min(); + else if (RGInfo.method == InterpMthd::Max) to_value = dataArray.max(); + else if (RGInfo.method == InterpMthd::Median) { + dataArray.sort_array(); + to_value = dataArray[data_cnt/2]; + if (0 == data_cnt % 2) + to_value = (to_value + dataArray[(data_cnt/2)+1])/2; + } + else to_value = dataArray.sum() / data_cnt; // UW_Mean + + to_dp.set(to_value, xIdx, yIdx); + to_cell_cnt++; + if(mlog.verbosity_level() >= 9) { + double to_lat; + double to_lon; + to_grid.xy_to_latlon(xIdx,yIdx, to_lat, to_lon); + to_lon *= -1; + if (1 == data_cnt) + mlog << Debug(9) << method_name + << "value: " << to_value << " to (" << to_lon << ", " << to_lat + << ") from offset " << from_index << ".\n"; + else + mlog << Debug(9) << method_name + << "value: " << to_value + << ", max: " << dataArray.max() + << ", min: " << dataArray.min() + << ", mean: " << dataArray.sum()/data_cnt + << " from " << data_cnt << " (out of " << cellArray.n() + << ") data values to (" << to_lon << ", " << to_lat << ").\n"; + } } } + else { + no_map_cnt++; + } } + } - delete [] from_data; + delete [] from_data; - mlog << Debug(4) << method_name << "[Count] data cells: " << to_cell_cnt - << ", missing: " << missing_cnt << ", non_missing: " << non_missing_cnt - << ", non mapped cells: " << no_map_cnt - << " out of " << (to_lat_cnt*to_lon_cnt) - << "\n\tRange: data: [" << from_min_value << " - " << from_max_value - << "]\n"; - } + mlog << Debug(4) << method_name << "[Count] data cells: " << to_cell_cnt + << ", missing: " << missing_cnt << ", non_missing: " << non_missing_cnt + << ", non mapped cells: " << no_map_cnt + << " out of " << (to_lat_cnt*to_lon_cnt) + << "\n\tRange: data: [" << from_min_value << " - " << from_max_value + << "]\n"; if (to_cell_cnt == 0) { mlog << Warning << "\n" << method_name @@ -1623,7 +1656,7 @@ static void regrid_nc_variable(NcFile *nc_in, Met2dDataFile *fr_mtddf, } mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + << get_exe_duration(start_clock) << " seconds\n"; } //////////////////////////////////////////////////////////////////////// @@ -1818,7 +1851,10 @@ static void process_goes_file(NcFile *nc_in, MetConfig &config, VarInfo *vinfo, // List range of data values if(mlog.verbosity_level() >= 2) { - double fr_dmin, fr_dmax, to_dmin, to_dmax; + double fr_dmin; + double fr_dmax; + double to_dmin; + double to_dmax; fr_dp.data_range(fr_dmin, fr_dmax); to_dp.data_range(to_dmin, to_dmax); mlog << Debug(2) << "Range of data (" << FieldSA[i] << ")\n" @@ -1848,7 +1884,8 @@ static void process_goes_file(NcFile *nc_in, MetConfig &config, VarInfo *vinfo, bool has_prob_thresh = !prob_cat_thresh.check(bad_data_double); if (has_prob_thresh || do_gaussian_filter) { - DataPlane prob_dp, prob_mask_dp; + DataPlane prob_dp; + DataPlane prob_mask_dp; ConcatString vname_prob = vname; vname_prob << "_prob_" << prob_cat_thresh.get_abbr_str(); int nx = to_dp.nx(); @@ -1901,7 +1938,7 @@ static void process_goes_file(NcFile *nc_in, MetConfig &config, VarInfo *vinfo, clear_cell_mapping(cellMapping); delete [] cellMapping; cellMapping = (IntArray *) nullptr; mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + << get_exe_duration(start_clock) << " seconds\n"; return; } @@ -2018,7 +2055,8 @@ static bool get_grid_mapping(const Grid &to_grid, IntArray *cellMapping, return status; } - double x, y; + double x; + double y; DataPlane to_dp; int to_lat_count = to_grid.ny(); int to_lon_count = to_grid.nx(); @@ -2050,7 +2088,7 @@ static bool get_grid_mapping(const Grid &to_grid, IntArray *cellMapping, << ((obs_count > 0) ? 1.0*count_in_grid/obs_count*100 : 0) << "%)\n"; } mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + << get_exe_duration(start_clock) << " seconds\n"; return status; } @@ -2061,15 +2099,17 @@ static void get_grid_mapping_latlon( DataPlane from_dp, DataPlane to_dp, Grid to_grid, IntArray *cellMapping, float *latitudes, float *longitudes, int from_lat_count, int from_lon_count, bool *skip_times, bool to_north) { - double x, y; - double to_ll_lat, to_ll_lon; + double x; + double y; + double to_ll_lat; + double to_ll_lon; int count_in_grid = 0; clock_t start_clock = clock(); int to_lat_count = to_grid.ny(); int to_lon_count = to_grid.nx(); int to_size = to_lat_count * to_lon_count; int data_size = from_lat_count * from_lon_count; - static const char *method_name = "get_grid_mapping(lats, lons) -> "; + static const char *method_name = "get_grid_mapping_latlon(lats, lons) -> "; auto to_cell_counts = new int[to_size]; auto mapping_indices = new int[data_size]; @@ -2088,7 +2128,7 @@ static void get_grid_mapping_latlon( float lat = latitudes[coord_offset]; float lon = longitudes[coord_offset]; if( lat < MISSING_LATLON || lon < MISSING_LATLON ) continue; - to_grid.latlon_to_xy(lat, -1.0*lon, x, y); + to_grid.latlon_to_xy(lat, -1.0*rescale_lon(lon), x, y); int idx_x = nint(x); int idx_y = nint(y); if (0 <= idx_x && idx_x < to_lon_count && 0 <= idx_y && idx_y < to_lat_count) { @@ -2097,16 +2137,17 @@ static void get_grid_mapping_latlon( to_cell_counts[to_offset] += 1; count_in_grid++; if(mlog.verbosity_level() >= 15) { - double to_lat, to_lon; + double to_lat; + double to_lon; to_grid.xy_to_latlon(idx_x, idx_y, to_lat, to_lon); - mlog << Debug(15) << method_name << " [" << xIdx << "," << yIdx << "] to " << coord_offset - << " (" << lon << ", " << lat << ") to (" << (to_lon*-1) << ", " << to_lat << ")\n"; + mlog << Debug(15) << method_name << " index: [" << xIdx << "," << yIdx << "] to " << coord_offset + << " (" << lon << ", " << lat << ") to (" << rescale_lon(-1*to_lon) << ", " << to_lat << ")\n"; } } } } mlog << Debug(LEVEL_FOR_PERFORMANCE+2) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds for mapping cells\n"; + << get_exe_duration(start_clock) << " seconds for mapping cells\n"; // Count the mapping cells for each to_cell and prepare IntArray int max_count = 0; @@ -2129,7 +2170,7 @@ static void get_grid_mapping_latlon( } } mlog << Debug(LEVEL_FOR_PERFORMANCE+1) << method_name << "took " - << (clock()-tmp_clock)/double(CLOCKS_PER_SEC) + << get_exe_duration(tmp_clock) << " seconds for extending IntArray (max_cells=" << max_count << ")\n"; // Build cell mapping @@ -2150,7 +2191,7 @@ static void get_grid_mapping_latlon( mlog << Debug(3) << method_name << "within grid: " << count_in_grid << " out of " << data_size << " (" << 1.0*count_in_grid/data_size*100 << "%)\n"; mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + << get_exe_duration(start_clock) << " seconds\n"; } //////////////////////////////////////////////////////////////////////// @@ -2158,7 +2199,8 @@ static void get_grid_mapping_latlon( static bool get_grid_mapping(const Grid &fr_grid, const Grid &to_grid, IntArray *cellMapping, NcVar var_lat, NcVar var_lon, bool *skip_times) { bool status = false; - DataPlane from_dp, to_dp; + DataPlane from_dp; + DataPlane to_dp; ConcatString cur_coord_name; clock_t start_clock = clock(); static const char *method_name = "get_grid_mapping(var_lat, var_lon) -> "; @@ -2167,7 +2209,14 @@ static bool get_grid_mapping(const Grid &fr_grid, const Grid &to_grid, IntArray int to_lon_count = to_grid.nx(); int from_lat_count = fr_grid.ny(); int from_lon_count = fr_grid.nx(); - + if (0 == from_lat_count) { + int dim_offset = get_dim_count(&var_lat) - 1; + if (dim_offset < 0) dim_offset = 0; + from_lat_count = get_dim_size(&var_lat, dim_offset); + dim_offset = get_dim_count(&var_lon) - 2; + if (dim_offset < 0) dim_offset = 0; + from_lon_count = get_dim_size(&var_lon, dim_offset); + } // Override the from nx & ny from NetCDF if exists int data_size = from_lat_count * from_lon_count; mlog << Debug(4) << method_name << "data_size (ny*nx): " << data_size @@ -2212,7 +2261,7 @@ static bool get_grid_mapping(const Grid &fr_grid, const Grid &to_grid, IntArray if( longitudes ) delete [] longitudes; } // if data_size > 0 mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + << get_exe_duration(start_clock) << " seconds\n"; return status; } @@ -2272,7 +2321,8 @@ static ConcatString get_goes_grid_input(MetConfig config, const Grid fr_grid) { static void get_grid_mapping(const Grid &fr_grid, const Grid &to_grid, IntArray *cellMapping, const ConcatString &geostationary_file) { static const char *method_name = "get_grid_mapping() -> "; - DataPlane from_dp, to_dp; + DataPlane from_dp; + DataPlane to_dp; ConcatString cur_coord_name; clock_t start_clock = clock(); @@ -2431,7 +2481,7 @@ static void get_grid_mapping(const Grid &fr_grid, const Grid &to_grid, IntArray if(coord_nc_in) delete coord_nc_in; mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + << get_exe_duration(start_clock) << " seconds\n"; } //////////////////////////////////////////////////////////////////////// @@ -2831,7 +2881,7 @@ static void regrid_goes_variable(NcFile *nc_in, const VarInfo *vinfo, } mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + << get_exe_duration(start_clock) << " seconds\n"; } //////////////////////////////////////////////////////////////////////// @@ -2900,7 +2950,7 @@ static void save_geostationary_data(const ConcatString geostationary_file, delete nc_file; nc_file = nullptr; mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took " - << (clock()-start_clock)/double(CLOCKS_PER_SEC) << " seconds\n"; + << get_exe_duration(start_clock) << " seconds\n"; } //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/regrid_data_plane/Makefile.in b/src/tools/other/regrid_data_plane/Makefile.in index 61c475b1ae..75f0f17630 100644 --- a/src/tools/other/regrid_data_plane/Makefile.in +++ b/src/tools/other/regrid_data_plane/Makefile.in @@ -225,6 +225,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/shift_data_plane/Makefile.in b/src/tools/other/shift_data_plane/Makefile.in index 4eb7b7f50b..aa38481fea 100644 --- a/src/tools/other/shift_data_plane/Makefile.in +++ b/src/tools/other/shift_data_plane/Makefile.in @@ -225,6 +225,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/other/wwmca_tool/Makefile.in b/src/tools/other/wwmca_tool/Makefile.in index 972b3f9255..e3be6b2af6 100644 --- a/src/tools/other/wwmca_tool/Makefile.in +++ b/src/tools/other/wwmca_tool/Makefile.in @@ -285,6 +285,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/tc_utils/Makefile.in b/src/tools/tc_utils/Makefile.in index 7c74bba2fa..858a6de0b8 100644 --- a/src/tools/tc_utils/Makefile.in +++ b/src/tools/tc_utils/Makefile.in @@ -232,6 +232,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/tc_utils/rmw_analysis/Makefile.in b/src/tools/tc_utils/rmw_analysis/Makefile.in index 9a89e51057..6d37dbd043 100644 --- a/src/tools/tc_utils/rmw_analysis/Makefile.in +++ b/src/tools/tc_utils/rmw_analysis/Makefile.in @@ -225,6 +225,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/tc_utils/tc_diag/Makefile.in b/src/tools/tc_utils/tc_diag/Makefile.in index b884c28f85..66b5eb365d 100644 --- a/src/tools/tc_utils/tc_diag/Makefile.in +++ b/src/tools/tc_utils/tc_diag/Makefile.in @@ -227,6 +227,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/tc_utils/tc_dland/Makefile.in b/src/tools/tc_utils/tc_dland/Makefile.in index 66bc377e52..b31ca8a29e 100644 --- a/src/tools/tc_utils/tc_dland/Makefile.in +++ b/src/tools/tc_utils/tc_dland/Makefile.in @@ -235,6 +235,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/tc_utils/tc_gen/Makefile.in b/src/tools/tc_utils/tc_gen/Makefile.in index 97b0b5994f..98881f5a22 100644 --- a/src/tools/tc_utils/tc_gen/Makefile.in +++ b/src/tools/tc_utils/tc_gen/Makefile.in @@ -225,6 +225,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/tc_utils/tc_pairs/Makefile.in b/src/tools/tc_utils/tc_pairs/Makefile.in index 736cb2afe3..f56d6bbcbd 100644 --- a/src/tools/tc_utils/tc_pairs/Makefile.in +++ b/src/tools/tc_utils/tc_pairs/Makefile.in @@ -249,6 +249,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/tc_utils/tc_rmw/Makefile.in b/src/tools/tc_utils/tc_rmw/Makefile.in index 0c5220595a..05430c1fa0 100644 --- a/src/tools/tc_utils/tc_rmw/Makefile.in +++ b/src/tools/tc_utils/tc_rmw/Makefile.in @@ -227,6 +227,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@ diff --git a/src/tools/tc_utils/tc_stat/Makefile.in b/src/tools/tc_utils/tc_stat/Makefile.in index 24bba4f72e..d6926559a0 100644 --- a/src/tools/tc_utils/tc_stat/Makefile.in +++ b/src/tools/tc_utils/tc_stat/Makefile.in @@ -227,6 +227,7 @@ MET_BUFRLIB = @MET_BUFRLIB@ MET_CAIRO = @MET_CAIRO@ MET_CAIROINC = @MET_CAIROINC@ MET_CAIROLIB = @MET_CAIROLIB@ +MET_CXX_STANDARD = @MET_CXX_STANDARD@ MET_ECKIT = @MET_ECKIT@ MET_ECKITINC = @MET_ECKITINC@ MET_ECKITLIB = @MET_ECKITLIB@