From dd1443a1fe772e0af3cd6a6bdd816463bf8cafd0 Mon Sep 17 00:00:00 2001 From: Zbigniew Piotrowski Date: Fri, 3 Nov 2023 11:21:53 +0100 Subject: [PATCH] Module renaming, added stub module file for ectrans --- src/programs/CMakeLists.txt | 2 +- ...r.F90 => ectrans-benchmark-driver_mod.F90} | 4 ++-- src/programs/ectrans-benchmark-program.F90 | 2 +- src/trans/CMakeLists.txt | 1 + src/trans/module/ectrans_mod.F90 | 24 +++++++++++++++++++ 5 files changed, 29 insertions(+), 4 deletions(-) rename src/programs/{ectrans-benchmark-driver.F90 => ectrans-benchmark-driver_mod.F90} (99%) create mode 100644 src/trans/module/ectrans_mod.F90 diff --git a/src/programs/CMakeLists.txt b/src/programs/CMakeLists.txt index b777823b1..b2fa72e0e 100644 --- a/src/programs/CMakeLists.txt +++ b/src/programs/CMakeLists.txt @@ -44,7 +44,7 @@ foreach( prec sp dp ) ecbuild_add_executable(TARGET ectrans-benchmark-uni-${prec} SOURCES ectrans-benchmark-program.F90 - ectrans-benchmark-driver.F90 + ectrans-benchmark-driver_mod.F90 ectrans-benchmark-data_mod.F90 LIBS fiat diff --git a/src/programs/ectrans-benchmark-driver.F90 b/src/programs/ectrans-benchmark-driver_mod.F90 similarity index 99% rename from src/programs/ectrans-benchmark-driver.F90 rename to src/programs/ectrans-benchmark-driver_mod.F90 index 52d22a665..173619fa8 100644 --- a/src/programs/ectrans-benchmark-driver.F90 +++ b/src/programs/ectrans-benchmark-driver_mod.F90 @@ -7,7 +7,7 @@ ! nor does it submit to any jurisdiction. ! -MODULE transform_driver +MODULE transform_driver_mod use parkind1, only: jpim, jprb, jprd use oml_mod ,only : oml_max_threads use yomgstats, only: jpmaxstat @@ -718,6 +718,6 @@ subroutine dump_gridpoint_field(jstep, myproc, nproma, ngpblks, fld, fldchar, no end subroutine dump_gridpoint_field -end module transform_driver +end module transform_driver_mod !=================================================================================================== diff --git a/src/programs/ectrans-benchmark-program.F90 b/src/programs/ectrans-benchmark-program.F90 index a5a530505..a11c9928c 100644 --- a/src/programs/ectrans-benchmark-program.F90 +++ b/src/programs/ectrans-benchmark-program.F90 @@ -45,7 +45,7 @@ program transform_test use mpl_module use yomgstats, only: jpmaxstat use yomhook, only : dr_hook_init -use transform_driver,only : ectrans_setup, ectrans_setup0, & +use transform_driver_mod, only : ectrans_setup, ectrans_setup0, & ectrans_trans_inq, ectrans_allocate_spectral, & ectrans_allocate_grid, ectrans_deallocate_grid, & ectrans_allocate_normdata, ectrans_calculate_norms, & diff --git a/src/trans/CMakeLists.txt b/src/trans/CMakeLists.txt index 62c947149..25827db99 100644 --- a/src/trans/CMakeLists.txt +++ b/src/trans/CMakeLists.txt @@ -40,6 +40,7 @@ ecbuild_list_add_pattern( LIST trans_src algor/* internal/* external/* + module/* ${CMAKE_CURRENT_BINARY_DIR}/internal/ectrans_version_mod.F90 QUIET ) diff --git a/src/trans/module/ectrans_mod.F90 b/src/trans/module/ectrans_mod.F90 new file mode 100644 index 000000000..6258ae513 --- /dev/null +++ b/src/trans/module/ectrans_mod.F90 @@ -0,0 +1,24 @@ +module ectrans_mod +#include "setup_trans0.h" +#include "setup_trans.h" +#include "inv_trans.h" +#include "dir_trans.h" +#include "trans_inq.h" +#include "specnorm.h" +end module ectrans_mod +submodule (ectrans_mod) setup_trans0_mod +#include "setup_trans0.F90" +end submodule setup_trans0_mod +submodule (ectrans_mod) setup_trans_mod +#include "setup_trans.F90" +end submodule setup_trans_mod +submodule (ectrans_mod) inv_trans_mod +#include "inv_trans.F90" +end submodule inv_trans_mod +submodule (ectrans_mod) inv_trans_mod +#include "inv_trans.F90" +end submodule inv_trans_mod +submodule (ectrans_mod) specnorm_mod +#include "specnorm.F90" +end submodule specnorm_mod +