Skip to content

Commit

Permalink
LMOD conversion (#31)
Browse files Browse the repository at this point in the history
* modification for build.ver/run.ver in global-workflow

* modification for build.ver/run.ver in global-workflow

* LMOD conversion

Co-authored-by: Helin Wei <[email protected]>
Co-authored-by: Helin Wei <[email protected]>
  • Loading branch information
3 people authored Dec 2, 2021
1 parent 9f12a1f commit d614452
Show file tree
Hide file tree
Showing 18 changed files with 235 additions and 130 deletions.
22 changes: 0 additions & 22 deletions modulefiles/gdas2gldas.wcoss2

This file was deleted.

33 changes: 33 additions & 0 deletions modulefiles/gdas2gldas.wcoss2.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
help([[
Load environment to run GLDAS on WCOSS2
]])

envvar_ver=os.getenv("envvar_ver") or "1.0"
PrgEnv_intel_ver=os.getenv("PrgEnv_intel_ver") or "8.1.0"
craype_ver=os.getenv("craype_ver") or "2.7.8"
intel_ver=os.getenv("intel_ver") or "19.1.3.304"
cray_mpich_ver=os.getenv("cray_mpich_ver") or "8.1.9"
load(pathJoin("envvar", envvar_ver))
load(pathJoin("PrgEnv-intel", PrgEnv_intel_ver))
load(pathJoin("craype", craype_ver))
load(pathJoin("intel", intel_ver))
load(pathJoin("cray-mpich", cray_mpich_ver))

w3nco_ver=os.getenv("w3nco_ver") or "2.4.1"
nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
bacio_ver=os.getenv("bacio_ver") or "2.4.1"
sp_ver=os.getenv("sp_ver") or "2.3.3"
load(pathJoin("w3nco", w3nco_ver))
load(pathJoin("nemsio", nemsio_ver))
load(pathJoin("bacio", bacio_ver))
load(pathJoin("sp", sp_ver))

hdf5_ver=os.getenv("hdf5_ver") or "1.10.6"
netcdf_ver=os.getenv("netcdf_ver") or "4.7.4"
esmf_ver=os.getenv("esmf_ver") or "8.0.1"

load(pathJoin("hdf5", hdf5_ver))
load(pathJoin("netcdf", netcdf_ver))
load(pathJoin("esmf", esmf_ver))

whatis("Description: GLDAS run environment")
22 changes: 0 additions & 22 deletions modulefiles/gldas2gdas.wcoss2

This file was deleted.

33 changes: 33 additions & 0 deletions modulefiles/gldas2gdas.wcoss2.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
help([[
Load environment to run GLDAS on WCOSS2
]])

envvar_ver=os.getenv("envvar_ver") or "1.0"
PrgEnv_intel_ver=os.getenv("PrgEnv_intel_ver") or "8.1.0"
craype_ver=os.getenv("craype_ver") or "2.7.8"
intel_ver=os.getenv("intel_ver") or "19.1.3.304"
cray_mpich_ver=os.getenv("cray_mpich_ver") or "8.1.9"
load(pathJoin("envvar", envvar_ver))
load(pathJoin("PrgEnv-intel", PrgEnv_intel_ver))
load(pathJoin("craype", craype_ver))
load(pathJoin("intel", intel_ver))
load(pathJoin("cray-mpich", cray_mpich_ver))

w3nco_ver=os.getenv("w3nco_ver") or "2.4.1"
nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
bacio_ver=os.getenv("bacio_ver") or "2.4.1"
sp_ver=os.getenv("sp_ver") or "2.3.3"
load(pathJoin("w3nco", w3nco_ver))
load(pathJoin("nemsio", nemsio_ver))
load(pathJoin("bacio", bacio_ver))
load(pathJoin("sp", sp_ver))

hdf5_ver=os.getenv("hdf5_ver") or "1.10.6"
netcdf_ver=os.getenv("netcdf_ver") or "4.7.4"
esmf_ver=os.getenv("esmf_ver") or "8.0.1"

load(pathJoin("hdf5", hdf5_ver))
load(pathJoin("netcdf", netcdf_ver))
load(pathJoin("esmf", esmf_ver))

whatis("Description: GLDAS run environment")
16 changes: 0 additions & 16 deletions modulefiles/gldas_forcing.wcoss2

This file was deleted.

21 changes: 21 additions & 0 deletions modulefiles/gldas_forcing.wcoss2.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
help([[
Load environment to run GLDAS on WCOSS2
]])

envvar_ver=os.getenv("envvar_ver") or "1.0"
PrgEnv_intel_ver=os.getenv("PrgEnv_intel_ver") or "8.1.0"
craype_ver=os.getenv("craype_ver") or "2.7.8"
intel_ver=os.getenv("intel_ver") or "19.1.3.304"
cray_mpich_ver=os.getenv("cray_mpich_ver") or "8.1.9"
load(pathJoin("envvar", envvar_ver))
load(pathJoin("PrgEnv-intel", PrgEnv_intel_ver))
load(pathJoin("craype", craype_ver))
load(pathJoin("intel", intel_ver))
load(pathJoin("cray-mpich", cray_mpich_ver))

w3nco_ver=os.getenv("w3nco_ver") or "2.4.1"
bacio_ver=os.getenv("bacio_ver") or "2.4.1"
load(pathJoin("w3nco", w3nco_ver))
load(pathJoin("bacio", bacio_ver))

whatis("Description: GLDAS run environment")
16 changes: 0 additions & 16 deletions modulefiles/gldas_model.wcoss2

This file was deleted.

29 changes: 29 additions & 0 deletions modulefiles/gldas_model.wcoss2.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
help([[
Load environment to run GLDAS on WCOSS2
]])

envvar_ver=os.getenv("envvar_ver") or "1.0"
PrgEnv_intel_ver=os.getenv("PrgEnv_intel_ver") or "8.1.0"
craype_ver=os.getenv("craype_ver") or "2.7.8"
intel_ver=os.getenv("intel_ver") or "19.1.3.304"
cray_mpich_ver=os.getenv("cray_mpich_ver") or "8.1.9"
load(pathJoin("envvar", envvar_ver))
load(pathJoin("PrgEnv-intel", PrgEnv_intel_ver))
load(pathJoin("craype", craype_ver))
load(pathJoin("intel", intel_ver))
load(pathJoin("cray-mpich", cray_mpich_ver))

w3emc_ver=os.getenv("w3emc_ver") or "2.7.3"
w3nco_ver=os.getenv("w3nco_ver") or "2.4.1"
nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
bacio_ver=os.getenv("bacio_ver") or "2.4.1"
sp_ver=os.getenv("sp_ver") or "2.3.3"
ip_ver=os.getenv("ip_ver") or "3.3.3"
load(pathJoin("w3emc", w3emc_ver))
load(pathJoin("w3nco", w3nco_ver))
load(pathJoin("nemsio", nemsio_ver))
load(pathJoin("bacio", bacio_ver))
load(pathJoin("sp", sp_ver))
load(pathJoin("ip", ip_ver))

whatis("Description: GLDAS run environment")
18 changes: 0 additions & 18 deletions modulefiles/gldas_post.wcoss2

This file was deleted.

25 changes: 25 additions & 0 deletions modulefiles/gldas_post.wcoss2.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
help([[
Load environment to run GLDAS on WCOSS2
]])

envvar_ver=os.getenv("envvar_ver") or "1.0"
PrgEnv_intel_ver=os.getenv("PrgEnv_intel_ver") or "8.1.0"
craype_ver=os.getenv("craype_ver") or "2.7.8"
intel_ver=os.getenv("intel_ver") or "19.1.3.304"
cray_mpich_ver=os.getenv("cray_mpich_ver") or "8.1.9"
load(pathJoin("envvar", envvar_ver))
load(pathJoin("PrgEnv-intel", PrgEnv_intel_ver))
load(pathJoin("craype", craype_ver))
load(pathJoin("intel", intel_ver))
load(pathJoin("cray-mpich", cray_mpich_ver))

w3emc_ver=os.getenv("w3emc_ver") or "2.7.3"
w3nco_ver=os.getenv("w3nco_ver") or "2.4.1"
nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
bacio_ver=os.getenv("bacio_ver") or "2.4.1"
load(pathJoin("w3emc", w3emc_ver))
load(pathJoin("w3nco", w3nco_ver))
load(pathJoin("nemsio", nemsio_ver))
load(pathJoin("bacio", bacio_ver))

whatis("Description: GLDAS run environment")
18 changes: 0 additions & 18 deletions modulefiles/gldas_rst.wcoss2

This file was deleted.

25 changes: 25 additions & 0 deletions modulefiles/gldas_rst.wcoss2.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
help([[
Load environment to run GLDAS on WCOSS2
]])

envvar_ver=os.getenv("envvar_ver") or "1.0"
PrgEnv_intel_ver=os.getenv("PrgEnv_intel_ver") or "8.1.0"
craype_ver=os.getenv("craype_ver") or "2.7.8"
intel_ver=os.getenv("intel_ver") or "19.1.3.304"
cray_mpich_ver=os.getenv("cray_mpich_ver") or "8.1.9"
load(pathJoin("envvar", envvar_ver))
load(pathJoin("PrgEnv-intel", PrgEnv_intel_ver))
load(pathJoin("craype", craype_ver))
load(pathJoin("intel", intel_ver))
load(pathJoin("cray-mpich", cray_mpich_ver))

w3emc_ver=os.getenv("w3emc_ver") or "2.7.3"
w3nco_ver=os.getenv("w3nco_ver") or "2.4.1"
nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
bacio_ver=os.getenv("bacio_ver") or "2.4.1"
load(pathJoin("w3emc", w3emc_ver))
load(pathJoin("w3nco", w3nco_ver))
load(pathJoin("nemsio", nemsio_ver))
load(pathJoin("bacio", bacio_ver))

whatis("Description: GLDAS run environment")
15 changes: 12 additions & 3 deletions sorc/build_gdas2gldas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ cwd=`pwd`
USE_PREINST_LIBS=${USE_PREINST_LIBS:-"true"}
if [ $USE_PREINST_LIBS = true ]; then
export MOD_PATH
source ../modulefiles/gdas2gldas.$target > /dev/null 2>&1
module purge
module use ../modulefiles
module load gdas2gldas.$target > /dev/null 2>&1
else
export MOD_PATH=${cwd}/lib/modulefiles
if [ $target = wcoss_cray ]; then
source ../modulefiles/gdas2gldas.${target}_userlib > /dev/null 2>&1
module purge
module use ../modulefiles
module load gdas2gldas.${target}_userlib > /dev/null 2>&1
else
source ../modulefiles/gdas2gldas.$target > /dev/null 2>&1
module purge
module use ../modulefiles
module load gdas2gldas.$target > /dev/null 2>&1
fi
fi

Expand All @@ -27,6 +33,9 @@ fi
#
cd gdas2gldas.fd

export FCOMP=ftn
export FFLAGS="-O3 -fp-model precise -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl"

make clean
make
make install
Expand Down
15 changes: 12 additions & 3 deletions sorc/build_gldas2gdas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ cwd=`pwd`
USE_PREINST_LIBS=${USE_PREINST_LIBS:-"true"}
if [ $USE_PREINST_LIBS = true ]; then
export MOD_PATH
source ../modulefiles/gldas2gdas.$target > /dev/null 2>&1
module purge
module use ../modulefiles
module load gldas2gdas.$target > /dev/null 2>&1
else
export MOD_PATH=${cwd}/lib/modulefiles
if [ $target = wcoss_cray ]; then
source ../modulefiles/gldas2gdas.${target}_userlib > /dev/null 2>&1
module purge
module use ../modulefiles
module load gldas2gdas.${target}_userlib > /dev/null 2>&1
else
source ../modulefiles/gldas2gdas.$target > /dev/null 2>&1
module purge
module use ../modulefiles
module load gldas2gdas.$target > /dev/null 2>&1
fi
fi

Expand All @@ -27,6 +33,9 @@ fi
#
cd gldas2gdas.fd

export FCOMP=ftn
export FFLAGS="-O3 -fp-model precise -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl"

make clean
make
make install
Expand Down
15 changes: 12 additions & 3 deletions sorc/build_gldas_forcing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ cwd=`pwd`
USE_PREINST_LIBS=${USE_PREINST_LIBS:-"true"}
if [ $USE_PREINST_LIBS = true ]; then
export MOD_PATH
source ../modulefiles/gldas_forcing.$target > /dev/null 2>&1
module purge
module use ../modulefiles
module load gldas_forcing.$target > /dev/null 2>&1
else
export MOD_PATH=${cwd}/lib/modulefiles
if [ $target = wcoss_cray ]; then
source ../modulefiles/gldas_forcing.${target}_userlib > /dev/null 2>&1
module purge
module use ../modulefiles
module load gldas_forcing.${target}_userlib > /dev/null 2>&1
else
source ../modulefiles/gldas_forcing.$target > /dev/null 2>&1
module purge
module use ../modulefiles
module load gldas_forcing.$target > /dev/null 2>&1
fi
fi

Expand All @@ -27,6 +33,9 @@ fi
#
cd gldas_forcing.fd

export FC=ftn
export FOPTS="-O0 -FR"

make clean
make
make install
Expand Down
Loading

0 comments on commit d614452

Please sign in to comment.