Skip to content

Commit

Permalink
save changes for ip_we_1
Browse files Browse the repository at this point in the history
  • Loading branch information
webisu committed Apr 19, 2024
1 parent 839df56 commit 40eda58
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 637 deletions.
16 changes: 7 additions & 9 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 @@ -83,17 +83,15 @@ 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})
# 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)
Expand Down
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

0 comments on commit 40eda58

Please sign in to comment.