Index: FLEXPART_9.1.8/src/makefile
===================================================================
--- FLEXPART_9.1.8/src/makefile	(revision 5a6d1b56f6d8412fb1c62af1b663fb651ece0788)
+++ FLEXPART_9.1.8/src/makefile	(revision 8be96b50c556d166abfb5f676596e79d60fe049f)
@@ -1,36 +1,29 @@
 SHELL = /bin/bash
-#MAIN = FP_ecmwf_gfortran
-MAIN = FLEXPART_laptop
-#
-
-TARGET = laptop
+TARGET = local
+WINDS=ecmwf
+#WINDS=gfs
+#WINDS=fnl
 
 FC       = gfortran
-INCPATH  = /xnilu_wrk/flex_wrk/bin64/grib_api/include
-LIBPATH1 = /xnilu_wrk/flex_wrk/bin64/grib_api/lib
-#LIBPATH2 = /flex_wrk/flexpart/lib64/gfortran/lib/
-LIBPATH2 =   /usr/lib/x86_64-linux-gnu/
-#LIBPATH2 =   /flex_wrk/flexpart/lib64/gfortran/lib/
 FFLAGS   =   -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH)
-#FFLAGS   =   -fbounds-check -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH)
-LDFLAGS  = $(FFLAGS) -L$(LIBPATH2) -L$(LIBPATH1) -lgrib_api_f90 -lgrib_api -lm -ljasper
-#
 
-# options for nordre
-# INCPATH  = /xnilu_wrk/flex_wrk/bin64/grib_api/include
-# LIBPATH1 = /xnilu_wrk/flex_wrk/bin64/grib_api/lib
-# LIBPATH2 =   /usr/lib/x86_64-linux-gnu/
-# #FFLAGS   =   -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH)
-# LDFLAGS  = $(FFLAGS) -L$(LIBPATH2) -L$(LIBPATH1) -lgrib_api_f90 -lgrib_api -lm -ljasper
-
-
-ifeq ($(TARGET),laptop)	
-  #options for Lion
-  libs_dir=/Users/ignacio_in_EBCRPA/flexpart/libs/
+ifeq ($(TARGET),dmz)	
+  # options for ganglia
+  INCPATH  = /xnilu_wrk/flex_wrk/bin64/grib_api/include
+  LIBPATH1 = /xnilu_wrk/flex_wrk/bin64/grib_api/lib
+  LIBPATH2 = /usr/lib/x86_64-linux-gnu/
+  MAIN = FLEXPART_dmz_
+endif
+ifeq ($(TARGET),local)
+  # local options 	
+  #libs_dir=/.../flexpart/libs/
+  libs_dir=/Users/ignacio/flexpart/libs/
   INCPATH  = $(libs_dir)/grib_api-1.9.9_dir/include
   LIBPATH1 = $(libs_dir)/grib_api-1.9.9_dir/lib
   LIBPATH2 = $(libs_dir)/jasper_dir/lib
-  MAIN = FLEXPART_laptop
+  MAIN = FLEXPART_local_
 endif
+
+LDFLAGS  = $(FFLAGS) -L$(LIBPATH2) -L$(LIBPATH1) -lgrib_api_f90 -lgrib_api -lm -ljasper
 
 MODOBJS = \
@@ -44,5 +37,5 @@
 OBJECTS = \
 writeheader.o  writeheader_txt.o   writeheader_surf.o       assignland.o\
-calcpar.o               part0.o \
+               part0.o \
 caldate.o               partdep.o \
 coordtrafo.o            psih.o \
@@ -60,26 +53,24 @@
 getrc.o                 readreleases.o \
 getvdep.o               readspecies.o \
-interpol_misslev.o      readwind.o \
-conccalc.o              richardson.o \
+interpol_misslev.o      \
+conccalc.o              \
 concoutput.o  concoutput_surf.o          scalev.o \
 pbl_profile.o           readOHfield.o\
 juldate.o               timemanager.o \
 interpol_vdep.o         interpol_rain.o \
-verttransform.o         partoutput.o \
+partoutput.o \
 hanna.o                 wetdepokernel.o \
 mean.o                  wetdepo.o \
 hanna_short.o           windalign.o \
-obukhov.o               gridcheck.o \
 hanna1.o                initialize.o \
-                        gridcheck_nests.o \
-readwind_nests.o        calcpar_nests.o \
+                           calcpar_nests.o \
 verttransform_nests.o   interpol_all_nests.o \
 interpol_wind_nests.o   interpol_misslev_nests.o \
 interpol_vdep_nests.o   interpol_rain_nests.o \
-getvdep_nests.o \
+getvdep_nests.o   gridcheck_nests.o \
+readwind_nests.o  \
 readageclasses.o        readpartpositions.o \
 calcfluxes.o            fluxoutput.o \
 qvsat.o                 skplin.o \
-convmix.o               calcmatrix.o \
 convect43c.o               redist.o \
 sort2.o                 distance.o \
@@ -100,6 +91,22 @@
 
 
-$(MAIN): $(MODOBJS) $(OBJECTS)
-	$(FC) *.o -o $(MAIN) $(LDFLAGS)
+ifeq ($(WINDS),ecmwf)
+  OBJECTS_WINDS = \
+  calcpar.o          readwind.o \
+  richardson.o       verttransform.o \
+  obukhov.o          gridcheck.o  \
+  convmix.o          calcmatrix.o 
+endif
+
+ifeq ($(WINDS),gfs)
+  OBJECTS_WINDS = \
+  calcpar_gfs.o          readwind_gfs.o \
+  richardson_gfs.o       verttransform_gfs.o \
+  obukhov_gfs.o          gridcheck_gfs.o  \
+  convmix_gfs.o          calcmatrix_gfs.o
+endif
+
+$(MAIN): $(MODOBJS) $(OBJECTS)  $(OBJECTS_WINDS)
+	$(FC) *.o -o $(MAIN)_$(WINDS) $(LDFLAGS)
 
 $(OBJECTS): $(MODOBJS)
