aboutsummaryrefslogtreecommitdiff
path: root/science/fvcom
diff options
context:
space:
mode:
Diffstat (limited to 'science/fvcom')
-rw-r--r--science/fvcom/Makefile45
-rw-r--r--science/fvcom/distinfo2
-rw-r--r--science/fvcom/files/patch-METIS_source-makefile11
-rw-r--r--science/fvcom/files/patch-Makefile134
-rw-r--r--science/fvcom/files/patch-mod_lag.F16
-rw-r--r--science/fvcom/pkg-descr5
6 files changed, 213 insertions, 0 deletions
diff --git a/science/fvcom/Makefile b/science/fvcom/Makefile
new file mode 100644
index 000000000000..e22276a39fc8
--- /dev/null
+++ b/science/fvcom/Makefile
@@ -0,0 +1,45 @@
+# Created by: Jason Bacon <jwbacon@tds.net>
+# $FreeBSD$
+
+PORTNAME= fvcom
+PORTVERSION= 2.7.1
+CATEGORIES= science
+MASTER_SITES= http://fvcom.smast.umassd.edu/FVCOM/index.html/
+DISTNAME= sourcecode1
+DIST_SUBDIR= fvcom
+
+MAINTAINER= jwbacon@tds.net
+COMMENT= Unstructured Grid Finite Volume Coastal Ocean Model
+
+# Check netcdf lib for Fortran support!
+LIB_DEPENDS+= netcdff:${PORTSDIR}/science/netcdf-ftn \
+ lapack:${PORTSDIR}/math/lapack \
+ blas:${PORTSDIR}/math/lapack
+
+USE_FORTRAN= yes
+WRKSRC= ${WRKDIR}/FVCOM2.7.1/FVCOM_source
+
+PLIST_FILES= bin/${PORTNAME}${PKGNAMESUFFIX}
+
+RESTRICTED= may not be redistributed because of licensing reasons
+
+.include <bsd.port.pre.mk>
+
+.if !exists(${DISTDIR}/${DIST_SUBDIR}/${DISTFILES})
+IGNORE= may not be redistributed because of licensing reasons.\
+ Please register at http://fvcom.smast.umassd.edu/FVCOM/index.html\
+ in order to download the source code ${DISTFILES}\
+ and place it in ${DISTDIR}/${DIST_SUBDIR}/
+.endif
+
+post-extract:
+ ${MV} ${WRKSRC}/makefile ${WRKSRC}/Makefile
+
+pre-build:
+ (cd ${WRKSRC}/../METIS_source && make)
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/fvcom \
+ ${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX}
+
+.include <bsd.port.post.mk>
diff --git a/science/fvcom/distinfo b/science/fvcom/distinfo
new file mode 100644
index 000000000000..137a45cc4c61
--- /dev/null
+++ b/science/fvcom/distinfo
@@ -0,0 +1,2 @@
+SHA256 (fvcom/sourcecode1.tar.gz) = b687fccef91e37b3b98554bd80bfbf6f857703cd9bdfde166b502bee7473b7ad
+SIZE (fvcom/sourcecode1.tar.gz) = 6162463
diff --git a/science/fvcom/files/patch-METIS_source-makefile b/science/fvcom/files/patch-METIS_source-makefile
new file mode 100644
index 000000000000..4603318013ee
--- /dev/null
+++ b/science/fvcom/files/patch-METIS_source-makefile
@@ -0,0 +1,11 @@
+--- ../METIS_source/makefile.orig 2012-03-31 22:00:57.000000000 -0500
++++ ../METIS_source/makefile 2012-03-31 22:01:01.000000000 -0500
+@@ -2,7 +2,7 @@
+ AR = ar rv
+ RANLIB = ranlib
+ # add path to c compiler
+-CC = icc
++CC = gcc
+ # add c compiler optimization flags
+ OPTFLAGS = -O2
+ CFLAGS = $(COPTIONS) $(OPTFLAGS) $(INCLUDES)
diff --git a/science/fvcom/files/patch-Makefile b/science/fvcom/files/patch-Makefile
new file mode 100644
index 000000000000..9417f6794ac4
--- /dev/null
+++ b/science/fvcom/files/patch-Makefile
@@ -0,0 +1,134 @@
+--- Makefile.orig 2009-09-22 14:45:57.000000000 -0500
++++ Makefile 2012-03-31 21:58:24.000000000 -0500
+@@ -17,7 +17,7 @@
+ # UNCOMMENT TO SELECT DOUBLE PRECISION
+ #--------------------------------------------------------------------------
+
+-# FLAG_1 = -DDOUBLE_PRECISION
++ FLAG_1 = -DDOUBLE_PRECISION
+
+ #--------------------------------------------------------------------------
+ # SPHERICAL SELECT SPHERICAL COORDINATES FOR INTEGRATION
+@@ -35,7 +35,7 @@
+ # UNCOMMENT TO INCLUDE FLOODYING/DRYING
+ #--------------------------------------------------------------------------
+
+-# FLAG_3 = -DWET_DRY
++ FLAG_3 = -DWET_DRY
+
+ #--------------------------------------------------------------------------
+ # MULTI_PROCESSOR INCLUDES PARALLELIZATION WITH MPI
+@@ -45,13 +45,14 @@
+ # UNCOMMENT TO INCLUDE MPI PARALLEL CAPABILITY
+ #--------------------------------------------------------------------------
+
+- FLAG_4 = -DMULTIPROCESSOR
++# FLAG_4 = -DMULTIPROCESSOR
+
+ # For em64t computers at SMAST (guppy)
+ # PARLIB = -L/hosts/salmon01/data00/medm/em64t/lib64 -lmetis
+
+ # For i386 computers at SMAST (salmon and minke)
+ # PARLIB = -L/hosts/salmon01/data00/medm/lib -lmetis
++# PARLIB = -L${LOCALBASE}/lib -lmetis
+ PARLIB = -L../METIS_source -lmetis
+
+ # For Typhoeus and Hydra
+@@ -67,7 +68,7 @@
+ # UNCOMMENT TO INCLUDE WATER QUALITY MODEL
+ #--------------------------------------------------------------------------
+
+-# FLAG_5 = -DWATER_QUALITY
++ FLAG_5 = -DWATER_QUALITY
+
+ #--------------------------------------------------------------------------
+ # NETCDF OUTPUT DUMP OUTPUT INTO NETCDF FILES (yes/no)
+@@ -79,8 +80,10 @@
+ # UNCOMMENT TO INCLUDE NETCDF OUTPUT CAPABILITY
+ #--------------------------------------------------------------------------
+ FLAG_6 = -DNETCDF_IO
+- IOLIBS = -L/hosts/mao/usr/medm/install/netcdf/3.6.3/em64t/lib -lnetcdf
+- IOINCS = -I/hosts/mao/usr/medm/install/netcdf/3.6.3/em64t/include
++# FreeBSD ports netcdf fortran support is separate from the standard
++# netcdf library. Must have both -lnetcdff and -lnetcdf
++ IOLIBS = -L${LOCALBASE}/lib -lnetcdff -lnetcdf
++ IOINCS = -I${LOCALBASE}/include
+
+ # For em64t computers at SMAST (guppy)
+ # IOLIBS = -L/hosts/salmon01/data00/medm/em64t/lib64 -lnetcdf
+@@ -107,7 +110,7 @@
+ # UNCOMMENT TO INCLUDE DATA ASSIMILATION
+ #--------------------------------------------------------------------------
+
+-# FLAG_7 = -DNG_OI_ASSIM
++ FLAG_7 = -DNG_OI_ASSIM
+
+ # For Build on em64t computer (Guppy)
+ # OILIB = -L/usr/X11R6/lib64 -L/usr/local/lib64 -lmkl_lapack -lmkl_em64t -lguide -lpthread
+@@ -381,15 +384,15 @@
+ #--------------------------------------------------------------------------
+ # Intel/MPI Compiler Definitions (SMAST)
+ #--------------------------------------------------------------------------
+- CPP = /usr/bin/cpp
+- CPPFLAGS = $(DEF_FLAGS) -DINTEL
+- FC = mpif90
+- DEBFLGS = #-check all
++# CPP = /usr/bin/cpp
++# CPPFLAGS = $(DEF_FLAGS) -DINTEL
++# FC = mpif90
++# DEBFLGS = #-check all
+ # Use 'OPT = -O0 -g' for fast compile to test the make
+ # Use 'OPT = -xP' for fast run on em64t (Hydra, Typhoeus and Guppy)
+ # Use 'OPT = -xN' for fast run on em64t (Salmon and Minke)
+ # OPT = -O0 -g
+- OPT = -xP
++# OPT = -xP
+ # OPT = -xN
+
+ # Do not set static for use with visit!
+@@ -398,12 +401,11 @@
+ #--------------------------------------------------------------------------
+ # gfortran defs
+ #--------------------------------------------------------------------------
+-# CPP = /usr/bin/cpp
+-# CPPFLAGS = $(DEF_FLAGS) -DGFORTRAN
+-# FC = gfortran -O3
+-# DEBFLGS =
+-# OPT =
+-# CLIB =
++ CPP = cpp
++ CPPFLAGS = $(DEF_FLAGS) -DGFORTRAN
++ DEBFLGS = -g
++ OPT = -O
++ CLIB =
+ #--------------------------------------------------------------------------
+ # absoft / mac os x defs
+ #--------------------------------------------------------------------------
+@@ -448,7 +450,8 @@
+ #--------------------------------------------------------------------------
+ # CAT Preprocessing Flags
+ #--------------------------------------------------------------------------
+- CPPARGS = $(CPPFLAGS) $(DEF_FLAGS) $(FLAG_1) $(FLAG_2) \
++ CPPARGS = $(CPPFLAGS) $(DEF_FLAGS) $(PORT_CPP_FLAGS) \
++ $(FLAG_1) $(FLAG_2) \
+ $(FLAG_3) $(FLAG_4) $(FLAG_5) $(FLAG_6) \
+ $(FLAG_7) $(FLAG_8) $(FLAG_9) $(FLAG_10) \
+ $(FLAG_11) $(FLAG_12) $(FLAG_13) $(FLAG_14) \
+@@ -463,7 +466,7 @@
+
+ LIBS = $(PV3LIB) $(CLIB) $(PARLIB) $(IOLIBS) \
+ $(MPILIB) $(GOTMLIB) $(KFLIB) $(BIOLIB) \
+- $(OILIB) $(VISITLIB) $(PETSC_LIB)
++ $(OILIB) $(VISITLIB) $(PETSC_LIB) -llapack -lblas
+
+ INCS = $(IOINCS) $(GOTMINCS) $(BIOINCS) $(VISITINC) $(PETSC_FC_INCLUDES)
+
+@@ -539,6 +542,8 @@
+ # Linking Directives
+ #--------------------------------------------------------------------------
+
++all: $(EXEC)
++
+ $(EXEC): $(OBJS)
+ $(FC) $(FFLAGS) $(VISOPT) $(LDFLAGS) $(OBJS) $(LIBS) -o $(EXEC)
+
diff --git a/science/fvcom/files/patch-mod_lag.F b/science/fvcom/files/patch-mod_lag.F
new file mode 100644
index 000000000000..84377bb00b64
--- /dev/null
+++ b/science/fvcom/files/patch-mod_lag.F
@@ -0,0 +1,16 @@
+--- mod_lag.F.orig 2008-07-25 16:44:11.000000000 -0500
++++ mod_lag.F 2012-03-31 21:57:17.000000000 -0500
+@@ -212,7 +212,12 @@
+ !Lagrangian particle associated scalar
+ character(len=80) :: lag_scal_choice
+ integer, parameter:: n_scal_choice = 6
+- character(len=80) :: scal_choices(n_scal_choice) = (/"s1","t1","rho1","km","kh","user_defined"/)
++ character(len=80) :: scal_choices(n_scal_choice) = (/ "s1 ", &
++ "t1 ", &
++ "rho1 ", &
++ "km ", &
++ "kh ", &
++ "user_defined"/)
+ logical :: scal_choice_valid
+
+
diff --git a/science/fvcom/pkg-descr b/science/fvcom/pkg-descr
new file mode 100644
index 000000000000..02a4c11499f5
--- /dev/null
+++ b/science/fvcom/pkg-descr
@@ -0,0 +1,5 @@
+FVCOM is a prognostic, unstructured-grid, finite-volume, free-surface,
+3-D primitive equation coastal ocean circulation model developed
+by UMASSD-WHOI joint efforts.
+
+WWW: http://fvcom.smast.umassd.edu/FVCOM/index.html