Skip to content

Commit

Permalink
Add manage externals to access MMM-physics repo (#2126)
Browse files Browse the repository at this point in the history
TYPE: enhancement, no impact

KEYWORDS: manage_externals, some physics for tropical suite

SOURCE: internal

DESCRIPTION OF CHANGES:
Add the use of manage_externals tool to access physics in
[MMM-physics](https://github.com/NCAR/MMM-physics) repository. The
physics we access are part of the 'tropical' suite: YSU PBL, revised MM5
surface layer, WSM6 microphysics, and new Tiedtke scheme. It also
accesses GWDO option 1 routine. These modules have been residing in
phys/physics_mmm/ in 4.6. Instead of copied files in this directory, we
now use manage_externals to access these modules from MMM-physics
repository.

Will need to update the tags specified in Externals.cfg before final
release.

LIST OF MODIFIED FILES: 
A       arch/Externals.cfg
M       phys/Makefile
D       phys/physics_mmm/bl_gwdo.F90
D       phys/physics_mmm/bl_ysu.F90
D       phys/physics_mmm/cu_ntiedtke.F90
D       phys/physics_mmm/module_libmassv.F90
D       phys/physics_mmm/mp_radar.F90
D       phys/physics_mmm/mp_wsm6.F90
D       phys/physics_mmm/mp_wsm6_effectRad.F90
D       phys/physics_mmm/sf_sfclayrev.F90
A       tools/manage_externals/

TESTS CONDUCTED: 
1. Successfully compiled the code on Derecho.
2. Are the Jenkins tests all passing?

RELEASE NOTE: Add manage_externals tool to access physics modules in
MMM-physics git repository.
  • Loading branch information
weiwangncar authored Jan 9, 2025
1 parent 695f455 commit 7195dc2
Show file tree
Hide file tree
Showing 28 changed files with 3,917 additions and 10,474 deletions.
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,29 @@ if ( ${USE_IPO} )
endif()



################################################################################
##
## Checkout external repositories using manage_externals
##
################################################################################
message( STATUS "Checking out external repos via manage_externals" )
set( LOG_FILE ${CMAKE_CURRENT_BINARY_DIR}/checkout_externals.log )
execute_process(
COMMAND
${PROJECT_SOURCE_DIR}/tools/manage_externals/checkout_externals --externals ${PROJECT_SOURCE_DIR}/arch/Externals.cfg
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE MANAGE_EXTERNALS_STATUS
OUTPUT_FILE ${LOG_FILE}
ERROR_FILE ${LOG_FILE}
)
if ( ${MANAGE_EXTERNALS_STATUS} AND NOT ${MANAGE_EXTERNALS_STATUS} EQUAL 0 )
message( FATAL_ERROR "Failed to checkout external repos via manage_externals" )
else()
message( STATUS "Finished checking out external repos via manage_externals" )
endif()


################################################################################
##
## Create our flags / defines properties and variables to carry our information
Expand Down
10 changes: 10 additions & 0 deletions arch/Externals.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[MMM-physics]
local_path = ./phys/physics_mmm
protocol = git
repo_url = https://github.com/NCAR/MMM-physics.git
tag = 20240626-MPASv8.2

required = True

[externals_description]
schema_version = 1.0.0
1 change: 1 addition & 0 deletions phys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ LIBTARGET = physics
TARGETDIR = ./

$(LIBTARGET) :
(cd .. && ./tools/manage_externals/checkout_externals --externals ./arch/Externals.cfg)
$(MAKE) $(J) non_nmm ; \
$(AR) $(ARFLAGS) ../main/$(LIBWRFLIB) $(MODULES) $(OBJS) \
$(FIRE_MODULES) $(DIAGNOSTIC_MODULES_EM) $(PHYSMMM_MODULES)
Expand Down
Loading

0 comments on commit 7195dc2

Please sign in to comment.