Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix 2531 compilation errors #2533

Merged
merged 6 commits into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build:
os: ubuntu-22.04
tools:
python: "3.10"

# Optionally set the version of Python and requirements required to build your
# docs
python:
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,9 @@ AM_CONDITIONAL([ENABLE_DEVELOPMENT], [test -n "$MET_DEVELOPMENT"])

CPPFLAGS=$CPPFLAGS' -DMET_BASE="\"$(pkgdatadir)\""'

# Add -std=c++11 to CXXFLAGS
CXXFLAGS=$CXXFLAGS' -std=c++11'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the -std flag to configure.ac makes me a bit nervous. I worry about whether any of the compilers out there will balk at that option and complain that it's not supported.


# Define other variables for the makefiles

AC_SUBST(FC_LIBS, [-lgfortran])
Expand Down
2 changes: 2 additions & 0 deletions docs/Users_Guide/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Programming Languages

The MET package, including MET-TC, is written primarily in C/C++ in order to be compatible with an extensive verification code base in C/C++ already in existence. In addition, the object-based MODE and MODE-TD verification tools rely heavily on the object-oriented aspects of C++. Knowledge of C/C++ is not necessary to use the MET package. The MET package has been designed to be highly configurable through the use of ASCII configuration files, enabling a great deal of flexibility without the need for source code modifications.

With the release of MET-11.1.0, C++11 is now the minimum required version of the C++ programming language standard.

NCEP's BUFRLIB is written entirely in Fortran. The portion of MET that handles the interface to the BUFRLIB for reading PrepBUFR point observation files is also written in Fortran.

The MET package is intended to be a tool for the modeling community to use and adapt. As users make upgrades and improvements to the tools, they are encouraged to offer those upgrades to the broader community by offering feedback to the developers.
Expand Down
4 changes: 2 additions & 2 deletions src/libcode/vx_grid/goes_grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -493,13 +493,13 @@ void GoesImagerData::compute_lat_lon()
mlog << Error << method_name << " index=" << index
<< " too big than " << buf_len << "\n";
else {
if (isnan(lat_rad)) lat = bad_data_float;
if (std::isnan(lat_rad)) lat = bad_data_float;
else {
lat = lat_rad * deg_per_rad;
if (lat > lat_max) {lat_max = lat; idx_lat_max = index; }
if (lat < lat_min) {lat_min = lat; idx_lat_min = index; }
}
if (isnan(lon_rad)) lon = bad_data_float;
if (std::isnan(lon_rad)) lon = bad_data_float;
else {
lon = lon_of_projection_origin - (lon_rad * deg_per_rad);
if (lon > lon_max) {lon_max = lon; idx_lon_max = index; }
Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_statistics/compute_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ void compute_aggregated_seeps_grid(const DataPlane &fcst_dp, const DataPlane &ob
else count_diagonal++;
}
seeps_score = seeps_mpr->score;
if (isnan(seeps_score)) {
if (std::isnan(seeps_score)) {
nan_count++;
seeps_score = bad_data_double;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_statistics/contable_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ for (j=0; j<Nrows; ++j) {
// replace nan with bad data
//

if (isnan(sum)) sum = bad_data_double;
if (std::isnan(sum)) sum = bad_data_double;

//
// done
Expand Down