Index: src/FLEXPART.f90
===================================================================
--- src/FLEXPART.f90	(revision e200b7adb07d4dfa7bf42f7cb43e0c85b4dbf894)
+++ src/FLEXPART.f90	(revision f13406cf18bf27ac76cdb58b9abebb11329d6757)
@@ -49,4 +49,6 @@
   integer :: i,j,ix,jy,inest
   integer :: idummy = -320
+  character(len=256) :: inline_options  !pathfile, flexversion, arg2
+
 
   ! Generate a large number of random numbers
@@ -58,25 +60,106 @@
   call gasdev1(idummy,rannumb(maxrand),rannumb(maxrand-1))
 
+  ! 
+  flexversion='Version 9.1.8  (2013-12-08)'
+  !verbosity=0
+  ! Read the pathnames where input/output files are stored
+  !*******************************************************
+
+  inline_options='none'
+  select case (iargc())
+  case (2)
+    call getarg(1,arg1)
+    pathfile=arg1
+    call getarg(2,arg2)
+    inline_options=arg2
+  case (1)
+    call getarg(1,arg1)
+    pathfile=arg1
+    verbosity=0
+    if (arg1(1:1).eq.'-') then
+        write(pathfile,'(a11)') './pathnames'
+        inline_options=arg1 
+    endif
+  case (0)
+    write(pathfile,'(a11)') './pathnames'
+    verbosity=0
+  end select
+  
+    if (inline_options(1:1).eq.'-') then
+      print*, 'inline options=', inline_options       
+      if (trim(inline_options).eq.'-v'.or.trim(inline_options).eq.'-v1') then
+         print*, 'verbose mode 1: additional information will be displayed'
+         verbosity=1
+      endif
+      if (trim(inline_options).eq.'-v2') then
+         print*, 'verbose mode 2: additional information will be displayed'
+         verbosity=2
+      endif
+      if (trim(inline_options).eq.'-i') then
+         print*, 'info mode: will provide run specific information and stop'
+         verbosity=1
+         info_flag=1
+      endif
+      if (trim(inline_options).eq.'-i2') then
+         print*, 'info mode: will provide run specific information and stop'
+         verbosity=2
+         info_flag=1
+      endif
+    endif
+
+
   ! Print the GPL License statement
   !*******************************************************
-  print*,'Welcome to FLEXPART Version 9.0'
+  print*,'Welcome to FLEXPART', trim(flexversion)
   print*,'FLEXPART is free software released under the GNU Genera'// &
        'l Public License.'
-
-  ! Read the pathnames where input/output files are stored
-  !*******************************************************
-
-  call readpaths
+            
+  if (verbosity.gt.0) then
+        WRITE(*,*) 'call readpaths'
+  endif 
+  call readpaths(pathfile)
+   
+ 
+  if (verbosity.gt.1) then !show clock info 
+     !print*,'length(4)',length(4)
+     !count=0,count_rate=1000
+     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
+
 
   ! Read the user specifications for the current model run
   !*******************************************************
 
+  if (verbosity.gt.0) then
+        WRITE(*,*) 'call readcommand'
+  endif
   call readcommand
+  if (verbosity.gt.0) then
+        WRITE(*,*) '    ldirect=', ldirect
+        WRITE(*,*) '    ibdate,ibtime=',ibdate,ibtime
+        WRITE(*,*) '    iedate,ietime=', iedate,ietime
+        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     
+  endif
 
 
   ! Read the age classes to be used
   !********************************
-
+  if (verbosity.gt.0) then
+        WRITE(*,*) 'call readageclasses'
+  endif
   call readageclasses
+
+  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     
+ 
 
 
@@ -84,12 +167,28 @@
   !******************************************************************
 
+  if (verbosity.gt.0) then
+        WRITE(*,*) 'call readavailable'
+  endif  
   call readavailable
-
 
   ! Read the model grid specifications,
   ! both for the mother domain and eventual nests
   !**********************************************
+ 
+  if (verbosity.gt.0) then
+     WRITE(*,*) 'call gridcheck'
+  endif
 
   call gridcheck
+
+  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 (verbosity.gt.0) then
+        WRITE(*,*) 'call gridcheck_nests'
+  endif  
   call gridcheck_nests
 
@@ -98,13 +197,24 @@
   !************************************
 
+  if (verbosity.gt.0) then
+        WRITE(*,*) 'call readoutgrid'
+  endif
+
   call readoutgrid
-  if (nested_output.eq.1) call readoutgrid_nest
-
+
+  if (nested_output.eq.1) then
+          call readoutgrid_nest
+    if (verbosity.gt.0) then
+        WRITE(*,*) '# readoutgrid_nest'
+    endif
+  endif
 
   ! Read the receptor points for which extra concentrations are to be calculated
   !*****************************************************************************
 
+  if (verbosity.eq.1) then
+     print*,'call readreceptors'
+  endif
   call readreceptors
-
 
   ! Read the physico-chemical species property table
@@ -117,4 +227,7 @@
   !***************************
 
+  if (verbosity.gt.0) then
+    print*,'call readlanduse'
+  endif
   call readlanduse
 
@@ -123,4 +236,7 @@
   !********************************************************************
 
+  if (verbosity.gt.0) then
+    print*,'call assignland'
+  endif
   call assignland
 
@@ -130,16 +246,25 @@
   !**********************************************
 
+  if (verbosity.gt.0) then
+    print*,'call readreleases'
+  endif
   call readreleases
+
 
   ! Read and compute surface resistances to dry deposition of gases
   !****************************************************************
 
+  if (verbosity.gt.0) then
+    print*,'call readdepo'
+  endif
   call readdepo
-
 
   ! Convert the release point coordinates from geografical to grid coordinates
   !***************************************************************************
 
-  call coordtrafo
+  call coordtrafo  
+  if (verbosity.gt.0) then
+    print*,'call coordtrafo'
+  endif
 
 
@@ -147,4 +272,7 @@
   !*****************************************
 
+  if (verbosity.gt.0) then
+    print*,'Initialize all particles to non-existent'
+  endif
   do j=1,maxpart
     itra1(j)=-999999999
@@ -155,6 +283,12 @@
 
   if (ipin.eq.1) then
+    if (verbosity.gt.0) then
+      print*,'call readpartpositions'
+    endif
     call readpartpositions
   else
+    if (verbosity.gt.0) then
+      print*,'numpart=0, numparticlecount=0'
+    endif    
     numpart=0
     numparticlecount=0
@@ -166,4 +300,8 @@
   !***************************************************************
 
+
+  if (verbosity.gt.0) then
+    print*,'call outgrid_init'
+  endif
   call outgrid_init
   if (nested_output.eq.1) call outgrid_init_nest
@@ -173,6 +311,10 @@
   !******************
 
-  if (OHREA.eqv..TRUE.) &
+  if (OHREA.eqv..TRUE.) then
+    if (verbosity.gt.0) then
+       print*,'call readOHfield'
+    endif
        call readOHfield
+  endif
 
   ! Write basic information on the simulation to a file "header"
@@ -180,7 +322,25 @@
   !******************************************************************
 
+
+  if (verbosity.gt.0) then
+    print*,'call writeheader'
+  endif
+
   call writeheader
-  if (nested_output.eq.1) call writeheader_nest
-  open(unitdates,file=path(2)(1:length(2))//'dates')
+  ! FLEXPART 9.2 ticket ?? write header in ASCII format 
+  call writeheader_txt
+  !if (nested_output.eq.1) call writeheader_nest
+  if (nested_output.eq.1.and.surf_only.ne.1) call writeheader_nest
+
+  if (nested_output.eq.1.and.surf_only.eq.1) call writeheader_nest_surf
+  if (nested_output.ne.1.and.surf_only.eq.1) call writeheader_surf
+
+
+
+  !open(unitdates,file=path(2)(1:length(2))//'dates')
+
+  if (verbosity.gt.0) then
+    print*,'call openreceptors'
+  endif
   call openreceptors
   if ((iout.eq.4).or.(iout.eq.5)) call openouttraj
@@ -190,4 +350,7 @@
   !***************************************************************************
 
+  if (verbosity.gt.0) then
+    print*,'discretize release times'
+  endif
   do i=1,numpoint
     ireleasestart(i)=nint(real(ireleasestart(i))/ &
@@ -200,4 +363,8 @@
   ! Initialize cloud-base mass fluxes for the convection scheme
   !************************************************************
+
+  if (verbosity.gt.0) then
+    print*,'Initialize cloud-base mass fluxes for the convection scheme'
+  endif
 
   do jy=0,nymin1
@@ -218,4 +385,16 @@
   !********************************
 
+  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
+     print*,'call timemanager'
+  endif
+
   call timemanager
 
