Skip to content

Commit

Permalink
add_lake_20200810: Place orog, lake and inland code
Browse files Browse the repository at this point in the history
in their own directories under new directory orog_mask_tools.fd.

References ufs-community#111.
  • Loading branch information
GeorgeGayno-NOAA committed Aug 17, 2020
1 parent a76f303 commit 1aa9c50
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 17 deletions.
5 changes: 3 additions & 2 deletions sorc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ add_subdirectory(nemsio_chgdate.fd)
add_subdirectory(mkgfsnemsioctl.fd)
add_subdirectory(fre-nctools.fd)
add_subdirectory(chgres_cube.fd)
add_subdirectory(orog.fd)
add_subdirectory(orog.fd/lake.fd)
add_subdirectory(orog_mask_tools.fd/orog.fd)
add_subdirectory(orog_mask_tools.fd/lake.fd)
add_subdirectory(orog_mask_tools.fd/inland.fd)
add_subdirectory(sfc_climo_gen.fd)
19 changes: 19 additions & 0 deletions sorc/orog_mask_tools.fd/inland.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set(fortran_src
nb.F90
inland.F90)

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -assume byterecl")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-range-check")
endif()

set(exe_name inland)

add_executable(${exe_name} ${fortran_src})

target_link_libraries(
${exe_name}
NetCDF::NetCDF_Fortran)

install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
set(fortran_src1
set(fortran_src
enclosure_cnvx.F90
find_limit.F90
lakefrac.F90)

set(fortran_src2
nb.F90
inland.F90)

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -assume byterecl")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-range-check")
endif()

set(exe_name1 lakefrac)
set(exe_name2 inland)

add_executable(${exe_name1} ${fortran_src1})
add_executable(${exe_name2} ${fortran_src2})
set(exe_name lakefrac)

target_link_libraries(
${exe_name1}
NetCDF::NetCDF_Fortran)
add_executable(${exe_name} ${fortran_src})

target_link_libraries(
${exe_name2}
${exe_name}
NetCDF::NetCDF_Fortran)

install(TARGETS ${exe_name1} ${exe_name2} RUNTIME DESTINATION ${exec_dir})
install(TARGETS ${exe_name} RUNTIME DESTINATION ${exec_dir})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1aa9c50

Please sign in to comment.