diff --git a/configure b/configure index badae61b4a..888d197d7d 100755 --- a/configure +++ b/configure @@ -5382,7 +5382,7 @@ if (test -n "$MET_ATLASLIB"); then fi # -# Look for the Eckit library. +# Look for the ecKit library. # # Configure the variables. The help text will appear if the user uses "configure --help". @@ -5412,6 +5412,7 @@ if (test -n "$MET_ECKITLIB"); then CPPFLAGS="${CPPFLAGS} -I${MET_ECKITINC}" LDFLAGS="${LDFLAGS} -L${MET_ECKITLIB}" fi + # # Look for the NetCDF library. # @@ -10136,7 +10137,8 @@ ac_config_files="$ac_config_files Makefile scripts/Rscripts/Makefile scripts/Rsc if test -n "$MET_DEVELOPMENT"; then - ac_config_files="$ac_config_files src/tools/dev_utils/Makefile src/tools/dev_utils/shapefiles/Makefile internal/test_util/Makefile internal/test_util/basic/Makefile internal/test_util/basic/vx_config/Makefile internal/test_util/basic/vx_log/Makefile internal/test_util/basic/vx_util/Makefile internal/test_util/libcode/Makefile internal/test_util/libcode/vx_data2d/Makefile internal/test_util/libcode/vx_data2d_factory/Makefile internal/test_util/libcode/vx_data2d_grib/Makefile internal/test_util/libcode/vx_data2d_nc_met/Makefile internal/test_util/libcode/vx_data2d_nc_cf/Makefile internal/test_util/libcode/vx_geodesy/Makefile internal/test_util/libcode/vx_grid/Makefile internal/test_util/libcode/vx_plot_util/Makefile internal/test_util/libcode/vx_ps/Makefile internal/test_util/libcode/vx_tc_util/Makefile internal/test_util/libcode/vx_nc_util/Makefile internal/test_util/libcode/vx_physics/Makefile internal/test_util/libcode/vx_series_data/Makefile internal/test_util/libcode/vx_solar/Makefile internal/test_util/tools/Makefile internal/test_util/tools/other/Makefile internal/test_util/tools/other/mode_time_domain/Makefile" + ac_config_files="$ac_config_files src/tools/dev_utils/Makefile src/tools/dev_utils/shapefiles/Makefile internal/test_util/Makefile internal/test_util/basic/Makefile internal/test_util/basic/vx_config/Makefile internal/test_util/basic/vx_log/Makefile internal/test_util/basic/vx_util/Makefile internal/test_util/libcode/Makefile internal/test_util/libcode/vx_data2d/Makefile internal/test_util/libcode/vx_data2d_factory/Makefile internal/test_util/libcode/vx_data2d_grib/Makefile internal/test_util/libcode/vx_data2d_nc_met/Makefile internal/test_util/libcode/vx_data2d_nc_cf/Makefile internal/test_util/libcode/vx_geodesy/Makefile internal/test_util/libcode/vx_grid/Makefile internal/test_util/libcode/vx_plot_util/Makefile internal/test_util/libcode/vx_ps/Makefile internal/test_util/libcode/vx_tc_util/Makefile internal/test_util/libcode/vx_nc_util/Makefile internal/test_util/libcode/vx_python3_utils/Makefile internal/test_util/libcode/vx_physics/Makefile internal/test_util/libcode/vx_series_data/Makefile internal/test_util/libcode/vx_solar/Makefile internal/test_util/tools/Makefile internal/test_util/tools/other/Makefile internal/test_util/tools/other/mode_time_domain/Makefile" + fi @@ -11153,6 +11155,7 @@ do "internal/test_util/libcode/vx_ps/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_ps/Makefile" ;; "internal/test_util/libcode/vx_tc_util/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_tc_util/Makefile" ;; "internal/test_util/libcode/vx_nc_util/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_nc_util/Makefile" ;; + "internal/test_util/libcode/vx_python3_utils/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_python3_utils/Makefile" ;; "internal/test_util/libcode/vx_physics/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_physics/Makefile" ;; "internal/test_util/libcode/vx_series_data/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_series_data/Makefile" ;; "internal/test_util/libcode/vx_solar/Makefile") CONFIG_FILES="$CONFIG_FILES internal/test_util/libcode/vx_solar/Makefile" ;; diff --git a/configure.ac b/configure.ac index 8445afb529..2f8159d58c 100644 --- a/configure.ac +++ b/configure.ac @@ -80,7 +80,7 @@ if (test -n "$MET_ATLASLIB"); then fi # -# Look for the Eckit library. +# Look for the ecKit library. # # Configure the variables. The help text will appear if the user uses "configure --help". @@ -110,6 +110,7 @@ if (test -n "$MET_ECKITLIB"); then CPPFLAGS="${CPPFLAGS} -I${MET_ECKITINC}" LDFLAGS="${LDFLAGS} -L${MET_ECKITLIB}" fi + # # Look for the NetCDF library. # @@ -1411,6 +1412,7 @@ if test -n "$MET_DEVELOPMENT"; then internal/test_util/libcode/vx_ps/Makefile internal/test_util/libcode/vx_tc_util/Makefile internal/test_util/libcode/vx_nc_util/Makefile + internal/test_util/libcode/vx_python3_utils/Makefile internal/test_util/libcode/vx_physics/Makefile internal/test_util/libcode/vx_series_data/Makefile internal/test_util/libcode/vx_solar/Makefile diff --git a/docs/Users_Guide/config_options.rst b/docs/Users_Guide/config_options.rst index 69e5998cc3..f2dc2803ba 100644 --- a/docs/Users_Guide/config_options.rst +++ b/docs/Users_Guide/config_options.rst @@ -1085,7 +1085,19 @@ File-format specific settings for the "field" entry: * The "GRIB2_perc_val" is an integer specifying the requested percentile value (0 to 100) to be used. This applies only to GRIB2 product definition templates 4.6 and 4.10. - + + * The "GRIB2_aerosol_type" is an integer specifying the aerosol type + (Table 4.233). This applies only to GRIB2 product defintion templates + 4.46 and 4.48. + + * The "GRIB2_aerosol_interval_type" is an integer specifying the aerosol + size interval (Table 4.91). This applies only to GRIB2 product defintion + templates 4.46 and 4.48. + + * The "GRIB2_aerosol_size_lower" and "GRIB2_aerosol_size_upper" are doubles + specifying the endpoints of the aerosol size interval. These applies only + to GRIB2 product defintion templates 4.46 and 4.48. + * The "GRIB2_ipdtmpl_index" and "GRIB2_ipdtmpl_val" entries are arrays of integers which specify the product description template values to be used. The indices are 0-based. For example, use the following to diff --git a/docs/Users_Guide/reformat_point.rst b/docs/Users_Guide/reformat_point.rst index d21586ebed..31d752a6f3 100644 --- a/docs/Users_Guide/reformat_point.rst +++ b/docs/Users_Guide/reformat_point.rst @@ -456,6 +456,8 @@ While initial versions of the ASCII2NC tool only supported a simple 11 column AS • `National Data Buoy (NDBC) Standard Meteorlogical Data format `_. See the :ref:`MET_NDBC_STATIONS` environment variable. +• `International Soil Moisture Network (ISMN) Data format `_. + • `AErosol RObotic NEtwork (AERONET) versions 2 and 3 format `_ • Python embedding of point observations, as described in :numref:`pyembed-point-obs-data`. See example below in :numref:`ascii2nc-pyembed`. @@ -539,7 +541,7 @@ Required Arguments for ascii2nc Optional Arguments for ascii2nc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3. The **-format ASCII_format** option may be set to "met_point", "little_r", "surfrad", "wwsis", "airnowhourlyaqobs", "airnowhourly", "airnowdaily_v2", "ndbc_standard", "aeronet", "aeronetv2", "aeronetv3", or "python". If passing in ISIS data, use the "surfrad" format flag. +3. The **-format ASCII_format** option may be set to "met_point", "little_r", "surfrad", "wwsis", "airnowhourlyaqobs", "airnowhourly", "airnowdaily_v2", "ndbc_standard", "ismn", "aeronet", "aeronetv2", "aeronetv3", or "python". If passing in ISIS data, use the "surfrad" format flag. 4. The **-config file** option is the configuration file for generating time summaries. diff --git a/internal/scripts/installation/compile_MET_all.sh b/internal/scripts/installation/compile_MET_all.sh index f06b6c5c6c..3d994ac6c9 100755 --- a/internal/scripts/installation/compile_MET_all.sh +++ b/internal/scripts/installation/compile_MET_all.sh @@ -50,8 +50,8 @@ # Please supply values for the following environment variables # in the input environment configuration file (install_met_env.: # MET_GRIB2CLIB, MET_GRIB2CINC, GRIB2CLIB_NAME, MET_BUFRLIB, BUFRLIB_NAME, -# MET_HDF5, MET_NETCDF, MET_PROJ, MET_GSL, LIB_JASPER, LIB_PNG, LIB_Z, -# SQLITE_INCLUDE_DIR, SQLITE_LIB_DIR. +# MET_HDF5, MET_NETCDF, MET_PROJ, MET_GSL, LIB_JASPER, LIB_LIBPNG, LIB_Z, +# SQLITE_INCLUDE_DIR, SQLITE_LIB_DIR, TIFF_INCLUDE_DIR, TIFF_LIB_DIR. # # The optional libraries ecKit and atlas offer support for unstructured # grids. The optional libraries HDF4, HDFEOS, FREETYPE, and CAIRO are @@ -157,6 +157,13 @@ if [[ -z "$LIB_Z" ]]; then LIB_Z=${LIB_DIR}/lib fi +# if TIFF is not defined in the environment file, enable its compilation +if [[ -z ${TIFF_INCLUDE_DIR} ]] && [[ -z ${TIFF_LIB_DIR} ]]; then + COMPILE_TIFF=1 +else + COMPILE_TIFF=0 +fi + # if SQLITE is not defined in the environment file, enable its compilation if [[ -z ${SQLITE_INCLUDE_DIR} ]] && [[ -z ${SQLITE_LIB_DIR} ]]; then COMPILE_SQLITE=1 @@ -177,29 +184,13 @@ else COMPILE_G2CLIB=0 fi -if [ -z ${MET_BUFRLIB} ]; then - COMPILE_BUFRLIB=1 -else - COMPILE_BUFRLIB=0 -fi +if [ -z ${MET_BUFRLIB} ]; then COMPILE_BUFRLIB=1; else COMPILE_BUFRLIB=0; fi -if [ -z ${MET_NETCDF} ]; then - COMPILE_NETCDF=1 -else - COMPILE_NETCDF=0 -fi +if [ -z ${MET_NETCDF} ]; then COMPILE_NETCDF=1; else COMPILE_NETCDF=0; fi -if [ -z ${MET_PROJ} ]; then - COMPILE_PROJ=1 -else - COMPILE_PROJ=0 -fi +if [ -z ${MET_PROJ} ]; then COMPILE_PROJ=1; else COMPILE_PROJ=0; fi -if [ -z ${MET_GSL} ]; then - COMPILE_GSL=1 -else - COMPILE_GSL=0 -fi +if [ -z ${MET_GSL} ]; then COMPILE_GSL=1; else COMPILE_GSL=0; fi # Only set COMPILE_ECKIT and COMPILE_ATLAS if you want to compile and enable support for unstructued grids if [ ! -z "${COMPILE_ECKIT}" ]; then COMPILE_ECKIT=1; else COMPILE_ECKIT=0; fi @@ -388,12 +379,6 @@ else exit fi -#export CC -#export CXX -#export FC -#export F77 -#export F90 - echo "export CC=${CC}" echo "export CXX=${CXX}" echo "export FC=${FC}" @@ -411,12 +396,19 @@ case "${unameOut}" in *) machine="UNKNOWN:${unameOut}" esac +# change sed command and extension for dynamic library files if [[ $machine == "Mac" ]]; then sed_inline="sed -i ''" else sed_inline="sed -i''" fi +if [[ "$(uname -m)" == "arm64" ]]; then + dynamic_lib_ext="dylib" +else + dynamic_lib_ext="so" +fi + # Load Python module if [ ${USE_MODULES} = "TRUE" ]; then @@ -442,6 +434,22 @@ fi # Compile Proj if [ $COMPILE_PROJ -eq 1 ]; then + + if [ $COMPILE_TIFF -eq 1 ]; then + echo + echo "Compiling TIFF at `date`" + mkdir -p ${LIB_DIR}/tiff + rm -rf ${LIB_DIR}/tiff/tiff* + tar -xzf ${TAR_DIR}/tiff*.tar.gz -C ${LIB_DIR}/tiff + cd ${LIB_DIR}/tiff/tiff* + echo "cd `pwd`" + run_cmd "./configure --prefix=${LIB_DIR} > $(pwd)/tiff.configure.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/tiff.make.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/tiff.make_install.log 2>&1" + export TIFF_INCLUDE_DIR=${LIB_DIR}/include + export TIFF_LIB_DIR=${LIB_DIR}/lib + fi + if [ $COMPILE_SQLITE -eq 1 ]; then echo echo "Compiling SQLITE at `date`" @@ -450,17 +458,18 @@ if [ $COMPILE_PROJ -eq 1 ]; then tar -xf ${TAR_DIR}/sqlite*.tar.gz -C ${LIB_DIR}/sqlite > /dev/null 2>&1 cd ${LIB_DIR}/sqlite/sqlite* echo "cd `pwd`" - run_cmd "./configure --enable-shared --prefix=${LIB_DIR} > sqlite.configure.log 2>&1" - run_cmd "make ${MAKE_ARGS} > sqlite.make.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > sqlite.make_install.log 2>&1" + run_cmd "./configure --enable-shared --prefix=${LIB_DIR} > $(pwd)/sqlite.configure.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/sqlite.make.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/sqlite.make_install.log 2>&1" export SQLITE_INCLUDE_DIR=${LIB_DIR}/include export SQLITE_LIB_DIR=${LIB_DIR}/lib fi - vrs="7.1.0"; + vrs="7.1.0" echo echo "Compiling PROJ_${vrs} at `date`" + echo "cmake version `cmake --version`" mkdir -p ${LIB_DIR}/proj rm -rf ${LIB_DIR}/proj/proj* tar -xf ${TAR_DIR}/proj-${vrs}.tar.gz -C ${LIB_DIR}/proj @@ -468,13 +477,20 @@ if [ $COMPILE_PROJ -eq 1 ]; then echo "cd `pwd`" export PATH=${LIB_DIR}/bin:${PATH} run_cmd "mkdir build; cd build" - if [[ -z "$LIB_TIFF" ]]; then - run_cmd "cmake -DCMAKE_INSTALL_PREFIX=${LIB_DIR} -DSQLITE3_INCLUDE_DIR=${SQLITE_INCLUDE_DIR} -DSQLITE3_LIBRARY=${SQLITE_LIB_DIR}/libsqlite3.so .." - else - run_cmd "cmake -DCMAKE_INSTALL_PREFIX=${LIB_DIR} -DSQLITE3_INCLUDE_DIR=${SQLITE_INCLUDE_DIR} -DSQLITE3_LIBRARY=${SQLITE_LIB_DIR}/libsqlite3.so -DTIFF_LIBRARY_RELEASE=${LIB_TIFF} .." + + tiff_arg="" + # add tiff library and include arguments if necessary + if [[ ! -z "$TIFF_LIB_DIR" ]]; then + tiff_arg+="-DTIFF_LIBRARY_RELEASE=${TIFF_LIB_DIR}/libtiff.${dynamic_lib_ext}" + fi + if [[ ! -z "$TIFF_INCLUDE_DIR" ]]; then + tiff_arg+=" -DTIFF_INCLUDE_DIR=${TIFF_INCLUDE_DIR}" fi - run_cmd "cmake --build ." - run_cmd "cmake --build . --target install" + + cmd="cmake -DCMAKE_INSTALL_PREFIX=${LIB_DIR} -DSQLITE3_INCLUDE_DIR=${SQLITE_INCLUDE_DIR} -DSQLITE3_LIBRARY=${SQLITE_LIB_DIR}/libsqlite3.${dynamic_lib_ext} ${tiff_arg} .. > $(pwd)/proj.cmake.log 2>&1" + run_cmd ${cmd} + run_cmd "cmake --build . > $(pwd)/proj.cmake_build.log 2>&1" + run_cmd "cmake --build . --target install > $(pwd)/proj.cmake_install.log 2>&1" fi @@ -482,9 +498,9 @@ fi if [ $COMPILE_GSL -eq 1 ]; then if [ ${COMPILER_FAMILY} = "pgi" ]; then - vrs="1.11"; + vrs="1.11" else - vrs="2.7.1"; + vrs="2.7.1" fi echo @@ -494,15 +510,15 @@ if [ $COMPILE_GSL -eq 1 ]; then tar -xf ${TAR_DIR}/gsl-${vrs}.tar.gz -C ${LIB_DIR}/gsl cd ${LIB_DIR}/gsl/gsl* echo "cd `pwd`" - run_cmd "./configure --prefix=${LIB_DIR} > gsl.configure.log 2>&1" - run_cmd "make ${MAKE_ARGS} > gsl.make.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > gsl.make_install.log 2>&1" + run_cmd "./configure --prefix=${LIB_DIR} > $(pwd)/gsl.configure.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/gsl.make.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/gsl.make_install.log 2>&1" fi # Compile BUFRLIB if [ $COMPILE_BUFRLIB -eq 1 ]; then - vrs="v11.6.0"; + vrs="v11.6.0" echo echo "Compiling bufr_${vrs} at `date`" @@ -514,11 +530,11 @@ if [ $COMPILE_BUFRLIB -eq 1 ]; then echo "cd `pwd`" run_cmd "mkdir build" export BUILD_DIR=${SOURCE_DIR}/build - run_cmd "cmake -H${SOURCE_DIR} -B${BUILD_DIR} -DCMAKE_INSTALL_PREFIX=${LIB_DIR} -DCMAKE_BUILD_TYPE=Debug" + run_cmd "cmake -H${SOURCE_DIR} -B${BUILD_DIR} -DCMAKE_INSTALL_PREFIX=${LIB_DIR} -DCMAKE_BUILD_TYPE=Debug > $(pwd)/bufr.cmake.log 2>&1" run_cmd "cd ${BUILD_DIR}" - run_cmd "make ${MAKE_ARGS} > bufr.make.log 2>&1" - run_cmd "ctest > bufr.ctest.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > bufr.make_install.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/bufr.make.log 2>&1" + run_cmd "ctest > $(pwd)/bufr.ctest.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/bufr.make_install.log 2>&1" fi @@ -531,14 +547,13 @@ if [ $COMPILE_ZLIB -eq 1 ]; then tar -xzf ${TAR_DIR}/zlib*.tar.gz -C ${LIB_DIR}/zlib cd ${LIB_DIR}/zlib/zlib* echo "cd `pwd`" - run_cmd "./configure --prefix=${LIB_DIR} > zlib.configure.log 2>&1" - run_cmd "make ${MAKE_ARGS} > zlib.make.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > zlib.make_install.log 2>&1" + run_cmd "./configure --prefix=${LIB_DIR} > $(pwd)/zlib.configure.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/zlib.make.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/zlib.make_install.log 2>&1" # GPM: why is this removed? Could we add a comment to # describe why this is needed? - echo "rm ${LIB_DIR}/lib/zlib.a" - rm ${LIB_DIR}/lib/libz.a + run_cmd "rm ${LIB_DIR}/lib/libz.a" fi # Compile LIBPNG @@ -550,15 +565,15 @@ if [[ $COMPILE_LIBPNG -eq 1 && $HOST != ys* ]]; then tar -xzf ${TAR_DIR}/libpng*.tar.gz -C ${LIB_DIR}/libpng cd ${LIB_DIR}/libpng/libpng* echo "cd `pwd`" - run_cmd "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include > libpng.configure.log 2>&1" - run_cmd "make ${MAKE_ARGS} > libpng.make.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > libpng.make_install.log 2>&1" + run_cmd "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include > $(pwd)/libpng.configure.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/libpng.make.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/libpng.make_install.log 2>&1" fi # Compile JASPER if [ $COMPILE_JASPER -eq 1 ]; then - vrs="2.0.25"; + vrs="2.0.25" echo echo "Compiling JASPER at `date`" @@ -570,17 +585,19 @@ if [ $COMPILE_JASPER -eq 1 ]; then export SOURCE_DIR=${LIB_DIR}/jasper/jasper-version-${vrs} echo "cd `pwd`" export BUILD_DIR=${LIB_DIR}/jasper/jasper-version-${vrs}/build - run_cmd "cmake -G \"Unix Makefiles\" -H${SOURCE_DIR} -B${BUILD_DIR} -DCMAKE_INSTALL_PREFIX=${LIB_DIR}" + run_cmd "cmake -G \"Unix Makefiles\" -H${SOURCE_DIR} -B${BUILD_DIR} -DCMAKE_INSTALL_PREFIX=${LIB_DIR} -DJAS_ENABLE_DOC=false > $(pwd)/jasper.cmake.log 2>&1" run_cmd "cd ${BUILD_DIR}" - run_cmd "make clean all" - run_cmd "make ${MAKE_ARGS} test > jasper.make_test.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > jasper.make_install.log 2>&1" + run_cmd "make clean all > $(pwd)/jasper.make.log 2>&1" + # Commented out due to “which: no opj2_compress in …” error, which causes one of four tests to fail + # This is a known problem, so skipping tests for now: https://github.com/AAROC/CODE-RADE/issues/36#issuecomment-359744351 + #run_cmd "make ${MAKE_ARGS} test > $(pwd)/jasper.make_test.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/jasper.make_install.log 2>&1" fi # Compile G2CLIB if [ $COMPILE_G2CLIB -eq 1 ]; then - vrs="1.6.4"; + vrs="1.6.4" echo echo "Compiling G2CLIB at `date`" @@ -590,10 +607,10 @@ if [ $COMPILE_G2CLIB -eq 1 ]; then cd ${LIB_DIR}/g2clib/NCEP* echo "cd `pwd`" run_cmd "mkdir build; cd build" - run_cmd "cmake -DCMAKE_INSTALL_PREFIX=${LIB_DIR} -DCMAKE_PREFIX_PATH=${LIB_DIR} .." - run_cmd "make ${MAKE_ARGS} > g2c.make.log 2>&1" - run_cmd "make ${MAKE_ARGS} test > g2c.make_test.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > g2c.make_install.log 2>&1" + run_cmd "cmake -DCMAKE_INSTALL_PREFIX=${LIB_DIR} -DCMAKE_PREFIX_PATH=${LIB_DIR} .. > $(pwd)/g2c.cmake.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/g2c.make.log 2>&1" + run_cmd "make ${MAKE_ARGS} test > $(pwd)/g2c.make_test.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/g2c.make_install.log 2>&1" fi # Compile ECKIT @@ -601,7 +618,7 @@ if [ $COMPILE_ECKIT -eq 1 ]; then # Need to obtain ecbuild before installing eckit - vrs="3.5.0"; + vrs="3.5.0" echo echo "Compiling ECBUILD at `date`" @@ -611,10 +628,10 @@ if [ $COMPILE_ECKIT -eq 1 ]; then cd ${LIB_DIR}/ecbuild/ecbuild* echo "cd `pwd`" run_cmd "mkdir build; cd build" - run_cmd "cmake ../ -DCMAKE_INSTALL_PREFIX=${LIB_DIR}" - run_cmd "make ${MAKE_ARGS} install > ecbuild.make_install.log 2>&1" + 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"; + vrs="1.20.2" echo echo "Compiling ECKIT at `date`" @@ -624,15 +641,15 @@ if [ $COMPILE_ECKIT -eq 1 ]; then cd ${LIB_DIR}/eckit/eckit* echo "cd `pwd`" run_cmd "mkdir build; cd build" - run_cmd "cmake ../ -DCMAKE_INSTALL_PREFIX=${LIB_DIR} -DCMAKE_PREFIX_PATH=${LIB_DIR}" - run_cmd "make ${MAKE_ARGS} install > eckit.make_install.log 2>&1" + run_cmd "cmake ../ -DCMAKE_INSTALL_PREFIX=${LIB_DIR} -DCMAKE_PREFIX_PATH=${LIB_DIR} > $(pwd)/eckit.cmake.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/eckit.make_install.log 2>&1" fi # Compile ATLAS if [ $COMPILE_ATLAS -eq 1 ]; then - vrs="0.30.0"; + vrs="0.30.0" echo echo "Compiling ATLAS at `date`" @@ -642,9 +659,9 @@ if [ $COMPILE_ATLAS -eq 1 ]; then cd ${LIB_DIR}/atlas/atlas* echo "cd `pwd`" run_cmd "mkdir build; cd build" - run_cmd "cmake ../ -DCMAKE_INSTALL_PREFIX=${LIB_DIR} -DCMAKE_PREFIX_PATH=${LIB_DIR}" - run_cmd "make ${MAKE_ARGS} > atlas.make.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > atlas.make_install.log 2>&1" + run_cmd "cmake ../ -DCMAKE_INSTALL_PREFIX=${LIB_DIR} -DCMAKE_PREFIX_PATH=${LIB_DIR} > $(pwd)/atlas.cmake.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/atlas.make.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/atlas.make_install.log 2>&1" fi @@ -661,7 +678,7 @@ if [ $COMPILE_HDF -eq 1 ]; then tar -xf ${TAR_DIR}/HDF4.2*.tar.gz -C ${LIB_DIR}/hdf cd ${LIB_DIR}/hdf/HDF* echo "cd `pwd`" - run_cmd "./configure --prefix=${LIB_DIR} --disable-netcdf --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} CPPFLAGS=-I/usr/include/tirpc LIBS='-lm -ltirpc' > hdf4.configure.log 2>&1" + run_cmd "./configure --prefix=${LIB_DIR} --disable-netcdf --with-jpeg=${LIB_DIR} --with-zlib=${LIB_DIR} CPPFLAGS=-I/usr/include/tirpc LIBS='-lm -ltirpc' > $(pwd)/hdf4.configure.log 2>&1" if [[ ${COMPILER_MAJOR_VERSION} -ge 10 ]]; then cat hdf/src/Makefile | \ sed 's/FFLAGS = -O2/FFLAGS = -w -fallow-argument-mismatch -O2/g' \ @@ -672,8 +689,8 @@ if [ $COMPILE_HDF -eq 1 ]; then > Makefile_new fi mv Makefile_new hdf/src/Makefile - run_cmd "make ${MAKE_ARGS} > hdf4.make.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > hdf4.make_install.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/hdf4.make.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/hdf4.make_install.log 2>&1" fi # Compile HDFEOS @@ -686,9 +703,9 @@ if [ $COMPILE_HDFEOS -eq 1 ]; then tar -xzf ${TAR_DIR}/HDF-EOS*.tar.* -C ${LIB_DIR}/hdfeos cd ${LIB_DIR}/hdfeos/hdfeos echo "cd `pwd`" - run_cmd "./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR} --with-jpeg=${LIB_DIR} > hdf-eos.configure.log 2>&1" - run_cmd "make ${MAKE_ARGS} > hed-eos.make.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > hsf-eos.make_install.log 2>&1" + run_cmd "./configure --prefix=${LIB_DIR} --with-hdf4=${LIB_DIR} --with-jpeg=${LIB_DIR} > $(pwd)/hdf-eos.configure.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/hed-eos.make.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/hsf-eos.make_install.log 2>&1" cp include/*.h ${LIB_DIR}/include/ fi @@ -703,8 +720,8 @@ if [ $COMPILE_NETCDF -eq 1 ]; then tar -xzf ${TAR_DIR}/hdf5*.tar.gz -C ${LIB_DIR}/hdf5 cd ${LIB_DIR}/hdf5/hdf5* echo "cd `pwd`" - run_cmd "./configure --prefix=${LIB_DIR} --with-zlib=${LIB_Z} CFLAGS=-fPIC CXXFLAGS=-fPIC FFLAGS=-fPIC LDFLAGS=-L${LIB_DIR}/lib:${LIB_Z} CPPFLAGS=-I${LIB_DIR}/include > hdf5.configure.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > hdf5.make_install.log 2>&1" + run_cmd "./configure --prefix=${LIB_DIR} --with-zlib=${LIB_Z} CFLAGS=-fPIC CXXFLAGS=-fPIC FFLAGS=-fPIC LDFLAGS=-L${LIB_DIR}/lib:${LIB_Z} CPPFLAGS=-I${LIB_DIR}/include > $(pwd)/hdf5.configure.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/hdf5.make_install.log 2>&1" echo echo "Compiling NetCDF-C at `date`" @@ -715,8 +732,8 @@ if [ $COMPILE_NETCDF -eq 1 ]; then export FC='' export F90='' echo "cd `pwd`" - run_cmd "./configure --prefix=${LIB_DIR} CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include > netcdf-c.configure.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > netcdf-c.make_install.log 2>&1" + run_cmd "./configure --prefix=${LIB_DIR} CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include > $(pwd)/netcdf-c.configure.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/netcdf-c.make_install.log 2>&1" echo echo "Compiling NetCDF-CXX at `date`" @@ -727,9 +744,8 @@ if [ $COMPILE_NETCDF -eq 1 ]; then if [[ $machine == "Mac" ]]; then configure_lib_args="-lnetcdf -lhdf5_hl -lhdf5 -lz" fi - run_cmd "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include LIBS=\"${LIBS} ${configure_lib_args}\" > netcdf-cxx.configure.log 2>&1" - - run_cmd "make ${MAKE_ARGS} install > netcdf-cxx.make_install.log 2>&1" + run_cmd "./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include LIBS=\"${LIBS} ${configure_lib_args}\" > $(pwd)/netcdf-cxx.configure.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/netcdf-cxx.make_install.log 2>&1" fi # Compile FREETYPE @@ -741,9 +757,9 @@ if [ $COMPILE_FREETYPE -eq 1 ]; then tar -xzf ${TAR_DIR}/freetype*.tar.gz -C ${LIB_DIR}/freetype cd ${LIB_DIR}/freetype/freetype* echo "cd `pwd`" - run_cmd "./configure --prefix=${LIB_DIR} --with-png=yes > freetype.configure.log 2>&1" - run_cmd "make ${MAKE_ARGS} > freetype.make.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > freetype.make_install.log 2>&1" + run_cmd "./configure --prefix=${LIB_DIR} --with-png=yes > $(pwd)/freetype.configure.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/freetype.make.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/freetype.make_install.log 2>&1" fi @@ -759,9 +775,9 @@ if [ $COMPILE_CAIRO -eq 1 ]; then tar -xzf ${TAR_DIR}/pixman*.tar.gz -C ${LIB_DIR}/pixman cd ${LIB_DIR}/pixman/pixman* echo "cd `pwd`" - run_cmd "./configure --prefix=${LIB_DIR} > pixman.configure.log 2>&1" - run_cmd "make ${MAKE_ARGS} > pixman.make.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > pixman.make_install.log 2>&1" + run_cmd "./configure --prefix=${LIB_DIR} > $(pwd)/pixman.configure.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/pixman.make.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/pixman.make_install.log 2>&1" fi echo @@ -775,9 +791,9 @@ if [ $COMPILE_CAIRO -eq 1 ]; then export PKG_CONFIG_PATH=${LIB_DIR}/lib/pkgconfig/ fi echo "cd `pwd`" - run_cmd "./configure --prefix=${LIB_DIR} ax_cv_c_float_words_bigendian=no LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include > cairo.configure.log 2>&1" - run_cmd "make ${MAKE_ARGS} > cairo.make.log 2>&1" - run_cmd "make ${MAKE_ARGS} install > cairo.make_install.log 2>&1" + run_cmd "./configure --prefix=${LIB_DIR} ax_cv_c_float_words_bigendian=no LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include > $(pwd)/cairo.configure.log 2>&1" + run_cmd "make ${MAKE_ARGS} > $(pwd)/cairo.make.log 2>&1" + run_cmd "make ${MAKE_ARGS} install > $(pwd)/cairo.make_install.log 2>&1" fi # Compile MET @@ -827,19 +843,46 @@ fi export MET_PYTHON_BIN_EXE=${MET_PYTHON_BIN_EXE:=${MET_PYTHON}/bin/python3} export MET_PYTHON_LD export MET_PYTHON_CC -export LDFLAGS="-Wl,--disable-new-dtags" -if [[ $machine == "Mac" ]]; then - export LDFLAGS="" +# add flags to user-defined LDFLAGS for MacOS +if [[ $machine != "Mac" ]]; then + LDFLAGS="${LDFLAGS} -Wl,--disable-new-dtags" fi # https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html # ${parameter:+word} # If parameter is null or unset, nothing is substituted, otherwise the expansion of word is substituted. -export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_DIR}/lib:${MET_PROJ:+:$MET_PROJ/lib64}:${LIB_DIR}/lib${MET_NETCDF:+:$MET_NETCDF/lib}${MET_HDF5:+:$MET_HDF5/lib}${MET_BUFRLIB:+:$MET_BUFRLIB}${MET_GRIB2CLIB:+:$MET_GRIB2CLIB}${MET_PYTHON_LIB:+:$MET_PYTHON_LIB}${MET_GSL:+:$MET_GSL/lib}${ADDTL_DIR:+:$ADDTL_DIR}" -export LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_JASPER:+$LIB_JASPER}${LIB_LIBPNG:+:$LIB_PNG}${LIB_Z:+$LIB_Z}" -export LDFLAGS="${LDFLAGS} ${LIB_JASPER:+-L$LIB_JASPER} ${LIB_LIBPNG:+-L$LIB_LIBPNG} ${MET_HDF5:+-L$MET_HDF5/lib} ${ADDTL_DIR:+-L$ADDTL_DIR}" -export LIBS="${LIBS} -lhdf5_hl -lhdf5 -lz -ltiff" + +# add LIB_DIR/lib and LIB_DIR/lib64 to rpath and -L +LDFLAGS="${LDFLAGS} -Wl,-rpath,${LIB_DIR}/lib -L${LIB_DIR}/lib -Wl,-rpath,${LIB_DIR}/lib64 -L${LIB_DIR}/lib64" + +# if variables are set, add /lib to rpath and -L +for x in $MET_CAIRO $MET_FREETYPE $MET_GSL $MET_HDF $MET_HDF5 $MET_NETCDF; do + arg="${x:+-Wl,-rpath,$x/lib -L$x/lib}" + if [[ "$LDFLAGS" != *"$arg"* ]]; then + LDFLAGS+=" $arg" + fi +done + +# if variables are set, add /lib64 to rpath and -L +for x in $MET_ATLAS $MET_BUFR $MET_ECKIT $MET_GRIB2C $MET_PROJ $LIB_JASPER; do + arg="${x:+-Wl,-rpath,$x/lib64 -L$x/lib64}" + if [[ "$LDFLAGS" != *"$arg"* ]]; then + LDFLAGS+=" $arg" + fi +done + +# if variables are set, add to rpath and -L +for x in $MET_ATLASLIB $MET_BUFRLIB $MET_CAIROLIB $MET_ECKITLIB $MET_FREETYPELIB $MET_GRIB2CLIB $MET_GSLLIB $MET_HDF5LIB $MET_HDFLIB $MET_NETCDFLIB $MET_PROJLIB $MET_PYTHON_LIB $LIB_JASPER $LIB_LIBPNG $LIB_Z $ADDTL_DIR; do + arg="${x:+-Wl,-rpath,$x -L$x}" + if [[ "$LDFLAGS" != *"$arg"* ]]; then + LDFLAGS+=" $arg" + fi +done + +export LDFLAGS + +export LIBS="${LIBS} -lhdf5_hl -lhdf5 -lz" export MET_FONT_DIR=${TEST_BASE}/fonts @@ -874,9 +917,9 @@ fi configure_cmd="${configure_cmd} ${OPT_ARGS}" echo "cd `pwd`" -run_cmd "${configure_cmd} > met.configure.log 2>&1" -run_cmd "make ${MAKE_ARGS} > met.make.log 2>&1" -run_cmd "make ${MAKE_ARGS} install > met.make_install.log 2>&1" -run_cmd "make ${MAKE_ARGS} test > met.make_test.log 2>&1" +run_cmd "${configure_cmd} > $(pwd)/met.configure.log 2>&1" +run_cmd "make ${MAKE_ARGS} > $(pwd)/met.make.log 2>&1" +run_cmd "make ${MAKE_ARGS} install > $(pwd)/met.make_install.log 2>&1" +run_cmd "make ${MAKE_ARGS} test > $(pwd)/met.make_test.log 2>&1" echo "Finished compiling at `date`" diff --git a/internal/scripts/installation/config/install_met_env.gaea b/internal/scripts/installation/config/install_met_env.gaea index 6fb1934a85..78052504da 100644 --- a/internal/scripts/installation/config/install_met_env.gaea +++ b/internal/scripts/installation/config/install_met_env.gaea @@ -1,14 +1,37 @@ -module load intel/2022.2.1 +module load intel-oneapi/2022.0.2 -export TEST_BASE=/usw/met/12.0.0 -export COMPILER=intel_2022.2.1 +export FC=ifx +export F77=ifx +export F90=ifx +export CC=icx +export CXX=icpx +export TEST_BASE=/usw/met/12.0.0-beta2 +export COMPILER=intel-oneapi_2022.0.2 export MET_SUBDIR=${TEST_BASE} -export MET_TARBALL=v12.0.0.tar.gz +export MET_TARBALL=v12.0.0-beta2.tar.gz export USE_MODULES=TRUE export MET_PYTHON=/lustre/f2/dev/esrl/Julie.Prestopnik/projects/miniconda/miniconda3/envs/metplus_v5.1_py3.10/ export MET_PYTHON_CC=-I${MET_PYTHON}/include/python3.10 export MET_PYTHON_LD=-L${MET_PYTHON}/lib/python3.10/config-3.10-x86_64-linux-gnu\ -L${MET_PYTHON}/lib\ -lpython3.10\ -lcrypt\ -lpthread\ -ldl\ -lutil\ -lm -export EXTERNAL_LIBS=/usw/met/12.0.0-beta1/external_libs -export LIB_Z=${EXTERNAL_LIBS}/lib -export MAKE_ARGS=-j -export CXXFLAGS="-std=c++11" +export ADDTL_DIR=/usr/lib64 +#export TIFF_INCLUDE_DIR=/lustre/f2/dev/esrl/Julie.Prestopnik/projects/miniconda/miniconda3/pkgs/libtiff-4.4.0-h82bc61c_5/include +#export LIB_TIFF=${ADDTL_DIR}/libtiff.so.5 +#export EXTERNAL_LIBS=/usw/met/12.0.0-beta2/external_libs +#export MET_PROJ=${EXTERNAL_LIBS} +#COMPILE_ATLAS=1 +#COMPILE_ECKIT=1 +#export MET_ATLAS=${EXTERNAL_LIBS} +#export MET_ECKIT=${EXTERNAL_LIBS} +#export MET_GSL=${EXTERNAL_LIBS} +#export MET_BUFRLIB=${EXTERNAL_LIBS} +#export BUFRLIB_NAME=-lbufr_4 +#export MET_HDF5=${EXTERNAL_LIBS} +#export MET_NETCDF=${EXTERNAL_LIBS} +#export MET_GRIB2CLIB=${EXTERNAL_LIBS}/lib +#export MET_GRIB2CINC=${EXTERNAL_LIBS}/include +#export GRIB2CLIB_NAME=-lg2c +#export LIB_JASPER=${EXTERNAL_LIBS}/lib +#export LIB_LIBPNG=${EXTERNAL_LIBS}/lib +#export LIB_Z=${EXTERNAL_LIBS}/lib +export MAKE_ARGS="-j 5" + diff --git a/internal/scripts/installation/config/install_met_env.hera b/internal/scripts/installation/config/install_met_env.hera index 2b7b6ed08f..cddaa00f90 100755 --- a/internal/scripts/installation/config/install_met_env.hera +++ b/internal/scripts/installation/config/install_met_env.hera @@ -2,6 +2,11 @@ module load gnu/9.2.0 module load intel/2022.1.2 module load cmake/3.26.4 +export FC=ifort +export F77=ifort +export F90=ifort +export CC=icc +export CXX=icpc export PATH=/scratch1/BMC/dtc/miniconda/miniconda3/envs/metplus_v5.1_py3.10/bin:${PATH} export TEST_BASE=/contrib/met/12.0.0 export COMPILER=intel_2022.1.2 @@ -14,21 +19,21 @@ export MET_PYTHON_LD=`python3-config --ldflags --embed` export SET_D64BIT=FALSE export ADDTL_DIR=/usr/lib64 export EXTERNAL_LIBS=/contrib/met/12.0.0/external_libs/ +export COMPILE_ECKIT=1 +export COMPILE_ATLAS=1 #export MET_PROJ=${EXTERNAL_LIBS} +#export MET_ATLAS=${EXTERNAL_LIBS} +#export MET_ECKIT=${EXTERNAL_LIBS} #export MET_NETCDF=${EXTERNAL_LIBS} #export MET_GSL=${EXTERNAL_LIBS} #export MET_BUFRLIB=${EXTERNAL_LIBS} -#export BUFRLIB_NAME=-lbufr -#export MET_HDF5=${EXTERNAL_LIBS} +#export BUFRLIB_NAME=-lbufr_4 #export MET_GRIB2CLIB=${EXTERNAL_LIBS}/lib #export MET_GRIB2CINC=${EXTERNAL_LIBS}/include -#export GRIB2CLIB_NAME=-lgrib2c +#export GRIB2CLIB_NAME=-lg2c #export LIB_JASPER=${EXTERNAL_LIBS}/lib #export LIB_LIBPNG=${EXTERNAL_LIBS}/lib #export LIB_Z=${EXTERNAL_LIBS}/lib #export SQLITE_INCLUDE_DIR=${EXTERNAL_LIBS}/include #export SQLITE_LIB_DIR=${EXTERNAL_LIBS}/lib -#export CFLAGS="-Wall -g" -#export CXXFLAGS="-Wall -g -lcurl" -export MAKE_ARGS=-j -export CXXFLAGS="-std=c++11" +export MAKE_ARGS="-j 5" diff --git a/internal/scripts/installation/config/install_met_env.jet b/internal/scripts/installation/config/install_met_env.jet index 87442a55fe..b3be597853 100644 --- a/internal/scripts/installation/config/install_met_env.jet +++ b/internal/scripts/installation/config/install_met_env.jet @@ -1,4 +1,3 @@ -module load gnu/9.2.0 module load intel/2022.1.2 module load cmake/3.26.4 @@ -17,13 +16,19 @@ export MET_PYTHON_CC=-I${MET_PYTHON}/include/python3.10 export MET_PYTHON_LD=-L${MET_PYTHON}/lib/python3.10/config-3.10-x86_64-linux-gnu\ -L${MET_PYTHON}/lib\ -lpython3.10\ -lcrypt\ -lpthread\ -ldl\ -lutil\ -lrt\ -lm\ -lm export ADDTL_DIR=/usr/lib64 export EXTERNAL_LIBS=${TEST_BASE}/external_libs/ +COMPILE_ATLAS=1 +COMPILE_ECKIT=1 #export MET_PROJ=${EXTERNAL_LIBS} +export TIFF_INCLUDE_DIR=/usr/include +export TIFF_LIB_DIR=/usr/lib64 +#export MET_ATLAS=${EXTERNAL_LIBS} +#export MET_ECKIT=${EXTERNAL_LIBS} #export MET_GSL=${EXTERNAL_LIBS} #export MET_BUFRLIB=${EXTERNAL_LIBS} -#export BUFRLIB_NAME=-lbufr +#export BUFRLIB_NAME=-lbufr_4 #export MET_GRIB2CLIB=${EXTERNAL_LIBS}/lib #export MET_GRIB2CINC=${EXTERNAL_LIBS}/include -#export GRIB2CLIB_NAME=-lgrib2c +#export GRIB2CLIB_NAME=-lg2c #export MET_HDF5=${EXTERNAL_LIBS} #export MET_NETCDF=${EXTERNAL_LIBS} #export LIB_JASPER=${EXTERNAL_LIBS}/lib @@ -31,6 +36,4 @@ export EXTERNAL_LIBS=${TEST_BASE}/external_libs/ #export LIB_Z=${EXTERNAL_LIBS}/lib #export SQLITE_INCLUDE_DIR=${EXTERNAL_LIBS}/include #export SQLITE_LIB_DIR=${EXTERNAL_LIBS}/lib -export MAKE_ARGS=-j -export SET_D64BIT=FALSE -export CXXFLAGS="-std=c++11" +export MAKE_ARGS="-j 5" diff --git a/internal/scripts/installation/config/install_met_env.orion b/internal/scripts/installation/config/install_met_env.orion index 5f8b03bafb..b951ee41f5 100644 --- a/internal/scripts/installation/config/install_met_env.orion +++ b/internal/scripts/installation/config/install_met_env.orion @@ -1,29 +1,34 @@ module load intel/2020.2 +module load cmake/3.22.1 -export TEST_BASE=/apps/contrib/MET/11.1.0 +export TEST_BASE=/apps/contrib/MET/12.0.0-beta2 export COMPILER=intel_2020 export MET_SUBDIR=${TEST_BASE}/ -export MET_TARBALL=v11.1.0.tar.gz +export MET_TARBALL=v12.0.0-beta2.tar.gz export USE_MODULES=TRUE export MET_PYTHON=/work/noaa/ovp/miniconda/miniconda3/envs/metplus_v5.1_py3.10 export MET_PYTHON_CC=-I${MET_PYTHON}/include/python3.10 export MET_PYTHON_LD=-L${MET_PYTHON}/lib/python3.10/config-3.10-x86_64-linux-gnu\ -L${MET_PYTHON}/lib\ -lpython3.10\ -lcrypt\ -lpthread\ -ldl\ -lutil\ -lrt\ -lm\ -lm +export ADDTL_DIR=/usr/lib64 +#export TIFF_INCLUDE_DIR=${ADDTL_DIR} +#export LIB_TIFF=${ADDTL_DIR}/libtiff.so.5 export EXTERNAL_LIBS=${TEST_BASE}/external_libs -export LIB_Z=${EXTERNAL_LIBS}/lib +#export SQLITE_INCLUDE_DIR=${EXTERNAL_LIBS}/include +#export SQLITE_LIB_DIR=${EXTERNAL_LIBS}/lib +#export MET_PROJ=${EXTERNAL_LIBS} +#COMPILE_ATLAS=1 +#COMPILE_ECKIT=1 +#export MET_ATLAS=${EXTERNAL_LIBS} +#export MET_ECKIT=${EXTERNAL_LIBS} #export MET_GSL=${EXTERNAL_LIBS} #export MET_BUFRLIB=${EXTERNAL_LIBS} -#export BUFRLIB_NAME=-lbufr +#export BUFRLIB_NAME=-lbufr_4 #export MET_HDF5=${EXTERNAL_LIBS} #export MET_NETCDF=${EXTERNAL_LIBS} #export MET_GRIB2CLIB=${EXTERNAL_LIBS}/lib #export MET_GRIB2CINC=${EXTERNAL_LIBS}/include -#export GRIB2CLIB_NAME=-lgrib2c +#export GRIB2CLIB_NAME=-lg2c #export LIB_JASPER=${EXTERNAL_LIBS}/lib #export LIB_LIBPNG=${EXTERNAL_LIBS}/lib -#export SET_D64BIT=FALSE -export MAKE_ARGS=-j -#export CFLAGS="-Wall -g" -#export CXXFLAGS="-Wall -g" -export CXXFLAGS="-std=c++11" - - +#export LIB_Z=${EXTERNAL_LIBS}/lib +export MAKE_ARGS="-j 5" diff --git a/internal/scripts/installation/config/install_met_env_met_only.casper b/internal/scripts/installation/config/install_met_env_met_only.casper deleted file mode 100644 index beb46d927d..0000000000 --- a/internal/scripts/installation/config/install_met_env_met_only.casper +++ /dev/null @@ -1,30 +0,0 @@ -module load ncarenv/1.3 -module load intel/2021.2 -module load netcdf/4.8.0 - -export TEST_BASE=/glade/p/ral/jntp/MET/MET_releases/casper/11.1.0 -export COMPILER=intel_2021.2 -export MET_SUBDIR=${TEST_BASE} -export MET_TARBALL=v11.1.0.tar.gz -export USE_MODULES=TRUE -export MET_PYTHON=/glade/p/ral/jntp/MET/METplus/miniconda/miniconda3/envs/metplus_v5.1_py3.10 -export MET_PYTHON_CC=-I${MET_PYTHON}/include/python3.10 -export MET_PYTHON_LD=`${MET_PYTHON}/bin/python3-config --ldflags --embed` -export MET_NETCDF=/glade/u/apps/ch/opt/netcdf/4.8.0/intel/2021.2/ -export MET_HDF5=/glade/u/apps/ch/opt/netcdf/4.8.0/intel/2021.2/ -export EXTERNAL_LIBS=${TEST_BASE}/external_libs -export MET_GSL=${EXTERNAL_LIBS} -export MET_BUFRLIB=${EXTERNAL_LIBS} -export BUFRLIB_NAME=-lbufr -export MET_HDF5=${EXTERNAL_LIBS} -export MET_GRIB2CLIB=${EXTERNAL_LIBS}/lib -export MET_GRIB2CINC=${EXTERNAL_LIBS}/include -export GRIB2CLIB_NAME=-lgrib2c -export LIB_JASPER=${EXTERNAL_LIBS}/lib -export LIB_LIBPNG=${EXTERNAL_LIBS}/lib -export LIB_Z=${EXTERNAL_LIBS}/lib -export SET_D64BIT=FALSE -#export CFLAGS="-Wall -g" -#export CXXFLAGS="-Wall -g" -export MAKE_ARGS=-j -export CXXFLAGS="-std=c++11" diff --git a/internal/scripts/installation/config/install_met_env_met_only.cheyenne b/internal/scripts/installation/config/install_met_env_met_only.cheyenne deleted file mode 100644 index 4049fc774a..0000000000 --- a/internal/scripts/installation/config/install_met_env_met_only.cheyenne +++ /dev/null @@ -1,30 +0,0 @@ -module load ncarenv/1.3 -module load intel/2021.2 -module load netcdf/4.8.0 - -export TEST_BASE=/glade/p/ral/jntp/MET/MET_releases/11.1.0 -export COMPILER=intel_2021.2 -export MET_SUBDIR=${TEST_BASE} -export MET_TARBALL=v11.1.0.tar.gz -export USE_MODULES=TRUE -export MET_PYTHON=/glade/p/ral/jntp/MET/METplus/miniconda/miniconda3/envs/metplus_v5.1_py3.10 -export MET_PYTHON_CC=-I${MET_PYTHON}/include/python3.10 -export MET_PYTHON_LD=`${MET_PYTHON}/bin/python3-config --ldflags --embed` -export MET_NETCDF=/glade/u/apps/ch/opt/netcdf/4.8.0/intel/2021.2/ -export MET_HDF5=/glade/u/apps/ch/opt/netcdf/4.8.0/intel/2021.2/ -export EXTERNAL_LIBS=${TEST_BASE}/external_libs -export MET_GSL=${EXTERNAL_LIBS} -export MET_BUFRLIB=${EXTERNAL_LIBS} -export BUFRLIB_NAME=-lbufr -export MET_HDF5=${EXTERNAL_LIBS} -export MET_GRIB2CLIB=${EXTERNAL_LIBS}/lib -export MET_GRIB2CINC=${EXTERNAL_LIBS}/include -export GRIB2CLIB_NAME=-lgrib2c -export LIB_JASPER=${EXTERNAL_LIBS}/lib -export LIB_LIBPNG=${EXTERNAL_LIBS}/lib -export LIB_Z=${EXTERNAL_LIBS}/lib -export SET_D64BIT=FALSE -##export CFLAGS="-Wall -g" -##export CXXFLAGS="-Wall -g" -export MAKE_ARGS=-j -export CXXFLAGS="-std=c++11" diff --git a/internal/scripts/installation/config/install_met_env_met_only.frontera b/internal/scripts/installation/config/install_met_env_met_only.frontera deleted file mode 100644 index 0d56c92e8a..0000000000 --- a/internal/scripts/installation/config/install_met_env_met_only.frontera +++ /dev/null @@ -1,27 +0,0 @@ -module load intel/19.1.1 -module load hdf5/1.12.0 -module load netcdf/4.7.4 - -export TEST_BASE=/work2/06612/tg859120/frontera/MET/11.0.0 -export COMPILER=intel_19.1.1 -export MET_SUBDIR=${TEST_BASE}/ -export MET_TARBALL=v11.0.0.tar.gz -export USE_MODULES=TRUE -export MET_PYTHON=/work2/06612/tg859120/frontera/miniconda/miniconda3/envs/metplus_v5.0_py3.8 -export MET_PYTHON_CC=-I${MET_PYTHON}/include/python3.8 -export MET_PYTHON_LD=-L${MET_PYTHON}/lib\ -lpython3.8\ -lcrypt\ -lpthread\ -ldl\ -lutil\ -lm -export MET_HDF5=/opt/apps/intel19/hdf5/1.12.0/x86_64/ -export MET_NETCDF=/opt/apps/intel19/netcdf/4.7.4/x86_64/ -export EXTERNAL_LIBS=${TEST_BASE}/external_libs -export MET_GSL=${EXTERNAL_LIBS} -export MET_BUFRLIB=${EXTERNAL_LIBS} -export BUFRLIB_NAME=-lbufr -export MET_GRIB2CLIB=${EXTERNAL_LIBS}/lib -export MET_GRIB2CINC=${EXTERNAL_LIBS}/include -export GRIB2CLIB_NAME=-lgrib2c -export LIB_JASPER=${EXTERNAL_LIBS}/lib -export LIB_LIBPNG=${EXTERNAL_LIBS}/lib -export LIB_Z=${EXTERNAL_LIBS}/lib -export SET_D64BIT=FALSE -#export CFLAGS="-Wall -g" -#export CXXFLAGS="-Wall -g" \ No newline at end of file diff --git a/internal/scripts/installation/config/install_met_env_met_only.gaea b/internal/scripts/installation/config/install_met_env_met_only.gaea deleted file mode 100644 index f3a72e6dbb..0000000000 --- a/internal/scripts/installation/config/install_met_env_met_only.gaea +++ /dev/null @@ -1,26 +0,0 @@ -module load intel/2022.2.1 - -export TEST_BASE=/usw/met/12.0.0 -export COMPILER=intel_2022.2.1 -export MET_SUBDIR=${TEST_BASE} -export MET_TARBALL=v12.0.0.tar.gz -export USE_MODULES=TRUE -export MET_PYTHON=/lustre/f2/dev/esrl/Julie.Prestopnik/projects/miniconda/miniconda3/envs/metplus_v5.1_py3.10/ -export MET_PYTHON_CC=-I${MET_PYTHON}/include/python3.10 -export MET_PYTHON_LD=-L${MET_PYTHON}/lib/python3.10/config-3.10-x86_64-linux-gnu\ -L${MET_PYTHON}/lib\ -lpython3.10\ -lcrypt\ -lpthread\ -ldl\ -lutil\ -lm -export EXTERNAL_LIBS=/usw/met/12.0.0/external_libs -export MET_PROJ=${EXTERNAL_LIBS} -export MET_NETCDF=${EXTERNAL_LIBS} -export MET_GSL=${EXTERNAL_LIBS} -export MET_BUFRLIB=${EXTERNAL_LIBS} -export BUFRLIB_NAME=-lbufr -export MET_HDF5=${EXTERNAL_LIBS} -export MET_GRIB2CLIB=${EXTERNAL_LIBS}/lib -export MET_GRIB2CINC=${EXTERNAL_LIBS}/include -export GRIB2CLIB_NAME=-lgrib2c -export LIB_JASPER=${EXTERNAL_LIBS}/lib -export LIB_LIBPNG=${EXTERNAL_LIBS}/lib -export LIB_Z=${EXTERNAL_LIBS}/lib -#export CFLAGS="-Wall -g" -#export CXXFLAGS="-Wall -g -lcurl" -export MAKE_ARGS=-j diff --git a/internal/scripts/installation/config/install_met_env_met_only.hera b/internal/scripts/installation/config/install_met_env_met_only.hera deleted file mode 100644 index b8ac02a3e0..0000000000 --- a/internal/scripts/installation/config/install_met_env_met_only.hera +++ /dev/null @@ -1,34 +0,0 @@ -module load gnu/9.2.0 -module load intel/2022.1.2 -module load cmake/3.26.4 - -export PATH=/scratch1/BMC/dtc/miniconda/miniconda3/envs/metplus_v5.1_py3.10/bin:${PATH} -export TEST_BASE=/contrib/met/12.0.0 -export COMPILER=intel_2022.1.2 -export MET_SUBDIR=${TEST_BASE} -export MET_TARBALL=v12.0.0.tar.gz -export USE_MODULES=TRUE -export MET_PYTHON=/scratch1/BMC/dtc/miniconda/miniconda3/envs/metplus_v5.1_py3.10 -export MET_PYTHON_CC=-I${MET_PYTHON}/include/python3.10 -export MET_PYTHON_LD=`python3-config --ldflags --embed` -export SET_D64BIT=FALSE -export ADDTL_DIR=/usr/lib64 -export EXTERNAL_LIBS=/contrib/met/12.0.0/external_libs/ -export MET_PROJ=${EXTERNAL_LIBS} -export MET_NETCDF=${EXTERNAL_LIBS} -export MET_GSL=${EXTERNAL_LIBS} -export MET_BUFRLIB=${EXTERNAL_LIBS} -export BUFRLIB_NAME=-lbufr -export MET_HDF5=${EXTERNAL_LIBS} -export MET_GRIB2CLIB=${EXTERNAL_LIBS}/lib -export MET_GRIB2CINC=${EXTERNAL_LIBS}/include -export GRIB2CLIB_NAME=-lgrib2c -export LIB_JASPER=${EXTERNAL_LIBS}/lib -export LIB_LIBPNG=${EXTERNAL_LIBS}/lib -export LIB_Z=${EXTERNAL_LIBS}/lib -export SQLITE_INCLUDE_DIR=${EXTERNAL_LIBS}/include -export SQLITE_LIB_DIR=${EXTERNAL_LIBS}/lib -#export CFLAGS="-Wall -g" -#export CXXFLAGS="-Wall -g -lcurl" -export MAKE_ARGS=-j -export CXXFLAGS="-std=c++11" diff --git a/internal/scripts/installation/config/install_met_env_met_only.jet b/internal/scripts/installation/config/install_met_env_met_only.jet deleted file mode 100644 index 00b9d689d2..0000000000 --- a/internal/scripts/installation/config/install_met_env_met_only.jet +++ /dev/null @@ -1,36 +0,0 @@ -module load gnu/9.2.0 -module load intel/2022.1.2 -module load cmake/3.26.4 - -export FC=ifort -export F77=ifort -export F90=ifort -export CC=icc -export CXX=icpc -export TEST_BASE=/contrib/met/12.0.0 -export COMPILER=intel_2022.1.2 -export MET_SUBDIR=${TEST_BASE} -export MET_TARBALL=v12.0.0.tar.gz -export USE_MODULES=TRUE -export MET_PYTHON=/mnt/lfs1/HFIP/dtc-hurr/METplus/miniconda/miniconda3/envs/metplus_v5.1_py3.10 -export MET_PYTHON_CC=-I${MET_PYTHON}/include/python3.10 -export MET_PYTHON_LD=-L${MET_PYTHON}/lib/python3.10/config-3.10-x86_64-linux-gnu\ -L${MET_PYTHON}/lib\ -lpython3.10\ -lcrypt\ -lpthread\ -ldl\ -lutil\ -lrt\ -lm\ -lm -export ADDTL_DIR=/usr/lib64 -export EXTERNAL_LIBS=${TEST_BASE}/external_libs/ -export MET_PROJ=${EXTERNAL_LIBS} -export MET_GSL=${EXTERNAL_LIBS} -export MET_BUFRLIB=${EXTERNAL_LIBS} -export BUFRLIB_NAME=-lbufr -export MET_GRIB2CLIB=${EXTERNAL_LIBS}/lib -export MET_GRIB2CINC=${EXTERNAL_LIBS}/include -export GRIB2CLIB_NAME=-lgrib2c -export MET_HDF5=${EXTERNAL_LIBS} -export MET_NETCDF=${EXTERNAL_LIBS} -export LIB_JASPER=${EXTERNAL_LIBS}/lib -export LIB_LIBPNG=${EXTERNAL_LIBS}/lib -export LIB_Z=${EXTERNAL_LIBS}/lib -export SQLITE_INCLUDE_DIR=${EXTERNAL_LIBS}/include -export SQLITE_LIB_DIR=${EXTERNAL_LIBS}/lib -export MAKE_ARGS=-j -export SET_D64BIT=FALSE -export CXXFLAGS="-std=c++11" diff --git a/internal/scripts/installation/config/install_met_env_met_only.orion b/internal/scripts/installation/config/install_met_env_met_only.orion deleted file mode 100644 index 66cea2a43c..0000000000 --- a/internal/scripts/installation/config/install_met_env_met_only.orion +++ /dev/null @@ -1,28 +0,0 @@ -module load intel/2020.2 - -export TEST_BASE=/apps/contrib/MET/11.1.0 -export COMPILER=intel_2020 -export MET_SUBDIR=${TEST_BASE}/ -export MET_TARBALL=v11.1.0.tar.gz -export USE_MODULES=TRUE -export MET_PYTHON=/work/noaa/ovp/miniconda/miniconda3/envs/metplus_v5.1_py3.10 -export MET_PYTHON_CC=-I${MET_PYTHON}/include/python3.10 -export MET_PYTHON_LD=`${MET_PYTHON}/bin/python3-config --ldflags --embed` -export EXTERNAL_LIBS=${TEST_BASE}/external_libs -export MET_GSL=${EXTERNAL_LIBS} -export MET_BUFRLIB=${EXTERNAL_LIBS} -export BUFRLIB_NAME=-lbufr -export MET_HDF5=${EXTERNAL_LIBS} -export MET_NETCDF=${EXTERNAL_LIBS} -export MET_GRIB2CLIB=${EXTERNAL_LIBS}/lib -export MET_GRIB2CINC=${EXTERNAL_LIBS}/include -export GRIB2CLIB_NAME=-lgrib2c -export LIB_JASPER=${EXTERNAL_LIBS}/lib -export LIB_LIBPNG=${EXTERNAL_LIBS}/lib -export LIB_Z=${EXTERNAL_LIBS}/lib -export SET_D64BIT=FALSE -export MAKE_ARGS=-j -#export CFLAGS="-Wall -g" -#export CXXFLAGS="-Wall -g" -export CXXFLAGS="-std=c++11" - diff --git a/internal/scripts/installation/modulefiles/11.1.0_orion b/internal/scripts/installation/modulefiles/11.1.0_orion deleted file mode 100644 index 03ebbc352a..0000000000 --- a/internal/scripts/installation/modulefiles/11.1.0_orion +++ /dev/null @@ -1,45 +0,0 @@ -#%Module###################################################################### -## -## Model Evaluation Tools -## -proc ModulesHelp { } { - puts stderr "Sets up the paths and environment variables to use the Model Evaluation Tools v11.1.0 - *** For help see the official MET webpage at http://www.dtcenter.org/met/users ***" -} - -prereq intel/2020.2 - -set base /apps/contrib/MET -set ver 11.1.0 -set share $base/$ver/share/met -set lib_base $base/11.1.0 -setenv MET_ROOT $base/$ver/MET-11.1.0 - -prepend-path PATH $base/$ver/bin:$lib_base/external_libs/bin:/work/noaa/ovp/miniconda/miniconda3/envs/metplus_v5.1_py3.10/bin - -export CC=icc -#export CXX=icc -#export F77=ifort -#module load intel/2020.2 -#module load intelpython3/2020.2 -#export libdir=/apps/contrib/MET/11.1.0/external_libs/lib -#export incdir=/apps/contrib/MET/11.1.0/external_libs/include -#export iprefix=/apps/contrib/MET/11.1.0/external_libs -#export basedir=/apps/contrib/MET/11.1.0/MET-11.1.0 -#export MET_HDF5=$iprefix -#export MET_NETCDF=$incdir -#export MET_GRIB2CINC=$incdir -#export MET_GRIB2CLIB=$libdir -#setenv MET_GSLLIB=$libdir -#export MET_GSLINC=$incdir -#export MET_BUFR=$libdir -#export MET_HDFINC=$incdir -#export MET_HDFLIB=$libdir -#export MET_HDFEOSINC=$incdir -#export MET_HDFEOSLIB=$libdir -#export MET_PYTHON=/work/noaa/ovp/miniconda/miniconda3/envs/metplus_v5.1_py3.10 -#export MET_PYTHON_CC=-I${MET_PYTHON}/include/python3.10 -#export MET_PYTHON_LD=-L${MET_PYTHON}/lib/python3.10/config-3.10-x86_64-linux-gnu\ -L${MET_PYTHON}/lib\ -lpython3.10\ -lcrypt\ -lpthread\ -ldl\ -lutil\ -lrt\ -lm\ -lm -#export MET_FONT_DIR=$basedir/fonts/ -#export LDFLAGS=-Wl,--disable-new-dtags -Wl,-rpath,${libdir}:${MET_PYTHON}/lib -#export CPPFLAGS=-I/apps/contrib/met/11.1.0/external_libs/include diff --git a/internal/scripts/installation/modulefiles/12.0.0_gaea b/internal/scripts/installation/modulefiles/12.0.0_gaea index 3afc495ab6..1ce4cd13c3 100644 --- a/internal/scripts/installation/modulefiles/12.0.0_gaea +++ b/internal/scripts/installation/modulefiles/12.0.0_gaea @@ -7,7 +7,7 @@ proc ModulesHelp { } { *** For help see the official MET webpage at http://www.dtcenter.org/met/users ***" } -module load intel/2022.2.1 +module load intel-oneapi/2022.0.2 set base /usw/met set ver 12.0.0 diff --git a/internal/scripts/installation/modulefiles/12.0.0_orion b/internal/scripts/installation/modulefiles/12.0.0_orion new file mode 100644 index 0000000000..ed0dd56805 --- /dev/null +++ b/internal/scripts/installation/modulefiles/12.0.0_orion @@ -0,0 +1,19 @@ +#%Module###################################################################### +## +## Model Evaluation Tools +## +proc ModulesHelp { } { + puts stderr "Sets up the paths and environment variables to use the Model Evaluation Tools v12.0.0 + *** For help see the official MET webpage at http://www.dtcenter.org/met/users ***" +} + +prereq intel/2020.2 + +set base /apps/contrib/MET +set ver 12.0.0-beta2 +set share $base/$ver/share/met +set lib_base $base/12.0.0-beta2 +setenv MET_ROOT $base/$ver/MET-12.0.0-beta2 + +prepend-path PATH $base/$ver/bin:$lib_base/external_libs/bin:/work/noaa/ovp/miniconda/miniconda3/envs/metplus_v5.1_py3.10/bin + diff --git a/internal/test_unit/xml/unit_ascii2nc.xml b/internal/test_unit/xml/unit_ascii2nc.xml index 77f445e1c0..2dd9df07e7 100644 --- a/internal/test_unit/xml/unit_ascii2nc.xml +++ b/internal/test_unit/xml/unit_ascii2nc.xml @@ -199,7 +199,16 @@ - - + + &MET_BIN;/ascii2nc + \ + -format ismn \ + &DATA_DIR_OBS;/ismn/SNOTEL/*/*.stm \ + &OUTPUT_DIR;/ascii2nc/ismn_SNOTEL_20220924_20220927.nc + + + &OUTPUT_DIR;/ascii2nc/ismn_SNOTEL_20220924_20220927.nc + + diff --git a/internal/test_unit/xml/unit_plot_data_plane.xml b/internal/test_unit/xml/unit_plot_data_plane.xml index 3e72dbca35..30011a183d 100644 --- a/internal/test_unit/xml/unit_plot_data_plane.xml +++ b/internal/test_unit/xml/unit_plot_data_plane.xml @@ -564,6 +564,23 @@ + + &MET_BIN;/plot_data_plane + \ + &DATA_DIR_MODEL;/grib2/rrfs/rrfs.t00z.prslev.f036.conus_3km.MASSDEN.grib2 \ + &OUTPUT_DIR;/plot_data_plane/RRFS_GRIB2_TABLE_4.48_MASSDEN.ps \ + 'name="MASSDEN"; level="Z8"; \ + GRIB2_aerosol_type=62001; \ + GRIB2_aerosol_interval_type=0; \ + GRIB2_aerosol_size_lower=2.5e-06;' \ + -title "Mass Density of Dry Dust up to 2.5e-06" \ + -v 1 + + + &OUTPUT_DIR;/plot_data_plane/RRFS_GRIB2_TABLE_4.48_MASSDEN.ps + + + &MET_BIN;/plot_data_plane \ @@ -645,7 +662,5 @@ &OUTPUT_DIR;/plot_data_plane/wrf_bottom_top_stag.ps - - diff --git a/internal/test_util/libcode/Makefile.am b/internal/test_util/libcode/Makefile.am index f5eff06762..38c5944d79 100644 --- a/internal/test_util/libcode/Makefile.am +++ b/internal/test_util/libcode/Makefile.am @@ -31,4 +31,8 @@ SUBDIRS = vx_data2d \ vx_physics \ vx_series_data +if ENABLE_PYTHON + SUBDIRS += vx_python3_utils +endif + MAINTAINERCLEANFILES = Makefile.in diff --git a/internal/test_util/libcode/Makefile.in b/internal/test_util/libcode/Makefile.in index b6f5b06bac..0f56d40950 100644 --- a/internal/test_util/libcode/Makefile.in +++ b/internal/test_util/libcode/Makefile.in @@ -87,6 +87,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@ENABLE_PYTHON_TRUE@am__append_1 = vx_python3_utils subdir = internal/test_util/libcode ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac @@ -149,7 +150,10 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = vx_data2d vx_data2d_grib vx_data2d_nc_met \ + vx_data2d_nccf vx_data2d_factory vx_geodesy vx_grid vx_ps \ + vx_solar vx_plot_util vx_tc_util vx_nc_util vx_physics \ + vx_series_data vx_python3_utils am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ @@ -335,21 +339,10 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = vx_data2d \ - vx_data2d_grib \ - vx_data2d_nc_met \ - vx_data2d_nc_cf \ - vx_data2d_factory \ - vx_geodesy \ - vx_grid \ - vx_ps \ - vx_solar \ - vx_plot_util \ - vx_tc_util \ - vx_nc_util \ - vx_physics \ - vx_series_data - +SUBDIRS = vx_data2d vx_data2d_grib vx_data2d_nc_met vx_data2d_nc_cf \ + vx_data2d_factory vx_geodesy vx_grid vx_ps vx_solar \ + vx_plot_util vx_tc_util vx_nc_util vx_physics vx_series_data \ + $(am__append_1) MAINTAINERCLEANFILES = Makefile.in all: all-recursive diff --git a/internal/test_util/libcode/vx_data2d/Makefile.am b/internal/test_util/libcode/vx_data2d/Makefile.am index 1759c4087c..72359847c8 100644 --- a/internal/test_util/libcode/vx_data2d/Makefile.am +++ b/internal/test_util/libcode/vx_data2d/Makefile.am @@ -11,7 +11,7 @@ include ${top_srcdir}/Make-include # Test programs noinst_PROGRAMS = test_table_read \ - dump_default_table + dump_default_table test_table_read_SOURCES = test_table_read.cc test_table_read_CPPFLAGS = ${MET_CPPFLAGS} diff --git a/internal/test_util/libcode/vx_python3_utils/.gitignore b/internal/test_util/libcode/vx_python3_utils/.gitignore new file mode 100644 index 0000000000..8aa7461ede --- /dev/null +++ b/internal/test_util/libcode/vx_python3_utils/.gitignore @@ -0,0 +1,7 @@ +test_get +test_numpy +*.o +*.a +.deps +Makefile +*.dSYM diff --git a/internal/test_util/libcode/vx_python3_utils/Makefile.am b/internal/test_util/libcode/vx_python3_utils/Makefile.am new file mode 100644 index 0000000000..ac5c10d6c3 --- /dev/null +++ b/internal/test_util/libcode/vx_python3_utils/Makefile.am @@ -0,0 +1,37 @@ +## @start 1 +## Makefile.am -- Process this file with automake to produce Makefile.in +## @end 1 + +MAINTAINERCLEANFILES = Makefile.in + +# Include the project definitions + +include ${top_srcdir}/Make-include + +# Test programs + +noinst_PROGRAMS = test_get \ + test_numpy + +test_get_SOURCES = test_get.cc +test_get_CPPFLAGS = ${MET_CPPFLAGS} +test_get_LDFLAGS = -L. ${MET_LDFLAGS} +test_get_LDADD = \ + -lvx_python3_utils \ + -lvx_util \ + -lvx_math \ + -lvx_cal \ + -lvx_log \ + $(PYTHON_DEP_LIBS) + +test_numpy_SOURCES = test_numpy.cc +test_numpy_CPPFLAGS = ${MET_CPPFLAGS} +test_numpy_LDFLAGS = -L. ${MET_LDFLAGS} +test_numpy_LDADD = \ + -lvx_python3_utils \ + -lvx_util \ + -lvx_math \ + -lvx_cal \ + -lvx_log \ + $(PYTHON_DEP_LIBS) + diff --git a/internal/test_util/libcode/vx_python3_utils/Makefile.in b/internal/test_util/libcode/vx_python3_utils/Makefile.in new file mode 100644 index 0000000000..3d3d12cefb --- /dev/null +++ b/internal/test_util/libcode/vx_python3_utils/Makefile.in @@ -0,0 +1,672 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = test_get$(EXEEXT) test_numpy$(EXEEXT) +subdir = internal/test_util/libcode/vx_python3_utils +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_test_get_OBJECTS = test_get-test_get.$(OBJEXT) +test_get_OBJECTS = $(am_test_get_OBJECTS) +am__DEPENDENCIES_1 = +test_get_DEPENDENCIES = $(am__DEPENDENCIES_1) +test_get_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(test_get_LDFLAGS) $(LDFLAGS) -o $@ +am_test_numpy_OBJECTS = test_numpy-test_numpy.$(OBJEXT) +test_numpy_OBJECTS = $(am_test_numpy_OBJECTS) +test_numpy_DEPENDENCIES = $(am__DEPENDENCIES_1) +test_numpy_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(test_numpy_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/test_get-test_get.Po \ + ./$(DEPDIR)/test_numpy-test_numpy.Po +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +SOURCES = $(test_get_SOURCES) $(test_numpy_SOURCES) +DIST_SOURCES = $(test_get_SOURCES) $(test_numpy_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUFRLIB_NAME = @BUFRLIB_NAME@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC_LIBS = @FC_LIBS@ +FFLAGS = @FFLAGS@ +FLIBS = @FLIBS@ +GRIB2CLIB_NAME = @GRIB2CLIB_NAME@ +GRIB2_DEP_LIBS = @GRIB2_DEP_LIBS@ +GRIB2_MET_LIBS = @GRIB2_MET_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MET_ATLAS = @MET_ATLAS@ +MET_ATLASINC = @MET_ATLASINC@ +MET_ATLASLIB = @MET_ATLASLIB@ +MET_BUFR = @MET_BUFR@ +MET_BUFRLIB = @MET_BUFRLIB@ +MET_CAIRO = @MET_CAIRO@ +MET_CAIROINC = @MET_CAIROINC@ +MET_CAIROLIB = @MET_CAIROLIB@ +MET_ECKIT = @MET_ECKIT@ +MET_ECKITINC = @MET_ECKITINC@ +MET_ECKITLIB = @MET_ECKITLIB@ +MET_FREETYPE = @MET_FREETYPE@ +MET_FREETYPEINC = @MET_FREETYPEINC@ +MET_FREETYPELIB = @MET_FREETYPELIB@ +MET_GRIB2C = @MET_GRIB2C@ +MET_GRIB2CINC = @MET_GRIB2CINC@ +MET_GRIB2CLIB = @MET_GRIB2CLIB@ +MET_GSL = @MET_GSL@ +MET_GSLINC = @MET_GSLINC@ +MET_GSLLIB = @MET_GSLLIB@ +MET_HDF = @MET_HDF@ +MET_HDF5 = @MET_HDF5@ +MET_HDF5INC = @MET_HDF5INC@ +MET_HDF5LIB = @MET_HDF5LIB@ +MET_HDFEOS = @MET_HDFEOS@ +MET_HDFEOSINC = @MET_HDFEOSINC@ +MET_HDFEOSLIB = @MET_HDFEOSLIB@ +MET_HDFINC = @MET_HDFINC@ +MET_HDFLIB = @MET_HDFLIB@ +MET_NETCDF = @MET_NETCDF@ +MET_NETCDFINC = @MET_NETCDFINC@ +MET_NETCDFLIB = @MET_NETCDFLIB@ +MET_PROJ = @MET_PROJ@ +MET_PROJINC = @MET_PROJINC@ +MET_PROJLIB = @MET_PROJLIB@ +MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@ +MET_PYTHON_CC = @MET_PYTHON_CC@ +MET_PYTHON_LD = @MET_PYTHON_LD@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PYTHON_DEP_LIBS = @PYTHON_DEP_LIBS@ +PYTHON_MET_LIBS = @PYTHON_MET_LIBS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UGRID_DEP_LIBS = @UGRID_DEP_LIBS@ +UGRID_MET_LIBS = @UGRID_MET_LIBS@ +VERSION = @VERSION@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +MAINTAINERCLEANFILES = Makefile.in +test_get_SOURCES = test_get.cc +test_get_CPPFLAGS = ${MET_CPPFLAGS} +test_get_LDFLAGS = -L. ${MET_LDFLAGS} +test_get_LDADD = \ + -lvx_python3_utils \ + -lvx_util \ + -lvx_math \ + -lvx_cal \ + -lvx_log \ + $(PYTHON_DEP_LIBS) + +test_numpy_SOURCES = test_numpy.cc +test_numpy_CPPFLAGS = ${MET_CPPFLAGS} +test_numpy_LDFLAGS = -L. ${MET_LDFLAGS} +test_numpy_LDADD = \ + -lvx_python3_utils \ + -lvx_util \ + -lvx_math \ + -lvx_cal \ + -lvx_log \ + $(PYTHON_DEP_LIBS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cc .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign internal/test_util/libcode/vx_python3_utils/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign internal/test_util/libcode/vx_python3_utils/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) + +test_get$(EXEEXT): $(test_get_OBJECTS) $(test_get_DEPENDENCIES) $(EXTRA_test_get_DEPENDENCIES) + @rm -f test_get$(EXEEXT) + $(AM_V_CXXLD)$(test_get_LINK) $(test_get_OBJECTS) $(test_get_LDADD) $(LIBS) + +test_numpy$(EXEEXT): $(test_numpy_OBJECTS) $(test_numpy_DEPENDENCIES) $(EXTRA_test_numpy_DEPENDENCIES) + @rm -f test_numpy$(EXEEXT) + $(AM_V_CXXLD)$(test_numpy_LINK) $(test_numpy_OBJECTS) $(test_numpy_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_get-test_get.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_numpy-test_numpy.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.cc.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +test_get-test_get.o: test_get.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_get_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_get-test_get.o -MD -MP -MF $(DEPDIR)/test_get-test_get.Tpo -c -o test_get-test_get.o `test -f 'test_get.cc' || echo '$(srcdir)/'`test_get.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_get-test_get.Tpo $(DEPDIR)/test_get-test_get.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test_get.cc' object='test_get-test_get.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_get_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_get-test_get.o `test -f 'test_get.cc' || echo '$(srcdir)/'`test_get.cc + +test_get-test_get.obj: test_get.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_get_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_get-test_get.obj -MD -MP -MF $(DEPDIR)/test_get-test_get.Tpo -c -o test_get-test_get.obj `if test -f 'test_get.cc'; then $(CYGPATH_W) 'test_get.cc'; else $(CYGPATH_W) '$(srcdir)/test_get.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_get-test_get.Tpo $(DEPDIR)/test_get-test_get.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test_get.cc' object='test_get-test_get.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_get_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_get-test_get.obj `if test -f 'test_get.cc'; then $(CYGPATH_W) 'test_get.cc'; else $(CYGPATH_W) '$(srcdir)/test_get.cc'; fi` + +test_numpy-test_numpy.o: test_numpy.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_numpy_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_numpy-test_numpy.o -MD -MP -MF $(DEPDIR)/test_numpy-test_numpy.Tpo -c -o test_numpy-test_numpy.o `test -f 'test_numpy.cc' || echo '$(srcdir)/'`test_numpy.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_numpy-test_numpy.Tpo $(DEPDIR)/test_numpy-test_numpy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test_numpy.cc' object='test_numpy-test_numpy.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_numpy_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_numpy-test_numpy.o `test -f 'test_numpy.cc' || echo '$(srcdir)/'`test_numpy.cc + +test_numpy-test_numpy.obj: test_numpy.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_numpy_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_numpy-test_numpy.obj -MD -MP -MF $(DEPDIR)/test_numpy-test_numpy.Tpo -c -o test_numpy-test_numpy.obj `if test -f 'test_numpy.cc'; then $(CYGPATH_W) 'test_numpy.cc'; else $(CYGPATH_W) '$(srcdir)/test_numpy.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_numpy-test_numpy.Tpo $(DEPDIR)/test_numpy-test_numpy.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test_numpy.cc' object='test_numpy-test_numpy.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_numpy_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_numpy-test_numpy.obj `if test -f 'test_numpy.cc'; then $(CYGPATH_W) 'test_numpy.cc'; else $(CYGPATH_W) '$(srcdir)/test_numpy.cc'; fi` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/test_get-test_get.Po + -rm -f ./$(DEPDIR)/test_numpy-test_numpy.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/test_get-test_get.Po + -rm -f ./$(DEPDIR)/test_numpy-test_numpy.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstPROGRAMS cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Include the project definitions + +include ${top_srcdir}/Make-include + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/internal/test_util/libcode/vx_python3_utils/test_get.cc b/internal/test_util/libcode/vx_python3_utils/test_get.cc index eedf339389..eae1428bda 100644 --- a/internal/test_util/libcode/vx_python3_utils/test_get.cc +++ b/internal/test_util/libcode/vx_python3_utils/test_get.cc @@ -60,12 +60,12 @@ ConcatString variable_name = argv[2]; script_name.chomp(".py"); -Python3_Script script(script_name); +Python3_Script script(script_name.c_str()); PyObject * var = 0; -var = script.lookup(variable_name); +var = script.lookup(variable_name.c_str()); if ( var ) { diff --git a/internal/test_util/libcode/vx_tc_util/.gitignore b/internal/test_util/libcode/vx_tc_util/.gitignore index b5e28af92c..635d358e43 100644 --- a/internal/test_util/libcode/vx_tc_util/.gitignore +++ b/internal/test_util/libcode/vx_tc_util/.gitignore @@ -1,5 +1,6 @@ -test_read_prob test_read +test_read_prob +test_read_rmw *.o *.a .deps diff --git a/internal/test_util/libcode/vx_tc_util/Makefile.am b/internal/test_util/libcode/vx_tc_util/Makefile.am index 8e683b35fd..dee36a650a 100644 --- a/internal/test_util/libcode/vx_tc_util/Makefile.am +++ b/internal/test_util/libcode/vx_tc_util/Makefile.am @@ -15,7 +15,8 @@ endif # Test programs noinst_PROGRAMS = test_read \ - test_read_prob + test_read_prob \ + test_read_rmw test_read_SOURCES = test_read.cc test_read_CPPFLAGS = ${MET_CPPFLAGS} @@ -88,3 +89,39 @@ test_read_prob_LDADD = -lvx_stat_out \ -lvx_log \ -lm -lproj -lnetcdf_c++4 -lnetcdf -lgsl -lgslcblas -lvx_util +test_read_rmw_SOURCES = test_read_rmw.cc +test_read_rmw_CPPFLAGS = ${MET_CPPFLAGS} +test_read_rmw_LDFLAGS = -L. ${MET_LDFLAGS} +test_read_rmw_LDADD = -lvx_stat_out \ + -lvx_statistics \ + -lvx_shapedata \ + -lvx_gsl_prob \ + -lvx_analysis_util \ + -lvx_tc_util \ + -lvx_shapedata \ + -lvx_util_math \ + -lvx_util \ + $(PYTHON_MET_LIBS) $(PYTHON_DEP_LIBS) \ + -lvx_statistics \ + -lvx_data2d_factory \ + -lvx_data2d_nc_met \ + -lvx_data2d_nc_pinterp \ + $(PYTHON_MET_LIBS) $(PYTHON_DEP_LIBS) \ + -lvx_data2d_nccf \ + -lvx_data2d_grib $(GRIB2_MET_LIBS) $(GRIB2_DEP_LIBS) \ + -lvx_data2d \ + -lvx_nc_util \ + -lvx_regrid \ + -lvx_grid \ + -lvx_geodesy \ + -lvx_config \ + -lvx_gsl_prob \ + -lvx_cal \ + -lvx_nav \ + -lvx_util_math \ + -lvx_util \ + -lvx_math \ + -lvx_color \ + -lvx_log \ + -lm -lproj -lnetcdf_c++4 -lnetcdf -lgsl -lgslcblas -lvx_util + diff --git a/internal/test_util/libcode/vx_tc_util/Makefile.in b/internal/test_util/libcode/vx_tc_util/Makefile.in index 64d0424033..219ea1228e 100644 --- a/internal/test_util/libcode/vx_tc_util/Makefile.in +++ b/internal/test_util/libcode/vx_tc_util/Makefile.in @@ -89,7 +89,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @ENABLE_PYTHON_TRUE@am__append_1 = -lvx_python3_utils -noinst_PROGRAMS = test_read$(EXEEXT) test_read_prob$(EXEEXT) +noinst_PROGRAMS = test_read$(EXEEXT) test_read_prob$(EXEEXT) \ + test_read_rmw$(EXEEXT) subdir = internal/test_util/libcode/vx_tc_util ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac @@ -117,6 +118,14 @@ test_read_prob_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) test_read_prob_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(test_read_prob_LDFLAGS) $(LDFLAGS) -o $@ +am_test_read_rmw_OBJECTS = test_read_rmw-test_read_rmw.$(OBJEXT) +test_read_rmw_OBJECTS = $(am_test_read_rmw_OBJECTS) +test_read_rmw_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +test_read_rmw_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(test_read_rmw_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -133,7 +142,8 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/test_read-test_read.Po \ - ./$(DEPDIR)/test_read_prob-test_read_prob.Po + ./$(DEPDIR)/test_read_prob-test_read_prob.Po \ + ./$(DEPDIR)/test_read_rmw-test_read_rmw.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -152,8 +162,10 @@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = -SOURCES = $(test_read_SOURCES) $(test_read_prob_SOURCES) -DIST_SOURCES = $(test_read_SOURCES) $(test_read_prob_SOURCES) +SOURCES = $(test_read_SOURCES) $(test_read_prob_SOURCES) \ + $(test_read_rmw_SOURCES) +DIST_SOURCES = $(test_read_SOURCES) $(test_read_prob_SOURCES) \ + $(test_read_rmw_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -408,6 +420,42 @@ test_read_prob_LDADD = -lvx_stat_out \ -lvx_log \ -lm -lproj -lnetcdf_c++4 -lnetcdf -lgsl -lgslcblas -lvx_util +test_read_rmw_SOURCES = test_read_rmw.cc +test_read_rmw_CPPFLAGS = ${MET_CPPFLAGS} +test_read_rmw_LDFLAGS = -L. ${MET_LDFLAGS} +test_read_rmw_LDADD = -lvx_stat_out \ + -lvx_statistics \ + -lvx_shapedata \ + -lvx_gsl_prob \ + -lvx_analysis_util \ + -lvx_tc_util \ + -lvx_shapedata \ + -lvx_util_math \ + -lvx_util \ + $(PYTHON_MET_LIBS) $(PYTHON_DEP_LIBS) \ + -lvx_statistics \ + -lvx_data2d_factory \ + -lvx_data2d_nc_met \ + -lvx_data2d_nc_pinterp \ + $(PYTHON_MET_LIBS) $(PYTHON_DEP_LIBS) \ + -lvx_data2d_nccf \ + -lvx_data2d_grib $(GRIB2_MET_LIBS) $(GRIB2_DEP_LIBS) \ + -lvx_data2d \ + -lvx_nc_util \ + -lvx_regrid \ + -lvx_grid \ + -lvx_geodesy \ + -lvx_config \ + -lvx_gsl_prob \ + -lvx_cal \ + -lvx_nav \ + -lvx_util_math \ + -lvx_util \ + -lvx_math \ + -lvx_color \ + -lvx_log \ + -lm -lproj -lnetcdf_c++4 -lnetcdf -lgsl -lgslcblas -lvx_util + all: all-am .SUFFIXES: @@ -453,6 +501,10 @@ test_read_prob$(EXEEXT): $(test_read_prob_OBJECTS) $(test_read_prob_DEPENDENCIES @rm -f test_read_prob$(EXEEXT) $(AM_V_CXXLD)$(test_read_prob_LINK) $(test_read_prob_OBJECTS) $(test_read_prob_LDADD) $(LIBS) +test_read_rmw$(EXEEXT): $(test_read_rmw_OBJECTS) $(test_read_rmw_DEPENDENCIES) $(EXTRA_test_read_rmw_DEPENDENCIES) + @rm -f test_read_rmw$(EXEEXT) + $(AM_V_CXXLD)$(test_read_rmw_LINK) $(test_read_rmw_OBJECTS) $(test_read_rmw_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -461,6 +513,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_read-test_read.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_read_prob-test_read_prob.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_read_rmw-test_read_rmw.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @@ -510,6 +563,20 @@ test_read_prob-test_read_prob.obj: test_read_prob.cc @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_prob_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_read_prob-test_read_prob.obj `if test -f 'test_read_prob.cc'; then $(CYGPATH_W) 'test_read_prob.cc'; else $(CYGPATH_W) '$(srcdir)/test_read_prob.cc'; fi` +test_read_rmw-test_read_rmw.o: test_read_rmw.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_rmw_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_read_rmw-test_read_rmw.o -MD -MP -MF $(DEPDIR)/test_read_rmw-test_read_rmw.Tpo -c -o test_read_rmw-test_read_rmw.o `test -f 'test_read_rmw.cc' || echo '$(srcdir)/'`test_read_rmw.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_read_rmw-test_read_rmw.Tpo $(DEPDIR)/test_read_rmw-test_read_rmw.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test_read_rmw.cc' object='test_read_rmw-test_read_rmw.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_rmw_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_read_rmw-test_read_rmw.o `test -f 'test_read_rmw.cc' || echo '$(srcdir)/'`test_read_rmw.cc + +test_read_rmw-test_read_rmw.obj: test_read_rmw.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_rmw_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_read_rmw-test_read_rmw.obj -MD -MP -MF $(DEPDIR)/test_read_rmw-test_read_rmw.Tpo -c -o test_read_rmw-test_read_rmw.obj `if test -f 'test_read_rmw.cc'; then $(CYGPATH_W) 'test_read_rmw.cc'; else $(CYGPATH_W) '$(srcdir)/test_read_rmw.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_read_rmw-test_read_rmw.Tpo $(DEPDIR)/test_read_rmw-test_read_rmw.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test_read_rmw.cc' object='test_read_rmw-test_read_rmw.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_rmw_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_read_rmw-test_read_rmw.obj `if test -f 'test_read_rmw.cc'; then $(CYGPATH_W) 'test_read_rmw.cc'; else $(CYGPATH_W) '$(srcdir)/test_read_rmw.cc'; fi` + ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am @@ -636,6 +703,7 @@ clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/test_read-test_read.Po -rm -f ./$(DEPDIR)/test_read_prob-test_read_prob.Po + -rm -f ./$(DEPDIR)/test_read_rmw-test_read_rmw.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -683,6 +751,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/test_read-test_read.Po -rm -f ./$(DEPDIR)/test_read_prob-test_read_prob.Po + -rm -f ./$(DEPDIR)/test_read_rmw-test_read_rmw.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff --git a/internal/test_util/libcode/vx_tc_util/test_read_rmw.cc b/internal/test_util/libcode/vx_tc_util/test_read_rmw.cc index 72eacbe4ae..ff813e27cb 100644 --- a/internal/test_util/libcode/vx_tc_util/test_read_rmw.cc +++ b/internal/test_util/libcode/vx_tc_util/test_read_rmw.cc @@ -15,6 +15,9 @@ using namespace std; #include #include +#include +using namespace netCDF; + #include "vx_util.h" #include "vx_nc_util.h" #include "vx_tc_util.h" diff --git a/src/basic/vx_config/config_constants.h b/src/basic/vx_config/config_constants.h index b01d8c907a..5985e0ba8e 100644 --- a/src/basic/vx_config/config_constants.h +++ b/src/basic/vx_config/config_constants.h @@ -555,6 +555,7 @@ static const char conf_key_GRIB1_subcenter[] = "GRIB1_subcenter"; static const char conf_key_GRIB1_rec[] = "GRIB1_rec"; static const char conf_key_GRIB1_code[] = "GRIB1_code"; static const char conf_key_GRIB1_tri[] = "GRIB1_tri"; + static const char conf_key_GRIB2_disc[] = "GRIB2_disc"; static const char conf_key_GRIB2_parm_cat[] = "GRIB2_parm_cat"; static const char conf_key_GRIB2_parm[] = "GRIB2_parm"; @@ -567,6 +568,12 @@ static const char conf_key_GRIB2_ens_type[] = "GRIB2_ens_type"; static const char conf_key_GRIB2_der_type[] = "GRIB2_der_type"; static const char conf_key_GRIB2_stat_type[] = "GRIB2_stat_type"; static const char conf_key_GRIB2_perc_val[] = "GRIB2_perc_val"; + +static const char conf_key_GRIB2_aerosol_type[] = "GRIB2_aerosol_type"; +static const char conf_key_GRIB2_aerosol_interval_type[] = "GRIB2_aerosol_interval_type"; +static const char conf_key_GRIB2_aerosol_size_lower[] = "GRIB2_aerosol_size_lower"; +static const char conf_key_GRIB2_aerosol_size_upper[] = "GRIB2_aerosol_size_upper"; + static const char conf_key_GRIB2_ipdtmpl_index[] = "GRIB2_ipdtmpl_index"; static const char conf_key_GRIB2_ipdtmpl_val[] = "GRIB2_ipdtmpl_val"; static const char conf_key_level[] = "level"; diff --git a/src/libcode/vx_data2d_grib2/data2d_grib2.cc b/src/libcode/vx_data2d_grib2/data2d_grib2.cc index 82cc9495be..e86ef7ca2c 100644 --- a/src/libcode/vx_data2d_grib2/data2d_grib2.cc +++ b/src/libcode/vx_data2d_grib2/data2d_grib2.cc @@ -437,6 +437,14 @@ void MetGrib2DataFile::find_record_matches(VarInfoGrib2* vinfo, continue; } + // test aerosol config file options + if( (!is_bad_data(vinfo->aerosol_type()) && vinfo->aerosol_type() != (*it)->AerosolType ) || + (!is_bad_data(vinfo->aerosol_interval_type()) && vinfo->aerosol_interval_type() != (*it)->AerosolIntervalType ) || + (!is_bad_data(vinfo->aerosol_size_lower()) && !is_eq(vinfo->aerosol_size_lower(), (*it)->AerosolSizeLower )) || + (!is_bad_data(vinfo->aerosol_size_upper()) && !is_eq(vinfo->aerosol_size_upper(), (*it)->AerosolSizeUpper )) ){ + continue; + } + // test ipdtmpl array values if(vinfo->n_ipdtmpl() > 0) { int i, j; diff --git a/src/libcode/vx_data2d_grib2/var_info_grib2.cc b/src/libcode/vx_data2d_grib2/var_info_grib2.cc index 90f5275bbc..6ea70eecfa 100644 --- a/src/libcode/vx_data2d_grib2/var_info_grib2.cc +++ b/src/libcode/vx_data2d_grib2/var_info_grib2.cc @@ -110,6 +110,11 @@ void VarInfoGrib2::assign(const VarInfoGrib2 &v) { StatType = v.StatType; PercVal = v.PercVal; + AerosolType = v.AerosolType; + AerosolIntervalType = v.AerosolIntervalType; + AerosolSizeLower = v.AerosolSizeLower; + AerosolSizeUpper = v.AerosolSizeUpper; + IPDTmplIndex = v.IPDTmplIndex; IPDTmplVal = v.IPDTmplVal; @@ -137,6 +142,11 @@ void VarInfoGrib2::clear() { StatType = bad_data_int; PercVal = bad_data_int; + AerosolType = bad_data_int; + AerosolIntervalType = bad_data_int; + AerosolSizeLower = bad_data_double; + AerosolSizeUpper = bad_data_double; + IPDTmplIndex.clear(); IPDTmplVal.clear(); @@ -149,18 +159,22 @@ void VarInfoGrib2::dump(ostream &out) const { // Dump out the contents out << "VarInfoGrib2::dump():\n" - << " Record = " << Record << "\n" - << " Discipline = " << Discipline << "\n" - << " MTable = " << MTable << "\n" - << " LTable = " << LTable << "\n" - << " ParmCat = " << ParmCat << "\n" - << " Parm = " << Parm << "\n" - << " PDTmpl = " << PDTmpl << "\n" - << " Process = " << Process << "\n" - << " EnsType = " << EnsType << "\n" - << " DerType = " << DerType << "\n" - << " StatType = " << StatType << "\n" - << " PercVal = " << PercVal << "\n"; + << " Record = " << Record << "\n" + << " Discipline = " << Discipline << "\n" + << " MTable = " << MTable << "\n" + << " LTable = " << LTable << "\n" + << " ParmCat = " << ParmCat << "\n" + << " Parm = " << Parm << "\n" + << " PDTmpl = " << PDTmpl << "\n" + << " Process = " << Process << "\n" + << " EnsType = " << EnsType << "\n" + << " DerType = " << DerType << "\n" + << " StatType = " << StatType << "\n" + << " PercVal = " << PercVal << "\n" + << " AerosolType = " << AerosolType << "\n" + << " AerosolIntervalType = " << AerosolIntervalType << "\n" + << " AerosolSizeLower = " << AerosolSizeLower << "\n" + << " AerosolSizeUpper = " << AerosolSizeUpper << "\n"; out << " IPDTmplIndex:\n"; IPDTmplIndex.dump(out); out << " IPDTmplVal:\n"; @@ -255,6 +269,34 @@ void VarInfoGrib2::set_perc_val(int v) { /////////////////////////////////////////////////////////////////////////////// +void VarInfoGrib2::set_aerosol_type(int v) { + AerosolType = v; + return; +} + +/////////////////////////////////////////////////////////////////////////////// + +void VarInfoGrib2::set_aerosol_interval_type(int v) { + AerosolIntervalType = v; + return; +} + +/////////////////////////////////////////////////////////////////////////////// + +void VarInfoGrib2::set_aerosol_size_lower(double v) { + AerosolSizeLower = v; + return; +} + +/////////////////////////////////////////////////////////////////////////////// + +void VarInfoGrib2::set_aerosol_size_upper(double v) { + AerosolSizeUpper = v; + return; +} + +/////////////////////////////////////////////////////////////////////////////// + void VarInfoGrib2::set_ipdtmpl_index(const IntArray &v) { IPDTmplIndex = v; return; @@ -292,6 +334,11 @@ void VarInfoGrib2::set_dict(Dictionary & dict) { StatType = dict.lookup_int (conf_key_GRIB2_stat_type, false); PercVal = dict.lookup_int (conf_key_GRIB2_perc_val, false); + AerosolType = dict.lookup_int (conf_key_GRIB2_aerosol_type, false); + AerosolIntervalType = dict.lookup_int (conf_key_GRIB2_aerosol_interval_type, false); + AerosolSizeLower = dict.lookup_double(conf_key_GRIB2_aerosol_size_lower, false); + AerosolSizeUpper = dict.lookup_double(conf_key_GRIB2_aerosol_size_upper, false); + IPDTmplIndex = dict.lookup_int_array(conf_key_GRIB2_ipdtmpl_index, false); IPDTmplVal = dict.lookup_int_array(conf_key_GRIB2_ipdtmpl_val, false); diff --git a/src/libcode/vx_data2d_grib2/var_info_grib2.h b/src/libcode/vx_data2d_grib2/var_info_grib2.h index 7f47facf08..619508358b 100644 --- a/src/libcode/vx_data2d_grib2/var_info_grib2.h +++ b/src/libcode/vx_data2d_grib2/var_info_grib2.h @@ -56,6 +56,11 @@ class VarInfoGrib2 : public VarInfo int StatType; // Statistical Processing Type (Table 4.10) int PercVal; // Percentile Value (Octet 35 for Templates 4.6 and 4.10) + int AerosolType; // Aerosol Type (Table 4.46 and 4.48) + int AerosolIntervalType; // Aerosol Interval Type (Table 4.46 and 4.48) + double AerosolSizeLower; // Lower limit of Aerosol Size + double AerosolSizeUpper; // Upper limit of Aerosol Size + IntArray IPDTmplIndex; // Index into the GRIB2 ipdtmpl array IntArray IPDTmplVal; // Corresponding GRIB2 ipdtmpl value @@ -89,6 +94,11 @@ class VarInfoGrib2 : public VarInfo int stat_type() const; int perc_val() const; + int aerosol_type() const; + int aerosol_interval_type() const; + double aerosol_size_lower() const; + double aerosol_size_upper() const; + int n_ipdtmpl() const; int ipdtmpl_index(int) const; int ipdtmpl_val(int) const; @@ -111,6 +121,10 @@ class VarInfoGrib2 : public VarInfo void set_der_type(int); void set_stat_type(int); void set_perc_val(int); + void set_aerosol_type(int); + void set_aerosol_interval_type(int); + void set_aerosol_size_lower(double); + void set_aerosol_size_upper(double); void set_ipdtmpl_index(const IntArray &); void set_ipdtmpl_val(const IntArray &); @@ -145,6 +159,12 @@ inline int VarInfoGrib2::ens_type() const { return(EnsType); } inline int VarInfoGrib2::der_type() const { return(DerType); } inline int VarInfoGrib2::stat_type() const { return(StatType); } inline int VarInfoGrib2::perc_val() const { return(PercVal); } + +inline int VarInfoGrib2::aerosol_type() const { return(AerosolType); } +inline int VarInfoGrib2::aerosol_interval_type() const { return(AerosolIntervalType); } +inline double VarInfoGrib2::aerosol_size_lower() const { return(AerosolSizeLower); } +inline double VarInfoGrib2::aerosol_size_upper() const { return(AerosolSizeUpper); } + inline int VarInfoGrib2::n_ipdtmpl() const { return(IPDTmplIndex.n()); } inline int VarInfoGrib2::ipdtmpl_index(int i) const { diff --git a/src/libcode/vx_tc_util/prob_pair_info.cc b/src/libcode/vx_tc_util/prob_pair_info.cc deleted file mode 100644 index 754ba05df2..0000000000 --- a/src/libcode/vx_tc_util/prob_pair_info.cc +++ /dev/null @@ -1,225 +0,0 @@ -// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* -// ** Copyright UCAR (c) 1992 - 2023 -// ** University Corporation for Atmospheric Research (UCAR) -// ** National Center for Atmospheric Research (NCAR) -// ** Research Applications Lab (RAL) -// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA -// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* - -//////////////////////////////////////////////////////////////////////// - -using namespace std; - -#include -#include -#include -#include -#include -#include - -#include "prob_pair_info_base.h" -#include "prob_rirw_pair_info.h" -#include "prob_pair_info_array.h" - -//////////////////////////////////////////////////////////////////////// -// -// Code for class ProbPairInfoArray -// -//////////////////////////////////////////////////////////////////////// - -ProbPairInfoArray::ProbPairInfoArray() { - - init_from_scratch(); -} - -//////////////////////////////////////////////////////////////////////// - -ProbPairInfoArray::~ProbPairInfoArray() { - - clear(); -} - -//////////////////////////////////////////////////////////////////////// - -ProbPairInfoArray::ProbPairInfoArray(const ProbPairInfoArray & t) { - - init_from_scratch(); - - assign(t); -} - -//////////////////////////////////////////////////////////////////////// - -ProbPairInfoArray & ProbPairInfoArray::operator=(const ProbPairInfoArray & t) { - - if(this == &t) return(*this); - - assign(t); - - return(*this); -} - -//////////////////////////////////////////////////////////////////////// - -void ProbPairInfoArray::init_from_scratch() { - - clear(); - - return; -} - -//////////////////////////////////////////////////////////////////////// - -void ProbPairInfoArray::clear() { - - // Deallocate memory for each entry - for(int i=0; idump(out, indent_depth+1); - } - - out << flush; - - return; -} - -//////////////////////////////////////////////////////////////////////// - -ConcatString ProbPairInfoArray::serialize() const { - ConcatString s; - - s << "ProbPairInfoArray: " - << "NPairs = " << n_pairs(); - - return(s); -} - -//////////////////////////////////////////////////////////////////////// - -ConcatString ProbPairInfoArray::serialize_r(int indent_depth) const { - Indent prefix(indent_depth); - ConcatString s; - - s << prefix << serialize() << ", Pairs:\n"; - - for(int i=0; iserialize_r(i+1, indent_depth+1); - } - - return(s); -} - -//////////////////////////////////////////////////////////////////////// - -void ProbPairInfoArray::assign(const ProbPairInfoArray &p) { - - clear(); - - // Allocate space and copy each element - for(int i=0; itype())); - *(Pair[i]) = *(p.Pair[i]); - } - - return; -} - -//////////////////////////////////////////////////////////////////////// - -const ProbPairInfoBase * ProbPairInfoArray::operator[](int n) const { - - // Check range - if((n < 0) || (n >= Pair.size())) { - mlog << Error - << "\nProbPairInfoArray::operator[](int) -> " - << "range check error for index value " << n << "\n\n"; - exit(1); - } - - return(Pair[n]); -} - -//////////////////////////////////////////////////////////////////////// - -bool ProbPairInfoArray::add(const ATCFProbLine &l, bool check_dup) { - - // Check for no pairs or a mismatch with the latest entry - if( Pair.size() == 0 || - (Pair.size() > 0 && !Pair[Pair.size()-1]->add(l, check_dup))) { - - // Allocate and store new pair - Pair.push_back(new_prob_pair(l.type())); - - // Add current line to new pair - if(!Pair[Pair.size()-1]->add(l, check_dup)) { - mlog << Warning - << "\nbool ProbPairInfoArray::add(const ATCFProbLine &l, bool check_dup) -> " - << "cannot store ATCFProbLine:\n" << l.get_line() << "\n\n"; - return(false); - } - } - - return(true); -} - -//////////////////////////////////////////////////////////////////////// - -bool ProbPairInfoArray::add(const ProbPairInfoBase *p) { - ProbPairInfoBase *new_pair; - - // Allocate new pair, set its value, and store it - new_pair = new_prob_pair(p->type()); - *(new_pair) = *(p); - Pair.push_back(new_pair); - - return(true); -} - -//////////////////////////////////////////////////////////////////////// - -ProbPairInfoBase * new_prob_pair(const ATCFLineType t) { - ProbPairInfoBase *new_pair = (ProbPairInfoBase *) 0; - - switch(t) { - case ATCFLineType_ProbRI: - new_pair = new ProbRIRWPairInfo; - break; - - default: - mlog << Warning - << "\nProbPairInfoBase * new_prob_pair(const ATCFLineType t) -> " - << "unexpected ATCF line type (" - << atcflinetype_to_string(t) << ")\n\n"; - break; - } - - if(!new_pair) { - mlog << Error - << "\nProbPairInfoBase * new_prob_pair(const ATCFLineType t) -> " - << "memory allocation error!\n\n"; - exit(1); - } - - return(new_pair); -} - -//////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_tc_util/prob_pair_info.h b/src/libcode/vx_tc_util/prob_pair_info.h deleted file mode 100644 index e83626527d..0000000000 --- a/src/libcode/vx_tc_util/prob_pair_info.h +++ /dev/null @@ -1,81 +0,0 @@ -// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* -// ** Copyright UCAR (c) 1992 - 2023 -// ** University Corporation for Atmospheric Research (UCAR) -// ** National Center for Atmospheric Research (NCAR) -// ** Research Applications Lab (RAL) -// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA -// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* - -//////////////////////////////////////////////////////////////////////// - -#ifndef __VX_PROB_PAIR_INFO_H__ -#define __VX_PROB_PAIR_INFO_H__ - -//////////////////////////////////////////////////////////////////////// - -#include -#include - -#include "atcf_prob_line.h" -#include "prob_info_array.h" - -#include "vx_util.h" - -//////////////////////////////////////////////////////////////////////// -// -// ProbPairInfo class stores a ProbInfoBase class pointer and a -// verifying -// -//////////////////////////////////////////////////////////////////////// - -class ProbPairInfo { - - protected: - - void init_from_scratch(); - void assign(const ProbPairInfo &); - - vector Pair; - - public: - - ProbPairInfo(); - ~ProbPairInfo(); - ProbPairInfo(const ProbPairInfo &); - ProbPairInfo & operator=(const ProbPairInfo &); - - void clear(); - - void dump(std::ostream &, int = 0) const; - ConcatString serialize() const; - ConcatString serialize_r(int = 0) const; - - // - // get stuff - // - - const ProbPairInfoBase * operator[](int) const; - int n_pairs() const; - - // - // do stuff - // - - bool add(const ATCFProbLine &, bool check_dup = false); - bool add(const ProbPairInfoBase *); - -}; - -//////////////////////////////////////////////////////////////////////// - -inline int ProbPairInfo::n_pairs() const { return(Pair.size()); } - -//////////////////////////////////////////////////////////////////////// - -extern ProbPairInfoBase * new_prob_pair(const ATCFLineType); - -//////////////////////////////////////////////////////////////////////// - -#endif /* __VX_PROB_PAIR_INFO_H__ */ - -//////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/ascii2nc/Makefile.am b/src/tools/other/ascii2nc/Makefile.am index 26b25fd835..0647687561 100644 --- a/src/tools/other/ascii2nc/Makefile.am +++ b/src/tools/other/ascii2nc/Makefile.am @@ -28,7 +28,9 @@ ascii2nc_SOURCES = ascii2nc.cc \ ndbc_handler.cc ndbc_handler.h \ ndbc_locations.cc ndbc_locations.h \ airnow_locations.cc airnow_locations.h \ - aeronet_handler.cc aeronet_handler.h $(OPT_PYTHON_SOURCES) + aeronet_handler.cc aeronet_handler.h \ + ismn_handler.cc ismn_handler.h \ + $(OPT_PYTHON_SOURCES) ascii2nc_CPPFLAGS = ${MET_CPPFLAGS} -I../../../basic/vx_log ascii2nc_LDFLAGS = ${MET_LDFLAGS} diff --git a/src/tools/other/ascii2nc/Makefile.in b/src/tools/other/ascii2nc/Makefile.in index c12146b23b..4c364feb94 100644 --- a/src/tools/other/ascii2nc/Makefile.in +++ b/src/tools/other/ascii2nc/Makefile.in @@ -110,7 +110,8 @@ am__ascii2nc_SOURCES_DIST = ascii2nc.cc ascii2nc_conf_info.cc \ airnow_handler.h ndbc_handler.cc ndbc_handler.h \ ndbc_locations.cc ndbc_locations.h airnow_locations.cc \ airnow_locations.h aeronet_handler.cc aeronet_handler.h \ - python_handler.h python_handler.cc + ismn_handler.cc ismn_handler.h python_handler.h \ + python_handler.cc @ENABLE_PYTHON_TRUE@am__objects_1 = ascii2nc-python_handler.$(OBJEXT) am__objects_2 = $(am__objects_1) am_ascii2nc_OBJECTS = ascii2nc-ascii2nc.$(OBJEXT) \ @@ -124,7 +125,8 @@ am_ascii2nc_OBJECTS = ascii2nc-ascii2nc.$(OBJEXT) \ ascii2nc-ndbc_handler.$(OBJEXT) \ ascii2nc-ndbc_locations.$(OBJEXT) \ ascii2nc-airnow_locations.$(OBJEXT) \ - ascii2nc-aeronet_handler.$(OBJEXT) $(am__objects_2) + ascii2nc-aeronet_handler.$(OBJEXT) \ + ascii2nc-ismn_handler.$(OBJEXT) $(am__objects_2) ascii2nc_OBJECTS = $(am_ascii2nc_OBJECTS) am__DEPENDENCIES_1 = ascii2nc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @@ -153,6 +155,7 @@ am__depfiles_remade = ./$(DEPDIR)/ascii2nc-aeronet_handler.Po \ ./$(DEPDIR)/ascii2nc-ascii2nc.Po \ ./$(DEPDIR)/ascii2nc-ascii2nc_conf_info.Po \ ./$(DEPDIR)/ascii2nc-file_handler.Po \ + ./$(DEPDIR)/ascii2nc-ismn_handler.Po \ ./$(DEPDIR)/ascii2nc-little_r_handler.Po \ ./$(DEPDIR)/ascii2nc-met_handler.Po \ ./$(DEPDIR)/ascii2nc-ndbc_handler.Po \ @@ -387,7 +390,9 @@ ascii2nc_SOURCES = ascii2nc.cc \ ndbc_handler.cc ndbc_handler.h \ ndbc_locations.cc ndbc_locations.h \ airnow_locations.cc airnow_locations.h \ - aeronet_handler.cc aeronet_handler.h $(OPT_PYTHON_SOURCES) + aeronet_handler.cc aeronet_handler.h \ + ismn_handler.cc ismn_handler.h \ + $(OPT_PYTHON_SOURCES) ascii2nc_CPPFLAGS = ${MET_CPPFLAGS} -I../../../basic/vx_log ascii2nc_LDFLAGS = ${MET_LDFLAGS} @@ -514,6 +519,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii2nc-ascii2nc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii2nc-ascii2nc_conf_info.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii2nc-file_handler.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii2nc-ismn_handler.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii2nc-little_r_handler.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii2nc-met_handler.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii2nc-ndbc_handler.Po@am__quote@ # am--include-marker @@ -710,6 +716,20 @@ ascii2nc-aeronet_handler.obj: aeronet_handler.cc @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ascii2nc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ascii2nc-aeronet_handler.obj `if test -f 'aeronet_handler.cc'; then $(CYGPATH_W) 'aeronet_handler.cc'; else $(CYGPATH_W) '$(srcdir)/aeronet_handler.cc'; fi` +ascii2nc-ismn_handler.o: ismn_handler.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ascii2nc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ascii2nc-ismn_handler.o -MD -MP -MF $(DEPDIR)/ascii2nc-ismn_handler.Tpo -c -o ascii2nc-ismn_handler.o `test -f 'ismn_handler.cc' || echo '$(srcdir)/'`ismn_handler.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ascii2nc-ismn_handler.Tpo $(DEPDIR)/ascii2nc-ismn_handler.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ismn_handler.cc' object='ascii2nc-ismn_handler.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ascii2nc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ascii2nc-ismn_handler.o `test -f 'ismn_handler.cc' || echo '$(srcdir)/'`ismn_handler.cc + +ascii2nc-ismn_handler.obj: ismn_handler.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ascii2nc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ascii2nc-ismn_handler.obj -MD -MP -MF $(DEPDIR)/ascii2nc-ismn_handler.Tpo -c -o ascii2nc-ismn_handler.obj `if test -f 'ismn_handler.cc'; then $(CYGPATH_W) 'ismn_handler.cc'; else $(CYGPATH_W) '$(srcdir)/ismn_handler.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ascii2nc-ismn_handler.Tpo $(DEPDIR)/ascii2nc-ismn_handler.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ismn_handler.cc' object='ascii2nc-ismn_handler.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ascii2nc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ascii2nc-ismn_handler.obj `if test -f 'ismn_handler.cc'; then $(CYGPATH_W) 'ismn_handler.cc'; else $(CYGPATH_W) '$(srcdir)/ismn_handler.cc'; fi` + ascii2nc-python_handler.o: python_handler.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ascii2nc_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ascii2nc-python_handler.o -MD -MP -MF $(DEPDIR)/ascii2nc-python_handler.Tpo -c -o ascii2nc-python_handler.o `test -f 'python_handler.cc' || echo '$(srcdir)/'`python_handler.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ascii2nc-python_handler.Tpo $(DEPDIR)/ascii2nc-python_handler.Po @@ -857,6 +877,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/ascii2nc-ascii2nc.Po -rm -f ./$(DEPDIR)/ascii2nc-ascii2nc_conf_info.Po -rm -f ./$(DEPDIR)/ascii2nc-file_handler.Po + -rm -f ./$(DEPDIR)/ascii2nc-ismn_handler.Po -rm -f ./$(DEPDIR)/ascii2nc-little_r_handler.Po -rm -f ./$(DEPDIR)/ascii2nc-met_handler.Po -rm -f ./$(DEPDIR)/ascii2nc-ndbc_handler.Po @@ -915,6 +936,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/ascii2nc-ascii2nc.Po -rm -f ./$(DEPDIR)/ascii2nc-ascii2nc_conf_info.Po -rm -f ./$(DEPDIR)/ascii2nc-file_handler.Po + -rm -f ./$(DEPDIR)/ascii2nc-ismn_handler.Po -rm -f ./$(DEPDIR)/ascii2nc-little_r_handler.Po -rm -f ./$(DEPDIR)/ascii2nc-met_handler.Po -rm -f ./$(DEPDIR)/ascii2nc-ndbc_handler.Po diff --git a/src/tools/other/ascii2nc/aeronet_handler.h b/src/tools/other/ascii2nc/aeronet_handler.h index ec64202944..e835a91602 100644 --- a/src/tools/other/ascii2nc/aeronet_handler.h +++ b/src/tools/other/ascii2nc/aeronet_handler.h @@ -10,8 +10,8 @@ //////////////////////////////////////////////////////////////////////// -#ifndef __AERONETHANDLER_H__ -#define __AERONETHANDLER_H__ +#ifndef __AERONET_HANDLER_H__ +#define __AERONET_HANDLER_H__ //////////////////////////////////////////////////////////////////////// @@ -125,7 +125,7 @@ class AeronetHandler : public FileHandler //////////////////////////////////////////////////////////////////////// -#endif /* __AERONETHANDLER_H__ */ +#endif /* __AERONET_HANDLER_H__ */ //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/ascii2nc/airnow_handler.cc b/src/tools/other/ascii2nc/airnow_handler.cc index a5542b642c..74525c6139 100644 --- a/src/tools/other/ascii2nc/airnow_handler.cc +++ b/src/tools/other/ascii2nc/airnow_handler.cc @@ -648,7 +648,7 @@ time_t AirnowHandler::_getValidTime(const string &dateStr, const string &timeStr struct tm time_struct; memset(&time_struct, 0, sizeof(time_struct)); - time_struct.tm_year = atoi(year.c_str()) -1900; + time_struct.tm_year = atoi(year.c_str()) - 1900; time_struct.tm_mon = atoi(mon.c_str()) - 1; time_struct.tm_mday = atoi(mday.c_str()); time_struct.tm_hour = atoi(hour.c_str()); diff --git a/src/tools/other/ascii2nc/airnow_handler.h b/src/tools/other/ascii2nc/airnow_handler.h index 9064c5ce70..beef7bf0d5 100644 --- a/src/tools/other/ascii2nc/airnow_handler.h +++ b/src/tools/other/ascii2nc/airnow_handler.h @@ -10,8 +10,8 @@ //////////////////////////////////////////////////////////////////////// -#ifndef __AIRNOWHANDLER_H__ -#define __AIRNOWHANDLER_H__ +#ifndef __AIRNOW_HANDLER_H__ +#define __AIRNOW_HANDLER_H__ //////////////////////////////////////////////////////////////////////// @@ -198,7 +198,7 @@ class AirnowHandler : public FileHandler //////////////////////////////////////////////////////////////////////// -#endif /* __AERONETHANDLER_H__ */ +#endif /* __AERONET_HANDLER_H__ */ //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/ascii2nc/ascii2nc.cc b/src/tools/other/ascii2nc/ascii2nc.cc index 19cfa25549..9caecd0481 100644 --- a/src/tools/other/ascii2nc/ascii2nc.cc +++ b/src/tools/other/ascii2nc/ascii2nc.cc @@ -48,7 +48,8 @@ // 019 07/06/22 Howard Soh METplus-Internal #19 Rename main to met_main // 020 08/26/22 Dave Albo MET #2142 Add AirNow observations // 021 10/03/22 Prestopnik MET #2227 Remove using namespace std from header files -// 022 10/07/22 Dave Albo MET #2276 Add NDBC Buoy data +// 022 10/07/22 Dave Albo MET #2276 Add NDBC buoy data +// 023 11/28/23 Halley Gotway MET #2701 Add ISMN soil moisture data // //////////////////////////////////////////////////////////////////////// @@ -86,6 +87,7 @@ using namespace std; #include "aeronet_handler.h" #include "airnow_handler.h" #include "ndbc_handler.h" +#include "ismn_handler.h" #ifdef ENABLE_PYTHON #include "global_python.h" @@ -113,6 +115,7 @@ enum ASCIIFormat { ASCIIFormat_Airnow_hourlyaqobs, ASCIIFormat_Airnow_hourly, ASCIIFormat_NDBC_standard, + ASCIIFormat_ISMN, ASCIIFormat_Aeronet_v2, ASCIIFormat_Aeronet_v3, ASCIIFormat_Python, @@ -322,6 +325,10 @@ FileHandler *create_file_handler(const ASCIIFormat format, const ConcatString &a return((FileHandler *) handler); } + case ASCIIFormat_ISMN: { + return((FileHandler *) new IsmnHandler(program_name)); + } + case ASCIIFormat_Aeronet_v2: { AeronetHandler *handler = new AeronetHandler(program_name); handler->setFormatVersion(2); @@ -459,9 +466,21 @@ FileHandler *determine_ascii_format(const ConcatString &ascii_filename) { delete ndbc_file; // - // If we get here, we didn't recognize the file contents. + // See if this is an ISMN file. // + f_in.rewind(); + IsmnHandler *ismn_file = new IsmnHandler(program_name); + + if(ismn_file->isFileType(f_in)) { + f_in.close(); + return((FileHandler *) ismn_file); + } + + delete ismn_file; + // + // If we get here, we didn't recognize the file contents. + // mlog << Error << "\ndetermine_ascii_format() -> " << "could not determine file format based on file contents\n\n"; @@ -503,6 +522,7 @@ void usage() { << AirnowHandler::getFormatStringHourlyAqObs() << "\", \"" << AirnowHandler::getFormatStringHourly() << "\", \"" << NdbcHandler::getFormatStringStandard() << "\", \"" + << IsmnHandler::getFormatString() << "\", \"" << AeronetHandler::getFormatString() << "\", \"" << AeronetHandler::getFormatString_v2() << "\", \"" << AeronetHandler::getFormatString_v3() << "\""; @@ -585,6 +605,9 @@ void set_format(const StringArray & a) { else if(NdbcHandler::getFormatStringStandard() == a[0]) { ascii_format = ASCIIFormat_NDBC_standard; } + else if(IsmnHandler::getFormatString() == a[0]) { + ascii_format = ASCIIFormat_ISMN; + } else if(AeronetHandler::getFormatString() == a[0] || AeronetHandler::getFormatString_v2() == a[0]) { ascii_format = ASCIIFormat_Aeronet_v2; diff --git a/src/tools/other/ascii2nc/file_handler.h b/src/tools/other/ascii2nc/file_handler.h index ece575672a..8358411f36 100644 --- a/src/tools/other/ascii2nc/file_handler.h +++ b/src/tools/other/ascii2nc/file_handler.h @@ -10,8 +10,8 @@ //////////////////////////////////////////////////////////////////////// -#ifndef __FILEHANDLER_H__ -#define __FILEHANDLER_H__ +#ifndef __FILE_HANDLER_H__ +#define __FILE_HANDLER_H__ //////////////////////////////////////////////////////////////////////// @@ -158,7 +158,7 @@ inline void FileHandler::setMessageTypeMap(map m) { //////////////////////////////////////////////////////////////////////// -#endif /* __FILEHANDLER_H__ */ +#endif /* __FILE_HANDLER_H__ */ //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/ascii2nc/ismn_handler.cc b/src/tools/other/ascii2nc/ismn_handler.cc new file mode 100644 index 0000000000..0cf8c29042 --- /dev/null +++ b/src/tools/other/ascii2nc/ismn_handler.cc @@ -0,0 +1,255 @@ +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* +// ** Copyright UCAR (c) 1992 - 2023 +// ** University Corporation for Atmospheric Research (UCAR) +// ** National Center for Atmospheric Research (NCAR) +// ** Research Applications Lab (RAL) +// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* + +//////////////////////////////////////////////////////////////////////// + +using namespace std; + +#include + +#include "vx_log.h" +#include "vx_math.h" +#include "vx_util.h" + +#include "ismn_handler.h" + +const int IsmnHandler::MIN_NUM_HDR_COLS = 8; +const int IsmnHandler::NUM_OBS_COLS = 5; + +// Relevant GRIB codes +static const int PRATE_GRIB_CODE = 59; +static const int SNOD_GRIB_CODE = 66; +static const int SOILW_GRIB_CODE = 144; +static const int SMS_GRIB_CODE = -1; +static const int WEASD_GRIB_CODE = 65; +static const int TMP_GRIB_CODE = 11; +static const int TSOIL_GRIB_CODE = 85; +static const int AVSFT_GRIB_CODE = 148; + +// Mapping of ISMN strings to output variable names +map IsmnObsVarMap = { + { "p", { PRATE_GRIB_CODE, "PRATE" } }, + { "sd", { SNOD_GRIB_CODE, "SNOD" } }, + { "sm", { SOILW_GRIB_CODE, "SOILW" } }, + { "su", { SMS_GRIB_CODE, "SMS" } }, + { "sweq", { WEASD_GRIB_CODE, "WEASD" } }, + { "ta", { TMP_GRIB_CODE, "TMP" } }, + { "ts", { TSOIL_GRIB_CODE, "TSOIL" } }, + { "tsf", { AVSFT_GRIB_CODE, "AVSFT" } } +}; + +//////////////////////////////////////////////////////////////////////// +// +// Code for class IsmnHandler +// +//////////////////////////////////////////////////////////////////////// + +IsmnHandler::IsmnHandler(const string &program_name) : + FileHandler(program_name) { + use_var_id = true; +} + +//////////////////////////////////////////////////////////////////////// + +IsmnHandler::~IsmnHandler() { } + +//////////////////////////////////////////////////////////////////////// + +bool IsmnHandler::isFileType(LineDataFile &ascii_file) const { + + // ISMN files are identified by having a .stm suffix and + // checking the number of header and data columns. + // The header and data lines look like this: + // MAQU MAQU NST_24 33.99908 102.13661 3449.0 0.4000 0.4000 ECH20 EC-TM + // 2014/10/21 07:00 -27.7 G M + + // Initialize using the filename suffix + bool is_file_type = check_prefix_suffix(ascii_file.short_filename(), + nullptr, ".stm"); + + // Read the header line + DataLine dl; + while(dl.n_items() == 0) ascii_file >> dl; + + // Check the minimum number of header columns + if(dl.n_items() < MIN_NUM_HDR_COLS) is_file_type = false; + + // Check the number of data line columns + ascii_file >> dl; + if(dl.n_items() != NUM_OBS_COLS) is_file_type = false; + + return(is_file_type); +} + +//////////////////////////////////////////////////////////////////////// +// Private/Protected methods +//////////////////////////////////////////////////////////////////////// + +bool IsmnHandler::_readObservations(LineDataFile &ascii_file) { + + // Read and save the header information + if(!_readHeaderInfo(ascii_file)) return(false); + + // Get the var_id to use + int var_id = bad_data_int; + if(!_varNames.has(_obsVarInfo._varName, var_id)) return(false); + + // Process the observation lines + DataLine dl; + while(ascii_file >> dl) { + + // Make sure that the line contains the correct number of tokens + if(dl.n_items() != NUM_OBS_COLS) { + mlog << Error << "\nIsmnHandler::_readObservations() -> " + << "unexpected number of columns (" << dl.n_items() + << " != " << NUM_OBS_COLS << ") on line number " + << dl.line_number() << " of ISMN file \"" + << ascii_file.filename() << "\"!\n\n"; + return(false); + } + + // Extract the valid time from the data line + time_t valid_time = _getValidTime(dl); + if(valid_time == 0) return(false); + + // Store the observation value + double obs_value = atof(dl[2]); + + // Handle unit conversion + switch(_obsVarInfo._gribCode) { + + // Convert precip rate in second to hours + case PRATE_GRIB_CODE: + obs_value /= 3600; + break; + + // Convert mm to m + case SNOD_GRIB_CODE: + obs_value /= 1000.0; + break; + + // Convert C to K + case TMP_GRIB_CODE: + case TSOIL_GRIB_CODE: + case AVSFT_GRIB_CODE: + obs_value += 273.15; + break; + + default: + break; + } + + // Store the observation + _addObservations(Observation( + _networkName, _stationId, valid_time, + _stationLat, _stationLon, _stationElv, + dl[3], var_id, bad_data_double, + _depth, obs_value, _obsVarInfo._varName)); + + } // end while + + return(true); +} + +//////////////////////////////////////////////////////////////////////// + +time_t IsmnHandler::_getValidTime(const DataLine &dl) const { + struct tm time_struct; + memset(&time_struct, 0, sizeof(time_struct)); + + // Formatted as YYYY/MM/DD HH:MM + string ymd_str(dl[0]); + string hm_str(dl[1]); + + // Validate the time strings + if(!check_reg_exp("^[0-9]\\{4\\}/[0-9]\\{2\\}/[0-9]\\{2\\}$", dl[0]) || + !check_reg_exp("^[0-9]\\{2\\}:[0-9]\\{2\\}$", dl[1])) { + mlog << Warning << "\nIsmnHandler::_getValidTime() -> " + << "unexpected time stamp format on line number " + << dl.line_number() << " of ISMN input file:\n" + << " " << dl << "\n\n"; + } + else { + + // Parse time components + time_struct.tm_year = stoi(ymd_str.substr(0, 4)) - 1900; + time_struct.tm_mon = stoi(ymd_str.substr(5, 2)) - 1; + time_struct.tm_mday = stoi(ymd_str.substr(8, 2)); + time_struct.tm_hour = stoi( hm_str.substr(0, 2)); + time_struct.tm_min = stoi( hm_str.substr(3, 2)); + } + + return(timegm(&time_struct)); +} + +//////////////////////////////////////////////////////////////////////// + +bool IsmnHandler::_readHeaderInfo(LineDataFile &ascii_file) { + + // The file name is delimited with underscores and the variable name + // is the fourth item + ConcatString cs(ascii_file.short_filename()); + StringArray sa = cs.split("_"); + + // Validate the file name + if(sa.n() < 4) { + mlog << Error << "\nIsmnHandler::_readHeaderInfo() -> " + << "unexpected ISMN file name \"" << ascii_file.filename() + << "\"!\n\n"; + return(false); + } + + // Validate the variable name + if(IsmnObsVarMap.count(sa[3]) == 0) { + mlog << Error << "\nIsmnHandler::_readHeaderInfo() -> " + << "unexpected variable name (" << sa[3] + << ") found in ISMN file name \"" << ascii_file.filename() + << "\"!\n\n"; + return(false); + } + + // Store the observation variable info + _obsVarInfo = IsmnObsVarMap[sa[3]]; + + // Store the output variable name + _varNames.add_uniq(_obsVarInfo._varName); + + // Read the header line + DataLine dl; + while(dl.n_items() == 0) ascii_file >> dl; + + // Check the minimum number of header columns + if(dl.n_items() < MIN_NUM_HDR_COLS) { + mlog << Error << "\nIsmnHandler::_readHeaderInfo() -> " + << "unexpected number of header columns (" + << dl.n_items() << " < " << MIN_NUM_HDR_COLS + << ") in ISMN file \"" << ascii_file.filename() + << "\"!\n\n"; + return(false); + } + + // Store the header information + _networkName = dl[1]; + _stationId = dl[2]; + _stationLat = atof(dl[3]); + _stationLon = atof(dl[4]); + _stationElv = atof(dl[5]); + + // Set the depth for precip as 0 + if(_obsVarInfo._gribCode == PRATE_GRIB_CODE) { + _depth = 0.0; + } + // Otherwise, store the average of the two depths + else { + _depth = (atof(dl[6]) + atof(dl[7]))/2.0; + } + + return(true); +} + +//////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/ascii2nc/ismn_handler.h b/src/tools/other/ascii2nc/ismn_handler.h new file mode 100644 index 0000000000..05470aedec --- /dev/null +++ b/src/tools/other/ascii2nc/ismn_handler.h @@ -0,0 +1,154 @@ +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* +// ** Copyright UCAR (c) 1992 - 2023 +// ** University Corporation for Atmospheric Research (UCAR) +// ** National Center for Atmospheric Research (NCAR) +// ** Research Applications Lab (RAL) +// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* + +//////////////////////////////////////////////////////////////////////// + +#ifndef __ISMN_HANDLER_H__ +#define __ISMN_HANDLER_H__ + +//////////////////////////////////////////////////////////////////////// + +#include +#include + +#include "file_handler.h" + +//////////////////////////////////////////////////////////////////////// + +struct obsVarInfo { + int _gribCode; + string _varName; +}; + +//////////////////////////////////////////////////////////////////////// +// +// International Soil Moisture Network Data +// https://ismn.bafg.de/en/data/header-value-files +// +// Dataset Filename Convention: +// CSE_Network_Station_Variablename_depthfrom_depthto_sensorname_startdate_enddate.ext +// +// - CSE: Continental Scale Experiment (CSE) acronym, if not applicable use Networkname +// - Network: Network abbreviation (e.g., OZNET) +// - Station: Station name (e.g., Widgiewa) +// - Variablename: Name of the variable in the file (e.g., Soil-Moisture) +// - p: preciptation in mm/h +// - Store as GRIB Code 59 (PRATE in kg/m^2/s) +// - Convert from mm/h to kg/m^2/s +// - sd: snow depth in mm +// - Store as GRIB Code 66 (SNOD in m) +// - Convert from mm to m +// - sm: soil moisture in kg^3/kg^3 +// - Store as GRIB Code 144 (SOILW as a fraction) +// - su: soil suction in kPa +// - Store as GRIB Code -1 (undefined, SMS in kPa) +// - sweq: snow water equivalent in mm +// - Store as GRIB Code 65 (WEASD kg/m^2) +// - ta: air temperature in C +// - Store as GRIB Code 11 (TMP in K) +// - Convert from C to K +// - ts: soil temperature in C +// - Store as GRIB Code 85 (TSOIL in K) +// - Convert from C to K +// - tsf: surface temperature in C +// - Store as GRIB Code 148 (AVSFT in K) +// - Convert from C to K +// - depthfrom: Depth in the ground in which the variable was observed (upper boundary) +// - depthto: Depth in the ground in which the variable was observed (lower boundary) +// - sensorname: Name of the sensor used +// - startdate: Date of the first dataset in the file (format YYYYMMDD) +// - enddate: Date of the last dataset in the file (format YYYYMMDD) +// - ext: Extension .stm (Soil Temperature and Soil Moisture Data Set see CEOP standard) +// +// Example: OZNET_OZNET_Widgiewa_Soil-Temperature_0.150000_0.150000_20010103_20090812.stm +// +// Dataset Conents: +// Example: +// REMEDHUS REMEDHUS Zamarron 41.24100 -5.54300 855.00 0.05 0.05 +// 2005/03/16 00:00 10.30 U M +// 2005/03/16 01:00 9.80 U M +// ... +// +// Header Line: +// CSE, Network, Station, +// Latitude (degrees north), Longitude (degrees east), +// Elevation (msl), Depth from, Depth to, +// Sensor name (Note: contains embedded whitespace) +// +// Record Lines: +// YYYY/MM/DD HH:MM, Variable value, +// ISMN Quality Flag, Data Provider Quality Flag +// +//////////////////////////////////////////////////////////////////////// + +class IsmnHandler : public FileHandler { + + public: + + IsmnHandler(const string &program_name); + virtual ~IsmnHandler(); + + virtual bool isFileType(LineDataFile &ascii_file) const; + + static string getFormatString() { return "ismn"; } + + protected: + + ///////////////////////// + // Protected constants + ///////////////////////// + + // The number of columns in the second header line in the file. This line + // is used to determine if this is a ISMN file since the first line has + // an indeterminate number of tokens. + + static const int MIN_NUM_HDR_COLS; + + // The number of columns in the observation lines in the file. + + static const int NUM_OBS_COLS; + + /////////////////////// + // Protected members + /////////////////////// + + // Unchanging file name information + obsVarInfo _obsVarInfo; + + // Store list of unqiue output variable names + StringArray _varNames; + + // Unchanging header information + string _networkName; + string _stationId; + double _stationLat; + double _stationLon; + double _stationElv; + double _depth; + + /////////////////////// + // Protected methods + /////////////////////// + + // Read and save the header information from the given file + bool _readHeaderInfo(LineDataFile &ascii_file); + + // Get the valid time from the observation line + time_t _getValidTime(const DataLine &data_line) const; + + // Read the observations and add them to the + // _observations vector + virtual bool _readObservations(LineDataFile &ascii_file); + +}; + +//////////////////////////////////////////////////////////////////////// + +#endif /* __ISMN_HANDLER_H__ */ + +//////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/ascii2nc/little_r_handler.h b/src/tools/other/ascii2nc/little_r_handler.h index 897f2416c3..c810a45ee4 100644 --- a/src/tools/other/ascii2nc/little_r_handler.h +++ b/src/tools/other/ascii2nc/little_r_handler.h @@ -10,8 +10,8 @@ //////////////////////////////////////////////////////////////////////// -#ifndef __LITTLERHANDLER_H__ -#define __LITTLERHANDLER_H__ +#ifndef __LITTLER_HANDLER_H__ +#define __LITTLER_HANDLER_H__ //////////////////////////////////////////////////////////////////////// @@ -64,7 +64,7 @@ class LittleRHandler : public FileHandler //////////////////////////////////////////////////////////////////////// -#endif /* __LITTLERHANDLER_H__ */ +#endif /* __LITTLER_HANDLER_H__ */ //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/ascii2nc/met_handler.h b/src/tools/other/ascii2nc/met_handler.h index f8dd880508..51ecf08010 100644 --- a/src/tools/other/ascii2nc/met_handler.h +++ b/src/tools/other/ascii2nc/met_handler.h @@ -10,8 +10,8 @@ //////////////////////////////////////////////////////////////////////// -#ifndef __METHANDLER_H__ -#define __METHANDLER_H__ +#ifndef __MET_HANDLER_H__ +#define __MET_HANDLER_H__ //////////////////////////////////////////////////////////////////////// @@ -54,7 +54,7 @@ class MetHandler : public FileHandler //////////////////////////////////////////////////////////////////////// -#endif /* __METHANDLER_H__ */ +#endif /* __MET_HANDLER_H__ */ //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/ascii2nc/ndbc_handler.cc b/src/tools/other/ascii2nc/ndbc_handler.cc index 9ec04255a2..510984f541 100644 --- a/src/tools/other/ascii2nc/ndbc_handler.cc +++ b/src/tools/other/ascii2nc/ndbc_handler.cc @@ -120,8 +120,15 @@ NdbcHandler::NdbcHandler(const string &program_name) : NdbcHandler::~NdbcHandler() { - mlog << Debug(1) << "Number of NDBC skipped files due to no lookup " << numMissingStations - << "\n"; + + // Log the non-zero number of missing stations + if(numMissingStations > 0) { + mlog << Debug(3) << "Skipped " << numMissingStations + << " NDBC files whose locations are not defined in \"" + << locationsFileName << "\". Set the " << stations_env + << " environment variable to provide an updated " + << "locations file.\n"; + } } @@ -362,7 +369,7 @@ time_t NdbcHandler::_getValidTime(const DataLine &data_line) const struct tm time_struct; memset(&time_struct, 0, sizeof(time_struct)); - time_struct.tm_year = atoi(year.c_str()) -1900; + time_struct.tm_year = atoi(year.c_str()) - 1900; time_struct.tm_mon = atoi(month.c_str()) - 1; time_struct.tm_mday = atoi(day.c_str()); time_struct.tm_hour = atoi(hour.c_str()); diff --git a/src/tools/other/ascii2nc/ndbc_handler.h b/src/tools/other/ascii2nc/ndbc_handler.h index b69b0ca311..d75b2136e5 100644 --- a/src/tools/other/ascii2nc/ndbc_handler.h +++ b/src/tools/other/ascii2nc/ndbc_handler.h @@ -10,8 +10,8 @@ //////////////////////////////////////////////////////////////////////// -#ifndef __NDBCHANDLER_H__ -#define __NDBCHANDLER_H__ +#ifndef __NDBC_HANDLER_H__ +#define __NDBC_HANDLER_H__ //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/ascii2nc/surfrad_handler.h b/src/tools/other/ascii2nc/surfrad_handler.h index 4fe8a3a9bb..ecbe6306e9 100644 --- a/src/tools/other/ascii2nc/surfrad_handler.h +++ b/src/tools/other/ascii2nc/surfrad_handler.h @@ -10,8 +10,8 @@ //////////////////////////////////////////////////////////////////////// -#ifndef __SURFRADHANDLER_H__ -#define __SURFRADHANDLER_H__ +#ifndef __SURFRAD_HANDLER_H__ +#define __SURFRAD_HANDLER_H__ //////////////////////////////////////////////////////////////////////// @@ -136,7 +136,7 @@ class SurfradHandler : public FileHandler //////////////////////////////////////////////////////////////////////// -#endif /* __SURFRADHANDLER_H__ */ +#endif /* __SURFRAD_HANDLER_H__ */ //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/ascii2nc/wwsis_handler.h b/src/tools/other/ascii2nc/wwsis_handler.h index 52d4f8c48b..774dd3ade1 100644 --- a/src/tools/other/ascii2nc/wwsis_handler.h +++ b/src/tools/other/ascii2nc/wwsis_handler.h @@ -12,8 +12,8 @@ //////////////////////////////////////////////////////////////////////// -#ifndef __WWSISHANDLER_H__ -#define __WWSISHANDLER_H__ +#ifndef __WWSIS_HANDLER_H__ +#define __WWSIS_HANDLER_H__ //////////////////////////////////////////////////////////////////////// @@ -115,7 +115,7 @@ class WwsisHandler : public FileHandler //////////////////////////////////////////////////////////////////////// -#endif /* __WWSISHANDLER_H__ */ +#endif /* __WWSIS_HANDLER_H__ */ //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/wwmca_tool/wwmca_utils.cc b/src/tools/other/wwmca_tool/wwmca_utils.cc deleted file mode 100644 index 2be5deb979..0000000000 --- a/src/tools/other/wwmca_tool/wwmca_utils.cc +++ /dev/null @@ -1,181 +0,0 @@ -// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* -// ** Copyright UCAR (c) 1992 - 2023 -// ** University Corporation for Atmospheric Research (UCAR) -// ** National Center for Atmospheric Research (NCAR) -// ** Research Applications Lab (RAL) -// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA -// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* - - -//////////////////////////////////////////////////////////////////////// - - -static const bool west_longitude_positive = true; - - -//////////////////////////////////////////////////////////////////////// - - -using namespace std; - -#include -#include -#include -#include -#include - -#include "wwmca_utils.h" - - -//////////////////////////////////////////////////////////////////////// - - -GridHemisphere find_grid_hemisphere(const Grid & grid) - -{ - -int j; -double x, y, lat, lon; -bool nh = false; -bool sh = false; -const int Nx = grid.nx(); -const int Ny = grid.ny(); - - // - // bottom, top - // - -for (j=0; j 0.0 ) nh = true; - if ( lat < 0.0 ) sh = true; - - grid.xy_to_latlon(x, Ny - 1.0, lat, lon); - - if ( lat > 0.0 ) nh = true; - if ( lat < 0.0 ) sh = true; - -} - -if ( nh && sh ) return ( both_hemispheres ); - - // - // left, right - // - -for (j=0; j 0.0 ) nh = true; - if ( lat < 0.0 ) sh = true; - - grid.xy_to_latlon(Nx - 1.0, y, lat, lon); - - if ( lat > 0.0 ) nh = true; - if ( lat < 0.0 ) sh = true; - -} - -if ( nh && sh ) return ( both_hemispheres ); - -if ( nh ) return ( north_hemisphere ); -if ( sh ) return ( south_hemisphere ); - - // - // done - // - -return ( no_hemisphere ); // this shouldn't happen - -} - - -//////////////////////////////////////////////////////////////////////// - - -Interpolator * get_interpolator(wwmca_regrid_Conf & config) - -{ - -int width, good_percent; -int n_good_needed; -ConcatString method; -Ave_Interp ave; -Nearest_Interp nearest; -Min_Interp mini; -Max_Interp maxi; - - -width = config.interp_width(); - -good_percent = config.good_percent(); - -n_good_needed = nint(ceil(0.01*good_percent*width)); - -method = (const char *) config.interp_method(); - - // - // get to work - // - -if ( method == "average" ) { - - ave.set_size(width); - - ave.set_ngood_needed(n_good_needed); - - return ( ave.copy() ); - -} - - -if ( method == "nearest" ) { - - nearest.set_size(width); - - nearest.set_ngood_needed(n_good_needed); - - return ( nearest.copy() ); - -} - - -if ( method == "min" ) { - - mini.set_size(width); - - mini.set_ngood_needed(n_good_needed); - - return ( mini.copy() ); - -} - - -if ( method == "max" ) { - - maxi.set_size(width); - - maxi.set_ngood_needed(n_good_needed); - - return ( maxi.copy() ); - -} - - - // - // nope - // - -return ( (Interpolator *) 0 ); - -} - - -//////////////////////////////////////////////////////////////////////// diff --git a/src/tools/other/wwmca_tool/wwmca_utils.h b/src/tools/other/wwmca_tool/wwmca_utils.h deleted file mode 100644 index 3728c9ae81..0000000000 --- a/src/tools/other/wwmca_tool/wwmca_utils.h +++ /dev/null @@ -1,77 +0,0 @@ -// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* -// ** Copyright UCAR (c) 1992 - 2023 -// ** University Corporation for Atmospheric Research (UCAR) -// ** National Center for Atmospheric Research (NCAR) -// ** Research Applications Lab (RAL) -// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA -// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* - - -//////////////////////////////////////////////////////////////////////// - - -#ifndef __WWMCA_UTILS_H__ -#define __WWMCA_UTILS_H__ - - -//////////////////////////////////////////////////////////////////////// - - -#include "wwmca_regrid_Conf.h" - -#include "interp_base.h" -#include "max_interp.h" -#include "min_interp.h" -#include "ave_interp.h" -#include "nearest_interp.h" - -#include "vx_grid.h" - - -//////////////////////////////////////////////////////////////////////// - - - // - // Is the given grid confined to either the north - // - // or south hemisphere, or does it straddle the - // - // equator? - // - - -extern GridHemisphere find_grid_hemisphere(const Grid &); - - -//////////////////////////////////////////////////////////////////////// - - - // - // Create an interpolator instance given the info - // - // from the config file - // - - -extern Interpolator * get_interpolator(wwmca_regrid_Conf &); - - -//////////////////////////////////////////////////////////////////////// - - - // - // Create the "to" grid from the grid info string in the config file - // - -// extern GridInfo get_grid(const char * gridinfo_string); - - -//////////////////////////////////////////////////////////////////////// - - -#endif /* __WWMCA_UTILS_H__ */ - - -//////////////////////////////////////////////////////////////////////// - - diff --git a/src/tools/tc_utils/rmw_analysis/rmw_analysis_utils.cc b/src/tools/tc_utils/rmw_analysis/rmw_analysis_utils.cc deleted file mode 100644 index c06c7b219a..0000000000 --- a/src/tools/tc_utils/rmw_analysis/rmw_analysis_utils.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include "rmw_analysis_utils.h" - -bool filter_track_point() { - - return true; -} diff --git a/src/tools/tc_utils/rmw_analysis/rmw_analysis_utils.h b/src/tools/tc_utils/rmw_analysis/rmw_analysis_utils.h deleted file mode 100644 index 217a08f9c1..0000000000 --- a/src/tools/tc_utils/rmw_analysis/rmw_analysis_utils.h +++ /dev/null @@ -1 +0,0 @@ -bool filter_track_point();