summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorLhxone <lhxone@outlook.com>2022-04-27 07:32:19 +0800
committerGitHub <noreply@github.com>2022-04-26 16:32:19 -0700
commite5444b9a777db9d0889342997dabf22c20820d03 (patch)
tree65eb6ba787fdc5c6e0e319f8cf7192aa61ee5cd2 /var
parent89cc16a9cdbffe55e06bc2edb215add24f16f90b (diff)
downloadspack-e5444b9a777db9d0889342997dabf22c20820d03.tar.gz
spack-e5444b9a777db9d0889342997dabf22c20820d03.tar.bz2
spack-e5444b9a777db9d0889342997dabf22c20820d03.tar.xz
spack-e5444b9a777db9d0889342997dabf22c20820d03.zip
New package: Swan (#30217)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/swan/package.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/swan/package.py b/var/spack/repos/builtin/packages/swan/package.py
new file mode 100644
index 0000000000..b82d8f7d32
--- /dev/null
+++ b/var/spack/repos/builtin/packages/swan/package.py
@@ -0,0 +1,40 @@
+# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Swan(MakefilePackage):
+ """SWAN is a third-generation wave model, developed at Delft
+ University of Technology, that computes random, short-crested
+ wind-generated waves in coastal regions and inland waters.
+ For more information about SWAN, see a short overview of model
+ features. This list reflects on the scientific relevance of
+ the development of SWAN."""
+
+ homepage = "http://swanmodel.sourceforge.net/"
+ url = "https://cfhcable.dl.sourceforge.net/project/swanmodel/swan/41.31/swan4131.tar.gz"
+
+ maintainers = ['lhxone']
+
+ version('4131', sha256='cd3ba1f0d79123f1b7d42a43169f07575b59b01e604c5e66fbc09769e227432e')
+
+ depends_on('mpi')
+ depends_on('netcdf-fortran')
+ depends_on('libfabric')
+
+ def edit(self, spec, prefix):
+ env['FC'] = 'gfortran'
+ m = FileFilter('platform.pl')
+ m.filter('F90_MPI = .*', 'F90_MPI = mpifort\\n";')
+ m.filter('NETCDFROOT =', 'NETCDFROOT = {0}' + spec['netcdf-fortran'].prefix)
+
+ def build(self, spec, prefix):
+ make('config')
+ make('mpi')
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ install('*.exe', prefix.bin)