Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature_2887_categ…
Browse files Browse the repository at this point in the history
…orical_weights
  • Loading branch information
JohnHalleyGotway committed Sep 6, 2024
2 parents 2a68914 + 2e14724 commit 1b8cd06
Show file tree
Hide file tree
Showing 173 changed files with 996 additions and 550 deletions.
2 changes: 1 addition & 1 deletion .github/jobs/set_job_controls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ run_unit_tests=false
run_diff=false
run_update_truth=false
met_base_repo=met-base
met_base_tag=v3.2
met_base_tag=v3.3
input_data_version=develop
truth_data_version=develop

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_docker_and_trigger_metplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
env:
SOURCE_BRANCH: ${{ steps.get_branch_name.outputs.branch_name }}-lite
MET_BASE_REPO: met-base
MET_BASE_TAG: v3.2
MET_BASE_TAG: v3.3

- name: Push Docker Image
run: .github/jobs/push_docker_image.sh
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/compilation_options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ jobs:
config: '--enable-mode_graphics'
- jobid: 'job8'
config: '--enable-modis'
- jobid: 'job9'
config: '--enable-all MET_CXX_STANDARD=11'
- jobid: 'job10'
config: '--enable-all MET_CXX_STANDARD=14'
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: .github/jobs/build_sonarqube_image.sh
env:
MET_BASE_REPO: met-base
MET_BASE_TAG: v3.2
MET_BASE_TAG: v3.3
SOURCE_BRANCH: ${{ steps.get_branch_name.outputs.branch_name }}
WD_REFERENCE_BRANCH: ${{ github.event.inputs.reference_branch }}
SONAR_SCANNER_VERSION: 5.0.1.3006
Expand Down
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
27 changes: 26 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,7 @@ MET_ATLAS
MET_PROJLIB
MET_PROJINC
MET_PROJ
MET_CXX_STANDARD
OPENMP_CFLAGS
am__fastdepCC_FALSE
am__fastdepCC_TRUE
Expand Down Expand Up @@ -933,6 +934,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
MET_CXX_STANDARD
MET_PROJ
MET_PROJINC
MET_PROJLIB
Expand Down Expand Up @@ -1667,6 +1669,9 @@ Some influential environment variables:
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
MET_CXX_STANDARD
Specify the version of the supported C++ standard. Values may be
11, 14, or 17. Default value is 17.
MET_PROJ Where proj lib and include subdirectories are located. If they
are installed in /usr/local, you don't have to specify them.
MET_PROJINC Where proj include files are located. Use if the libraries and
Expand Down Expand Up @@ -5317,6 +5322,26 @@ printf "%s\n" "$ac_cv_prog_c_openmp" >&6; }
CPPFLAGS="${CPPFLAGS} ${OPENMP_CFLAGS}"
LDFLAGS="${LDFLAGS} ${OPENMP_CFLAGS}"

#
# Look for a specified C++ Standard
#

# Configure the variable. The help text will appear if the user uses "configure --help".



# Set a default value

if (test -z "$MET_CXX_STANDARD"); then
MET_CXX_STANDARD=17
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: c++17 will be used as the C++ standard" >&5
printf "%s\n" "$as_me: c++17 will be used as the C++ standard" >&6;}
elif (test -n "$MET_CXX_STANDARD"); then
MET_CXX_STANDARD=${MET_CXX_STANDARD}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: MET_CXX_STANDARD will be set" >&5
printf "%s\n" "$as_me: MET_CXX_STANDARD will be set" >&6;}
fi

#
# Look for the Proj library.
#
Expand Down Expand Up @@ -6988,7 +7013,7 @@ fi
CPPFLAGS=$CPPFLAGS' -DMET_BASE="\"$(pkgdatadir)\""'

# Add -std=c++11 to CXXFLAGS
CXXFLAGS=$CXXFLAGS' -std=c++11'
CXXFLAGS=$CXXFLAGS' -std=c++'$MET_CXX_STANDARD

# Define other variables for the makefiles

Expand Down
20 changes: 19 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ AC_OPENMP()
CPPFLAGS="${CPPFLAGS} ${OPENMP_CFLAGS}"
LDFLAGS="${LDFLAGS} ${OPENMP_CFLAGS}"

#
# Look for a specified C++ Standard
#

# Configure the variable. The help text will appear if the user uses "configure --help".

AC_ARG_VAR([MET_CXX_STANDARD], [Specify the version of the supported C++ standard. Values may be 11, 14, or 17. Default value is 17.])

# Set a default value

if (test -z "$MET_CXX_STANDARD"); then
MET_CXX_STANDARD=17
AC_MSG_NOTICE([c++17 will be used as the C++ standard])
elif (test -n "$MET_CXX_STANDARD"); then
MET_CXX_STANDARD=${MET_CXX_STANDARD}
AC_MSG_NOTICE([MET_CXX_STANDARD will be set])
fi

#
# Look for the Proj library.
#
Expand Down Expand Up @@ -1160,7 +1178,7 @@ AM_CONDITIONAL([ENABLE_DEVELOPMENT], [test -n "$MET_DEVELOPMENT"])
CPPFLAGS=$CPPFLAGS' -DMET_BASE="\"$(pkgdatadir)\""'

# Add -std=c++11 to CXXFLAGS
CXXFLAGS=$CXXFLAGS' -std=c++11'
CXXFLAGS=$CXXFLAGS' -std=c++'$MET_CXX_STANDARD

# Define other variables for the makefiles

Expand Down
1 change: 1 addition & 0 deletions data/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/climo/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/climo/seeps/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/colortables/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/colortables/NCL_colortables/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/config/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/map/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/map/admin_by_country/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/poly/HMT_masks/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/poly/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/poly/NCEP_masks/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/ps/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/table_files/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
1 change: 1 addition & 0 deletions data/tc_data/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ MET_BUFRLIB = @MET_BUFRLIB@
MET_CAIRO = @MET_CAIRO@
MET_CAIROINC = @MET_CAIROINC@
MET_CAIROLIB = @MET_CAIROLIB@
MET_CXX_STANDARD = @MET_CXX_STANDARD@
MET_ECKIT = @MET_ECKIT@
MET_ECKITINC = @MET_ECKITINC@
MET_ECKITLIB = @MET_ECKITLIB@
Expand Down
10 changes: 7 additions & 3 deletions docs/Users_Guide/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Environment Variable Descriptions
containing the bin, include, lib, and share directories for Python.

**MET_PYTHON_CC** - Format is -I followed by the directory containing
the Python include files (ex. -I/usr/local/python3/include/python3.10).
the Python include files (e.g. -I/usr/local/python3/include/python3.10).
This information may be obtained by
running :code:`python3-config --cflags`;
however, this command can, on certain systems,
Expand All @@ -257,7 +257,7 @@ Environment Variable Descriptions
the Python library
files then a space, then -l followed by the necessary Python
libraries to link to
(ex. -L/usr/local/python3/lib/\\ -lpython3.10\\
(e.g. -L/usr/local/python3/lib/\\ -lpython3.10\\
-lpthread\\ -ldl\\ -lutil\\ -lm).
The backslashes are necessary in the example shown because of
the spaces, which will be
Expand Down Expand Up @@ -285,7 +285,11 @@ Environment Variable Descriptions
without a specified value of cores to use. The automated MET
testing scripts in the
Docker environment have been successful with a value of
5 (ex. export MAKE_ARGS=”-j 5”).
5 (e.g. export MAKE_ARGS=”-j 5”).

**export MET_CXX_STANDARD** - Specify the version of the supported
C++ standard. Values may be 11, 14, or 17. The default value is 17.
(e.g. export MET_CXX_STANDARD=11).


External Library Handling in compile_MET_all.sh
Expand Down
15 changes: 14 additions & 1 deletion docs/Users_Guide/reformat_point.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1092,9 +1092,22 @@ Optional Arguments for point2grid
16. The **-compress level** option indicates the desired level of compression (deflate level) for NetCDF variables. The valid level is between 0 and 9. The value of "level" will override the default setting of 0 from the configuration file or the environment variable MET_NC_COMPRESS. Setting the compression level to 0 will make no compression for the NetCDF output. Lower number is for fast compression and higher number is for better compression.

Only 4 interpolation methods are applied to the field variables; MIN/MAX/MEDIAN/UW_MEAN. The GAUSSIAN method is applied to the probability variable only. Unlike regrad_data_plane, MAX method is applied to the file variable and Gaussian method to the probability variable with the MAXGAUSS method. If the probability variable is not requested, MAXGAUSS method is the same as MAX method.

For the GOES-16 and GOES-17 data, the computing lat/long is time consuming. The computed coordinate (lat/long) is saved to a temporary NetCDF file, as described in :numref:`Contributor's Guide Section %s <tmp_files_point2grid>`. The computing lat/long step can be skipped if the coordinate file is given through the environment variable MET_GEOSTATIONARY_DATA. The grid mapping to the target grid is saved to MET_TMP_DIR to save the execution time. Once this file is created, the MET_GEOSTATIONARY_DATA is ignored. The grid mapping file should be deleted manually in order to apply a new MET_GEOSTATIONARY_DATA environment variable or to re-generate the grid mapping file. An example of call point2grid to process GOES-16 AOD data is shown below:


The grid name or the grid definition can be given with the -field option when the grid information is missing from the input NetCDF file for the latitude_longitude projection. The latitude and longitude variable names should be defined by the user, and the grid information from the set_attr_grid is ignored in this case

.. code-block:: none
point2grid \
iceh.2018-01-03.c00.tlat_tlon.nc \
G231 \
point2grid_cice_to_G231.nc \
-config Point2GridConfig_tlat_tlon \
-field 'name="hi_d"; level="(0,*,*)"; set_attr_grid="latlon 1440 1080 -79.80672 60.28144 0.04 0.04";' \
-v 1
.. code-block:: none
point2grid \
Expand Down
2 changes: 1 addition & 1 deletion internal/scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG MET_BASE_REPO=met-base
ARG MET_BASE_TAG=v3.2
ARG MET_BASE_TAG=v3.3

FROM dtcenter/${MET_BASE_REPO}:${MET_BASE_TAG}
MAINTAINER John Halley Gotway <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion internal/scripts/docker/Dockerfile.copy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG MET_BASE_REPO=met-base-unit-test
ARG MET_BASE_TAG=v3.2
ARG MET_BASE_TAG=v3.3

FROM dtcenter/${MET_BASE_REPO}:${MET_BASE_TAG}
MAINTAINER John Halley Gotway <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion internal/scripts/docker/Dockerfile.sonarqube
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG MET_BASE_REPO=met-base
ARG MET_BASE_TAG=v3.2
ARG MET_BASE_TAG=v3.3

FROM dtcenter/${MET_BASE_REPO}:${MET_BASE_TAG}
MAINTAINER John Halley Gotway <[email protected]>
Expand Down
28 changes: 21 additions & 7 deletions internal/scripts/installation/compile_MET_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,11 @@ if [ $COMPILE_ECKIT -eq 1 ]; then

# Need to obtain ecbuild before installing eckit

vrs="3.5.0"
if [[ ! -z ${MET_CXX_STANDARD} && ${MET_CXX_STANDARD} -le 14 ]]; then
vrs="3.5.0"
elif [[ -z ${MET_CXX_STANDARD} ]]; then
vrs="3.7.0"
fi

echo
echo "Compiling ECBUILD at `date`"
Expand All @@ -652,9 +656,13 @@ if [ $COMPILE_ECKIT -eq 1 ]; then
run_cmd "mkdir build; cd build"
run_cmd "cmake ../ -DCMAKE_INSTALL_PREFIX=${LIB_DIR} > $(pwd)/ecbuild.cmake.log 2>&1"
run_cmd "make ${MAKE_ARGS} install > $(pwd)/ecbuild.make_install.log 2>&1"

vrs="1.20.2"

if [[ ! -z ${MET_CXX_STANDARD} && ${MET_CXX_STANDARD} -le 14 ]]; then
vrs="1.20.2"
elif [[ -z ${MET_CXX_STANDARD} ]]; then
vrs="1.24.4"
fi

echo
echo "Compiling ECKIT at `date`"
mkdir -p ${LIB_DIR}/eckit
Expand All @@ -671,7 +679,11 @@ fi
# Compile ATLAS
if [ $COMPILE_ATLAS -eq 1 ]; then

vrs="0.30.0"
if [[ ! -z ${MET_CXX_STANDARD} && ${MET_CXX_STANDARD} -le 14 ]]; then
vrs="0.30.0"
elif [[ -z ${MET_CXX_STANDARD} ]]; then
vrs="0.35.0"
fi

echo
echo "Compiling ATLAS at `date`"
Expand Down Expand Up @@ -862,9 +874,11 @@ if [ -z ${MET_PROJ} ]; then
export MET_PROJ=${LIB_DIR}
fi

export MET_PYTHON_BIN_EXE=${MET_PYTHON_BIN_EXE:=${MET_PYTHON}/bin/python3}
export MET_PYTHON_LD
export MET_PYTHON_CC
if [[ ! -z ${MET_PYTHON_CC} || ! -z ${MET_PYTHON_LD} ]]; then
export MET_PYTHON_BIN_EXE=${MET_PYTHON_BIN_EXE:=${MET_PYTHON}/bin/python3}
export MET_PYTHON_LD
export MET_PYTHON_CC
fi

# add flags to user-defined LDFLAGS for MacOS
if [[ $machine != "Mac" ]]; then
Expand Down
7 changes: 7 additions & 0 deletions internal/test_unit/config/Point2GridConfig_SST
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
file_type = NETCDF_NCCF;

var_name_map = [
{ key = "lat_vname"; val = "yh"; },
{ key = "lon_vname"; val = "xh"; }
];

Loading

0 comments on commit 1b8cd06

Please sign in to comment.