-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: bringing over some changes from WRF CMake changes. Tabs to spa…
…ces and enforcing uniform style guide
- Loading branch information
1 parent
b458d58
commit dc2d2bb
Showing
22 changed files
with
412 additions
and
387 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
add_library(hydro_data_rec STATIC | ||
module_gw_gw2d_data.F90 | ||
module_rt_inc.F90 | ||
module_namelist_inc.F90 | ||
module_RT_data.F90 | ||
module_namelist.F90 | ||
module_gw_gw2d_data.F90 | ||
module_rt_inc.F90 | ||
module_namelist_inc.F90 | ||
module_RT_data.F90 | ||
module_namelist.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# build the version static library | ||
add_library(hydro_debug_utils STATIC | ||
debug_dump_variable.F90 | ||
debug_dump_variable.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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
# build the version static library | ||
add_library(hydro_driver STATIC | ||
module_HYDRO_drv.F90 | ||
module_HYDRO_drv.F90 | ||
) | ||
|
||
target_link_libraries(hydro_driver PUBLIC hydro_mpp) | ||
target_link_libraries(hydro_driver PUBLIC hydro_data_rec) | ||
target_link_libraries(hydro_driver PUBLIC hydro_routing) | ||
target_link_libraries(hydro_driver PUBLIC hydro_debug_utils) | ||
target_link_libraries(hydro_driver PUBLIC | ||
hydro_mpp | ||
hydro_data_rec | ||
hydro_routing | ||
hydro_debug_utils | ||
) | ||
|
||
if (WRF_HYDRO_NUDGING STREQUAL "1") | ||
target_link_libraries(hydro_driver PUBLIC hydro_nudging) | ||
endif (WRF_HYDRO_NUDGING STREQUAL "1") | ||
if(WRF_HYDRO_NUDGING STREQUAL "1") | ||
target_link_libraries(hydro_driver PUBLIC hydro_nudging) | ||
endif() |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
# build the orchestrator static library | ||
add_library(hydro_netcdf_layer STATIC | ||
netcdf_layer.F90 | ||
) | ||
) | ||
|
||
target_link_libraries(hydro_netcdf_layer | ||
MPI::MPI_Fortran | ||
) |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
add_library(noah STATIC | ||
module_sf_urban.F | ||
module_sf_noahlsm.F | ||
module_sf_urban.F | ||
module_sf_noahlsm.F | ||
) |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
add_library(noah_util STATIC | ||
kwm_string_utilities.F | ||
module_date_utilities.F | ||
module_model_constants.F | ||
module_Noahlsm_utility.F | ||
module_sfcdif_wrf.F | ||
kwm_string_utilities.F | ||
module_date_utilities.F | ||
module_model_constants.F | ||
module_Noahlsm_utility.F | ||
module_sfcdif_wrf.F | ||
) |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
add_library(noahmp_util STATIC | ||
kwm_string_utilities.F | ||
module_date_utilities.F | ||
module_model_constants.F | ||
module_wrf_utilities.F | ||
kwm_string_utilities.F | ||
module_date_utilities.F | ||
module_model_constants.F | ||
module_wrf_utilities.F | ||
) | ||
|
||
target_link_libraries(noahmp_util PUBLIC hydro_mpp) |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
add_subdirectory("surfex") | ||
|
||
add_library(noahmp_phys STATIC | ||
module_sf_noahmpdrv.F | ||
module_sf_noahmp_glacier.F | ||
module_sf_noahmp_groundwater.F | ||
module_sf_noahmplsm.F | ||
module_sf_noahmpdrv.F | ||
module_sf_noahmp_glacier.F | ||
module_sf_noahmp_groundwater.F | ||
module_sf_noahmplsm.F | ||
) | ||
|
||
target_link_libraries(noahmp_phys snowcro crocus_surfex) |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
add_library(hydro_mpp STATIC | ||
CPL_WRF.F90 | ||
module_mpp_GWBUCKET.F90 | ||
module_mpp_ReachLS.F90 | ||
mpp_land.F90 | ||
hashtable.F90 | ||
CPL_WRF.F90 | ||
module_mpp_GWBUCKET.F90 | ||
module_mpp_ReachLS.F90 | ||
mpp_land.F90 | ||
hashtable.F90 | ||
) | ||
|
||
target_link_libraries(hydro_mpp ${MPI_Fortran_LIBRARIES}) | ||
target_link_libraries(hydro_mpp MPI::MPI_Fortran) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
add_library(hydro_routing STATIC | ||
module_UDMAP.F90 | ||
module_channel_routing.F90 | ||
module_date_utilities_rt.F90 | ||
module_GW_baseflow.F90 | ||
module_gw_gw2d.F90 | ||
module_HYDRO_io.F90 | ||
module_HYDRO_utils.F90 | ||
module_lsm_forcing.F90 | ||
module_noah_chan_param_init_rt.F90 | ||
module_NWM_io_dict.F90 | ||
module_NWM_io.F90 | ||
module_reservoir_routing.F90 | ||
module_RT.F90 | ||
Noah_distr_routing.F90 | ||
Noah_distr_routing_overland.F90 | ||
Noah_distr_routing_subsurface.F90 | ||
module_UDMAP.F90 | ||
module_channel_routing.F90 | ||
module_date_utilities_rt.F90 | ||
module_GW_baseflow.F90 | ||
module_gw_gw2d.F90 | ||
module_HYDRO_io.F90 | ||
module_HYDRO_utils.F90 | ||
module_lsm_forcing.F90 | ||
module_noah_chan_param_init_rt.F90 | ||
module_NWM_io_dict.F90 | ||
module_NWM_io.F90 | ||
module_reservoir_routing.F90 | ||
module_RT.F90 | ||
Noah_distr_routing.F90 | ||
Noah_distr_routing_overland.F90 | ||
Noah_distr_routing_subsurface.F90 | ||
) | ||
|
||
target_link_libraries(hydro_routing PUBLIC hydro_mpp) | ||
target_link_libraries(hydro_routing PUBLIC hydro_utils) | ||
target_link_libraries(hydro_routing PUBLIC hydro_orchestrator) | ||
target_link_libraries(hydro_routing PUBLIC hydro_routing_overland) | ||
target_link_libraries(hydro_routing PUBLIC hydro_routing_subsurface) | ||
#target_link_libraries(hydro_routing PUBLIC hydro_routing_groundwater) | ||
#target_link_libraries(hydro_routing PUBLIC hydro_routing_groundwater_bucket) | ||
#target_link_libraries(hydro_routing PUBLIC hydro_routing_groundwater_nhd) | ||
#target_link_libraries(hydro_routing PUBLIC hydro_routing_groundwater_simple) | ||
target_link_libraries(hydro_routing PUBLIC hydro_routing_reservoirs) | ||
target_link_libraries(hydro_routing PUBLIC hydro_routing_reservoirs_levelpool) | ||
target_link_libraries(hydro_routing PUBLIC hydro_routing_reservoirs_hybrid) | ||
target_link_libraries(hydro_routing PUBLIC hydro_data_rec) | ||
target_link_libraries(hydro_routing PUBLIC hydro_routing_reservoirs_rfc) | ||
target_link_libraries(hydro_routing | ||
MPI::MPI_Fortran | ||
hydro_mpp | ||
hydro_utils | ||
hydro_orchestrator | ||
hydro_routing_overland | ||
hydro_routing_subsurface | ||
hydro_routing_reservoirs | ||
hydro_routing_reservoirs_levelpool | ||
hydro_routing_reservoirs_hybrid | ||
hydro_data_rec | ||
hydro_routing_reservoirs_rfc | ||
) |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
add_library(hydro_routing_overland STATIC | ||
module_overland_control.F90 | ||
module_overland_mass_balance.F90 | ||
module_overland_streams_and_lakes.F90 | ||
module_overland_routing_properties.F90 | ||
module_overland.F90 | ||
module_overland_control.F90 | ||
module_overland_mass_balance.F90 | ||
module_overland_streams_and_lakes.F90 | ||
module_overland_routing_properties.F90 | ||
module_overland.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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
add_library(hydro_routing_reservoirs_levelpool STATIC | ||
module_levelpool.F90 | ||
module_levelpool_state.F90 | ||
module_levelpool_properties.F90 | ||
module_levelpool.F90 | ||
module_levelpool_state.F90 | ||
module_levelpool_properties.F90 | ||
) | ||
|
||
add_dependencies(hydro_routing_reservoirs_levelpool hydro_routing_reservoirs) |
6 changes: 3 additions & 3 deletions
6
src/Routing/Reservoirs/Persistence_Level_Pool_Hybrid/CMakeLists.txt
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
add_library(hydro_routing_reservoirs_hybrid STATIC | ||
module_persistence_levelpool_hybrid.F90 | ||
module_persistence_levelpool_hybrid_state.F90 | ||
module_persistence_levelpool_hybrid_properties.F90 | ||
module_persistence_levelpool_hybrid.F90 | ||
module_persistence_levelpool_hybrid_state.F90 | ||
module_persistence_levelpool_hybrid_properties.F90 | ||
) | ||
|
||
add_dependencies(hydro_routing_reservoirs_hybrid hydro_routing_reservoirs) |
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
add_library(hydro_routing_reservoirs_rfc STATIC | ||
module_rfc_forecasts.F90 | ||
module_rfc_forecasts_state.F90 | ||
module_rfc_forecasts_properties.F90 | ||
module_rfc_forecasts.F90 | ||
module_rfc_forecasts_state.F90 | ||
module_rfc_forecasts_properties.F90 | ||
) | ||
|
||
add_dependencies(hydro_routing_reservoirs_rfc hydro_routing_reservoirs) | ||
add_dependencies(hydro_routing_reservoirs_rfc hydro_routing_reservoirs_levelpool) | ||
add_dependencies(hydro_routing_reservoirs_rfc | ||
hydro_routing_reservoirs | ||
hydro_routing_reservoirs_levelpool | ||
) |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
add_library(hydro_routing_subsurface STATIC | ||
module_subsurface_input.F90 | ||
module_subsurface_output.F90 | ||
module_subsurface_static_data.F90 | ||
module_subsurface_grid_transform.F90 | ||
module_subsurface_properties.F90 | ||
module_subsurface_state.F90 | ||
module_subsurface.F90 | ||
module_subsurface_input.F90 | ||
module_subsurface_output.F90 | ||
module_subsurface_static_data.F90 | ||
module_subsurface_grid_transform.F90 | ||
module_subsurface_properties.F90 | ||
module_subsurface_state.F90 | ||
module_subsurface.F90 | ||
) | ||
|
||
target_link_libraries(hydro_routing_subsurface PUBLIC hydro_routing_overland) | ||
target_link_libraries(hydro_routing_subsurface PRIVATE hydro_routing_overland) |
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
# build the version static library | ||
add_library(hydro_nudging STATIC | ||
module_date_utils_nudging.F90 | ||
module_nudging_io.F90 | ||
module_nudging_utils.F90 | ||
module_stream_nudging.F90 | ||
module_date_utils_nudging.F90 | ||
module_nudging_io.F90 | ||
module_nudging_utils.F90 | ||
module_stream_nudging.F90 | ||
) | ||
|
||
target_link_libraries(hydro_nudging PUBLIC hydro_mpp) | ||
target_link_libraries(hydro_nudging PUBLIC hydro_data_rec) | ||
target_link_libraries(hydro_nudging PUBLIC hydro_orchestrator) | ||
target_link_libraries(hydro_nudging PRIVATE | ||
hydro_mpp | ||
hydro_data_rec | ||
hydro_orchestrator | ||
) |
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 |
---|---|---|
@@ -1,19 +1,20 @@ | ||
# read version numbers for wrf_hydro_version and nwm_version from | ||
# ../.version and ../.nwm_version | ||
file (STRINGS "../.version" WRF_HYDRO_VERSION) | ||
if (NWM_META AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.nwm_version) | ||
file (STRINGS "../.nwm_version" NWM_VERSION) | ||
else (NWM_META AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.nwm_version) | ||
set(NWM_VERSION "undefined") | ||
endif (NWM_META AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.nwm_version) | ||
# ../.version and ../.nwm_version files | ||
|
||
file(STRINGS "../.version" WRF_HYDRO_VERSION) | ||
if(NWM_META AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.nwm_version) | ||
file (STRINGS "../.nwm_version" NWM_VERSION) | ||
else(NWM_META AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.nwm_version) | ||
set(NWM_VERSION "undefined") | ||
endif() | ||
|
||
# add the preprocessor definitions for NWM_VERSION and WRF_HYDRO_VERSION | ||
# needed to compile module_version.F90 | ||
add_definitions (-DNWM_VERSION="${NWM_VERSION}") | ||
add_definitions (-DWRF_HYDRO_VERSION="${WRF_HYDRO_VERSION}") | ||
add_definitions(-DNWM_VERSION="${NWM_VERSION}") | ||
add_definitions(-DWRF_HYDRO_VERSION="${WRF_HYDRO_VERSION}") | ||
|
||
# build the version static library | ||
add_library(hydro_utils STATIC | ||
module_version.F90 | ||
module_hydro_stop.F90 | ||
module_version.F90 | ||
module_hydro_stop.F90 | ||
) |