Index: options/OUTGRID
===================================================================
--- options/OUTGRID	(revision 9397d0ff4a7392463176bf1766cadace84c03917)
+++ options/OUTGRID	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -13,10 +13,10 @@
 !*******************************************************************************
 &OUTGRID
- OUTLON0=    -25.00,
- OUTLAT0=     10.00,
- NUMXGRID=       85,
- NUMYGRID=       65,
- DXOUT=        1.00,
- DYOUT=        1.00,
- OUTHEIGHTS=  100.0, 500.0, 1000.0 , 50000.0,
+ OUTLON0=    -25.00, ! GEOGRAPHYICAL LONGITUDE OF LOWER LEFT CORNER OF OUTPUT GRID
+ OUTLAT0=     10.00, ! GEOGRAPHYICAL LATITUDE OF LOWER LEFT CORNER OF OUTPUT GRID
+ NUMXGRID=       85, ! NUMBER OF GRID POINTS IN X DIRECTION (= No. of cells + 1)
+ NUMYGRID=       65, ! NUMBER OF GRID POINTS IN Y DIRECTION (= No. of cells + 1)
+ DXOUT=        1.00, ! GRID DISTANCE IN X DIRECTION
+ DYOUT=        1.00, ! GRID DISTANCE IN Y DIRECTION
+ OUTHEIGHTS=  100.0, 500.0, 1000.0 , 50000.0 ! HEIGHT OF LEVELS (UPPER BOUNDARY)
  /
Index: options/SPECIES/SPECIES_009
===================================================================
--- options/SPECIES/SPECIES_009	(revision 8d70e43d4b1d277004f61f2e5c1befdddeeda5e3)
+++ options/SPECIES/SPECIES_009	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -12,5 +12,5 @@
  PDSIGMA=0.0,                 ! Dry deposition (particles) - dsig
  PDRYVEL=-9.99,               ! Alternative: dry deposition velocity
- PRELDIFF=1,3,                ! Dry deposition (gases) - D
+ PRELDIFF=1.3,                ! Dry deposition (gases) - D
  PHENRY=6000.0,               ! Dry deposition (gases) - Henrys const.
  PF0=-9,                      ! Dry deposition (gases) - f0 (reactivity)
Index: options/SPECIES/SPECIES_012
===================================================================
--- options/SPECIES/SPECIES_012	(revision 95a45d34ce18935ea257ed298f98e77418e8f2e1)
+++ options/SPECIES/SPECIES_012	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -1,4 +1,4 @@
 &SPECIES_PARAMS
- PSPECIES="SO4-aero",        ! Tracer name
+ PSPECIES="SO4-aero",         ! Tracer name
  PDECAY=-9.9,                 ! Species half life
  PWETA_GAS=-0.9E-9,           ! Below-cloud scavenging (gases) - A (weta_gas)
Index: options/SPECIES/SPECIES_016
===================================================================
--- options/SPECIES/SPECIES_016	(revision 95a45d34ce18935ea257ed298f98e77418e8f2e1)
+++ options/SPECIES/SPECIES_016	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -1,5 +1,5 @@
 &SPECIES_PARAMS
- PSPECIES="Cs-137",          ! Tracer name
- PDECAY=-9.9,                 ! Species half life
+ PSPECIES="Cs-137",           ! Tracer name
+ PDECAY=946.08E6,             ! Species half life
  PWETA_GAS=-0.9E-9,           ! Below-cloud scavenging (gases) - A (weta_gas)
  PWETB_GAS=-9.9,              ! Below-cloud scavenging (gases) - B (wetb_gas)
Index: options/SPECIES/SPECIES_018
===================================================================
--- options/SPECIES/SPECIES_018	(revision 95a45d34ce18935ea257ed298f98e77418e8f2e1)
+++ options/SPECIES/SPECIES_018	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -1,4 +1,4 @@
 &SPECIES_PARAMS
- PSPECIES="Ru-106",          ! Tracer name
+ PSPECIES="Ru-106",           ! Tracer name
  PDECAY=31536000.0,           ! Species half life
  PWETA_GAS=-0.9E-9,           ! Below-cloud scavenging (gases) - A (weta_gas)
Index: options/SPECIES/SPECIES_025
===================================================================
--- options/SPECIES/SPECIES_025	(revision ce1e95bb46b897cbb4fced80ed9ff6075239db9e)
+++ options/SPECIES/SPECIES_025	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -1,4 +1,4 @@
 &SPECIES_PARAMS
- PSPECIES="AERO-TRACE",       ! Tracer name
+ PSPECIES="AERO-TRACER",      ! Tracer name
  PDECAY=-9.9,                 ! Species half life
  PWETA_GAS=-0.9E-9,           ! Below-cloud scavenging (gases) - A (weta_gas)
Index: options/SPECIES/SPECIES_028
===================================================================
--- options/SPECIES/SPECIES_028	(revision 341f4b7eb1c45f4749b96fc8dbea2dfff30140f2)
+++ options/SPECIES/SPECIES_028	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -2,5 +2,5 @@
  PSPECIES="C3H8            ",
  PWEIGHTMOLAR=  44.0000000    ,
- POHCCONST=  1.55-E17,
+ POHCCONST=  1.55E-17,
  POHDCONST=  61.0000000    ,
  POHNCONST=  2.00000000    ,
Index: options/SPECIES/specoverview.f90
===================================================================
--- options/SPECIES/specoverview.f90	(revision 95a45d34ce18935ea257ed298f98e77418e8f2e1)
+++ options/SPECIES/specoverview.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -19,4 +19,5 @@
 ! along with FLEXPART.  If not, see <http://www.gnu.org/licenses/>.   *
 !**********************************************************************
+program specoverview
   implicit none
 
@@ -27,89 +28,84 @@
   real :: pdsigma, pdryvel, pweightmolar, pohcconst, pohdconst, pohnconst
   real :: pcrain_aero, pcsnow_aero, pccn_aero, pin_aero
-  integer :: readerror, unitspecies, specnumber
+  real :: parea_dow(7), parea_hour(24), ppoint_dow(7), ppoint_hour(24)
+  integer :: ierr, unitspecies, specnumber
 
-! declare namelist
+  ! declare namelist
   namelist /species_params/ &
        pspecies, pdecay, pweta_gas, pwetb_gas, &
        pcrain_aero, pcsnow_aero, pccn_aero, pin_aero, &
        preldiff, phenry, pf0, pdensity, pdquer, &
-       pdsigma, pdryvel, pweightmolar, pohcconst, pohdconst, pohnconst 
+       pdsigma, pdryvel, pweightmolar, pohcconst, pohdconst, pohnconst, &
+       parea_dow, parea_hour, ppoint_dow, ppoint_hour
 
   unitspecies=4
 
-  write(*,*) '    Species   |       |   WetDep(gas)   |    DryDep(gas)   |WetDep(below-C)| WetDep(in-C)|'//& 
-             '     DryDepo(particles)  Altern| Radioact.  |     OH Reaction      |'
+  write(*,*) '    Species   |       |   WetDep(gas)   |    DryDep(gas)   |WetDep(below-C)| WetDep(in-C)|'// & 
+       '     DryDepo(particles)  Altern| Radioact.  |     OH Reaction      |'
 
-  write(*,*) '    Name      |molwght| A          B    | D    H        f0 | Crain   Csnow |  ccn    in  |' //&
-             '   rho    dquer    dsig    vd  | Halflife[s]|   C**     D[T]  N*** |'
+  write(*,*) '    Name      |molwght| A          B    | D    H        f0 | Crain   Csnow |  ccn    in  |'// &
+       '   rho    dquer    dsig    vd  | Halflife[s]|   C**     D[T]  N*** |'
 
-  write(*,*) '--------------|-------|-----------------|------------------|---------------|-------------|'//&
-             '-------------------------------|------------|----------------------|'
+  write(*,*) '--------------|-------|-----------------|------------------|---------------|-------------|'// &
+       '-------------------------------|------------|----------------------|'
 
 
-! write(*,*) '    Specie    | Radioact.  | WetDep(gas)     |WetDep(below-C)| WetDep(in-C)|     DryDepo(gas)  |'//& 
-!            '     DryDepo(particles)  Altern|       |     OH Reaction      |'
-! write(*,*) '    Name      | Halflife[s]|  A         B    |  Crain  Csnow | ccn    in   |   D      H    f0  |' //&
-!            '   rho    dquer    dsig    vd  |molwght|   C**     D[T]  N*** |'
-! write(*,*) '--------------|------------|-----------------|---------------|-------------|-------------------|'//&
-!            '-------------------------------|-------|----------------------|'
+  do specnumber=1,100
 
-  do specnumber=1,100
-  
-  write (aspec,'(i0.3)') specnumber
-  speciesfn='SPECIES_'//aspec
- 
-! write(*,*) 'Processing: ',speciesfn
+     write (aspec,'(i0.3)') specnumber
+     speciesfn='SPECIES_'//aspec
 
-  pspecies="" ! read failure indicator value
-  pdecay=-9.9
-  pweta_gas=-0.9E-09
-  pwetb_gas=0.0
-  pcrain_aero=-9.9
-  pcsnow_aero=-9.9
-  pccn_aero=-9.9
-  pin_aero=-9.9
-  preldiff=-9.9
-  phenry=0.0
-  pf0=0.0
-  pdensity=-0.9E09
-  pdquer=0.0
-  pdsigma=0.0
-  pdryvel=-9.99
-  pohcconst=-9.9
-  pohdconst=-9.9
-  pohnconst=2.0
-  pweightmolar=-9.9
+     ! write(*,*) 'Processing: ',speciesfn
 
-! Open the SPECIES file and read species names and properties
-!************************************************************
-  open(unitspecies,file=speciesfn,status='old',form='formatted',err=998)
-  read(unitspecies,species_params,err=998)
-  close(unitspecies)
-  
-  write(*,45) specnumber,' ',pspecies,'|',pweightmolar,'|',pweta_gas,' ',pwetb_gas,'|', &
-              preldiff,' ',phenry,' ',pf0,'|', &
-              pcrain_aero,' ',pcsnow_aero,'|',pccn_aero,' ',pin_aero,'|', &
-              pdensity,pdquer,pdsigma,pdryvel,'|',pdecay,'|',pohcconst,pohdconst,pohnconst,'|'
+     pspecies="" ! read failure indicator value
+     pdecay=-9.9
+     pweta_gas=-0.9E-09
+     pwetb_gas=0.0
+     pcrain_aero=-9.9
+     pcsnow_aero=-9.9
+     pccn_aero=-9.9
+     pin_aero=-9.9
+     preldiff=-9.9
+     phenry=0.0
+     pf0=0.0
+     pdensity=-0.9E09
+     pdquer=0.0
+     pdsigma=0.0
+     pdryvel=-9.99
+     pohcconst=-9.9
+     pohdconst=-9.9
+     pohnconst=2.0
+     pweightmolar=-9.9
 
-45 format(i3,a1,a11,a1,f7.1,a1,e8.1,a1,f8.2,a1, &
+     ! Open the SPECIES file and read species names and properties
+     !************************************************************
+     open(unitspecies,file=speciesfn,status='old',form='formatted',iostat=ierr)
+     if (ierr /= 0) then
+        ! Report missing files below 40
+        if (specnumber <= 40) then
+           write(*,'(i3,2(1x,a))') specnumber, 'no such file:', trim(speciesfn)
+        end if
+        cycle
+     end if
+     read(unitspecies,species_params)  ! to skip errors add: ,err=998
+     close(unitspecies)
+
+     write(*,45) specnumber,' ',pspecies,'|',pweightmolar,'|',pweta_gas,' ',pwetb_gas,'|', &
+          preldiff,' ',phenry,' ',pf0,'|', &
+          pcrain_aero,' ',pcsnow_aero,'|',pccn_aero,' ',pin_aero,'|', &
+          pdensity,pdquer,pdsigma,pdryvel,'|',pdecay,'|',pohcconst,pohdconst,pohnconst,'|'
+
+45   format(i3,a1,a11,a1,f7.1,a1,e8.1,a1,f8.2,a1, &
           f4.1,a1,e8.1,a1,f4.1,a1, &
           f7.1,a1,f7.1,a1,f6.1,a1,f6.1,a1, &
           e8.1,e9.1,f7.1,f7.2,a1,f12.1,a1,e8.1,f7.1,f7.1,a1)
 
-!  write(*,45) specnumber,' ',pspecies,'|',pdecay,'|',pweta_gas,' ',pwetb_gas,'|',pcrain_aero,' ', &
-!            pcsnow_aero,'|',pccn_aero,' ',pin_aero,'|',preldiff,' ',phenry,' ',pf0,'|', &
-!             pdensity,pdquer,pdsigma,pdryvel,'|',pweightmolar,'|',pohcconst,pohdconst,pohnconst,'|'
+998  continue
+  enddo
 
-!5 format(i3,a1,a11,a1,f12.1,a1,e8.1,a1,f8.2,a1,f7.1,a1,f7.1,a1,f6.1,a1,f6.1,a1,f5.1,a1,e8.1,a1,f4.1,a1, &
-!         e8.1,e9.1,f7.1,f7.2,a1,f7.1,a1,e8.1,f7.1,f7.1,a1)
-            
-998 continue
-enddo
+  write(*,*) '** unit [cm^3/molec/s] (in FLEXPART version 9.2 and below this had unit [cm3/s], note the unit is now changed!)'
+  write(*,*) '*** no unit'
 
-write(*,*) '** unit [cm^3/molec/s] (in FLEXPART version 9.2 and below this had unit [cm3/s], note the unit is now changed!)'
-write(*,*) '*** no unit'
+  print*,'rho: density'
 
- print*,'rho: density'
-
-end
+end program specoverview
Index: src/FLEXPART.f90
===================================================================
--- src/FLEXPART.f90	(revision 49e63b96c7b151b073dea74ff5bc766921de3b31)
+++ src/FLEXPART.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -44,5 +44,5 @@
   implicit none
 
-  integer :: i,j,ix,jy,inest, iopt
+  integer :: i, j, ix, jy, inest, iopt
   integer :: idummy = -320
   character(len=256) :: inline_options  !pathfile, flexversion, arg2
@@ -62,5 +62,5 @@
   ! FLEXPART version string
   flexversion_major = '10' ! Major version number, also used for species file names
-  flexversion='Version '//trim(flexversion_major)//'.4.1 (2020-08-05)'
+  flexversion='Version '//trim(flexversion_major)//'.4.1 (2022-11-09)'
   verbosity=0
 
@@ -69,12 +69,12 @@
 
   inline_options='none'
-  select case (iargc())
+  select case (command_argument_count())  ! Portable standard Fortran intrinsic procedure
   case (2)
-    call getarg(1,arg1)
+    call get_command_argument(1,arg1)     ! Portable standard Fortran intrinsic procedure
     pathfile=arg1
-    call getarg(2,arg2)
+    call get_command_argument(2,arg2)     ! Portable standard Fortran intrinsic procedure
     inline_options=arg2
   case (1)
-    call getarg(1,arg1)
+    call get_command_argument(1,arg1)     ! Portable standard Fortran intrinsic procedure
     pathfile=arg1
     if (arg1(1:1).eq.'-') then
@@ -90,5 +90,5 @@
   print*,'Welcome to FLEXPART ', trim(flexversion)
   print*,'FLEXPART is free software released under the GNU General Public License.'
- 
+
 
   ! Ingest inline options
@@ -112,12 +112,12 @@
     endif
     if (trim(inline_options).eq.'-i') then
-       print*, 'Info mode: provide detailed run specific information and stop'
-       verbosity=1
-       info_flag=1
+      print*, 'Info mode: provide detailed 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
+      print*, 'Info mode: provide more detailed run specific information and stop'
+      verbosity=2
+      info_flag=1
     endif
   endif
@@ -138,5 +138,5 @@
      !print*,'length(4)',length(4)
      !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
@@ -159,5 +159,5 @@
       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
   endif
 
@@ -217,7 +217,7 @@
   ! both for the mother domain and eventual nests
   !**********************************************
- 
-  if (verbosity.gt.0) then
-     write(*,*) 'call gridcheck'
+
+  if (verbosity.gt.0) then
+    write(*,*) 'call gridcheck'
   endif
 
@@ -258,5 +258,5 @@
 
   if (verbosity.eq.1) then
-     print*,'call readreceptors'
+    print*,'call readreceptors'
   endif
   call readreceptors
@@ -267,5 +267,4 @@
   !call readspecies
 
-
   ! Read the landuse inventory
   !***************************
@@ -329,5 +328,5 @@
     if (verbosity.gt.0) then
       print*,'numpart=0, numparticlecount=0'
-    endif    
+    endif
     numpart=0
     numparticlecount=0
Index: src/FLEXPART_MPI.f90
===================================================================
--- src/FLEXPART_MPI.f90	(revision 92fab6545ef2a8e57cadc977df94b6b510318a1d)
+++ src/FLEXPART_MPI.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -44,5 +44,5 @@
   implicit none
 
-  integer :: i,j,ix,jy,inest
+  integer :: i, j, ix, jy, inest, iopt
   integer :: idummy = -320
   character(len=256) :: inline_options  !pathfile, flexversion, arg2
@@ -71,7 +71,8 @@
   call gasdev1(idummy,rannumb(maxrand),rannumb(maxrand-1))
 
+
   ! FLEXPART version string
   flexversion_major = '10' ! Major version number, also used for species file names
-  flexversion='Ver. '//trim(flexversion_major)//'.2beta MPI (2017-08-01)'
+  flexversion='Version '//trim(flexversion_major)//'.4.1 MPI (2022-11-09)'
   verbosity=0
 
@@ -80,12 +81,12 @@
 
   inline_options='none'
-  select case (iargc())
+  select case (command_argument_count())  ! Portable standard Fortran intrinsic procedure
   case (2)
-    call getarg(1,arg1)
+    call get_command_argument(1,arg1)     ! Portable standard Fortran intrinsic procedure
     pathfile=arg1
-    call getarg(2,arg2)
+    call get_command_argument(2,arg2)     ! Portable standard Fortran intrinsic procedure
     inline_options=arg2
   case (1)
-    call getarg(1,arg1)
+    call get_command_argument(1,arg1)     ! Portable standard Fortran intrinsic procedure
     pathfile=arg1
     if (arg1(1:1).eq.'-') then
@@ -97,19 +98,30 @@
   end select
   
-  if (lroot) then
   ! Print the GPL License statement
   !*******************************************************
+  if (lroot) then
     print*,'Welcome to FLEXPART ', trim(flexversion)
     print*,'FLEXPART is free software released under the GNU General Public License.'
   endif
-  
+
+
+  ! Ingest inline options
+  !*******************************************************
   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'
+    print*,'inline_options:',inline_options
+    !verbose mode
+    iopt=index(inline_options,'v') 
+    if (iopt.gt.0) then
       verbosity=1
-    endif
-    if (trim(inline_options).eq.'-v2') then
-      print*, 'Verbose mode 2: display more detailed information during run'
-      verbosity=2
+      !print*, iopt, inline_options(iopt+1:iopt+1)
+      if  (trim(inline_options(iopt+1:iopt+1)).eq.'2') then
+        print*, 'Verbose mode 2: display more detailed information during run'
+        verbosity=2
+      endif
+    endif
+    !debug mode 
+    iopt=index(inline_options,'d')
+    if (iopt.gt.0) then
+      debug_mode=.true.
     endif
     if (trim(inline_options).eq.'-i') then
@@ -125,4 +137,11 @@
   endif
            
+  if (verbosity.gt.0) then
+    print*, 'nxmax=',nxmax
+    print*, 'nymax=',nymax
+    print*, 'nzmax=',nzmax
+    print*,'nxshift=',nxshift 
+  endif
+  
   if (verbosity.gt.0) then
     write(*,*) 'call readpaths'
@@ -133,5 +152,5 @@
      !print*,'length(4)',length(4)
      !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
@@ -157,12 +176,11 @@
   endif
 
-  ! Initialize arrays in com_mod 
+  ! Initialize arrays in com_mod
   !*****************************
-
   if(.not.(lmpreader.and.lmp_use_reader)) call com_mod_allocate_part(maxpart_mpi)
 
 
-! Read the age classes to be used
-!********************************
+  ! Read the age classes to be used
+  !********************************
   if (verbosity.gt.0 .and. lroot) then
     write(*,*) 'call readageclasses'
@@ -185,4 +203,7 @@
   ! Detect metdata format
   !**********************
+  if (verbosity.gt.0 .and. lroot) then
+    write(*,*) 'call detectformat'
+  endif
 
   metdata_format = detectformat()
@@ -207,7 +228,7 @@
   call com_mod_allocate_nests
 
-! Read the model grid specifications,
-! both for the mother domain and eventual nests
-!**********************************************
+  ! Read the model grid specifications,
+  ! both for the mother domain and eventual nests
+  !**********************************************
 
   if (verbosity.gt.0 .and. lroot) then
@@ -221,5 +242,4 @@
   end if
 
-
   if (verbosity.gt.1 .and. lroot) then   
     call system_clock(count_clock, count_rate, count_max)
@@ -227,5 +247,4 @@
   endif      
 
-
   if (verbosity.gt.0 .and. lroot) then
     write(*,*) 'call gridcheck_nests'
@@ -233,10 +252,9 @@
   call gridcheck_nests
 
-
-! Read the output grid specifications
-!************************************
-
-  if (verbosity.gt.0 .and. lroot) then
-    WRITE(*,*) 'call readoutgrid'
+  ! Read the output grid specifications
+  !************************************
+
+  if (verbosity.gt.0 .and. lroot) then
+    write(*,*) 'call readoutgrid'
   endif
 
@@ -246,5 +264,5 @@
     call readoutgrid_nest
     if (verbosity.gt.0.and.lroot) then
-      WRITE(*,*) '# readoutgrid_nest'
+      write(*,*) '# readoutgrid_nest'
     endif
   endif
@@ -263,5 +281,4 @@
   !call readspecies
 
-
   ! Read the landuse inventory
   !***************************
@@ -272,7 +289,6 @@
   call readlanduse
 
-
-! Assign fractional cover of landuse classes to each ECMWF grid point
-!********************************************************************
+  ! Assign fractional cover of landuse classes to each ECMWF grid point
+  !********************************************************************
 
   if (verbosity.gt.0 .and. lroot) then
@@ -289,7 +305,6 @@
   call readreleases
 
-
-! Read and compute surface resistances to dry deposition of gases
-!****************************************************************
+  ! Read and compute surface resistances to dry deposition of gases
+  !****************************************************************
 
   if (verbosity.gt.0 .and. lroot) then
@@ -305,5 +320,4 @@
     print*,'call coordtrafo'
   endif
-
 
   ! Initialize all particles to non-existent
@@ -337,9 +351,7 @@
   endif
 
-
   ! Calculate volume, surface area, etc., of all output grid cells
   ! Allocate fluxes and OHfield if necessary
   !***************************************************************
-
 
   if (verbosity.gt.0 .and. lroot) then
@@ -387,5 +399,5 @@
 
     call writeheader
-! FLEXPART 9.2 ticket ?? write header in ASCII format 
+    ! FLEXPART 9.2 ticket ?? write header in ASCII format 
     call writeheader_txt
 
@@ -445,6 +457,6 @@
   end if
 
-! Calculate particle trajectories
-!********************************
+  ! Calculate particle trajectories
+  !********************************
 
   if (verbosity.gt.0.and. lroot) then
Index: src/gridcheck_ecmwf.f90
===================================================================
--- src/gridcheck_ecmwf.f90	(revision 92fab6545ef2a8e57cadc977df94b6b510318a1d)
+++ src/gridcheck_ecmwf.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -103,4 +103,6 @@
   ! OPENING OF DATA FILE (GRIB CODE)
   !
+  write(*,*)   'Reading: '//path(3)(1:length(3)) &
+       //trim(wfname(ifn))
 5 call grib_open_file(ifile,path(3)(1:length(3)) &
        //trim(wfname(ifn)),'r',iret)
@@ -418,5 +420,5 @@
 
   nuvz=iumax
-  nwz =iwmax
+  nwz =iwmax + 1       ! +1 needed if input contains only lower levels
   if(nuvz.eq.nlev_ec) nwz=nlev_ec+1
 
Index: src/gridcheck_gfs.f90
===================================================================
--- src/gridcheck_gfs.f90	(revision 92fab6545ef2a8e57cadc977df94b6b510318a1d)
+++ src/gridcheck_gfs.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -111,4 +111,6 @@
   ! OPENING OF DATA FILE (GRIB CODE)
   !
+  write(*,*)     'Reading: '//path(3)(1:length(3)) &
+         //trim(wfname(ifn))
 5   call grib_open_file(ifile,path(3)(1:length(3)) &
          //trim(wfname(ifn)),'r',iret)
Index: src/gridcheck_nests.f90
===================================================================
--- src/gridcheck_nests.f90	(revision 92fab6545ef2a8e57cadc977df94b6b510318a1d)
+++ src/gridcheck_nests.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -77,4 +77,7 @@
   igrib=0
   iret=0
+
+  write(*,*) 'Reading: '//path(numpath+2*(l-1)+1) &
+         (1:length(numpath+2*(l-1)+1))//trim(wfnamen(l,ifn))
 
 5   call grib_open_file(ifile,path(numpath+2*(l-1)+1) &
@@ -326,5 +329,5 @@
 
   nuvzn=iumax
-  nwzn=iwmax
+  nwzn=iwmax + 1       ! +1 needed if input contains only lower levels
   if(nuvzn.eq.nlev_ec) nwzn=nlev_ecn+1
 
Index: src/par_mod.f90
===================================================================
--- src/par_mod.f90	(revision 92fab6545ef2a8e57cadc977df94b6b510318a1d)
+++ src/par_mod.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -131,4 +131,7 @@
   !*********************************************
   
+  ! NOTE: dimensioning of zsec2 in gridcheck depends on nuvzmax, therefore nuvzmax
+  ! must represent all levels even if only lower levels are in the input files.
+
   ! ECMWF
 ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92,nxshift=359 ! 1.0 degree 92 level
Index: src/readreleases.f90
===================================================================
--- src/readreleases.f90	(revision 92fab6545ef2a8e57cadc977df94b6b510318a1d)
+++ src/readreleases.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -555,4 +555,7 @@
         ireleaseend(numpoint)=int((jul2-bdate)*86400.)
       else
+        write(*,*) 'FLEXPART MODEL WARNING'
+        write(*,*) 'Too few particles to randomize release,'
+        write(*,*) 'release time set to mid-point of release interval'
         ireleasestart(numpoint)=int((julm-bdate)*86400.)
         ireleaseend(numpoint)=int((julm-bdate)*86400.)
Index: src/readspecies.f90
===================================================================
--- src/readspecies.f90	(revision 92fab6545ef2a8e57cadc977df94b6b510318a1d)
+++ src/readspecies.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -104,4 +104,6 @@
   specnum(pos_spec)=id_spec
   write(aspecnumb,'(i3.3)') specnum(pos_spec)
+  write(*,*) 'Reading: '// &
+                        path(1)(1:length(1))//'SPECIES/SPECIES_'//aspecnumb
   open(unitspecies,file=path(1)(1:length(1))//'SPECIES/SPECIES_'//aspecnumb,status='old',form='formatted',err=998)
 !write(*,*) 'reading SPECIES',specnum(pos_spec)
Index: src/readwind_ecmwf.f90
===================================================================
--- src/readwind_ecmwf.f90	(revision 92fab6545ef2a8e57cadc977df94b6b510318a1d)
+++ src/readwind_ecmwf.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -103,4 +103,6 @@
 ! OPENING OF DATA FILE (GRIB CODE)
 !
+  write(*,*)   'Reading: '//path(3)(1:length(3)) &
+       //trim(wfname(indj))
 5 call grib_open_file(ifile,path(3)(1:length(3)) &
        //trim(wfname(indj)),'r',iret)
@@ -386,12 +388,12 @@
   endif
 
-  if(levdiff2.eq.0) then
-    iwmax=nlev_ec+1
+!  if(levdiff2.eq.0) then
+    iwmax=iwmax+1
     do i=0,nxmin1
       do j=0,nymin1
-        wwh(i,j,nlev_ec+1)=0.
+        wwh(i,j,iwmax)=0.
       end do
     end do
-  endif
+!  endif
 
 ! For global fields, assign the leftmost data column also to the rightmost
Index: src/readwind_ecmwf_mpi.f90
===================================================================
--- src/readwind_ecmwf_mpi.f90	(revision 92fab6545ef2a8e57cadc977df94b6b510318a1d)
+++ src/readwind_ecmwf_mpi.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -113,4 +113,6 @@
 ! OPENING OF DATA FILE (GRIB CODE)
 !
+  write(*,*)   'Reading: '//path(3)(1:length(3)) &
+       //trim(wfname(indj))
 5 call grib_open_file(ifile,path(3)(1:length(3)) &
        //trim(wfname(indj)),'r',iret)
@@ -394,12 +396,12 @@
   endif
 
-  if(levdiff2.eq.0) then
-    iwmax=nlev_ec+1
+!  if(levdiff2.eq.0) then
+    iwmax=iwmax+1
     do i=0,nxmin1
       do j=0,nymin1
-        wwh(i,j,nlev_ec+1)=0.
+        wwh(i,j,iwmax)=0.
       end do
     end do
-  endif
+!  endif
 
 ! For global fields, assign the leftmost data column also to the rightmost
Index: src/readwind_gfs.f90
===================================================================
--- src/readwind_gfs.f90	(revision 92fab6545ef2a8e57cadc977df94b6b510318a1d)
+++ src/readwind_gfs.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -103,4 +103,6 @@
 
   !HSO
+  write(*,*)   'Reading: '//path(3)(1:length(3)) &
+         //trim(wfname(indj))
   call grib_open_file(ifile,path(3)(1:length(3)) &
          //trim(wfname(indj)),'r',iret)
Index: src/readwind_nests.f90
===================================================================
--- src/readwind_nests.f90	(revision 92fab6545ef2a8e57cadc977df94b6b510318a1d)
+++ src/readwind_nests.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -79,5 +79,6 @@
   ! OPENING OF DATA FILE (GRIB CODE)
   !
-
+    write(*,*)   'Reading: '//path(numpath+2*(l-1)+1) &
+         (1:length(numpath+2*(l-1)+1))//trim(wfnamen(l,indj))
 5   call grib_open_file(ifile,path(numpath+2*(l-1)+1) &
          (1:length(numpath+2*(l-1)+1))//trim(wfnamen(l,indj)),'r')
@@ -365,12 +366,12 @@
   endif
 
-  if(levdiff2.eq.0) then
-    iwmax=nlev_ec+1
+!  if(levdiff2.eq.0) then
+    iwmax=iwmax+1
     do i=0,nxn(l)-1
       do j=0,nyn(l)-1
-        wwhn(i,j,nlev_ec+1,l)=0.
+        wwhn(i,j,iwmax,l)=0.
       end do
     end do
-  endif
+!  endif
 
   do i=0,nxn(l)-1
Index: src/writeheader_txt.f90
===================================================================
--- src/writeheader_txt.f90	(revision 92fab6545ef2a8e57cadc977df94b6b510318a1d)
+++ src/writeheader_txt.f90	(revision dba422187e10650e160348f0a0271adfac6b8b88)
@@ -52,5 +52,5 @@
   
   write(unitheader,*) '# ibdate,ibtime, iedate, ietime, flexversion'
-  write(unitheader,*) ibdate, ibtime, iedate, ietime, trim(flexversion) !  'FLEXPART V9.0'
+  write(unitheader,*) ibdate, ibtime, iedate, ietime, trim(flexversion)
   !if (ldirect.eq.1) then
   !  write(unitheader,*) ibdate,ibtime,trim(flexversion) !  'FLEXPART V9.0'
