From 936fdde2ee6b6896db82c55945d10b15236f79f4 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 3 Dec 2019 10:05:18 -0500 Subject: [PATCH] Use MAPL CMake target and Fortran module --- CMakeLists.txt | 2 +- geos_utils/fv_regrid_c2c.F90 | 12 +----------- geos_utils/fv_regridding_utils.F90 | 5 +---- geos_utils/rs_scaleMod.F90 | 4 +--- model/mapz-driver/CMakeLists.txt | 2 +- tools/external_ic.F90 | 4 +--- tools/fv_treat_da_inc.F90 | 2 +- 7 files changed, 7 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c0e8cd89c..aad9f37c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,7 @@ endif () esma_add_library (${this} SRCS ${srcs} - DEPENDENCIES MAPL_Base + DEPENDENCIES MAPL INCLUDES ${extra_incs} ${INC_ESMF} ${INC_NETCDF}) if (FV_PRECISION STREQUAL R4) diff --git a/geos_utils/fv_regrid_c2c.F90 b/geos_utils/fv_regrid_c2c.F90 index 2597abffa..59b935c9f 100644 --- a/geos_utils/fv_regrid_c2c.F90 +++ b/geos_utils/fv_regrid_c2c.F90 @@ -13,17 +13,7 @@ module fv_regrid_c2c use tracer_manager_mod, only: get_tracer_names, get_number_tracers, get_tracer_index use field_manager_mod, only: MODEL_ATMOS - use MAPL_MOD, only: MAPL_PI_R8, MAPL_OMEGA, MAPL_GRAV, & - MAPL_KAPPA, MAPL_RGAS, MAPL_RVAP, & - MAPL_CP - use MAPL_GridManagerMod - use MAPL_RegridderManagerMod - use MAPL_CubedSphereGridFactoryMod - use MAPL_AbstractRegridderMod - use MAPL_RegridderSpecMod - use MAPL_IOMod - use MAPL_ShmemMod - use pFIO + use MAPL use, intrinsic :: iso_fortran_env, only: REAL64, REAL32 use fv_arrays_mod, only: fv_atmos_type, fv_grid_type, fv_grid_bounds_type, FVPRC, REAL4, REAL8 diff --git a/geos_utils/fv_regridding_utils.F90 b/geos_utils/fv_regridding_utils.F90 index 7a554dfc8..5cb009141 100644 --- a/geos_utils/fv_regridding_utils.F90 +++ b/geos_utils/fv_regridding_utils.F90 @@ -8,10 +8,7 @@ module fv_regridding_utils use fv_mp_mod, only: is_master, ng use fv_mapz_mod, only: mappm use mpp_mod, only: mpp_error, FATAL, NOTE, mpp_broadcast,mpp_npes - !use MAPL_MOD, only: MAPL_PI_R8, MAPL_OMEGA, MAPL_GRAV, & - !MAPL_KAPPA, MAPL_RGAS, MAPL_RVAP, & - !MAPL_CP - use MAPL_MOD + use MAPL implicit none diff --git a/geos_utils/rs_scaleMod.F90 b/geos_utils/rs_scaleMod.F90 index 8f85a2b9b..79e915027 100644 --- a/geos_utils/rs_scaleMod.F90 +++ b/geos_utils/rs_scaleMod.F90 @@ -2,10 +2,8 @@ module rs_scaleMod use fv_arrays_mod - use MAPL_ConstantsMod, only: MAPL_PSDRY - use MAPL_Mod + use MAPL use ESMF - use pFIO_StringIntegerMapMod use, intrinsic :: iso_fortran_env, only: REAL64, REAL32 ! bma added implicit none diff --git a/model/mapz-driver/CMakeLists.txt b/model/mapz-driver/CMakeLists.txt index f0e6de384..3aced14f5 100644 --- a/model/mapz-driver/CMakeLists.txt +++ b/model/mapz-driver/CMakeLists.txt @@ -33,7 +33,7 @@ endif () ecbuild_add_executable( TARGET mapz-driver SOURCES ${srcs} - LIBS ${FMS} ${MAPL_BASE}) + LIBS ${FMS} MAPL) target_compile_definitions(mapz-driver PRIVATE MAPL_MODE SPMD TIMING) target_compile_options(mapz-driver PRIVATE ${TRACEBACK}) set_target_properties(${this} PROPERTIES Fortran_MODULE_DIRECTORY ${esma_include}/${this}) diff --git a/tools/external_ic.F90 b/tools/external_ic.F90 index da59e56db..c08569083 100644 --- a/tools/external_ic.F90 +++ b/tools/external_ic.F90 @@ -18,9 +18,7 @@ module external_ic_mod use constants_mod, only: pi=>pi_8, omega, grav, kappa, rdgas, rvgas, cp_air #ifdef MAPL_MODE - use MAPL_IOMod - use MAPL_ShmemMod - use pFIO + use MAPL #endif use, intrinsic :: iso_fortran_env, only: REAL64, REAL32 diff --git a/tools/fv_treat_da_inc.F90 b/tools/fv_treat_da_inc.F90 index df42311fc..f53e93404 100644 --- a/tools/fv_treat_da_inc.F90 +++ b/tools/fv_treat_da_inc.F90 @@ -119,7 +119,7 @@ module fv_treat_da_inc_mod use field_manager_mod, only: MODEL_ATMOS #ifdef MAPL_MODE - use MAPL_MOD + use MAPL #else use constants_mod, only: pi=>pi_8, omega, grav, kappa, & rdgas, rvgas, cp_air