Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring external land component support to UFS #1443

Merged
merged 73 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
654136b
add noahmp as a sub-component
uturuncoglu Aug 30, 2021
813dd2f
Merge remote-tracking branch 'upstream/develop' into feature/lnd_noahmp
uturuncoglu Aug 30, 2021
0dee542
add support for noahmp component
uturuncoglu Sep 21, 2021
51d2897
update NoahMP
uturuncoglu Sep 22, 2021
250ef1c
update FV3
uturuncoglu Oct 8, 2021
85bb529
update NoahMP
uturuncoglu Oct 8, 2021
7055f45
update noahmp and add fms as dependency
uturuncoglu Oct 24, 2021
c0c2216
update model and its components
uturuncoglu Jan 4, 2022
7936668
update components and add external land component support
uturuncoglu Jan 4, 2022
3c43bee
update NoahMP component
uturuncoglu Jan 6, 2022
12a38a0
initial attempt to support fully coupled configuration
uturuncoglu Jan 21, 2022
a7278dd
add new regression test for datm-noahmp configuration
uturuncoglu Feb 1, 2022
499aac4
add restart capability to land model and new RT
uturuncoglu Feb 18, 2022
0192bd7
update noahmp to point noaa-emc repo
uturuncoglu Mar 2, 2022
4e00115
update noahmp
uturuncoglu Mar 3, 2022
8ee6bb7
update noahmp
uturuncoglu Mar 5, 2022
4faa4db
fix git module file
uturuncoglu Mar 8, 2022
58b97db
fix gitmodules
uturuncoglu Mar 10, 2022
13d8551
update model
uturuncoglu Apr 12, 2022
7308342
Merge remote-tracking branch 'origin/develop' into feature/lnd_noahmp
uturuncoglu Apr 12, 2022
51b460f
fix noahmp configuration
uturuncoglu Apr 12, 2022
fa5197e
Merge commit '5abaed5' into feature/lnd_noahmp
uturuncoglu Apr 22, 2022
2e07238
update to support 32bit cases
uturuncoglu Apr 29, 2022
bc66c0d
update model
uturuncoglu Jun 21, 2022
1bdd80d
update model
uturuncoglu Jun 23, 2022
b0603b0
update MOM6
uturuncoglu Jun 23, 2022
41de482
update model
uturuncoglu Jun 23, 2022
561bd2a
update noahmp and extent list of apps
uturuncoglu Jul 29, 2022
d17cbea
update model
uturuncoglu Aug 2, 2022
41e060c
enable atm-lnd side-by-side configuration
uturuncoglu Aug 11, 2022
5cc81b1
point FV3 fork
uturuncoglu Aug 11, 2022
a5ec920
minor fix for control_p8
uturuncoglu Aug 11, 2022
bd1ecc2
revert baseline and input directory for cheyenne
uturuncoglu Aug 12, 2022
0a92540
couple of fixes for land coupling
uturuncoglu Aug 18, 2022
c3c3f62
update noahmp to support gnu
uturuncoglu Aug 19, 2022
ebc5367
update for side-by-side configuration
uturuncoglu Sep 15, 2022
3c4223b
update model
uturuncoglu Sep 20, 2022
fb89484
remove test directory from rt.sh and update noahmp
uturuncoglu Sep 20, 2022
0f4eb35
update external noahmp component
uturuncoglu Sep 27, 2022
8ade619
upfate noahmp to fix minor issues
uturuncoglu Sep 27, 2022
435777c
update fv3 and noahmp
uturuncoglu Sep 30, 2022
99b4146
update noahmp for component testing
uturuncoglu Sep 30, 2022
e169aae
update model
uturuncoglu Oct 3, 2022
fda11e8
point updated CDEPS
uturuncoglu Oct 10, 2022
aa59bbc
sync with develop
uturuncoglu Oct 10, 2022
303497d
update FV3 and NOAHMP
uturuncoglu Oct 13, 2022
18f88a0
use cubed_sphere_grid as output grid
Oct 18, 2022
6c16043
point updated CMEPS fork
Oct 18, 2022
c209805
point fork for CMEPS
Oct 19, 2022
33b11d8
sync model and components
Oct 19, 2022
4122b47
fix issue with ort dbg test
Oct 20, 2022
a8b669d
switch to another fix for inconsistent land sea mask issue
Oct 20, 2022
e08bcfd
update ccpp physics
uturuncoglu Oct 21, 2022
a5577a4
Merge branch 'feature/lnd_noahmp_new' of https://github.com/uturuncog…
uturuncoglu Oct 21, 2022
2a8800c
remove unused code
uturuncoglu Oct 21, 2022
abaf635
make grid file configurable for external land
uturuncoglu Oct 26, 2022
c261ca3
Merge remote-tracking branch 'origin/develop' into feature/lnd_noahmp…
uturuncoglu Oct 26, 2022
e69dd3b
add new BL_DATE
jkbk2004 Oct 26, 2022
00d5573
Merge branch 'feature/lnd_noahmp_new' of https://github.com/uturuncog…
uturuncoglu Oct 26, 2022
256c758
chnage wcoss_cray to wcoss2.intel
uturuncoglu Oct 26, 2022
854dbb9
add correct BL_DATE
jkbk2004 Oct 26, 2022
f186c1a
[AutoRT] hera.gnu Job Completed.
BrianCurtis-NOAA Oct 27, 2022
fa9406b
update list files of tests
uturuncoglu Oct 27, 2022
e6f5f53
Merge branch 'feature/lnd_noahmp_new' of https://github.com/uturuncog…
uturuncoglu Oct 27, 2022
62033a8
add cheyenne intel/gnu RT logs: passed
jkbk2004 Oct 27, 2022
004931c
add here.intel RT log: passed
jkbk2004 Oct 27, 2022
5bb82a3
add jet.intel RT log: passed
jkbk2004 Oct 27, 2022
8441026
WCOSS2 Intel RT Log
BrianCurtis-NOAA Oct 28, 2022
564822a
Acorn Intel RT Log
BrianCurtis-NOAA Oct 28, 2022
cec687f
revert CMEPS pointer to NOAA-EMC emc/develop
uturuncoglu Oct 28, 2022
833eb3d
point FV3 NOAA-EMC
uturuncoglu Oct 28, 2022
8d31266
point CDEPS NOAA-EMC
uturuncoglu Oct 28, 2022
cf4cef9
point noaa-emc fork for noahmp component
uturuncoglu Oct 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@
path = AQM
url = https://github.com/NOAA-EMC/AQM
branch = develop
[submodule "NOAHMP"]
path = NOAHMP-interface/noahmp
url = https://github.com/NOAA-EMC/noahmp
branch = develop
17 changes: 16 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules/Modules)
###############################################################################

# Valid applications and choices
list(APPEND VALID_APPS ATM ATMAERO ATMAQ ATMW S2S S2SA S2SW S2SWA HAFS HAFSW HAFS-ALL NG-GODAS)
list(APPEND VALID_APPS ATM ATMAERO ATMAQ ATMW ATML LND S2S S2SA S2SW S2SWA S2SWAL HAFS HAFSW HAFS-ALL NG-GODAS)
set(APP NONE CACHE BOOL "Application Name")
if(NOT (APP IN_LIST VALID_APPS))
message(FATAL_ERROR "${APP} is not a valid application.\nValid Applications are: ${VALID_APPS}")
Expand All @@ -33,6 +33,7 @@ set(WW3 OFF CACHE BOOL "Enable WW3")
set(STOCH_PHYS OFF CACHE BOOL "Enable Stochastic Physics")
set(CMEPS OFF CACHE BOOL "Enable CMEPS")
set(CDEPS OFF CACHE BOOL "Enable CDEPS")
set(NOAHMP OFF CACHE BOOL "Enable NOAHMP")

# Configure selected application specific components
message("")
Expand All @@ -50,6 +51,7 @@ message("WW3 .............. ${WW3}")
message("STOCH_PHYS ....... ${STOCH_PHYS}")
message("CDEPS ............ ${CDEPS}")
message("CMEPS ............ ${CMEPS}")
message("NOAHMP ........... ${NOAHMP}")

###############################################################################
### Build Options
Expand Down Expand Up @@ -211,6 +213,13 @@ if(CDEPS)
add_subdirectory(CDEPS-interface)
endif()

###############################################################################
### Land Components [NOAHMP]
###############################################################################
if(NOAHMP)
add_subdirectory(NOAHMP-interface)
endif()

###############################################################################
### UFS Library
###############################################################################
Expand Down Expand Up @@ -283,6 +292,12 @@ if(CDEPS)
target_link_libraries(ufs PUBLIC cdeps::cdeps)
endif()

if(NOAHMP)
add_dependencies(ufs noahmp)
list(APPEND _ufs_defs_private FRONT_NOAHMP=lnd_comp_nuopc)
list(APPEND _ufs_libs_public noahmp)
endif()

target_compile_definitions(ufs PRIVATE "${_ufs_defs_private}")
target_link_libraries(ufs PUBLIC "${_ufs_libs_public}")

Expand Down
2 changes: 1 addition & 1 deletion FV3
83 changes: 83 additions & 0 deletions NOAHMP-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#------------------------------------------------------------------------------
# Add source files
# NUOPC cap
list(APPEND _noahmp_cap_files noahmp/drivers/nuopc/lnd_comp_kind.F90
noahmp/drivers/nuopc/lnd_comp_types.F90
noahmp/drivers/nuopc/lnd_comp_shr.F90
noahmp/drivers/nuopc/lnd_comp_io.F90
noahmp/drivers/nuopc/lnd_comp_domain.F90
noahmp/drivers/nuopc/lnd_comp_import_export.F90
noahmp/drivers/nuopc/lnd_comp_nuopc.F90
noahmp/drivers/nuopc/lnd_comp_driver.F90)

# CCPP interface
list(APPEND _noahmp_ccpp_files noahmp/drivers/ccpp/noahmpdrv.F90
noahmp/drivers/ccpp/sfc_diff.f
noahmp/drivers/ccpp/machine.F
noahmp/drivers/ccpp/noahmp_tables.f90
noahmp/drivers/ccpp/namelist_soilveg.f
noahmp/drivers/ccpp/set_soilveg.f
noahmp/drivers/ccpp/funcphys.f90
noahmp/drivers/ccpp/physcons.F90)

# NoahMP
list(APPEND _noahmp_files noahmp/src/module_sf_noahmplsm.f90
noahmp/src/module_sf_noahmp_glacier.f90)

#------------------------------------------------------------------------------
# Set CCPP flags for C/C++/Fortran preprocessor
add_definitions(-DCCPP)

#------------------------------------------------------------------------------
# Set MPI flags for C/C++/Fortran preprocessor
if(MPI)
add_definitions(-DMPI)
endif()

#------------------------------------------------------------------------------
# Set flag for 32bit dynamics build
if(32BIT)
message(STATUS "Compile CCPP slow physics with 64-bit precision, fast physics with 32-bit precision")
add_definitions(-DOVERLOAD_R4)
if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS_PHYSICS "-real-size 64 -no-prec-div -no-prec-sqrt")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS_PHYSICS "-fdefault-real-8 -fdefault-double-8")
endif()
set(CMAKE_Fortran_FLAGS_DYNAMICS "")
else()
message(STATUS "Compile CCPP physics with 64-bit precision")
remove_definitions(-DOVERLOAD_R8)
remove_definitions(-DOVERLOAD_R4)
set(CMAKE_Fortran_FLAGS_PHYSICS "")
set(CMAKE_Fortran_FLAGS_DYNAMICS "")
endif()

#------------------------------------------------------------------------------
# Add model-specific flags for C/C++/Fortran preprocessor
add_definitions(-DMOIST_CAPPA -DUSE_COND -DNEMS_GSM)
add_definitions(-DINTERNAL_FILE_NML)

#------------------------------------------------------------------------------
# NOAHMP
add_library(noahmp STATIC ${_noahmp_cap_files} ${_noahmp_ccpp_files} ${_noahmp_files})
set_target_properties(noahmp PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(noahmp PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)
target_link_libraries(noahmp PUBLIC esmf fms)

###############################################################################
### Install
###############################################################################

install(
TARGETS noahmp
EXPORT noahmp-config
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
COMPONENT Library)

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod DESTINATION ${CMAKE_INSTALL_PREFIX}/NOAHMP)

install(EXPORT noahmp-config
DESTINATION lib/cmake)
1 change: 1 addition & 0 deletions NOAHMP-interface/noahmp
Submodule noahmp added at 34a52c
28 changes: 19 additions & 9 deletions cmake/configure_apps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
###############################################################################
### Configure Application Components
###############################################################################
if(APP MATCHES "^(ATM|ATMW|ATMAQ)$")
if(APP MATCHES "^(ATM|ATMW|ATMAQ|ATML)$")
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)
Expand All @@ -23,6 +23,10 @@ if(APP MATCHES "^(ATM|ATMW|ATMAQ)$")
elseif(APP MATCHES "ATMAQ")
set(AQM ON CACHE BOOL "Enable AQM" FORCE)
message("Configuring UFS app in Atmosphere with Air Quality mode")
elseif(APP MATCHES "ATML")
set(CMEPS ON CACHE BOOL "Enable CMEPS" FORCE)
set(NOAHMP ON CACHE BOOL "Enable NOAHMP" FORCE)
message("Configuring UFS app in Atmosphere with Air Quality mode")
else()
message("Configuring UFS app in Atmosphere Only mode")
endif()
Expand All @@ -38,25 +42,24 @@ if(APP MATCHES "^(NG-GODAS)$")
message("Configuring UFS app in (CDEPS) Data Atmosphere mode")
endif()

if(APP MATCHES "^(S2S|S2SA|S2SW|S2SWA)$")
if(APP MATCHES "^(S2S|S2SA|S2SW|S2SWA|S2SWAL)$")
set(APP_MSG "Configuring UFS app in S2S")
set(CMEPS ON CACHE BOOL "Enable CMEPS" FORCE)
set(FMS ON CACHE BOOL "Enable FMS" FORCE)
set(FV3 ON CACHE BOOL "Enable FV3" FORCE)
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)
if(APP MATCHES "^S2SW")
if(APP MATCHES "^(S2SW|S2SWA|S2SWAL)")
set(WW3 ON CACHE BOOL "Enable WAVEWATCH III" FORCE)
string(CONCAT APP_MSG ${APP_MSG} " with Waves")
endif()
if(APP MATCHES "A$")
if(APP MATCHES "^(S2SA|S2SWA)")
set(UFS_GOCART ON CACHE BOOL "Enable GOCART" FORCE)
if(WW3)
string(CONCAT APP_MSG ${APP_MSG} " and Aerosols")
else()
string(CONCAT APP_MSG ${APP_MSG} " with Aerosols")
endif()
string(CONCAT APP_MSG ${APP_MSG} " with Aerosols")
endif()
if(APP MATCHES "^S2SWAL")
set(NOAHMP ON CACHE BOOL "Enable NOAHMP" FORCE)
endif()
message("${APP_MSG} mode")
endif()
Expand Down Expand Up @@ -84,3 +87,10 @@ if(APP MATCHES "^(ATMAERO)$")
set(UFS_GOCART ON CACHE BOOL "Enable GOCART" FORCE)
message("Configuring UFS app in Atmosphere with Aerosols mode")
endif()

if(APP MATCHES "^(LND)$")
set(CMEPS ON CACHE BOOL "Enable CMEPS" FORCE)
set(CDEPS ON CACHE BOOL "Enable CDEPS" FORCE)
set(NOAHMP ON CACHE BOOL "Enable NOAHMP" FORCE)
set(FMS ON CACHE BOOL "Enable FMS" FORCE)
endif()
11 changes: 11 additions & 0 deletions driver/UFSDriver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ MODULE UFSDriver
#ifdef FRONT_NOAH
use FRONT_NOAH, only: NOAH_SS => SetServices
#endif
#ifdef FRONT_NOAHMP
use FRONT_NOAHMP, only: NOAHMP_SS => SetServices
#endif
#ifdef FRONT_LIS
use FRONT_LIS, only: LIS_SS => SetServices
#endif
Expand Down Expand Up @@ -447,6 +450,14 @@ subroutine SetModelServices(driver, rc)
found_comp = .true.
end if
#endif
#ifdef FRONT_NOAHMP
if (trim(model) == "noahmp") then
call NUOPC_DriverAddComp(driver, trim(prefix), NOAHMP_SS, &
petList=petList, comp=comp, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
found_comp = .true.
end if
#endif
#ifdef FRONT_LIS
if (trim(model) == "lis") then
!TODO: Remove bail code and pass info and SetVM to DriverAddComp
Expand Down
Loading