Skip to content

Commit

Permalink
Merge pull request ufs-community#73 from climbfuji/move_plumrise_to_g…
Browse files Browse the repository at this point in the history
…ocart_repo

Move plumerise to gocart repo
  • Loading branch information
DomHeinzeller authored Apr 23, 2021
2 parents f445799 + 931c198 commit e1511c0
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
url = https://github.com/noaa-gsl/stochastic_physics
branch = gsl/develop
[submodule "gocart"]
path = gocart
path = gocart-interface/gocart
url = https://github.com/NOAA-GSL/GOCART
branch = gsl/develop-chem
[submodule "CMakeModules"]
Expand Down
14 changes: 2 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ message("STOCH_PHYS ....... ${STOCH_PHYS}")
message("NEMSdatm ......... ${NEMSdatm}")
message("CDEPS ............ ${CDEPS}")
message("CMEPS ............ ${CMEPS}")
message("GOCART ........... ${GOCART}")

# Options that applications reset
message("32BIT ............ ${32BIT}")
Expand Down Expand Up @@ -230,18 +231,7 @@ endif()
### Chemistry Components [GOCART]
###############################################################################
if(GOCART)
# this will look for MAPL ?
#set(BUILD_UFS ON CACHE BOOL "Enable UFS build of GOCART")
#add_subdirectory(gocart)
list(APPEND _gocart_srcs gocart/Process_Library/Chem_MieTableMod2G.F90
gocart/Process_Library/GOCART2G_Process.F90)
add_library(gocart ${_gocart_srcs})
target_compile_definitions(gocart PRIVATE "HAS_NETCDF3")
#set_target_properties(gocart PROPERTIES Fortran_MODULE_DIRECTORY
# ${CMAKE_CURRENT_BINARY_DIR}/mod)
#target_include_directories(gocart PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/NEMS/src)
#target_include_directories(ufs INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
# $<INSTALL_INTERFACE:mod>)
add_subdirectory(gocart-interface)
endif()

###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion FV3
Submodule FV3 updated 2 files
+4 −2 CMakeLists.txt
+1 −1 ccpp/physics
7 changes: 3 additions & 4 deletions cmake/configure_apps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@
###############################################################################
### Configure Application Components
###############################################################################
if(APP MATCHES "^(ATM|ATMW|ATMC)$")
if(APP MATCHES "^(ATM|ATMW)$")
set(FMS ON CACHE BOOL "Enable FMS" FORCE)
set(FV3 ON CACHE BOOL "Enable FV3" FORCE)
set(STOCH_PHYS ON CACHE BOOL "Enable Stochastic Physics" FORCE)
set(GOCART ON CACHE BOOL "Enable GOCART Chemistry" FORCE)
if(APP MATCHES "ATMW")
set(WW3 ON CACHE BOOL "Enable WAVEWATCH III" FORCE)
message("Configuring UFS app in Atmosphere with Waves mode")
elseif(APP MATCHES "ATMC")
set(GOCART ON CACHE BOOL "Enable GOCART Chemistry" FORCE)
message("Configuring UFS app in Atmosphere with GOCART Chemistry")
else()
message("Configuring UFS app in Atmosphere Only mode")
endif()
Expand All @@ -49,6 +47,7 @@ if(APP MATCHES "^(S2S|S2SW)$")
set(MOM6 ON CACHE BOOL "Enable MOM6" FORCE)
set(CICE6 ON CACHE BOOL "Enable CICE6" FORCE)
set(STOCH_PHYS ON CACHE BOOL "Enable Stochastic Physics" FORCE)
set(GOCART ON CACHE BOOL "Enable GOCART Chemistry" FORCE)
if(APP MATCHES "S2SW")
set(WW3 ON CACHE BOOL "Enable WAVEWATCH III" FORCE)
message("Configuring UFS app in S2S with Waves mode")
Expand Down
1 change: 0 additions & 1 deletion gocart
Submodule gocart deleted from 170779
31 changes: 31 additions & 0 deletions gocart-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# this will look for MAPL and all the other stuff we don't needd
#add_subdirectory(gocart)

list(APPEND _gocart_srcs gocart/Process_Library/gsd_chem_constants.F90
gocart/Process_Library/gsd_chem_config.F90
gocart/Process_Library/plume_data_mod.F90
gocart/Process_Library/plume_rise_mod.F90
gocart/Process_Library/plume_scalar_mod.F90
gocart/Process_Library/plume_zero_mod.F90
gocart/Process_Library/Chem_MieTableMod2G.F90
gocart/Process_Library/GOCART2G_Process.F90)
add_library(gocart ${_gocart_srcs})

target_compile_definitions(gocart PRIVATE "HAS_NETCDF3")
set_target_properties(gocart PROPERTIES Fortran_MODULE_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(gocart PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)
target_link_libraries(gocart PRIVATE NetCDF::NetCDF_Fortran)

install(TARGETS gocart
EXPORT gocart-targets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib
)
# Export our configuration
install(EXPORT gocart-targets
FILE gocart-config.cmake
DESTINATION lib/cmake
)
1 change: 1 addition & 0 deletions gocart-interface/gocart
Submodule gocart added at 4e8dfe
4 changes: 0 additions & 4 deletions tests/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ if [[ "${MAKE_OPT}" == *"APP=ATMW"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DAPP=ATMW"
fi

if [[ "${MAKE_OPT}" == *"APP=ATMC"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DAPP=ATMC"
fi

if [[ "${MAKE_OPT}" == *"APP=S2S"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DAPP=S2S -DMOM6SOLO=ON"
fi
Expand Down
4 changes: 1 addition & 3 deletions tests/rt_ccpp_dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ RUN | fv3_gfdlmp_gsd_chem
RUN | fv3_gfdlmp_gsd_chem_sppt | | fv3 |
RUN | fv3_gfdlmp_gsd_chem_ca |+ hera.intel | fv3 |

# Compile without suite argument for CAPS physics
COMPILE | APP=ATM REPRO=Y | | fv3 |
# Run tests
COMPILE | APP=ATM REPRO=Y SUITES=FV3_GFS_2017_shinhong,FV3_GFS_2017_ysu,FV3_GFS_2017_ntiedtke | | fv3 |
RUN | fv3_shinhong | | fv3 |
RUN | fv3_ysu | | fv3 |
RUN | fv3_ntiedtke | | fv3 |
Expand Down

0 comments on commit e1511c0

Please sign in to comment.