Skip to content

Commit

Permalink
Test for ip v4+ for new ipolates interface. NOAA-EMC#18
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Nov 20, 2023
1 parent ae26670 commit b84c950
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/netcdf_io/interp_inc.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fconvert=big-endian -ffree-line-length-0 -ffast-math -fno-second-underscore -frecord-marker=4")
endif()

add_executable(interp_inc.x driver.f90)
add_executable(interp_inc.x driver.F90)
target_link_libraries(interp_inc.x PRIVATE NetCDF::NetCDF_Fortran)
target_link_libraries(interp_inc.x PRIVATE MPI::MPI_Fortran)
target_link_libraries(interp_inc.x PRIVATE w3emc::w3emc_d)
target_link_libraries(interp_inc.x PRIVATE ip::ip_d)
target_link_libraries(interp_inc.x PRIVATE sp::sp_d)

if(ip_VERSION VERSION_GREATER_EQUAL 4.0.0)
message("setting ip_v4")
target_compile_definitions(interp_inc.x PRIVATE "IP_V4")
endif()

# Install executable targets
install(TARGETS interp_inc.x RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,19 @@ program interp_inc

use netcdf
use mpi
#ifdef IP_V4
use ip_mod, only: ipolates, ipolatev
#endif

implicit none

integer, parameter :: num_recs = 9

! Declare externals
external :: w3tagb, netcdf_err, splat, w3tage
#ifndef IP_V4
external :: ipolates, ipolatev
#endif

character(len=128) :: outfile, infile
character(len=11) :: records(num_recs)
Expand Down

0 comments on commit b84c950

Please sign in to comment.