Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/support/lisf-557ww-7.6' into f…
Browse files Browse the repository at this point in the history
…ix/SMAP_DA_soilTemp_bug_fix
  • Loading branch information
jvgeiger committed May 7, 2024
2 parents 8467b6f + f446cb8 commit f0c3425
Show file tree
Hide file tree
Showing 4,284 changed files with 64,800 additions and 11,565 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
139 changes: 139 additions & 0 deletions .github/scripts/appimage/AppRun
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
#!/bin/bash

SELF=$(readlink -f "${0}")
HERE=${SELF%/*}

LISF_LIBS_OPENJPEG=${HERE}/usr/lib/openjpeg/2.4.0_gnu-11.2.0
LISF_LIBS_ECCODES=${HERE}/usr/lib/eccodes/2.22.0_gnu-11.2.0
LISF_LIBS_NETCDF=${HERE}/usr/lib/netcdf/4.7.4_gnu-11.2.0
LISF_LIBS_HDF4=${HERE}/usr/lib/hdf4/4.2.15_gnu-11.2.0
LISF_LIBS_HDFEOS=${HERE}/usr/lib/hdfeos2/3.0_gnu-11.2.0
LISF_LIBS_HDF5=${HERE}/usr/lib/hdf5/1.12.0_gnu-11.2.0
LISF_LIBS_ESMF=${HERE}/usr/lib/esmf/8.1.1_gnu-11.2.0_mpich-3.4
LISF_LIBS_GDAL=${HERE}/usr/lib/gdal/3.5.2_gnu-11.2.0
LISF_LIBS_FORTRANGIS=${HERE}/usr/lib/fortrangis/2.6-6_gnu-11.2.0
LISF_LIBS_LIBGEOTIFF=${HERE}/usr/lib/geotiff/1.7.0_gnu-11.2.0
LISF_LIBS_PROJ=${HERE}/usr/lib/proj/9.1.0_gnu-11.2.0
LISF_LIBS_TIFF=${HERE}/usr/lib/tiff/4.0.9_gnu-11.2.0

LISF_LIBS_PATH=""
LISF_LIBS_PATH+=":${LISF_LIBS_ECCODES}/lib"
LISF_LIBS_PATH+=":${LISF_LIBS_NETCDF}/lib"
LISF_LIBS_PATH+=":${LISF_LIBS_ESMF}/lib/libO/Linux.gfortran.64.mpich3.default"
LISF_LIBS_PATH+=":${LISF_LIBS_HDF5}/lib"
LISF_LIBS_PATH+=":${LISF_LIBS_HDF4}/lib"
LISF_LIBS_PATH+=":${LISF_LIBS_GDAL}/lib"
LISF_LIBS_PATH+=":${LISF_LIBS_LIBGEOTIFF}/lib"
LISF_LIBS_PATH+=":${LISF_LIBS_FORTRANGIS}/lib"
LISF_LIBS_PATH+=":${LISF_LIBS_OPENJPEG}/lib"
LISF_LIBS_PATH+=":${LISF_LIBS_PROJ}/lib"
LISF_LIBS_PATH+=":${LISF_LIBS_TIFF}/lib"
export LISF_LIBS_PATH

export LANG=C
export LD_LIBRARY_PATH=${LISF_LIBS_PATH}:${LD_LIBRARY_PATH}
export ECCODES_DEFINITION_PATH=${LISF_LIBS_ECCODES}/share/eccodes/definitions
export ECCODES_SAMPLES_PATH=${LISF_LIBS_ECCODES}/share/eccodes/samples

export PATH=${HERE}/usr/bin:${PATH}

function lisf_usage {
NAME="LISF-x86_64.AppImage"
echo "Usage: $NAME [options] [-- LISF options]"
echo ""
echo " where [options] are:"
echo " -h show this help message"
echo " -v show revision info about LISF"
echo " -i show configuration info about LISF"
echo " -a <LDT|LIS|LVT> specify which app to run"
echo ""
echo " where [LISF options] are options to pass to LISF;"
echo " these must be preceeded by --"
echo ""
echo " Examples:"
echo " $NAME -a LDT ldt.config"
echo " mpirun -n N $NAME -a LIS -- --file lis.config"
echo " $NAME -a LVT lvt.config"
}

function lisf_version {
echo "## Revision info"
echo ""
cat "${HERE}/info/revision.log"
}

function lisf_info {
lisf_version
echo ""
echo "## LDT info"
echo ""
echo "### LDT_NetCDF_inc.h"
cat "${HERE}/info/ldt/LDT_NetCDF_inc.h"
echo ""
echo "### LDT_misc.h"
cat "${HERE}/info/ldt/LDT_misc.h"
echo ""
echo "### configure.ldt"
cat "${HERE}/info/ldt/configure.ldt"
echo ""
echo "## LIS info"
echo ""
echo "### LIS_NetCDF_inc.h"
cat "${HERE}/info/lis/LIS_NetCDF_inc.h"
echo ""
echo "### LIS_misc.h"
cat "${HERE}/info/lis/LIS_misc.h"
echo ""
echo "### LIS_plugins.h"
cat "${HERE}/info/lis/LIS_plugins.h"
echo ""
echo "### configure.lis"
cat "${HERE}/info/lis/configure.lis"
echo ""
echo "## LVT info"
echo ""
echo "### LVT_misc.h"
cat "${HERE}/info/lvt/LVT_NetCDF_inc.h"
echo ""
echo "### LVT_misc.h"
cat "${HERE}/info/lvt/LVT_misc.h"
echo ""
echo "### configure.lvt"
cat "${HERE}/info/lvt/configure.lvt"
}

if [[ ${#} -eq 0 ]]
then
lisf_usage
fi

optstring=":hvia:"
while getopts ${optstring} arg
do
case ${arg} in
h)
lisf_usage
exit 0
;;
v)
lisf_version
exit 0
;;
i)
lisf_info
exit 0
;;
a)
APP="${OPTARG}"
;;
?)
echo "Invalid option: -${OPTARG}"
echo ""
lisf_usage
exit 1
;;
esac
done

shift $((${OPTIND} - 1))
exec "${HERE}/usr/bin/${APP}" "${@}"
18 changes: 18 additions & 0 deletions .github/scripts/appimage/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM lisf_libraries

# LISF {{{
WORKDIR /home/workdir
COPY LISF ./LISF
RUN cp ./LISF/.github/scripts/appimage/lisf.env .
RUN cp ./LISF/.github/scripts/appimage/compile_lisf .
RUN ./compile_lisf
# }}}

# AppImage {{{
WORKDIR /home/workdir
COPY ./LISF/.github/scripts/appimage/AppRun .
COPY ./LISF/.github/scripts/appimage/LISF.png .
COPY ./LISF/.github/scripts/appimage/LISF.desktop .
COPY ./LISF/.github/scripts/appimage/prep_appdir .
RUN ./prep_appdir
# }}}
6 changes: 6 additions & 0 deletions .github/scripts/appimage/LISF.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Desktop Entry]
Name=LISF
Exec=LISF
Icon=LISF
Type=Application
Categories=Utility;
Binary file added .github/scripts/appimage/LISF.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions .github/scripts/appimage/compile_lisf
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/usr/bin/env bash

source lisf.env
cd LISF

#
# Revision
#

git log -n 1 --oneline --decorate >revision.log

#
# LDT
#

# Parallelism (0-serial, 1-dmpar, default=0): 0
# Optimization level (-3=strict checks with warnings, -2=strict checks, -1=debug, 0,1,2,3, default=2): 2
# Assume little/big_endian data format (1-little, 2-big, default=2): 2
# Use GRIBAPI/ECCODES? (0-neither, 1-gribapi, 2-eccodes, default=2): 2
# NETCDF version (3 or 4, default=4)?: 4
# NETCDF use shuffle filter? (1-yes, 0-no, default = 1): 1
# NETCDF use deflate filter? (1-yes, 0-no, default = 1): 1
# NETCDF use deflate level? (1 to 9-yes, 0-no, default = 9): 1
# Use HDF4? (1-yes, 0-no, default=1): 1
# Use HDF5? (1-yes, 0-no, default=1): 1
# Use HDFEOS? (1-yes, 0-no, default=1): 1
# Enable GeoTIFF support? (1-yes, 0-no, default=1): 1
# Enable LIBGEOTIFF support? (1-yes, 0-no, default=1): 1
# Include date/time stamp history? (1-yes, 0-no, default=1): 1

cd ldt
printf '%s\n' "0" "2" "2" "2" "4" "1" "1" "1" "1" "1" "1" "1" "1" "1" | ./configure
./compile -j 2

#
# LIS
#

# Parallelism (0-serial, 1-dmpar, default=1): 1
# Optimization level (-3=strict checks with warnings, -2=strict checks, -1=debug, 0,1,2,3, default=2): 2
# Assume little/big_endian data format (1-little, 2-big, default=2): 2
# Use GRIBAPI/ECCODES? (0-neither, 1-gribapi, 2-eccodes, default=2): 2
# Enable AFWA-specific grib configuration settings? (1-yes, 0-no, default=0): 0
# Use NETCDF? (1-yes, 0-no, default=1): 1
# NETCDF version (3 or 4, default=4): 4
# NETCDF use shuffle filter? (1-yes, 0-no, default = 1): 1
# NETCDF use deflate filter? (1-yes, 0-no, default = 1): 1
# NETCDF use deflate level? (1 to 9-yes, 0-no, default = 9): 1
# Use HDF4? (1-yes, 0-no, default=1): 1
# Use HDF5? (1-yes, 0-no, default=1): 1
# Use HDFEOS? (1-yes, 0-no, default=1): 1
# Use MINPACK? (1-yes, 0-no, default=0): 0
# Use LIS-CRTM? (1-yes, 0-no, default=0): 0
# Use LIS-CMEM? (1-yes, 0-no, default=0): 0
# Use LIS-LAPACK? (0-no, 1-mkl, 2-lapack/blas, 3-lapack/refblas, default=0): 0
# Use PETSc? (1-yes, 0-no, default=0): 0

cd ../lis
printf '%s\n' "1" "2" "2" "2" "0" "1" "4" "1" "1" "1" "1" "1" "1" "0" "0" "0" "0" "0" | ./configure
./compile -j 2

#
# LVT
#

# Optimization level (-3=strict checks with warnings, -2=strict checks, -1=debug, 0,1,2,3, default=2): 2
# Assume little/big_endian data format (1-little, 2-big, default=2): 2
# Use GRIBAPI/ECCODES? (1-gribapi, 2-eccodes, default=2): 2
# Use NETCDF? (1-yes, 0-no, default=1): 1
# NETCDF version (3 or 4, default=4): 4
# NETCDF use shuffle filter? (1-yes, 0-no, default = 1): 1
# NETCDF use deflate filter? (1-yes, 0-no, default = 1): 1
# NETCDF use deflate level? (1 to 9-yes, 0-no, default = 9): 1
# Use HDF4? (1-yes, 0-no, default=1): 1
# Use HDF5? (1-yes, 0-no, default=1): 1
# Use HDFEOS? (1-yes, 0-no, default=1): 1
# Enable AFWA-specific grib configuration settings? (1-yes, 0-no, default=0): 0
# Enable GeoTIFF support? (1-yes, 0-no, default=1): 1
# Use MATLAB support? (1-yes, 0-no, default=0): 0

cd ../lvt
printf '%s\n' "2" "2" "2" "1" "4" "1" "1" "1" "1" "1" "1" "0" "1" "0" | ./configure
./compile -j 2
139 changes: 139 additions & 0 deletions .github/scripts/appimage/lisf.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
LISF_LIBS_MPICH=/home/workdir/lib/mpich/3.4_gnu-11.2.0
LISF_LIBS_OPENJPEG=/home/workdir/lib/openjpeg/2.4.0_gnu-11.2.0
LISF_LIBS_ECCODES=/home/workdir/lib/eccodes/2.22.0_gnu-11.2.0
LISF_LIBS_NETCDF=/home/workdir/lib/netcdf/4.7.4_gnu-11.2.0
LISF_LIBS_HDF4=/home/workdir/lib/hdf4/4.2.15_gnu-11.2.0
LISF_LIBS_HDFEOS=/home/workdir/lib/hdfeos2/3.0_gnu-11.2.0
LISF_LIBS_HDF5=/home/workdir/lib/hdf5/1.12.0_gnu-11.2.0
LISF_LIBS_ESMF=/home/workdir/lib/esmf/8.1.1_gnu-11.2.0_mpich-3.4
LISF_LIBS_PROJ=/home/workdir/lib/proj/9.1.0_gnu-11.2.0
LISF_LIBS_GDAL=/home/workdir/lib/gdal/3.5.2_gnu-11.2.0
LISF_LIBS_FORTRANGIS=/home/workdir/lib/fortrangis/2.6-6_gnu-11.2.0
LISF_LIBS_LIBGEOTIFF=/home/workdir/lib/geotiff/1.7.0_gnu-11.2.0
LISF_LIBS_TIFF=/home/workdir/lib/tiff/4.0.9_gnu-11.2.0
LISF_LIBS_LAPACK=/home/workdir/lib/blaslapack/3.11.0_gnu-11.2.0
LISF_LIBS_PETSC=/home/workdir/lib/petsc/3.16.1_gnu-11.2.0

LISF_LIBS_PATH="$LISF_LIBS_MPICH/lib"
LISF_LIBS_PATH+=":$LISF_LIBS_ECCODES/lib"
LISF_LIBS_PATH+=":$LISF_LIBS_NETCDF/lib"
LISF_LIBS_PATH+=":$LISF_LIBS_ESMF/lib/libO/Linux.gfortran.64.mpich3.default"
LISF_LIBS_PATH+=":$LISF_LIBS_HDF5/lib"
LISF_LIBS_PATH+=":$LISF_LIBS_HDF4/lib"
LISF_LIBS_PATH+=":$LISF_LIBS_PROJ/lib"
LISF_LIBS_PATH+=":$LISF_LIBS_GDAL/lib"
LISF_LIBS_PATH+=":$LISF_LIBS_LIBGEOTIFF/lib"
LISF_LIBS_PATH+=":$LISF_LIBS_OPENJPEG/lib"
LISF_LIBS_PATH+=":$LISF_LIBS_TIFF/lib"
LISF_LIBS_PATH+=":$LISF_LIBS_LAPACK/lib"
LISF_LIBS_PATH+=":$LISF_LIBS_PETSC/lib"
export LISF_LIBS_PATH

def_lis_jpeg=""
def_lis_openjpeg=$LISF_LIBS_OPENJPEG
def_lis_eccodes=$LISF_LIBS_ECCODES
def_lis_netcdf=$LISF_LIBS_NETCDF
def_lis_hdf4=$LISF_LIBS_HDF4
def_lis_hdfeos=$LISF_LIBS_HDFEOS
def_lis_hdf5=$LISF_LIBS_HDF5
def_lis_modesmf=$LISF_LIBS_ESMF/mod/modO/Linux.gfortran.64.mpich3.default
def_lis_libesmf=$LISF_LIBS_ESMF/lib/libO/Linux.gfortran.64.mpich3.default
def_lis_minpack=""
def_lis_crtm=""
def_lis_crtm_prof=""
def_lis_cmem=""
def_lis_lapack=$LISF_LIBS_LAPACK/lib
def_lis_petsc=$LISF_LIBS_PETSC
def_lvt_gdal=$LISF_LIBS_GDAL
def_lvt_fortrangis=$LISF_LIBS_FORTRANGIS
def_ldt_libgeotiff=$LISF_LIBS_LIBGEOTIFF

export LIS_ARCH=linux_gfortran
export LIS_SPMD=parallel
export LIS_FC=mpif90
export LIS_CC=mpicc
export LIS_CPPC=mpiCC
export LIS_JPEG=$def_lis_jpeg
export LIS_OPENJPEG=$def_lis_openjpeg
export LIS_ECCODES=$def_lis_eccodes
export LIS_NETCDF=$def_lis_netcdf
export LIS_HDF4=$def_lis_hdf4
export LIS_HDFEOS=$def_lis_hdfeos
export LIS_HDF5=$def_lis_hdf5
export LIS_MODESMF=$def_lis_modesmf
export LIS_LIBESMF=$def_lis_libesmf
export LIS_MINPACK=$def_lis_minpack
export LIS_CRTM=$def_lis_crtm
export LIS_CRTM_PROF=$def_lis_crtm_prof
export LIS_CMEM=$def_lis_cmem
export LIS_PETSC=$def_lis_petsc
export LIS_LAPACK=$def_lis_lapack

export LDT_ARCH=linux_gfortran
export LDT_FC=mpif90
export LDT_CC=mpicc
export LDT_JPEG=$def_lis_jpeg
export LDT_OPENJPEG=$def_lis_openjpeg
export LDT_ECCODES=$def_lis_eccodes
export LDT_NETCDF=$def_lis_netcdf
export LDT_HDF4=$def_lis_hdf4
export LDT_HDFEOS=$def_lis_hdfeos
export LDT_HDF5=$def_lis_hdf5
export LDT_MODESMF=$def_lis_modesmf
export LDT_LIBESMF=$def_lis_libesmf
export LDT_GDAL=$def_lvt_gdal
export LDT_FORTRANGIS=$def_lvt_fortrangis
export LDT_LIBGEOTIFF=$def_ldt_libgeotiff

export LVT_ARCH=linux_gfortran
export LVT_FC=mpif90
export LVT_CC=mpicc
export LVT_JPEG=$def_lis_jpeg
export LVT_OPENJPEG=$def_lis_openjpeg
export LVT_ECCODES=$def_lis_eccodes
export LVT_NETCDF=$def_lis_netcdf
export LVT_HDF4=$def_lis_hdf4
export LVT_HDFEOS=$def_lis_hdfeos
export LVT_HDF5=$def_lis_hdf5
export LVT_MODESMF=$def_lis_modesmf
export LVT_LIBESMF=$def_lis_libesmf
export LVT_GDAL=$def_lvt_gdal
export LVT_FORTRANGIS=$def_lvt_fortrangis

export LANG=C
export PATH=$LISF_LIBS_MPICH/bin:$PATH
export LD_LIBRARY_PATH=$LISF_LIBS_PATH:$LD_LIBRARY_PATH

unset def_lis_jpeg
unset def_lis_openjpeg
unset def_lis_eccodes
unset def_lis_netcdf
unset def_lis_hdf4
unset def_lis_hdfeos
unset def_lis_hdf5
unset def_lis_modesmf
unset def_lis_libesmf
unset def_lis_minpack
unset def_lis_crtm
unset def_lis_crtm_prof
unset def_lis_cmem
unset def_lis_lapack
unset def_lis_petsc
unset def_lvt_gdal
unset def_lvt_fortrangis
unset def_ldt_libgeotiff
unset LISF_LIBS_MPICH
unset LISF_LIBS_OPENJPEG
unset LISF_LIBS_ECCODES
unset LISF_LIBS_NETCDF
unset LISF_LIBS_HDF4
unset LISF_LIBS_HDFEOS
unset LISF_LIBS_HDF5
unset LISF_LIBS_ESMF
unset LISF_LIBS_PROJ
unset LISF_LIBS_GDAL
unset LISF_LIBS_FORTRANGIS
unset LISF_LIBS_LIBGEOTIFF
unset LISF_LIBS_TIFF
unset LISF_LIBS_LAPACK
unset LISF_LIBS_PETSC
7 changes: 7 additions & 0 deletions .github/scripts/appimage/make_appimage
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

sudo docker create --name dummy lisf_appdir
sudo docker cp dummy:/home/workdir/LISF.AppDir .
sudo docker rm -f dummy

sudo appimagetool LISF.AppDir
Loading

0 comments on commit f0c3425

Please sign in to comment.