Index: .gitignore
===================================================================
--- .gitignore	(revision e603ee6f96b7fff6d753cacbd345ce63251fafbe)
+++ .gitignore	(revision 4ba50e639ce2a6b391f5e1cfb7fc60fc5d80d5be)
@@ -1,2 +1,5 @@
+FP_ecmwf_gfortran*
+*.o
+*_mod.mod
 .DS_Store
 output
Index: src/FLEXPART.f90
===================================================================
--- src/FLEXPART.f90	(revision b4d29ce9942e7817568d557b23ac2d4ccb3bfb37)
+++ src/FLEXPART.f90	(revision 414a5e52bd4f4b3d5e120e95de3c6b7c518ab456)
@@ -50,5 +50,5 @@
   integer :: idummy = -320
   character(len=256) :: inline_options  !pathfile, flexversion, arg2
-
+  integer :: index_v
 
   ! Generate a large number of random numbers
@@ -61,18 +61,20 @@
 
   ! FLEXPART version string
-  flexversion='Version 9.2 beta (2014-07-01)'
-  verbosity=0
-
+  ! flexversion='Version 9.2 beta (2014-07-01)'
+  flexversion='Version 9.2.0.1 (2015-01-27)'
+  ! default inlide options
+  inline_options='none'
+  !verbosity flags  defined in com_mod.f90
+ 
   ! Read the pathnames where input/output files are stored
   !*******************************************************
 
-  inline_options='none'
   select case (iargc())
-  case (2)
+  case (2) !2 parameters: pathfile and inline options
     call getarg(1,arg1)
     pathfile=arg1
     call getarg(2,arg2)
     inline_options=arg2
-  case (1)
+  case (1) !1 parameter pathfiel or inline options
     call getarg(1,arg1)
     pathfile=arg1
@@ -81,5 +83,5 @@
       inline_options=arg1 
     endif
-  case (0)
+  case (0) !default behavior
     write(pathfile,'(a11)') './pathnames'
   end select
@@ -89,40 +91,94 @@
   print*,'Welcome to FLEXPART ', trim(flexversion)
   print*,'FLEXPART is free software released under the GNU General Public License.'
+
+  ! inline options allow to fine tune the verbosity during run time
+  ! e.g.: show compilation parameters or input variables, time execution     
+  if (inline_options(1:1).eq.'-') then
+   ! if (index(inline_options,'v').gt.0) then
+   !    print*, 'verbose mode'
+   !    verbosity=1
+   !    index_v=index(inline_options,'v')
+   !    if (inline_options(index_v+1:index_v+1).eq.'2') then
+   !    verbosity=2
+   !    endif         
+   ! endif   
  
-  if (inline_options(1:1).eq.'-') then
-    if (trim(inline_options).eq.'-v'.or.trim(inline_options).eq.'-v1') then
-       print*, 'Verbose mode 1: display detailed information during run'
+    !if (trim(inline_options).eq.'-v'.or.trim(inline_options).eq.'-v1') then
+    if (index(inline_options,'v').gt.0) then
+       index_v=index(inline_options,'v')
+       print*, 'Verbose mode: display  additional information during run'
        verbosity=1
-    endif
-    if (trim(inline_options).eq.'-v2') then
-       print*, 'Verbose mode 2: display more detailed information during run'
+       if (inline_options(index_v+1:index_v+1).eq.'2') then
        verbosity=2
-    endif
-    if (trim(inline_options).eq.'-i') then
-       print*, 'Info mode: provide detailed run specific information and stop'
+       endif
+       print*, 'verbosity level=', verbosity !inline_options(index_v+1:index_v+1)
+              
+    endif
+    !iif (trim(inline_options).eq.'-v2') then
+    !   print*, 'Verbose mode 2: display more detailed information during run'
+    !   verbosity=2
+    !endif
+
+    if (index(inline_options,'i').gt.0) then   
+    !if (trim(inline_options).eq.'-i') then
+       index_v=index(inline_options,'i')
+       print*, 'Info mode: provide run specific information and stop'
        verbosity=1
        info_flag=1
-    endif
-    if (trim(inline_options).eq.'-i2') then
-       print*, 'Info mode: provide more detailed run specific information and stop'
-       verbosity=2
-       info_flag=1
-    endif
+       !if (trim(inline_options).eq.'-i2') then
+       if (inline_options(index_v+1:index_v+1).eq.'2') then
+           print*, 'Including input files'
+       !   verbosity=1
+       info_flag=2
+       endif
+    endif
+    !if (trim(inline_options).eq.'-i2') then
+    !   print*, 'Info mode: provide more detailed run specific information and stop'
+    !   verbosity=1
+    !   info_flag=2
+    !endif
+    if (index(inline_options,'t').gt.0) then
+       time_flag=1
+       print*, 'timing execution: not implemented'
+       !stop
+    endif
+    if (index(inline_options,'d').gt.0) then
+       debug_flag=1
+       print*, 'debug: not implemented'
+       print*, 'debug_flag=', debug_flag
+       !stop
+    endif 
   endif
            
   if (verbosity.gt.0) then
+    print*, 'FLEXPART>******************************'
+    print*, 'FLEXPART>* verbosity level:', verbosity
+    print*, 'FLEXPART>* info only:      ', info_flag
+    print*, 'FLEXPART>* time execution: ', time_flag
+    print*, 'FLEXPART>******************************'
+    
+    print*, 'FLEXPART> parameters from par_mod'    
+    print*, 'FLEXPART> nxmax=  ', nxmax
+    print*, 'FLEXPART> nymax=  ', nymax
+    print*, 'FLEXPART> nuvzmax=', nuvzmax
+    print*, 'FLEXPART> nwzmax= ', nwzmax
+    print*, 'FLEXPART> nzmax=  ', nzmax
+    print*, 'FLEXPART> nxshift=', nxshift
+    print*, 'FLEXPART> maxpart=', maxpart
+    print*, 'FLEXPART> maxspec=', maxspec 
+
+    if (info_flag.eq.1) stop
     write(*,*) 'call readpaths'
   endif 
   call readpaths(pathfile)
  
-  if (verbosity.gt.1) then !show clock info 
-     !print*,'length(4)',length(4)
+  !if (time_flag.gt.1) then !show clock info 
      !count=0,count_rate=1000
-     CALL SYSTEM_CLOCK(count_clock0, count_rate, count_max)
+  CALL SYSTEM_CLOCK(count_clock0, count_rate, count_max)
      !WRITE(*,*) 'SYSTEM_CLOCK',count, count_rate, count_max
      !WRITE(*,*) 'SYSTEM_CLOCK, count_clock0', count_clock0
      !WRITE(*,*) 'SYSTEM_CLOCK, count_rate', count_rate
      !WRITE(*,*) 'SYSTEM_CLOCK, count_max', count_max
-  endif
+  !endif
 
   ! Read the user specifications for the current model run
@@ -134,12 +190,12 @@
   call readcommand
   if (verbosity.gt.0) then
-    write(*,*) '    ldirect=', ldirect
-    write(*,*) '    ibdate,ibtime=',ibdate,ibtime
+    write(*,*) '    ldirect      =', ldirect
+    write(*,*) '    ibdate,ibtime=', ibdate,ibtime
     write(*,*) '    iedate,ietime=', iedate,ietime
-    if (verbosity.gt.1) then   
+  endif
+    if (time_flag.gt.0) then   
       CALL SYSTEM_CLOCK(count_clock, count_rate, count_max)
       write(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max
     endif     
-  endif
 
   ! Read the age classes to be used
@@ -150,5 +206,5 @@
   call readageclasses
 
-  if (verbosity.gt.1) then   
+  if (time_flag.gt.1) then   
     CALL SYSTEM_CLOCK(count_clock, count_rate, count_max)
     write(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max
@@ -168,10 +224,9 @@
  
   if (verbosity.gt.0) then
-     write(*,*) 'call gridcheck'
-  endif
-
+     write(*,*) 'FLEXPART> call gridcheck'
+  endif
   call gridcheck
 
-  if (verbosity.gt.1) then   
+  if (time_flag.gt.0) then   
     CALL SYSTEM_CLOCK(count_clock, count_rate, count_max)
     write(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max
@@ -187,5 +242,5 @@
 
   if (verbosity.gt.0) then
-    write(*,*) 'call readoutgrid'
+    write(*,*) 'FLEXPART> call readoutgrid'
   endif
 
@@ -195,5 +250,5 @@
     call readoutgrid_nest
     if (verbosity.gt.0) then
-      write(*,*) '# readoutgrid_nest'
+      write(*,*) 'FLEXPART>  readoutgrid_nest'
     endif
   endif
@@ -203,5 +258,5 @@
 
   if (verbosity.eq.1) then
-     print*,'call readreceptors'
+     print*,'FLEXPART> call readreceptors'
   endif
   call readreceptors
@@ -217,5 +272,5 @@
 
   if (verbosity.gt.0) then
-    print*,'call readlanduse'
+    print*,'FLEXPART> call readlanduse'
   endif
   call readlanduse
@@ -225,5 +280,5 @@
 
   if (verbosity.gt.0) then
-    print*,'call assignland'
+    print*,'FLEXPART> call assignland'
   endif
   call assignland
@@ -233,5 +288,5 @@
 
   if (verbosity.gt.0) then
-    print*,'call readreleases'
+    print*,'FLEXPART> call readreleases'
   endif
   call readreleases
@@ -273,5 +328,5 @@
   else
     if (verbosity.gt.0) then
-      print*,'numpart=0, numparticlecount=0'
+      print*,'set numpart=0, numparticlecount=0'
     endif    
     numpart=0
@@ -308,5 +363,5 @@
 
   call writeheader
-  ! FLEXPART 9.2 ticket ?? write header in ASCII format 
+  ! write header in ASCII format 
   call writeheader_txt
   !if (nested_output.eq.1) call writeheader_nest
@@ -357,13 +412,13 @@
   !********************************
 
-  if (verbosity.gt.0) then
-     if (verbosity.gt.1) then   
-       CALL SYSTEM_CLOCK(count_clock, count_rate, count_max)
-       write(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max
-     endif
-     if (info_flag.eq.1) then
-       print*, 'info only mode (stop)'    
-       stop
-     endif
+  if (time_flag.gt.0) then   
+    CALL SYSTEM_CLOCK(count_clock, count_rate, count_max)
+    write(*,*) 'SYSTEM_CLOCK',(count_clock - count_clock0)/real(count_rate) !, count_rate, count_max
+  endif
+  if (info_flag.eq.2) then
+    print*, 'info only mode (stop before call timemanager)'
+    stop
+  endif
+  if (verbosity.gt.0) then
      print*,'call timemanager'
   endif
Index: src/com_mod.f90
===================================================================
--- src/com_mod.f90	(revision b4d29ce9942e7817568d557b23ac2d4ccb3bfb37)
+++ src/com_mod.f90	(revision e92a713ff8f0235244b31f68f33888d61d310d81)
@@ -23,5 +23,5 @@
   !****************************************************************
 
-  character :: path(numpath+2*maxnests)*120
+  character :: path(numpath+2*maxnests)*256
   integer :: length(numpath+2*maxnests)
   character(len=256) :: pathfile, flexversion, arg1, arg2
@@ -686,4 +686,6 @@
   integer :: verbosity=0
   integer :: info_flag=0
+  integer :: time_flag=0
+  integer :: debug_flag=0
   integer :: count_clock, count_clock0,  count_rate, count_max
   logical :: nmlout=.true.
Index: src/gridcheck.f90
===================================================================
--- src/gridcheck.f90	(revision b4d29ce9942e7817568d557b23ac2d4ccb3bfb37)
+++ src/gridcheck.f90	(revision 6470a473fbfddbb6309750e0e18693000f2acefb)
@@ -446,8 +446,8 @@
        nuvz+1,nwz
   write(*,*)
-  write(*,'(a)') ' Mother domain:'
-  write(*,'(a,f10.5,a,f10.5,a,f10.5)') '  Longitude range: ', &
+  write(*,'(a)') 'gridcheck> Mother domain:'
+  write(*,'(a,f10.5,a,f10.5,a,f10.5)') 'gridcheck>  Longitude range: ', &
        xlon0,' to ',xlon0+(nx-1)*dx,'   Grid distance: ',dx
-  write(*,'(a,f10.5,a,f10.5,a,f10.5)') '  Latitude range : ', &
+  write(*,'(a,f10.5,a,f10.5,a,f10.5)') 'gridcheck>  Latitude range : ', &
        ylat0,' to ',ylat0+(ny-1)*dy,'   Grid distance: ',dy
   write(*,*)
@@ -545,15 +545,15 @@
        '###### '
   write(*,*)
-  write(*,'(a)') '!!! PLEASE INSERT A NEW CD-ROM AND   !!!'
-  write(*,'(a)') '!!! PRESS ANY KEY TO CONTINUE...     !!!'
-  write(*,'(a)') '!!! ...OR TERMINATE FLEXPART PRESSING!!!'
-  write(*,'(a)') '!!! THE "X" KEY...                   !!!'
-  write(*,*)
-  read(*,'(a)') opt
-  if(opt.eq.'X') then
+  !write(*,'(a)') '!!! PLEASE INSERT A NEW CD-ROM AND   !!!'
+  !write(*,'(a)') '!!! PRESS ANY KEY TO CONTINUE...     !!!'
+  !write(*,'(a)') '!!! ...OR TERMINATE FLEXPART PRESSING!!!'
+  !write(*,'(a)') '!!! THE "X" KEY...                   !!!'
+  !write(*,*)
+  !read(*,'(a)') opt
+  !if(opt.eq.'X') then
     stop
-  else
-    goto 5
-  endif
+  !else
+  !  goto 5
+  !endif
 
 end subroutine gridcheck
Index: src/makefile
===================================================================
--- src/makefile	(revision 4fbe7a5609fe43bdc3940768d8f4d949237cc44a)
+++ src/makefile	(revision da396a2871f09772dff5066880929c71462ea4ae)
@@ -6,5 +6,5 @@
 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)
+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
Index: src/par_mod.f90
===================================================================
--- src/par_mod.f90	(revision 0b7110922bbc5658468bac8f9fb6c53ec1aa2b3b)
+++ src/par_mod.f90	(revision da396a2871f09772dff5066880929c71462ea4ae)
@@ -123,10 +123,12 @@
   !integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92 !FNL XF
   !integer,parameter :: nxmax=361,nymax=181,nuvzmax=152,nwzmax=152,nzmax=152 !ECMWF new 
-  integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92 !ECMWF
+  !integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92 !ECMWF
   !integer,parameter :: nxmax=361,nymax=181,nuvzmax=26,nwzmax=26,nzmax=26
   !integer,parameter :: nxmax=721,nymax=361,nuvzmax=64,nwzmax=64,nzmax=64
+  integer,parameter :: nxmax=721,nymax=361,nuvzmax=138,nwzmax=138,nzmax=138 !ECMWF 0.5
   !integer,parameter :: nxmax=1201,nymax=235,nuvzmax=58,nwzmax=58,nzmax=58
 
   integer,parameter :: nxshift=359 ! for ECMWF
+  !integer,parameter :: nxshift=718 ! for ECMWF 0.5
   !integer,parameter :: nxshift=0     ! for GFS or FNL (XF)
 
@@ -154,6 +156,6 @@
   !*********************************************
 
-  integer,parameter :: maxnests=0, nxmaxn=0, nymaxn=0
-  !integer,parameter :: maxnests=1,nxmaxn=351,nymaxn=351 !ECMWF
+  !integer,parameter :: maxnests=0, nxmaxn=0, nymaxn=0
+  integer,parameter :: maxnests=1,nxmaxn=361,nymaxn=351 !ECMWF
   !integer,parameter :: maxnests=1, nxmaxn=201, nymaxn=161 ! FNL XF
   ! maxnests                maximum number of nested grids
@@ -198,6 +200,6 @@
   !**************************************************
 
-  integer,parameter :: maxpart=150000
-  integer,parameter :: maxspec=4
+  integer,parameter :: maxpart=4000000
+  integer,parameter :: maxspec=1
 
 
Index: src/readcommand.f90
===================================================================
--- src/readcommand.f90	(revision b4d29ce9942e7817568d557b23ac2d4ccb3bfb37)
+++ src/readcommand.f90	(revision cd1f691a239c90ce47cbb0a963f57591aa887d9f)
@@ -444,5 +444,5 @@
   if ((ipout.ne.0).and.(ipout.ne.1).and.(ipout.ne.2)) then
     write(*,*) ' #### FLEXPART MODEL ERROR! FILE COMMAND:     #### '
-    write(*,*) ' #### IPOUT MUST BE 1, 2 OR 3!                #### '
+    write(*,*) ' #### IPOUT MUST BE 0, 1, or 2!                #### '
     stop
   endif
Index: src/readpaths.f90
===================================================================
--- src/readpaths.f90	(revision b4d29ce9942e7817568d557b23ac2d4ccb3bfb37)
+++ src/readpaths.f90	(revision 18c1336f298f7280ee592e7b9026b47c656eeefe)
@@ -63,10 +63,19 @@
     length(i)=index(path(i),' ')-1
 
+
+  if (verbosity.gt.0) then
+      print*, 'path read', i, '=',  path(i)
+  end if
     
+  end do
+
+
+    do i=1,numpath
+ 
     string_test = path(i)
     character_test = string_test(length(i):length(i))
     !print*, 'character_test,  string_test ', character_test,  string_test 
       if ((character_test .NE. '/') .AND. (i .LT. 4))  then
-         print*, 'WARNING: path not ending in /' 
+         print*, 'readpaths> WARNING: path not ending in /' 
          print*, path(i)
          path(i) = string_test(1:length(i)) // '/'
@@ -74,7 +83,10 @@
          print*, 'fix: padded with /' 
          print*, path(i)
-         print*, 'length(i) increased 1' 
+         print*, 'length(i) increased 1',  length(i) 
       endif
-  end do
+
+    end do
+
+
 
   ! Check whether any nested subdomains are to be used
@@ -95,6 +107,15 @@
 30   numbnests=i-1
 
+  if (verbosity.gt.0) then
+      do i=1,numpath
+      print*, 'path tested', i, '=',  path(i)
+      end do 
+  end if
+
   close(unitpath)
   return
+
+   
+
 
 998   write(*,*) ' #### TRAJECTORY MODEL ERROR! ERROR WHILE     #### '
Index: src/readreleases.f90
===================================================================
--- src/readreleases.f90	(revision b4d29ce9942e7817568d557b23ac2d4ccb3bfb37)
+++ src/readreleases.f90	(revision 242571ddd9bf11b07fcd8a317319daf2651c1e2a)
@@ -126,5 +126,6 @@
   ! prepare namelist output if requested
   if (nmlout.eqv..true.) then
-    open(unitreleasesout,file=path(2)(1:length(2))//'RELEASES.namelist',access='append',status='new',err=1000)
+    !open(unitreleasesout,file=path(2)(1:length(2))//'RELEASES.namelist',access='append',status='new',err=1000)
+    open(unitreleasesout,file=path(2)(1:length(2))//'RELEASES.namelist',err=1000)
   endif
 
@@ -258,5 +259,5 @@
   if (stat.ne.0) write(*,*)'ERROR: could not allocate xmasssave'
 
-  write (*,*) 'Releasepoints : ', numpoint
+  write (*,*) 'readreleases> Releasepoints : ', numpoint
 
   do i=1,numpoint
@@ -293,4 +294,8 @@
 
   do i=1,nspec
+    if (verbosity.gt.0) then
+      print*, 'readreleases> call readspecies', i
+    endif
+ 
     if (readerror.ne.0) then
       read(unitreleases,*,err=998) specnum_rel(i)
@@ -494,4 +499,25 @@
   endif ! if namelist format
 
+
+  if (verbosity.gt.1 .and. numpoint.eq.1) then ! verbosity 2 or larger
+    write(*,*) 'numpoint=', numpoint
+    print*,  id1,it1
+    print*,  id2,it2
+    print*,  xpoint1(numpoint)
+    print*,  ypoint1(numpoint)
+    print*,  xpoint2(numpoint)
+    print*,  ypoint2(numpoint)
+    print*,  'kindz=' , kindz(numpoint)
+    print*,  zpoint1(numpoint)
+    print*,  zpoint2(numpoint)
+    print*,  npart(numpoint)
+    do i=1,nspec
+      !mass(i)=
+      print*, 'xmass=', xmass(numpoint,i)
+    end do
+    print*, compoint(numpoint) 
+  endif
+
+
   ! If a release point contains no particles, stop and issue error message
   !***********************************************************************
@@ -536,4 +562,8 @@
         write(*,*) 'after simulation stops.'
         write(*,*) 'Make files COMMAND and RELEASES consistent.'
+        write(*,*) jul1, ' < ' , bdate 
+        write(*,*) ' .or. '
+        write(*,*) jul2 , ' > ', edate
+        
         stop
       endif
@@ -563,4 +593,9 @@
   endif
 
+  if (verbosity.gt.1 .and. numpoint.eq.1) then ! verbosity 2 or larger
+    print*, 'ireleasestart(',numpoint,')', ireleasestart(numpoint) 
+    print*, 'ireleaseend(',numpoint,')', ireleaseend(numpoint) 
+  endif
+
   ! Determine the release rate (particles per second) and total number
   ! of particles released during the simulation
Index: src/readspecies.f90
===================================================================
--- src/readspecies.f90	(revision b4d29ce9942e7817568d557b23ac2d4ccb3bfb37)
+++ src/readspecies.f90	(revision 43c86848adb64a2282787e3e7edec499b823078a)
@@ -103,5 +103,8 @@
   write(aspecnumb,'(i3.3)') specnum(pos_spec)
   open(unitspecies,file=path(1)(1:length(1))//'SPECIES/SPECIES_'//aspecnumb,status='old',form='formatted',err=998)
-  !write(*,*) 'reading SPECIES',specnum(pos_spec)
+ 
+  if (verbosity.gt.0) then
+    write(*,*) 'reading SPECIES',specnum(pos_spec)
+  endif
 
   ASSSPEC=.FALSE.
