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
