diff --git a/.github/workflows/ci_build_scm_ubuntu_22.04.yml b/.github/workflows/ci_build_scm_ubuntu_22.04.yml index 6c33a30e5..06e71b531 100644 --- a/.github/workflows/ci_build_scm_ubuntu_22.04.yml +++ b/.github/workflows/ci_build_scm_ubuntu_22.04.yml @@ -19,7 +19,6 @@ jobs: NFVERSION: v4.5.3 bacio_ROOT: /home/runner/bacio sp_ROOT: /home/runner/NCEPLIBS-sp - w3emc_ROOT: /home/runner/myw3emc SCM_ROOT: /home/runner/work/ccpp-scm/ccpp-scm intel_ROOT: /home/runner/intel suites: SCM_GFS_v15p2,SCM_GFS_v16,SCM_GFS_v17_p8,SCM_HRRR,SCM_RRFS_v1beta,SCM_RAP,SCM_WoFS_v0,SCM_GFS_v15p2_ps,SCM_GFS_v16_ps,SCM_GFS_v17_p8_ps,SCM_HRRR_ps,SCM_RRFS_v1beta_ps,SCM_RAP_ps,SCM_WoFS_v0_ps @@ -119,23 +118,6 @@ jobs: make install echo "sp_DIR=/home/runner/NCEPLIBS-sp/lib/cmake/sp" >> $GITHUB_ENV - - name: Cache w3emc library v2.9.2 - id: cache-w3emc-fortran - uses: actions/cache@v3 - with: - path: /home/runner/myw3emc - key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-key - - - name: Install w3emc library v2.9.2 - if: steps.cache-w3emc-fortran.outputs.cache-hit != 'true' - run: | - git clone --branch v2.9.2 https://github.com/NOAA-EMC/NCEPLIBS-w3emc.git NCEPLIBS-w3emc - cd NCEPLIBS-w3emc && mkdir build && cd build - cmake -DCMAKE_INSTALL_PREFIX=${w3emc_ROOT} ../ - make -j2 - make install - echo "w3emc_DIR=/home/runner/myw3emc/lib/cmake/w3emc" >> $GITHUB_ENV - - name: Install NetCDF C library run: | sudo apt-get update diff --git a/.github/workflows/ci_build_scm_ubuntu_22.04_nvidia.yml b/.github/workflows/ci_build_scm_ubuntu_22.04_nvidia.yml index 9e998655f..159190d0a 100644 --- a/.github/workflows/ci_build_scm_ubuntu_22.04_nvidia.yml +++ b/.github/workflows/ci_build_scm_ubuntu_22.04_nvidia.yml @@ -19,7 +19,6 @@ jobs: NETCDF: /home/runner/netcdf bacio_ROOT: /home/runner/bacio sp_ROOT: /home/runner/NCEPLIBS-sp - w3emc_ROOT: /home/runner/myw3emc SCM_ROOT: /home/runner/work/ccpp-scm/ccpp-scm zlib_ROOT: /home/runner/zlib HDF5_ROOT: /home/runner/hdf5 @@ -219,23 +218,6 @@ jobs: make install echo "sp_DIR=/home/runner/NCEPLIBS-sp/lib/cmake/sp" >> $GITHUB_ENV - - name: Cache w3emc library v2.9.2 - id: cache-w3emc-fortran - uses: actions/cache@v3 - with: - path: /home/runner/myw3emc - key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-key - - - name: Install w3emc library v2.9.2 - if: steps.cache-w3emc-fortran.outputs.cache-hit != 'true' - run: | - git clone --branch v2.9.2 https://github.com/NOAA-EMC/NCEPLIBS-w3emc.git NCEPLIBS-w3emc - cd NCEPLIBS-w3emc && mkdir build && cd build - cmake -DCMAKE_INSTALL_PREFIX=${w3emc_ROOT} ../ - make -j2 - make install - echo "w3emc_DIR=/home/runner/myw3emc/lib/cmake/w3emc" >> $GITHUB_ENV - ####################################################################################### # Build and run SCM regression tests (ccpp-scm/test/rt_test_cases.py) ####################################################################################### diff --git a/.github/workflows/ci_run_scm_DEPHY.yml b/.github/workflows/ci_run_scm_DEPHY.yml index eeba4c7fe..eb8d6701b 100644 --- a/.github/workflows/ci_run_scm_DEPHY.yml +++ b/.github/workflows/ci_run_scm_DEPHY.yml @@ -18,7 +18,6 @@ jobs: NFVERSION: v4.5.3 bacio_ROOT: /home/runner/bacio sp_ROOT: /home/runner/NCEPLIBS-sp - w3emc_ROOT: /home/runner/myw3emc SCM_ROOT: /home/runner/work/ccpp-scm/ccpp-scm suites: SCM_GFS_v16,SCM_GFS_v16_ps @@ -88,23 +87,6 @@ jobs: make install echo "sp_DIR=/home/runner/NCEPLIBS-sp/lib/cmake/sp" >> $GITHUB_ENV - - name: Cache w3emc library v2.9.2 - id: cache-w3emc-fortran - uses: actions/cache@v3 - with: - path: /home/runner/myw3emc - key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-key - - - name: Install w3emc library v2.9.2 - if: steps.cache-w3emc-fortran.outputs.cache-hit != 'true' - run: | - git clone --branch v2.9.2 https://github.com/NOAA-EMC/NCEPLIBS-w3emc.git NCEPLIBS-w3emc - cd NCEPLIBS-w3emc && mkdir build && cd build - cmake -DCMAKE_INSTALL_PREFIX=${w3emc_ROOT} ../ - make -j2 - make install - echo "w3emc_DIR=/home/runner/myw3emc/lib/cmake/w3emc" >> $GITHUB_ENV - - name: Install NetCDF C library run: sudo apt-get install libnetcdf-dev diff --git a/.github/workflows/ci_run_scm_rts.yml b/.github/workflows/ci_run_scm_rts.yml index d58a10cdd..c561d2731 100644 --- a/.github/workflows/ci_run_scm_rts.yml +++ b/.github/workflows/ci_run_scm_rts.yml @@ -19,7 +19,6 @@ jobs: NFVERSION: v4.5.3 bacio_ROOT: /home/runner/bacio sp_ROOT: /home/runner/NCEPLIBS-sp - w3emc_ROOT: /home/runner/myw3emc SCM_ROOT: /home/runner/work/ccpp-scm/ccpp-scm suites: SCM_GFS_v15p2,SCM_GFS_v16,SCM_GFS_v17_p8,SCM_HRRR,SCM_RRFS_v1beta,SCM_RAP,SCM_WoFS_v0 suites_ps: SCM_GFS_v15p2_ps,SCM_GFS_v16_ps,SCM_GFS_v17_p8_ps,SCM_HRRR_ps,SCM_RRFS_v1beta_ps,SCM_RAP_ps,SCM_WoFS_v0_ps @@ -105,23 +104,6 @@ jobs: make install echo "sp_DIR=/home/runner/NCEPLIBS-sp/lib/cmake/sp" >> $GITHUB_ENV - - name: Cache w3emc library v2.9.2 - id: cache-w3emc-fortran - uses: actions/cache@v3 - with: - path: /home/runner/myw3emc - key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-key - - - name: Install w3emc library v2.9.2 - if: steps.cache-w3emc-fortran.outputs.cache-hit != 'true' - run: | - git clone --branch v2.9.2 https://github.com/NOAA-EMC/NCEPLIBS-w3emc.git NCEPLIBS-w3emc - cd NCEPLIBS-w3emc && mkdir build && cd build - cmake -DCMAKE_INSTALL_PREFIX=${w3emc_ROOT} ../ - make -j2 - make install - echo "w3emc_DIR=/home/runner/myw3emc/lib/cmake/w3emc" >> $GITHUB_ENV - - name: Install NetCDF C library run: sudo apt-get install libnetcdf-dev diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 41736151a..57d54c9ee 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -17,6 +17,7 @@ # actual variable definition files 'ccpp/framework/src/ccpp_types.F90', 'ccpp/physics/physics/hooks/machine.F', + 'ccpp/physics/physics/tools/w3emc.F90', 'ccpp/physics/physics/Radiation/RRTMG/radsw_param.f', 'ccpp/physics/physics/Radiation/RRTMG/radlw_param.f', 'ccpp/physics/physics/photochem/h2o_def.f', diff --git a/scm/doc/TechGuide/chap_quick.rst b/scm/doc/TechGuide/chap_quick.rst index 69f165b94..6ebba9907 100644 --- a/scm/doc/TechGuide/chap_quick.rst +++ b/scm/doc/TechGuide/chap_quick.rst @@ -25,7 +25,7 @@ Obtaining Code The source code for the SCM, CCPP, and their required components are provided through GitHub. The latest release branch contains the tested and supported version for general use, while the development branch (``main``) contains the latest -developer code, but may not be as stable or consistent with existing documentation. +developer code, but may not be as stable or consistent with existing documentation. Instructions for using either option are discussed here. Release Code @@ -127,7 +127,7 @@ System Requirements, Libraries, and Tools ----------------------------------------- The source code for the SCM and CCPP components is in the form of -programs written in FORTRAN 90 (with some required features from the +programs written in FORTRAN 90 (with some required features from the FORTRAN 2008 standard), and C. In addition, the model I/O relies on the NetCDF libraries. Beyond the standard scripts, the build system relies on use of the Python scripting language, along with cmake, @@ -162,10 +162,8 @@ their locations prior to building the SCM. - sp - Spectral Transformation Library -- w3emc - GRIB decoder and encoder library - The following environment variables are used by the build system to -properly link these libraries: ``bacio_ROOT``, ``sp_ROOT``, and ``w3emc_ROOT`` Computational platforms on +properly link these libraries: ``bacio_ROOT`` and ``sp_ROOT`` Computational platforms on which these libraries are prebuilt and installed in a central location are referred to as *preconfigured* platforms. Examples of preconfigured platforms are most NOAA high-performance computing machines (using the @@ -231,8 +229,8 @@ installing prerequisite libraries. Visit https://github.com/NOAA-EMC/hpc-stack for instructions for installing prerequisite libraries via *hpc-stack* in their docs directory. UFS users who already installed libraries via the *hpc-stack* package only need to set the -compiler (``CC``, ``CXX``, ``FC``), NetCDF (``NetCDF_ROOT``), and ``bacio``, -``sp`` and ``w3emc`` (``bacio_ROOT``, ``sp_ROOT``, ``w3emc_ROOT``) environment variables to point +compiler (``CC``, ``CXX``, ``FC``), NetCDF (``NetCDF_ROOT``), ``bacio`` and +``sp`` (``bacio_ROOT``, ``sp_ROOT``) environment variables to point to their installation paths in order to compile the SCM. The SCM uses only a small part of the UFS *hpc-stack* package and has fewer @@ -301,7 +299,7 @@ If the download step fails, make sure that your system’s firewall does not block access to GitHub. If it does, download the files ``comparison_data.tar.gz``, ``physics_input_data.tar.gz``, ``processed_case_input.tar.gz``, and ``raw_case_input.tar.gz`` from the GitHub release website using your browser and manually extract its -contents in the directory ``scm/data``. Similarly, do the same for +contents in the directory ``scm/data``. Similarly, do the same for ``thompson_tables.tar.gz`` and ``MG_INCCN_data.tar.gz`` and extract to ``scm/data/physics_input_data/``. @@ -756,7 +754,7 @@ GNU-based Docker image: - Python - 3 -- NCEPLIBS subset: bacio v2.4.1_4, sp v2.3.3_d, w3emc v2.9.2_d +- NCEPLIBS subset: bacio v2.4.1_4, sp v2.3.3_d A Docker image containing the SCM, CCPP, and its software prerequisites can be generated from the code in the software repository obtained by diff --git a/scm/etc/modules/derecho_gnu.lua b/scm/etc/modules/derecho_gnu.lua index be07155c4..30094ecef 100644 --- a/scm/etc/modules/derecho_gnu.lua +++ b/scm/etc/modules/derecho_gnu.lua @@ -22,7 +22,6 @@ load("netcdf-c/4.9.2") load("netcdf-fortran/4.6.0") load("bacio/2.4.1") load("sp/2.3.3") -load("w3emc") setenv("CMAKE_C_COMPILER","mpicc") setenv("CMAKE_CXX_COMPILER","mpicxx") diff --git a/scm/etc/modules/derecho_intel.lua b/scm/etc/modules/derecho_intel.lua index 37f784bfe..6a93b9d65 100644 --- a/scm/etc/modules/derecho_intel.lua +++ b/scm/etc/modules/derecho_intel.lua @@ -22,7 +22,6 @@ load("netcdf-c/4.9.2") load("netcdf-fortran/4.6.0") load("bacio/2.4.1") load("sp/2.3.3") -load("w3emc") setenv("CMAKE_C_COMPILER","cc") setenv("CMAKE_CXX_COMPILER","CC") diff --git a/scm/etc/modules/hera_gnu.lua b/scm/etc/modules/hera_gnu.lua index 0e28df2d0..fe2a1250d 100644 --- a/scm/etc/modules/hera_gnu.lua +++ b/scm/etc/modules/hera_gnu.lua @@ -22,7 +22,6 @@ load("netcdf-c/4.9.2") load("netcdf-fortran/4.6.0") load("bacio/2.4.1") load("sp/2.3.3") -load("w3emc") setenv("CMAKE_C_COMPILER","mpicc") setenv("CMAKE_CXX_COMPILER","mpicxx") diff --git a/scm/etc/modules/hera_intel.lua b/scm/etc/modules/hera_intel.lua index 6cdbf7d4c..98d2feb9f 100644 --- a/scm/etc/modules/hera_intel.lua +++ b/scm/etc/modules/hera_intel.lua @@ -21,7 +21,6 @@ load("netcdf-c/4.9.2") load("netcdf-fortran/4.6.0") load("bacio/2.4.1") load("sp/2.3.3") -load("w3emc") setenv("CMAKE_C_COMPILER","mpiicc") setenv("CMAKE_CXX_COMPILER","mpiicpc") diff --git a/scm/etc/modules/jet_gnu.lua b/scm/etc/modules/jet_gnu.lua index 96d5a1c97..b5a4b70bc 100644 --- a/scm/etc/modules/jet_gnu.lua +++ b/scm/etc/modules/jet_gnu.lua @@ -23,7 +23,6 @@ load("netcdf-c/4.9.2") load("netcdf-fortran/4.6.0") load("bacio/2.4.1") load("sp/2.3.3") -load("w3emc") setenv("CMAKE_C_COMPILER","mpicc") setenv("CMAKE_CXX_COMPILER","mpicxx") diff --git a/scm/etc/modules/jet_intel.lua b/scm/etc/modules/jet_intel.lua index 8c232ed26..e44932cba 100644 --- a/scm/etc/modules/jet_intel.lua +++ b/scm/etc/modules/jet_intel.lua @@ -23,7 +23,6 @@ load("netcdf-c/4.9.2") load("netcdf-fortran/4.6.0") load("bacio/2.4.1") load("sp/2.3.3") -load("w3emc") setenv("CMAKE_C_COMPILER","mpiicc") setenv("CMAKE_CXX_COMPILER","mpiicpc") diff --git a/scm/etc/modules/orion_gnu.lua b/scm/etc/modules/orion_gnu.lua index 17eb12b09..dec39653c 100644 --- a/scm/etc/modules/orion_gnu.lua +++ b/scm/etc/modules/orion_gnu.lua @@ -22,7 +22,6 @@ load("netcdf-c/4.9.2") load("netcdf-fortran/4.6.0") load("bacio/2.4.1") load("sp/2.3.3") -load("w3emc") setenv("CMAKE_C_COMPILER","mpicc") setenv("CMAKE_CXX_COMPILER","mpicxx") diff --git a/scm/etc/modules/orion_intel.lua b/scm/etc/modules/orion_intel.lua index 005119c5d..ddcedf9dd 100644 --- a/scm/etc/modules/orion_intel.lua +++ b/scm/etc/modules/orion_intel.lua @@ -22,7 +22,6 @@ load("netcdf-c/4.9.2") load("netcdf-fortran/4.6.0") load("bacio/2.4.1") load("sp/2.3.3") -load("w3emc") setenv("CMAKE_C_COMPILER","mpiicc") setenv("CMAKE_CXX_COMPILER","mpiicpc") diff --git a/scm/src/CMakeLists.txt b/scm/src/CMakeLists.txt index 2ef20bb84..739c47617 100644 --- a/scm/src/CMakeLists.txt +++ b/scm/src/CMakeLists.txt @@ -50,7 +50,7 @@ else() RESULT_VARIABLE return_code ) endif() - + # Check return code from CCPP prebuild.py if(return_code EQUAL 0) message (STATUS "CCPP prebuild step completed successfully") @@ -70,7 +70,6 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/../../CMakeModule find_package(NetCDF REQUIRED COMPONENTS C Fortran) find_package(bacio REQUIRED) find_package(sp REQUIRED) -find_package(w3emc REQUIRED) SET(CCPP_FRAMEWORK_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/framework) SET(CCPP_PHYSICS_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/physics) @@ -130,15 +129,15 @@ set(SIMDMULTIARCH OFF CACHE BOOL "Enable multi-target SIMD instruction sets") # Set compile options if (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ggdb -fbacktrace -cpp -fcray-pointer -ffree-line-length-none -fno-range-check") - + if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz") endif() - + if(NOT 32BIT) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fdefault-double-8") endif() - + if (${CMAKE_BUILD_TYPE} MATCHES "Debug") set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0") @@ -146,7 +145,7 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2") endif() - + set(CMAKE_C_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE) set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE) set(CMAKE_C_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE) @@ -154,11 +153,11 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") elseif (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -nowarn -sox -align array64byte -qno-opt-dynamic-align") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align -sox -fp-model source") - + if(NOT 32BIT) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -real-size 64") endif() - + if (${CMAKE_BUILD_TYPE} MATCHES "Debug") set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv -init=snan,arrays") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -ftrapuv") @@ -181,7 +180,7 @@ elseif (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=core-avx-i") endif() endif() - + set(CMAKE_C_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE) set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE) set(CMAKE_C_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE) @@ -199,7 +198,7 @@ elseif (${CMAKE_Fortran_COMPILER_ID} MATCHES "NVHPC") if(NOT 32BIT) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8") endif() - + if (${CMAKE_BUILD_TYPE} MATCHES "Debug") set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -g") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g") @@ -211,7 +210,7 @@ elseif (${CMAKE_Fortran_COMPILER_ID} MATCHES "NVHPC") set(MPI_C_COMPILER mpicc) set(MPI_CXX_COMPILER mpicxx) set(MPI_Fortran_COMPILER mpif90) - + set(CMAKE_C_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE) set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE) set(CMAKE_C_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE) @@ -279,7 +278,6 @@ endif() TARGET_LINK_LIBRARIES(scm NetCDF::NetCDF_Fortran) TARGET_LINK_LIBRARIES(scm bacio::bacio_4) TARGET_LINK_LIBRARIES(scm sp::sp_d) -TARGET_LINK_LIBRARIES(scm w3emc::w3emc_d) TARGET_LINK_LIBRARIES(scm ccpp_framework) TARGET_LINK_LIBRARIES(scm ccpp_physics) @@ -292,4 +290,3 @@ ADD_CUSTOM_COMMAND( COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/run_scm.py ${CMAKE_CURRENT_BINARY_DIR}/run_scm.py) - diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index cf4a6db0c..67160d88d 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -1,7 +1,8 @@ module GFS_typedefs use machine, only: kind_phys, kind_dbl_prec, kind_sngl_prec - + use w3emc, only: w3difdat, w3kind + use module_radsw_parameters, only: topfsw_type, sfcfsw_type use module_radlw_parameters, only: topflw_type, sfcflw_type use h2o_def, only: levh2o, h2o_coeff diff --git a/scm/src/scm.F90 b/scm/src/scm.F90 index ba152f1c1..9c990db10 100644 --- a/scm/src/scm.F90 +++ b/scm/src/scm.F90 @@ -15,6 +15,7 @@ subroutine scm_main_sub() use scm_time_integration use scm_output use scm_type_defs + use w3emc, only: w3movdat use :: ccpp_static_api, & only: ccpp_physics_init, & diff --git a/scm/src/scm_input.F90 b/scm/src/scm_input.F90 index cc3effcd5..a913caaa4 100644 --- a/scm/src/scm_input.F90 +++ b/scm/src/scm_input.F90 @@ -7,6 +7,7 @@ module scm_input use scm_kinds, only : sp, dp, qp use netcdf use scm_type_defs, only: character_length +use w3emc, only: w3difdat implicit none