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

We ip 3 .. changes from we_ip1 ported to v3.2.0 #135

Closed
wants to merge 2 commits into from
Closed
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
14 changes: 3 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ option(USE_HDF5 "Use HDF5?" off)
option(USE_REGEX "Use Regex?" on)
option(USE_TIGGE "Use tigge?" on)
option(USE_MYSQL "Use MySQL?" off)
option(USE_IPOLATES "iplib=0,1,3?" 3)
option(USE_IPOLATES "Use Ipolates" on)
option(USE_UDF "Use UDF?" off)
option(USE_OPENMP "Use OpenMP?" on)
option(USE_PROJ4 "Use Proj4?" off)
Expand Down Expand Up @@ -92,18 +92,11 @@ endif()

# If user wants to use NCEPLIBS-ip, find it and the sp library.
message(STATUS "Checking if the user want to use NCEPLIBS-ip...")
if(USE_IPOLATES EQUAL 1)
if(USE_IPOLATES)
find_package(ip CONFIG REQUIRED)
find_package(sp CONFIG REQUIRED)
elseif(USE_IPOLATES EQUAL 3)
find_package(ip2 CONFIG REQUIRED)
list(APPEND definitions_list -DIPOLATES_LIB="ipolates_lib_d")
endif()

if(NOT USE_IPOLATES EQUAL 0)
list(APPEND definitions_list -DIPOLATES_LIB="ipolates_lib")
endif()
list(APPEND definitions_list -DUSE_IPOLATES=${USE_IPOLATES})

message(STATUS "Checking if the user want to use NetCDF...")
if(USE_NETCDF4)
find_package(NetCDF MODULE REQUIRED COMPONENTS C)
Expand Down Expand Up @@ -209,4 +202,3 @@ include(CTest)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()

5 changes: 2 additions & 3 deletions wgrib2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Import_grib_fs.c Import_lonlat.c Import_netcdf.c init.c int8.c
intpower.c Inv.c Inv_no.c Irr_grids.c itoshort_a.c JMA.c jpeg_pk.c
Last.c lat2ij.c Latlon.c Level.c Limit.c Lola.c Lvl.c Macro.c
manage_inv_out.c Match.c Match_fs.c Match_inv.c Mem_buffer.c Merge.c
Misc.c missing.c mk_gdt.c mk_kgds.c Model_version_date.c Mod_grib.c
Misc.c missing.c mk_gdt.c Model_version_date.c Mod_grib.c
Mysql.c Mysql_dump.c Mysql_speed.c Names.c ncep_grids.c NCEP_norm.c
NCEP_uv.c Ncpu.c Ndate.c Ndates.c Netcdf.c Netcdf_sup.c New_grid.c
new_grid_lambertc.c New_grid_order.c openmp_util.c parse_loop.c
Expand Down Expand Up @@ -105,9 +105,8 @@ endif()
if(USE_G2CLIB)
endif()

if(USE_IPOLATES EQUAL 1)
if(USE_IPOLATES)
target_link_libraries(obj_lib PUBLIC ip::ip_d)
target_link_libraries(obj_lib PUBLIC sp::sp_d)

# Link to the Fortran runtime library for each compiler if using ip2.
# The wgrib2 exectuable is created using the C compiler and
Expand Down
8 changes: 2 additions & 6 deletions wgrib2/Config.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,9 @@ int f_config(ARG0) {
strcat(inv_out, "tigge package is not installed\n");
#endif

#if USE_IPOLATES > 0
#ifdef USE_IPOLATES
inv_out += strlen(inv_out);
sprintf(inv_out, "IPOLATES " IPOLATES_LIB " (option %d) is installed", USE_IPOLATES);
#if USE_SPECTRAL > 0
strcat(inv_out, " with spectral interpolation");
#endif
strcat(inv_out, ", default vectors:\n");
sprintf(inv_out, "IPOLATES NCEPLIBS-ip\n");
#else
strcat(inv_out, "interpolation package is not installed, default vectors:\n");
#endif
Expand Down
Loading
Loading