From 4be44aa0afb4b83df14bf27059f72082471714a4 Mon Sep 17 00:00:00 2001 From: WenMeng-NOAA <48260754+WenMeng-NOAA@users.noreply.github.com> Date: Mon, 14 Mar 2022 10:23:10 -0400 Subject: [PATCH] Support GFSV16.2.0 on Hera/Orion (#446) * 1)Added changes with using the hpc-stack on Hera/Orion; 2)Change modulefile on Hera/Orion in lua format. * Added changes on Hera. * Update post_hera.lua with intel/2022.1.2. * Add changes on Orion. * Change intel version to 2018. --- modulefiles/post/post_hera.lua | 55 ++++++++++ modulefiles/post/post_orion.lua | 55 ++++++++++ modulefiles/post/v8.0.0-hera | 55 ---------- modulefiles/post/v8.0.0-orion | 56 ---------- modulefiles/upp/lib-hera | 52 --------- modulefiles/upp/lib-orion | 53 --------- modulefiles/upp/upp_hera.lua | 41 +++++++ modulefiles/upp/upp_orion.lua | 46 ++++++++ sorc/build_ncep_post.sh | 7 ++ sorc/ncep_post.fd/build_upp_lib.sh | 8 ++ sorc/ncep_post.fd/makefile_lib_hpc | 152 ++++++++++++++++++++++++++ sorc/ncep_post.fd/makefile_module_hpc | 126 +++++++++++++++++++++ 12 files changed, 490 insertions(+), 216 deletions(-) create mode 100644 modulefiles/post/post_hera.lua create mode 100755 modulefiles/post/post_orion.lua delete mode 100644 modulefiles/post/v8.0.0-hera delete mode 100755 modulefiles/post/v8.0.0-orion delete mode 100755 modulefiles/upp/lib-hera delete mode 100755 modulefiles/upp/lib-orion create mode 100644 modulefiles/upp/upp_hera.lua create mode 100644 modulefiles/upp/upp_orion.lua create mode 100644 sorc/ncep_post.fd/makefile_lib_hpc create mode 100755 sorc/ncep_post.fd/makefile_module_hpc diff --git a/modulefiles/post/post_hera.lua b/modulefiles/post/post_hera.lua new file mode 100644 index 000000000..bacfa1657 --- /dev/null +++ b/modulefiles/post/post_hera.lua @@ -0,0 +1,55 @@ +help([[ +Load environment to build post on HERA +]]) + +prepend_path("MODULEPATH", "/scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack-gfsv16/modulefiles/stack") + +hpc_ver=os.getenv("hpc_ver") or "1.2.0" +load(pathJoin("hpc", hpc_ver)) + +hpc_intel_ver=os.getenv("hpc_intel_ver") or "18.0.5.274" +load(pathJoin("hpc-intel",hpc_intel_ver)) +impi_ver=os.getenv("impi_ver") or "2018.0.4" +load(pathJoin("hpc-impi", impi_ver)) + +hdf5_ver=os.getenv("hdf5_ver") or "1.10.6" +load(pathJoin("hdf5", hdf5_ver)) +netcdf_ver=os.getenv("netcdf_ver") or "4.7.4" +load(pathJoin("netcdf", netcdf_ver)) + +jasper_ver=os.getenv("jasper_ver") or "2.0.25" +load(pathJoin("jasper", jasper_ver)) +libpng_ver=os.getenv("libpng_ver") or "1.6.37" +load(pathJoin("libpng", libpng_ver)) +zlib_ver=os.getenv("zlib_ver") or "1.2.11" +load(pathJoin("zlib", zlib_ver)) + +g2_ver=os.getenv("g2_ver") or "3.4.5" +load(pathJoin("g2", g2_ver)) +g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.9.1" +load(pathJoin("g2tmpl", g2tmpl_ver)) +w3nco_ver=os.getenv("w3nco_ver") or "2.4.1" +load(pathJoin("w3nco", w3nco_ver)) +bacio_ver=os.getenv("bacio_ver") or "2.4.1" +load(pathJoin("bacio", bacio_ver)) +gfsio_ver=os.getenv("gfsio_ver") or "1.4.1" +load(pathJoin("gfsio", gfsio_ver)) +ip_ver=os.getenv("ip_ver") or "3.3.3" +load(pathJoin("ip", ip_ver)) +sp_ver=os.getenv("sp_ver") or "2.3.3" +load(pathJoin("sp", sp_ver)) +crtm_ver=os.getenv("crtm_ver") or "2.3.0" +load(pathJoin("crtm", crtm_ver)) +w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" +load(pathJoin("w3emc", w3emc_ver)) + +nemsio_ver=os.getenv("nemsio_ver") or "2.5.2" +load(pathJoin("nemsio", nemsio_ver)) +sigio_ver=os.getenv("sigio_ver") or "2.3.2" +load(pathJoin("sigio", sigio_ver)) +sfcio_ver=os.getenv("sfcio_ver") or "1.4.1" +load(pathJoin("sfcio", sfcio_ver)) +wrf_io_ver=os.getenv("wrf_io_ver") or "1.2.0" +load(pathJoin("wrf_io", wrf_io_ver)) + +whatis("Description: post build environment") diff --git a/modulefiles/post/post_orion.lua b/modulefiles/post/post_orion.lua new file mode 100755 index 000000000..07d3702a7 --- /dev/null +++ b/modulefiles/post/post_orion.lua @@ -0,0 +1,55 @@ +help([[ +Load environment to build post on ORION +]]) + +prepend_path("MODULEPATH", "/apps/contrib/NCEP/libs/hpc-stack-gfsv16/modulefiles/stack") + +hpc_ver=os.getenv("hpc_ver") or "1.2.0" +load(pathJoin("hpc", hpc_ver)) + +hpc_intel_ver=os.getenv("hpc_intel_ver") or "2018.4" +load(pathJoin("hpc-intel",hpc_intel_ver)) +impi_ver=os.getenv("impi_ver") or "2018.4" +load(pathJoin("hpc-impi", impi_ver)) + +hdf5_ver=os.getenv("hdf5_ver") or "1.10.6" +load(pathJoin("hdf5", hdf5_ver)) +netcdf_ver=os.getenv("netcdf_ver") or "4.7.4" +load(pathJoin("netcdf", netcdf_ver)) + +jasper_ver=os.getenv("jasper_ver") or "2.0.25" +load(pathJoin("jasper", jasper_ver)) +libpng_ver=os.getenv("libpng_ver") or "1.6.37" +load(pathJoin("libpng", libpng_ver)) +zlib_ver=os.getenv("zlib_ver") or "1.2.11" +load(pathJoin("zlib", zlib_ver)) + +g2_ver=os.getenv("g2_ver") or "3.4.5" +load(pathJoin("g2", g2_ver)) +g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.9.1" +load(pathJoin("g2tmpl", g2tmpl_ver)) +w3nco_ver=os.getenv("w3nco_ver") or "2.4.1" +load(pathJoin("w3nco", w3nco_ver)) +bacio_ver=os.getenv("bacio_ver") or "2.4.1" +load(pathJoin("bacio", bacio_ver)) +gfsio_ver=os.getenv("gfsio_ver") or "1.4.1" +load(pathJoin("gfsio", gfsio_ver)) +ip_ver=os.getenv("ip_ver") or "3.3.3" +load(pathJoin("ip", ip_ver)) +sp_ver=os.getenv("sp_ver") or "2.3.3" +load(pathJoin("sp", sp_ver)) +crtm_ver=os.getenv("crtm_ver") or "2.3.0" +load(pathJoin("crtm", crtm_ver)) +w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" +load(pathJoin("w3emc", w3emc_ver)) + +nemsio_ver=os.getenv("nemsio_ver") or "2.5.2" +load(pathJoin("nemsio", nemsio_ver)) +sigio_ver=os.getenv("sigio_ver") or "2.3.2" +load(pathJoin("sigio", sigio_ver)) +sfcio_ver=os.getenv("sfcio_ver") or "1.4.1" +load(pathJoin("sfcio", sfcio_ver)) +wrf_io_ver=os.getenv("wrf_io_ver") or "1.2.0" +load(pathJoin("wrf_io", wrf_io_ver)) + +whatis("Description: post build environment") diff --git a/modulefiles/post/v8.0.0-hera b/modulefiles/post/v8.0.0-hera deleted file mode 100644 index 72b80bc9e..000000000 --- a/modulefiles/post/v8.0.0-hera +++ /dev/null @@ -1,55 +0,0 @@ -#%Module###################################################################### -############################################################# -## Lin.Gan@noaa.gov -## EMC -## post v7.0.0 -## Wen Meng 07/2018: set post to v8.0.0 for fv3gfs -############################################################# -proc ModulesHelp { } { -puts stderr "Set environment veriables for post" -puts stderr "This module initializes the users environment" -puts stderr "to build the post for WCOSS production.\n" -} -module-whatis "post" - -set ver v8.0.0 - -# Loading Intel Compiler Suite -module load intel/18.0.5.274 -module load impi/2018.0.4 - -module use /scratch1/NCEPDEV/nems/emc.nemspara/soft/modulefiles -module load hdf5_parallel/1.10.6 -module load netcdf_parallel/4.7.4 - -module use -a /scratch2/NCEPDEV/nwprod/NCEPLIBS/modulefiles -module load jasper/1.900.1 -module load png/1.2.44 -module load z/1.2.11 - -# Loding nceplibs modules -module load g2/3.2.0 -module load g2tmpl/1.6.0 -module load w3nco/2.2.0 -module load bacio/2.0.3 -module load gfsio/1.1.0 -module load ip/3.0.2 -module load sp/2.0.3 -module load crtm/2.3.0 -module load w3emc/2.4.0 - -module load nemsio/2.2.4 -module load sigio/2.1.1 -module load sfcio/1.1.1 -module load wrfio/1.1.1 - -setenv myFC mpiifort -setenv OPENMP "-qopenmp" -setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -qopenmp -fpp" -# -#setenv myFCFLAGS "-O0 -convert big_endian -fp-model source -openmp -g -check all -ftrapuv -fp-stack-check -fstack-protector -heap-arrays -recursive -traceback" - -setenv myCPP /lib/cpp -setenv myCPPFLAGS "-P" - -setenv mySFC ifort diff --git a/modulefiles/post/v8.0.0-orion b/modulefiles/post/v8.0.0-orion deleted file mode 100755 index cf7889526..000000000 --- a/modulefiles/post/v8.0.0-orion +++ /dev/null @@ -1,56 +0,0 @@ -#%Module###################################################################### -############################################################# -## Lin.Gan@noaa.gov -## EMC -## post v7.0.0 -## Wen Meng 07/2018: set post to v8.0.0 for fv3gfs -############################################################# -proc ModulesHelp { } { -puts stderr "Set environment veriables for post" -puts stderr "This module initializes the users environment" -puts stderr "to build the post for WCOSS production.\n" -} -module-whatis "post" - -set ver v8.0.0 - -# Loading Intel Compiler Suite -module load intel/2018.4 -module load impi/2018.4 - -#module use /contrib/modulefiles -module use -a /apps/contrib/NCEPLIBS/orion/modulefiles - -module load netcdf_parallel/4.7.4 -module load hdf5_parallel/1.10.6 - -module load jasper/1.900.2 -module load png/1.2.44 -module load z/1.2.6 - -# Loding nceplibs modules -module load g2/3.2.0 -module load g2tmpl/1.6.0 -module load w3nco/2.2.0 -module load bacio/2.0.3 -module load gfsio/1.2.0 -module load ip/3.0.2 -module load sp/2.0.3 -module load crtm/2.3.0 -module load w3emc/2.4.0 - -module load nemsio/2.2.4 -module load sigio/2.2.0 -module load sfcio/1.2.0 -module load wrfio/1.1.1 - -setenv myFC mpiifort -setenv OPENMP "-qopenmp" -setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -qopenmp -fpp" -# -#setenv myFCFLAGS "-O0 -convert big_endian -fp-model source -qopenmp -g -check all -ftrapuv -fp-stack-check -fstack-protector -heap-arrays -recursive -traceback" - -setenv myCPP /lib/cpp -setenv myCPPFLAGS "-P" - -setenv mySFC ifort diff --git a/modulefiles/upp/lib-hera b/modulefiles/upp/lib-hera deleted file mode 100755 index 392989db4..000000000 --- a/modulefiles/upp/lib-hera +++ /dev/null @@ -1,52 +0,0 @@ -#%Module###################################################################### -## Jun.Wang@noaa.gov: Started NCEPPOST lib v6.3.0 -## Wen.Meng@noaa.gov 10/2019: Upgraded to v8.0.0 -##_____________________________________________________ -proc ModulesHelp { } { -puts stderr "Set environment veriables for NCEPPOST" -puts stderr "This module initializes the enviro nment " -puts stderr "for the Intel Compiler Suite $version\n" -} -module-whatis " NCEPPOST lib whatis description" - -#set ver v6.3.0 -#set envir dev -#set NCEPLIB /nwprod/lib - -#set sys [uname sysname] - -#setenv COMPF_MP mpiifort -setenv myFC mpiifort -setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -fpp" -setenv myCPP /lib/cpp -setenv myCPPFLAGS "-P" -setenv ARCHV ar -setenv CPPC /lib/cpp -#setenv version v8.0.0 -# - -module purge - -# Loading Intel Compiler Suite -module load intel/18.0.5.274 -module load impi/2018.0.4 - -# Loading nceplibs modules -module use -a /scratch2/NCEPDEV/nwprod/NCEPLIBS/modulefiles -module load jasper/1.900.1 -module load png/1.2.44 -module load z/1.2.11 - -module load g2/3.2.0 -module load g2tmpl/1.6.0 -#module load xmlparse/v2.0.0 -module load w3nco/2.2.0 -module load bacio/2.0.3 -module load gfsio/1.1.0 -#module load sigio/2.1.1 -module load ip/3.0.2 -module load sp/2.0.3 -module load crtm/2.3.0 -module load w3emc/2.4.0 - - diff --git a/modulefiles/upp/lib-orion b/modulefiles/upp/lib-orion deleted file mode 100755 index 7459163ba..000000000 --- a/modulefiles/upp/lib-orion +++ /dev/null @@ -1,53 +0,0 @@ -#%Module###################################################################### -## Jun.Wang@noaa.gov: Started NCEPPOST lib v6.3.0 -## Wen.Meng@noaa.gov 10/2019: Upgraded to v8.0.0 -##_____________________________________________________ -proc ModulesHelp { } { -puts stderr "Set environment veriables for NCEPPOST" -puts stderr "This module initializes the enviro nment " -puts stderr "for the Intel Compiler Suite $version\n" -} -module-whatis " NCEPPOST lib whatis description" - -#set ver v6.3.0 -#set envir dev -#set NCEPLIB /nwprod/lib - -#set sys [uname sysname] - -#setenv COMPF_MP mpiifort -setenv myFC mpiifort -setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -fpp" -#setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -qopenmp -fpp" -setenv myCPP /lib/cpp -setenv myCPPFLAGS "-P" -setenv ARCHV ar -setenv CPPC /lib/cpp -#setenv version v8.0.0 -# - -module purge - -# Loading Intel Compiler Suite -module load intel/2018.4 -module load impi/2018.4 - -# Loading nceplibs modules -module use -a /apps/contrib/NCEPLIBS/orion/modulefiles -module load jasper/1.900.2 -module load png/1.2.44 -module load z/1.2.6 - -module load g2/3.2.0 -module load g2tmpl/1.6.0 -#module load xmlparse/v2.0.0 -module load w3nco/2.2.0 -module load bacio/2.0.3 -module load gfsio/1.2.0 -#module load sigio/2.1.0 -module load ip/3.0.2 -module load sp/2.0.3 -module load crtm/2.3.0 -module load w3emc/2.4.0 - - diff --git a/modulefiles/upp/upp_hera.lua b/modulefiles/upp/upp_hera.lua new file mode 100644 index 000000000..6a61c5752 --- /dev/null +++ b/modulefiles/upp/upp_hera.lua @@ -0,0 +1,41 @@ +help([[ +Load environment to build upp lib on HERA +]]) + +prepend_path("MODULEPATH", "/scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack-gfsv16/modulefiles/stack") + +hpc_ver=os.getenv("hpc_ver") or "1.2.0" +load(pathJoin("hpc", hpc_ver)) + +hpc_intel_ver=os.getenv("hpc_intel_ver") or "18.0.5.274" +load(pathJoin("hpc-intel",hpc_intel_ver)) +impi_ver=os.getenv("impi_ver") or "2018.0.4" +load(pathJoin("hpc-impi", impi_ver)) + +jasper_ver=os.getenv("jasper_ver") or "2.0.25" +load(pathJoin("jasper", jasper_ver)) +libpng_ver=os.getenv("libpng_ver") or "1.6.37" +load(pathJoin("libpng", libpng_ver)) +zlib_ver=os.getenv("zlib_ver") or "1.2.11" +load(pathJoin("zlib", zlib_ver)) + +g2_ver=os.getenv("g2_ver") or "3.4.5" +load(pathJoin("g2", g2_ver)) +ip_ver=os.getenv("ip_ver") or "3.3.3" +load(pathJoin("ip", ip_ver)) +g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.9.1" +load(pathJoin("g2tmpl", g2tmpl_ver)) +w3nco_ver=os.getenv("w3nco_ver") or "2.4.1" +load(pathJoin("w3nco", w3nco_ver)) +bacio_ver=os.getenv("bacio_ver") or "2.4.1" +load(pathJoin("bacio", bacio_ver)) +gfsio_ver=os.getenv("gfsio_ver") or "1.4.1" +load(pathJoin("gfsio", gfsio_ver)) +sp_ver=os.getenv("sp_ver") or "2.3.3" +load(pathJoin("sp", sp_ver)) +crtm_ver=os.getenv("crtm_ver") or "2.3.0" +load(pathJoin("crtm", crtm_ver)) +w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" +load(pathJoin("w3emc", w3emc_ver)) + +whatis("Description: upp lib build environment") diff --git a/modulefiles/upp/upp_orion.lua b/modulefiles/upp/upp_orion.lua new file mode 100644 index 000000000..c47f628d8 --- /dev/null +++ b/modulefiles/upp/upp_orion.lua @@ -0,0 +1,46 @@ +help([[ +Load environment to build upp lib on HERA +]]) + +prepend_path("MODULEPATH", "/apps/contrib/NCEP/libs/hpc-stack-gfsv16/modulefiles/stack") + +hpc_ver=os.getenv("hpc_ver") or "1.2.0" +load(pathJoin("hpc", hpc_ver)) + +hpc_intel_ver=os.getenv("hpc_intel_ver") or "2018.4" +load(pathJoin("hpc-intel",hpc_intel_ver)) +impi_ver=os.getenv("impi_ver") or "2018.4" +load(pathJoin("hpc-impi", impi_ver)) + +hdf5_ver=os.getenv("hdf5_ver") or "1.10.6" +load(pathJoin("hdf5", hdf5_ver)) +netcdf_ver=os.getenv("netcdf_ver") or "4.7.4" +load(pathJoin("netcdf", netcdf_ver)) + +jasper_ver=os.getenv("jasper_ver") or "2.0.25" +load(pathJoin("jasper", jasper_ver)) +libpng_ver=os.getenv("libpng_ver") or "1.6.37" +load(pathJoin("libpng", libpng_ver)) +zlib_ver=os.getenv("zlib_ver") or "1.2.11" +load(pathJoin("zlib", zlib_ver)) + +g2_ver=os.getenv("g2_ver") or "3.4.5" +load(pathJoin("g2", g2_ver)) +ip_ver=os.getenv("ip_ver") or "3.3.3" +load(pathJoin("ip", ip_ver)) +g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.9.1" +load(pathJoin("g2tmpl", g2tmpl_ver)) +w3nco_ver=os.getenv("w3nco_ver") or "2.4.1" +load(pathJoin("w3nco", w3nco_ver)) +bacio_ver=os.getenv("bacio_ver") or "2.4.1" +load(pathJoin("bacio", bacio_ver)) +gfsio_ver=os.getenv("gfsio_ver") or "1.4.1" +load(pathJoin("gfsio", gfsio_ver)) +sp_ver=os.getenv("sp_ver") or "2.3.3" +load(pathJoin("sp", sp_ver)) +crtm_ver=os.getenv("crtm_ver") or "2.3.0" +load(pathJoin("crtm", crtm_ver)) +w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" +load(pathJoin("w3emc", w3emc_ver)) + +whatis("Description: upp lib build environment") diff --git a/sorc/build_ncep_post.sh b/sorc/build_ncep_post.sh index 97579b8b0..a1463e85e 100755 --- a/sorc/build_ncep_post.sh +++ b/sorc/build_ncep_post.sh @@ -60,6 +60,13 @@ module load post_${machine} module list make -f makefile_module_${machine} clean make -f makefile_module_${machine} +elif [ $machine = hera -o $machine = orion ] ; then +module purge +module use ${moduledir}/post +module load post_${machine} +module list +make -f makefile_module_hpc clean +make -f makefile_module_hpc else module use ${moduledir} module load post/v8.0.0-${machine} diff --git a/sorc/ncep_post.fd/build_upp_lib.sh b/sorc/ncep_post.fd/build_upp_lib.sh index a18f21495..c30e722fd 100755 --- a/sorc/ncep_post.fd/build_upp_lib.sh +++ b/sorc/ncep_post.fd/build_upp_lib.sh @@ -33,6 +33,10 @@ moduledir=`dirname $(readlink -f ../../modulefiles/upp)` if [ $machine = wcoss2 ] ; then module use ${moduledir}/upp module load upp_${machine} +elif [ $machine = hera -o $machine = orion ] ; then +module purge +module use ${moduledir}/upp +module load upp_${machine} else module use -a ${moduledir} module load upp/lib-${machine} @@ -53,6 +57,10 @@ if [ $machine = wcoss2 ] ; then make -f makefile_lib_${machine} clean mkdir -m 775 -p include make -f makefile_lib_${machine} +elif [ $machine = hera -o $machine = orion ] ; then +make -f makefile_lib_hpc clean +mkdir -m 775 -p include +make -f makefile_lib_hpc else make -f makefile_lib clean mkdir -m 775 -p include/upp_4 diff --git a/sorc/ncep_post.fd/makefile_lib_hpc b/sorc/ncep_post.fd/makefile_lib_hpc new file mode 100644 index 000000000..a1e345d07 --- /dev/null +++ b/sorc/ncep_post.fd/makefile_lib_hpc @@ -0,0 +1,152 @@ +################################################################################ +# +# Makefile for upp (NCEP Post) +# +# Use: +# make - build the executable +# make clean - start with a clean slate +# +# The following macros will be of interest: +# +# TARGET - name of the executable +# FC - name of Fortran compiler +# CPP - name of CPP +# ARCH - architecture +# CPPFLAGS - CPP flags +# OPTS - compiler code optimizations +# LIST - source listing +# SMP - threading +# TRAPS - runtime traps for floating point exceptions +# PROFILE - source code profiling ( -pg ) +# DEBUG - -g +# MEM - user data area and stack size +# MAP - load map +# W3LIB - w3lib +# BACIO - bacio lib +# ESSL - ESSL library +# MASS - MASS library +# HPMLIB - hpm lib +# SEARCH - library search location +# +# This version for eta_post with more intelligent memory allocation +# Jim Tuccillo Feb 2001 +# +# This version for eta_post with asynchronous I/O server. +# Jim Tuccillo June 2001 + +# This version for NEMS_POST +# Jun Wang June 2010 +# +# This version for GFS V16 in-line post +# Wen Meng Ocotomber 2020 +# +# This vesrion for GFS V16 in-line post on wcoss2 +# Wen Meng Nov 2021 +# +# This vesrion for GFS V16 in-line post on Hera/Orion +# Wen Meng Feb 2022 +# +################################################################################# +# +# Define the name of the executable +# + #POSTLIBPATH=../.. + #TARGET = ${POSTLIBPATH}/lib/libncep_post_${version}_4.a + #INCMOD= ${POSTLIBPATH}/lib/include/ncep_post_${version}_4 + TARGET = libupp.a + INCMOD = include + AR = ar + ARFLAGS = -rv + +# +# CPP, Compiler, and Linker Options +# + +#FC = mpfort -compiler ifort +#CPP = /lib/cpp -P +FC = mpiifort -O3 -convert big_endian -traceback -g -fp-model source -fpp +CPP = /lib/cpp -P +ARCH = auto +CPPFLAGS = -DLINUX +OPTS = -O -fp-model strict +LIST = +FREE = -FR +#TRAPS = -qflttrap=ov:und:zero:inv:inex -qcheck -qinitauto=FF +TRAPS = +PROFILE = +DEBUG = -g +CFLAGS = -DLINUX -Dfunder -DFortranByte=char -DFortranInt=int -DFortranLlong='long long' +W3LIBDIR = /nwprod/lib + +SEARCH = +# +# Assemble Options +# +#FFLAGS = $(OPTS) $(FREE) $(TRAPS) $(DEBUG) -I$(CRTM_INC) -I$(W3EMC_INC4) -I$(G2_INC4) -I$(G2TMPL_INC) -I$(XMLPARSE_INC) -I$(SIGIO_INC4) -I$(GFSIO_INC4) +FFLAGS = $(OPTS) $(FREE) $(TRAPS) $(DEBUG) -I$(CRTM_INC) -I$(W3EMC_INC4) -I$(G2_INC4) -I$(G2TMPL_INC) -I$(GFSIO_INC) +FFLAGST = $(OPTS) $(FREE) $(TRAPS) $(DEBUG) -I$(CRTM_INC) -I$(W3EMC_INC4) -I$(SIGIO_INC) -I$(GFSIO_INC) + +# +# Threaded object files +# +OBJST= kinds_mod.o machine.o physcons.o ZENSUN.o CLDFRAC_ZHAO.o GFSPOST.o +# +# Non-threaded object files +# +#OBJXML= post_t.o +# +OBJS= VRBLS2D_mod.o VRBLS3D_mod.o VRBLS4D_mod.o MASKS_mod.o PMICRPH.o SOIL_mod.o \ + CMASSI.o CTLBLK.o GRIDSPEC.o LOOKUP.o PARAMR.o RHGRD.o RQSTFLD.o xml_perl_data.o \ + cuparm.o params.o svptbl.o get_postfilename.o grib2_module.o \ + SET_LVLSXML.o FILL_PSETFLD.o \ + BNDLYR.o BOUND.o CALCAPE.o CALDWP.o CALDRG.o CALHEL.o CALLCL.o \ + CALMCVG.o CALPOT.o CALPW.o CALRH.o CALRCH.o CALRH_GSD.o \ + CALSTRM.o CALTAU.o CALTHTE.o CALVIS.o CALVIS_GSD.o CALVOR.o CALWXT.o \ + CALWXT_RAMER.o CALWXT_BOURG.o CALWXT_REVISED.o CALRH_PW.o \ + CALWXT_EXPLICIT.o CALWXT_DOMINANT.o \ + CLDRAD.o CLMAX.o COLLECT.o COLLECT_LOC.o DEWPOINT.o \ + FDLVL.o FGAMMA.o FIXED.o FRZLVL.o FRZLVL2.o \ + GET_BITS.o GRIBIT.o LFMFLD.o \ + MAPSSLP.o MISCLN.o MDL2STD_P.o MIXLEN.o MDL2P.o MDLFLD.o \ + NGMFLD.o NGMSLP.o OTLFT.o OTLIFT.o SLP_new.o SLP_NMM.o EXCH.o \ + PARA_RANGE.o PROCESS.o EXCH2.o \ + READCNTRL.o READ_xml.o SET_OUTFLDS.o SCLFLD.o \ + SMOOTH.o SURFCE.o \ + SPLINE.o TABLE.o TABLEQ.o TRPAUS.o TTBLEX.o WETBULB.o \ + CALMICT.o MICROINIT.o GPVS.o MDL2SIGMA.o \ + ETCALC.o CANRES.o CALGUST.o WETFRZLVL.o SNFRAC.o MDL2AGL.o SNFRAC_GFS.o \ + AVIATION.o DEALLOCATE.o \ + CALPBL.o MDL2SIGMA2.o CALRH_GFS.o LFMFLD_GFS.o \ + CALRAD_WCLOUD_newcrtm.o MDL2THANDPV.o CALPBLREGIME.o POLEAVG.o \ + ICAOHEIGHT.o \ + GEO_ZENITH_ANGLE.o GFIP3.o GRIDAVG.o CALUPDHEL.o \ + AllGETHERV_GSD.o MSFPS.o SELECT_CHANNELS.o ALLOCATE_ALL.o \ + gtg_ctlblk.o gtg_indices.o gtg_filter.o gtg_compute.o gtg_config.o map_routines.o gtg_algo.o gtg_smoothseams.o CALVESSEL.o \ + CALHEL2.o CALCAPE2.o + + +.SUFFIXES: .F .f .o .f90 .c + +.F.f: + $(CPP) $(CPPFLAGS) $< > $*.f + +$(TARGET): $(OBJST) $(OBJXML) $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJST) $(OBJXML) $(OBJS) $(LIBS) + mv *.mod $(INCMOD) + +.f.o: + $(FC) $(FFLAGS) -c $< + +.f90.o: + $(FC) $(FFLAGS) -c $< + +.c.o : + ${CC} ${CFLAGS} -c $< + +clean: + /bin/rm -rf libupp.a *.lst *.o include +# +#postcntrl_t.o : postcntrl_t.f90 +# $(FC) $(FFLAGS) postcntrl_t.f90 + + diff --git a/sorc/ncep_post.fd/makefile_module_hpc b/sorc/ncep_post.fd/makefile_module_hpc new file mode 100755 index 000000000..d3bd33cea --- /dev/null +++ b/sorc/ncep_post.fd/makefile_module_hpc @@ -0,0 +1,126 @@ +################################################################################################### +# post implement module load standard +# +# 10/15 Lin Gan: Create module load version +# 12/07 Lin Gan: Update to generate post module output +# 07/16 J. Carley: Generalize for multiple machines +# 11/21 Wen Meng: Update for wcoss2 +# 02/22 Wen Meng: Update for R&D machines Hera/Orion +# +################################################################################################### + +SHELL=/bin/bash +# +# Define the name of the executable +# +# To generate exe as ncep_post +TARGET = ncep_post +LIB_TARGET = libnceppost.a +AR = ar +ARFLAGS = ruv + +# +# CPP, Compiler, and Linker Options +# + +FC = mpiifort -O3 -convert big_endian -traceback -g -fp-model source -qopenmp -fpp +CPP = /lib/cpp -P +CPPFLAGS = -DLINUX +FREE = -FR + +NETCDF_INC = -I$(NETCDF)/include +NETCDF_LDFLAGS = -L$(NETCDF)/lib -lnetcdff -lnetcdf -L$(HDF5_LIBRARIES) -lhdf5_hl -lhdf5 $(ZLIB_LIB) + +CFLAGS = -DLINUX -Dfunder -DFortranByte=char -DFortranInt=int -DFortranLlong='long long' + +FFLAGS = $(OPTS) $(FREE) $(DEBUG) \ + -I$(SFCIO_INC) \ + -I$(NEMSIO_INC) \ + -I$(SIGIO_INC) \ + -I$(G2_INC4) \ + -I$(G2TMPL_INC) \ + -I$(GFSIO_INC) \ + -I$(W3EMC_INC4) \ + -I$(CRTM_INC) \ + -I$(IP_INC4) \ + $(NETCDF_INC) + +LIBS = $(WRF_IO_LIB) \ + $(G2TMPL_LIB) \ + $(G2_LIB4) \ + $(JASPER_LIB) \ + $(LIBPNG_LIB) \ + $(ZLIB_LIB) \ + $(NEMSIO_LIB) \ + $(GFSIO_LIB) \ + $(SIGIO_LIB) \ + $(SFCIO_LIB) \ + $(IP_LIB4) \ + $(SP_LIB4) \ + $(W3EMC_LIB4) \ + $(W3NCO_LIB4) \ + $(BACIO_LIB4) \ + $(CRTM_LIB) \ + $(NETCDF_LDFLAGS) + + +OBJS = wrf_io_flags.o getVariable.o getIVariableN.o \ + kinds_mod.o machine.o physcons.o \ + native_endianness.o blockIO.o \ + retrieve_index.o ZENSUN.o CLDFRAC_ZHAO.o \ + GFSPOST.o GFSPOSTSIG.o GETGBANDSCATTER.o \ + VRBLS2D_mod.o VRBLS3D_mod.o VRBLS4D_mod.o MASKS_mod.o PMICRPH.o SOIL_mod.o \ + CMASSI.o CTLBLK.o GRIDSPEC.o LOOKUP.o PARAMR.o RHGRD.o RQSTFLD.o xml_perl_data.o \ + cuparm.o params.o svptbl.o get_postfilename.o grib2_module.o \ + SET_LVLSXML.o FILL_PSETFLD.o \ + BNDLYR.o BOUND.o CALCAPE.o CALDWP.o CALDRG.o CALHEL.o CALLCL.o \ + CALMCVG.o CALPOT.o CALPW.o CALRH.o CALRCH.o CALRH_GSD.o \ + CALSTRM.o CALTAU.o CALTHTE.o CALVIS.o CALVIS_GSD.o CALVOR.o CALWXT.o \ + CALWXT_RAMER.o CALWXT_BOURG.o CALWXT_REVISED.o CALRH_PW.o \ + CALWXT_EXPLICIT.o CALWXT_DOMINANT.o \ + CLDRAD.o CLMAX.o COLLECT.o COLLECT_LOC.o DEWPOINT.o \ + FDLVL.o FGAMMA.o FIXED.o FRZLVL.o FRZLVL2.o \ + GET_BITS.o GRIBIT.o INITPOST.o LFMFLD.o \ + MAPSSLP.o MISCLN.o MDL2STD_P.o MIXLEN.o MDL2P.o MDLFLD.o MPI_FIRST.o MPI_LAST.o \ + NGMFLD.o NGMSLP.o OTLFT.o OTLIFT.o SLP_new.o SLP_NMM.o EXCH.o \ + PARA_RANGE.o PROCESS.o INITPOST_NMM.o EXCH2.o \ + READCNTRL.o READ_xml.o SET_OUTFLDS.o SCLFLD.o SERVER.o SETUP_SERVERS.o \ + SMOOTH.o SURFCE.o \ + SPLINE.o TABLE.o TABLEQ.o TRPAUS.o TTBLEX.o WETBULB.o WRFPOST.o \ + CALMICT.o MICROINIT.o GPVS.o MDL2SIGMA.o \ + ETCALC.o CANRES.o CALGUST.o WETFRZLVL.o SNFRAC.o MDL2AGL.o SNFRAC_GFS.o \ + AVIATION.o DEALLOCATE.o \ + CALPBL.o MDL2SIGMA2.o INITPOST_GFS.o CALRH_GFS.o LFMFLD_GFS.o \ + CALRAD_WCLOUD_newcrtm.o MDL2THANDPV.o CALPBLREGIME.o POLEAVG.o \ + INITPOST_NEMS.o GETNEMSNDSCATTER.o ICAOHEIGHT.o INITPOST_GFS_NEMS.o \ + GEO_ZENITH_ANGLE.o GFIP3.o GRIDAVG.o CALUPDHEL.o INITPOST_GFS_SIGIO.o \ + AllGETHERV_GSD.o MSFPS.o SELECT_CHANNELS.o ALLOCATE_ALL.o INITPOST_NEMS_MPIIO.o ASSIGNNEMSIOVAR.o \ + INITPOST_GFS_NEMS_MPIIO.o INITPOST_NETCDF.o INITPOST_GFS_NETCDF.o INITPOST_GFS_NETCDF_PARA.o \ + gtg_ctlblk.o gtg_indices.o gtg_filter.o gtg_compute.o gtg_config.o map_routines.o gtg_algo.o gtg_smoothseams.o CALVESSEL.o \ + CALHEL2.o CALCAPE2.o + + +.SUFFIXES: .F .f .o .f90 .c + +.F.f: + $(CPP) $(CPPFLAGS) $< > $*.f + +$(TARGET): $(OBJST) $(OBJS) + $(FC) -o $@ $(OBJST) $(OBJS) $(LIBS) $(OPENMP) + mkdir -p include/post_4 + $(AR) $(ARFLAGS) $(LIB_TARGET) $(OBJST) $(OBJS) + mv *.mod include/post_4 + +.f.o: + $(FC) $(FFLAGS) -c $< + +.f90.o: + $(FC) $(FFLAGS) -c $< + +.c.o : + ${CC} ${CFLAGS} -c $< + + +clean: + /bin/rm -f *.o *.mod libnceppost.a ncep_post + /bin/rm -rf include