Skip to content

Commit

Permalink
Merge pull request #4 from jfgrimm/delft3d-emsf-fix-2
Browse files Browse the repository at this point in the history
install (and patch) Delft3D ESMF script
  • Loading branch information
WilleBell authored Feb 21, 2024
2 parents 2e5b5bd + e4e4218 commit d952284
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ checksums = [
# Delft3D-4.04.01.tgz
None,
# Delft3D-4.04.01_use-external-esmf.patch'
'86f127cf3193c6fc9256491d917051db91e695718631d1b221b111499e0f432b',
'225d76fb3eea22e203f1a9f371b4fd07d75a8478de35a7428c1a1f85b344323c',
]

builddependencies = [
Expand Down Expand Up @@ -59,6 +59,8 @@ preconfigopts += "sed -i 's/if (spec < 0)/if (spec == nullptr)/g' utils_lgpl/del
preconfigopts += "sed -i 's/if (has_umean \/= 0)/if (has_umean .neqv. .false.)/g' " # noqa: W605
preconfigopts += "engines_gpl/flow2d3d/packages/flow2d3d_io/src/input/restart_trim_flow.f90 && "
preconfigopts += "sed -i -e 's/-recursive/-frecursive/g' -e 's/-traceback/-fbacktrace/g' configure.ac && "
# copy ESMF_RegridWeightGen_in_Delft3D-WAVE.sh script
preconfigopts += "cp third_party_open/esmf/lnx64/scripts/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh . && "
# remove esmf precompiled binaries
preconfigopts += "rm -r third_party_open/esmf && libtoolize && "
preconfigopts += './autogen.sh && '
Expand All @@ -72,8 +74,10 @@ prebuildopts = "sed -i.backup 's/-l -l//g' libtool config.lt config.status && "

install_cmd = 'make ds-install'

postinstallcmds = ["cp %(start_dir)s/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh %(installdir)s/bin/"]

sanity_check_paths = {
'files': ['bin/d_hydro'],
'files': ['bin/d_hydro', 'bin/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh'],
'dirs': ['lib', 'share']
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,48 @@ diff -Nru trunk.orig/src/configure.ac trunk/src/configure.ac
third_party_open/Makefile
third_party_open/md5/Makefile
third_party_open/md5/md5digest/Makefile
diff -Nru trunk.orig/src/third_party_open/esmf/lnx64/scripts/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh trunk/src/third_party_open/esmf/lnx64/scripts/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh
--- trunk.orig/src/third_party_open/esmf/lnx64/scripts/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh 2024-02-20 14:35:27.449776542 +0000
+++ trunk/src/third_party_open/esmf/lnx64/scripts/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh 2024-02-21 11:53:47.816278292 +0000
@@ -52,24 +52,24 @@
scriptdirname=`readlink \-f \$0`
scriptdir=`dirname $scriptdirname`
D3D_HOME=$scriptdir/..
-regridexec=$D3D_HOME/bin/ESMF_RegridWeightGen
+regridexec=$(which ESMF_RegridWeightGen)
# ESMF_regrid is build with old compilers etc.
# share/esmf optionally contains some library-versions especially for running this version of ESMF_regrid,
# both for RedHat 6.* and 7.*

-if [ -f "/etc/redhat-release" ]; then
- grepOS=`cat /etc/redhat-release | grep -i "release 6"`
- if [ "$grepOS" != "" ]; then
- echo "RH 6: Using RH 6 libraries" >>esmf_sh.log
- export LD_LIBRARY_PATH=$D3D_HOME/share/delft3d/esmf/lnx64/bin:$D3D_HOME/lib:$LD_LIBRARY_PATH
- else
- echo "using RH 7 libraries" >>esmf_sh.log
- export LD_LIBRARY_PATH=$D3D_HOME/share/delft3d/esmf/lnx64/bin_COS7:$D3D_HOME/lib:$LD_LIBRARY_PATH
- fi
-else
- echo "ERROR: ESMF_RegridWeightGen_in_Delft3D-WAVE.sh only implemented for CentOS 6 and 7."
- exit
-fi
+# if [ -f "/etc/redhat-release" ]; then
+# grepOS=`cat /etc/redhat-release | grep -i "release 6"`
+# if [ "$grepOS" != "" ]; then
+# echo "RH 6: Using RH 6 libraries" >>esmf_sh.log
+# export LD_LIBRARY_PATH=$D3D_HOME/share/delft3d/esmf/lnx64/bin:$D3D_HOME/lib:$LD_LIBRARY_PATH
+# else
+# echo "using RH 7 libraries" >>esmf_sh.log
+# export LD_LIBRARY_PATH=$D3D_HOME/share/delft3d/esmf/lnx64/bin_COS7:$D3D_HOME/lib:$LD_LIBRARY_PATH
+# fi
+# else
+# echo "ERROR: ESMF_RegridWeightGen_in_Delft3D-WAVE.sh only implemented for CentOS 6 and 7."
+# exit
+# fi


echo Executing batchscript "ESMF_RegridWeightGen_in_Delft3D-WAVE.sh" for Delft3D-WAVE >>esmf_sh.log
diff -Nru trunk.orig/src/third_party_open/Makefile.am trunk/src/third_party_open/Makefile.am
--- trunk.orig/src/third_party_open/Makefile.am 2024-02-20 14:35:27.045777956 +0000
+++ trunk/src/third_party_open/Makefile.am 2024-02-20 14:43:31.552143270 +0000
Expand Down

0 comments on commit d952284

Please sign in to comment.