Skip to content

Commit

Permalink
Troubleshooting conflicts in pio/pnetcdf with CDEPS and CICE
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSzapiro-NOAA committed Apr 19, 2024
1 parent e71c968 commit 6d3634f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CDEPS-interface/CDEPS
24 changes: 13 additions & 11 deletions CICE-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -fbacktrace")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fconvert=big-endian -ffree-line-length-none ")
#Set CPP defintions for the ufs/cdeps_share source component of the cmeps target library
list(APPEND CDEPS_SHARE_DEFS "CPRGNU")
#list(APPEND CDEPS_SHARE_DEFS "CPRGNU")
if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz")
endif()
Expand All @@ -17,7 +17,7 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created -init=snan,arrays")
set(CMAKE_Fortran_LINK_FLAGS "")
#Set CPP defintions for the ufs/cdeps_share source component of the cmeps target library
list(APPEND CDEPS_SHARE_DEFS "CPRINTEL")
#list(APPEND CDEPS_SHARE_DEFS "CPRINTEL")
else()
message(WARNING "Fortran compiler with ID ${CMAKE_Fortran_COMPILER_ID} will be used with CMake default options")
endif()
Expand All @@ -43,7 +43,8 @@ else()
endif()

# Configuration Options
set(CICE_IO "PIO" CACHE STRING "CICE OPTIONS: Choose IO options.")
#set(CICE_IO "PIO" CACHE STRING "CICE OPTIONS: Choose IO options.")
set(CICE_IO "NetCDF" CACHE STRING "CICE OPTIONS: Choose IO options.")
set_property(CACHE CICE_IO PROPERTY STRINGS "NetCDF" "PIO" "Binary")

# Too many files to list, so include them via this file
Expand All @@ -57,7 +58,7 @@ list(APPEND lib_src_files
${cice_mpi_comm_files}
${cice_nuopc_cmeps_driver_files})

if (WAVICE)
# ice prescribed
list(APPEND lib_src_files
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_orb_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_const_mod.F90
Expand All @@ -66,12 +67,13 @@ if (WAVICE)
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_log_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_sys_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_kind_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/ufs/cdeps_share/shr_assert_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/ufs/cdeps_share/shr_infnan_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_nl_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/dshr/dshr_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/streams/dshr_methods_mod.F90))
endif()
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_cal_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_string_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/share/shr_timer_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/streams/dshr_strdata_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/streams/dshr_stream_mod.F90
${PROJECT_SOURCE_DIR}/CDEPS-interface/CDEPS/streams/dshr_methods_mod.F90)

list(APPEND _cice_defs FORTRANUNDERSCORE
coupled)
Expand Down Expand Up @@ -104,10 +106,10 @@ if(OpenMP_Fortran_FOUND)
target_link_libraries(cice PRIVATE OpenMP::OpenMP_Fortran)
endif()

if(WAVICE)
# ice prescribed
add_dependencies(cice cdeps::cdeps)
target_compile_definitions(cice PUBLIC "DISABLE_FoX")
target_link_libraries(cice PUBLIC cdeps::cdeps)
endif()

###############################################################################
### Install
Expand Down
2 changes: 2 additions & 0 deletions tests/tests/atm_ds2s_docn_pcice
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ export CICE_PRESCRIBED=true
export stream_files_dice=$ocn_data
export MESH_DICE=$MESH_OCN
export eps_imesh=4.0e-1
export CICE_RESTART_FORMAT='hdf5'
export CICE_HISTORY_FORMAT='hdf5'

export RESTART_N=12
export RESTART_INTERVAL="${RESTART_N} -1"
Expand Down

0 comments on commit 6d3634f

Please sign in to comment.