forked from ufs-community/ufs-weather-model
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bring external land component support to UFS (ufs-community#1443)
* update components and add external land component support * use cubed_sphere_grid as output grid * point updated CMEPS fork * switch to another fix for inconsistent land sea mask issue * make grid file configurable for external land Co-authored-by: Ufuk Turuncoglu <[email protected]> Co-authored-by: JONG KIM <[email protected]> Co-authored-by: Brian Curtis <[email protected]>
- Loading branch information
1 parent
5ac19d4
commit 5094e98
Showing
30 changed files
with
5,617 additions
and
3,911 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule CDEPS
updated
23 files
Submodule CMEPS
updated
18 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule FV3
updated
6 files
+52 −18 | atmos_model.F90 | |
+44 −33 | ccpp/data/GFS_typedefs.F90 | |
+24 −18 | ccpp/data/GFS_typedefs.meta | |
+1 −1 | ccpp/physics | |
+142 −0 | cpl/module_block_data.F90 | |
+9 −1 | cpl/module_cplfields.F90 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.