Index: flexpart_code/makefile.general.gfortran
===================================================================
--- flexpart_code/makefile.general.gfortran	(revision 1a933f2341ba7795cf41e9560baad813d31355b9)
+++ flexpart_code/makefile.general.gfortran	(revision 4c0504c3d1819e746e315a527b957701fe05fcf4)
@@ -5,32 +5,22 @@
 #############################################
 #### Uncomment this to activate performance timing
-#DEFS = -DPERFTIMER -DCTBTO
 #DEFS = -DPERFTIMER
-# DEFS = -DCTBTO
-DEFS = 
 #############################################
 
 FC       = gfortran
+PREFIX ?= /usr/local
 
-GRIB_API_ROOT = /dvlscratch/ATM/morton/usr/local/grib_api
+INCPATH = $(PREFIX)/include
+LIBPATH1 = -L$(PREFIX)/lib
 
-# NetCDF4 stuff
-NC4_ROOT = /dvlscratch/ATM/morton/usr/local
-NC4_INCLUDE_FLAGS = -I${NC4_ROOT}/netcdf-fortran-4.4.3/include
-NC4_LIB_FLAGS = -Wl,-rpath=${NC4_ROOT}/netcdf-fortran-4.4.3/lib \
-                -L${NC4_ROOT}/netcdf-fortran-4.4.3/lib \
-                -lnetcdff \
-                -Wl,-rpath=${NC4_ROOT}/netcdf-c-4.4.0/lib \
-                -L${NC4_ROOT}/netcdf-c-4.4.0/lib \
-                -lnetcdf -lnetcdf
+## INTEL_ROOT=/path/to/intel/compiler/root
+## FC = $(INTEL_ROOT)/bin/ifort
+## LIBPATH2 = -Wl,-rpath=${INTEL_ROOT}/lib/intel64 -L${INTEL_ROOT}/lib/intel64
 
+## FFLAGS   =   -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH)
+## default is 4 for frecord-marker
+FFLAGS   =   -O2 -mcmodel=medium -fconvert=little-endian -I$(INCPATH)
 
-INCPATH  = ${GRIB_API_ROOT}/include
-LIBPATH1 = ${GRIB_API_ROOT}/lib
-#LIBPATH2 = 
-
-FFLAGS   =   -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH) ${NC4_INCLUDE_FLAGS} 
-
-LDFLAGS  = $(FFLAGS) -L$(LIBPATH2) -L$(LIBPATH1) -lgrib_api_f90 -lgrib_api -lm -ljasper ${NC4_LIB_FLAGS}
+LDFLAGS = $(FFLAGS) $(LIBPATH2) $(LIBPATH1) -lgrib_api_f90 -lgrib_api -ljasper -lnetcdff -lnetcdf -lnetcdf -lhdf5_hl -lhdf5 -ldl -lm -lcurl
 
 
Index: flexpart_code/makefile.general.ifort
===================================================================
--- flexpart_code/makefile.general.ifort	(revision 1a933f2341ba7795cf41e9560baad813d31355b9)
+++ flexpart_code/makefile.general.ifort	(revision 4c0504c3d1819e746e315a527b957701fe05fcf4)
@@ -4,36 +4,21 @@
 
 #############################################
-# DEFS = -DCTBTO
+#### Uncomment this to activate performance timing
+#DEFS = -DPERFTIMER
 #############################################
 
-INTEL_ROOT = /cots/intel/composer_xe_2013.2.146
-GRIB_API_ROOT = /dvl/atm/klinkl/src/ifort_grib_api/grib_api-1.14.2
-NC4_ROOT = /dvlscratch/ATM/morton/usrifort/local
+FC ?= ifort
+PREFIX ?= /usr/local
 
+INCPATH = $(PREFIX)/include
+LIBPATH1 = -L$(PREFIX)/lib
 
+## INTEL_ROOT=/path/to/intel/compiler/root
+## FC = $(INTEL_ROOT)/bin/ifort
+## LIBPATH2 = -Wl,-rpath=${INTEL_ROOT}/lib/intel64 -L${INTEL_ROOT}/lib/intel64
 
-FC = $(INTEL_ROOT)/bin/ifort
+FFLAGS   =   -O2 -mcmodel=medium -convert little_endian -I$(INCPATH)
 
-INCPATH = $(GRIB_API_ROOT)/fortran
-LIBPATH1 = $(GRIB_API_ROOT)/fortran/.libs
-LIBPATH2 = $(GRIB_API_ROOT)/src/.libs
-
-LIBNC4_INCLUDES = -I${NC4_ROOT}/netcdf-fortran-4.4.3/include
-LIBNC4_FLAGS = -Wl,-rpath=${NC4_ROOT}/netcdf-fortran-4.4.3/lib \
-                    -L${NC4_ROOT}/netcdf-fortran-4.4.3/lib \
-                    -lnetcdff \
-                    -Wl,-rpath=${NC4_ROOT}/netcdf-c-4.4.0/lib \
-                    -L${NC4_ROOT}/netcdf-c-4.4.0/lib \
-                    -lnetcdf -lnetcdf  \
-                    -Wl,-rpath=${INTEL_ROOT}/lib/intel64 \
-                    -L${INTEL_ROOT}//lib/intel64 \
-                    -lifport -lifcore -limf -lsvml -lintlc
-
-
-
-FFLAGS   =   -O2 -mcmodel=medium -convert little_endian -I$(INCPATH) \
-             ${LIBNC4_INCLUDES}
-
-LDFLAGS  = $(FFLAGS) -L$(LIBPATH2) -L$(LIBPATH1) -lgrib_api_f90 -lgrib_api -lm -ljasper ${LIBNC4_FLAGS}
+LDFLAGS = $(FFLAGS) $(LIBPATH2) $(LIBPATH1) -lgrib_api_f90 -lgrib_api -ljasper -lnetcdff -lnetcdf -lnetcdf -lhdf5_hl -lhdf5 -ldl -lm -lcurl
 
 
