Index: branches/petra/src/concoutput_nest.f90
===================================================================
--- trunk/src/concoutput_nest.f90	(revision 4)
+++ branches/petra/src/concoutput_nest.f90	(revision 36)
@@ -1,4 +1,4 @@
 !**********************************************************************
-! Copyright 1998,1999,2000,2001,2002,2005,2007,2008,2009,2010         *
+! Copyright 1998-2015                                                 *
 ! Andreas Stohl, Petra Seibert, A. Frank, Gerhard Wotawa,             *
 ! Caroline Forster, Sabine Eckhardt, John Burkhart, Harald Sodemann   *
@@ -45,4 +45,6 @@
   !                                                                            *
   !     2008 new sparse matrix format                                          *
+  !     PS, 2/2015: option to produce incremental deposition output 
+  !                 access= -> position=
   !                                                                            *
   !*****************************************************************************
@@ -112,17 +114,17 @@
 
 
-    if (ldirect.eq.1) then
-       do ks=1,nspec
-         do kp=1,maxpointspec_act
-           tot_mu(ks,kp)=1
-         end do
-       end do
-   else
-      do ks=1,nspec
-             do kp=1,maxpointspec_act
-               tot_mu(ks,kp)=xmass(kp,ks)
-             end do
-      end do
-    endif
+  if (ldirect.eq.1) then
+    do ks=1,nspec
+      do kp=1,maxpointspec_act
+        tot_mu(ks,kp)=1
+      end do
+    end do
+  else
+    do ks=1,nspec
+      do kp=1,maxpointspec_act
+        tot_mu(ks,kp)=xmass(kp,ks)
+      end do
+    end do
+  endif
 
 
@@ -162,25 +164,25 @@
   end do
 
-    do i=1,numreceptor
-      xl=xreceptor(i)
-      yl=yreceptor(i)
-      iix=max(min(nint(xl),nxmin1),0)
-      jjy=max(min(nint(yl),nymin1),0)
-      densityoutrecept(i)=rho(iix,jjy,1,2)
-    end do
-
-
-  ! Output is different for forward and backward simulations
-    do kz=1,numzgrid
-      do jy=0,numygridn-1
-        do ix=0,numxgridn-1
-          if (ldirect.eq.1) then
-            factor3d(ix,jy,kz)=1.e12/volumen(ix,jy,kz)/outnum
-          else
-            factor3d(ix,jy,kz)=real(abs(loutaver))/outnum
-          endif
-        end do
-      end do
-    end do
+  do i=1,numreceptor
+    xl=xreceptor(i)
+    yl=yreceptor(i)
+    iix=max(min(nint(xl),nxmin1),0)
+    jjy=max(min(nint(yl),nymin1),0)
+    densityoutrecept(i)=rho(iix,jjy,1,2)
+  end do
+
+
+! Output is different for forward and backward simulations
+  do kz=1,numzgrid
+    do jy=0,numygridn-1
+      do ix=0,numxgridn-1
+        if (ldirect.eq.1) then
+          factor3d(ix,jy,kz)=1.e12/volumen(ix,jy,kz)/outnum
+        else
+          factor3d(ix,jy,kz)=real(abs(loutaver))/outnum
+        endif
+      end do
+    end do
+  end do
 
   !*********************************************************************
@@ -191,178 +193,281 @@
   do ks=1,nspec
 
-  write(anspec,'(i3.3)') ks
-  if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5)) then
-    if (ldirect.eq.1) then
-      open(unitoutgrid,file=path(2)(1:length(2))//'grid_conc_nest_' &
-           //adate// &
-           atime//'_'//anspec,form='unformatted')
-    else
-      open(unitoutgrid,file=path(2)(1:length(2))//'grid_time_nest_' &
-           //adate// &
-           atime//'_'//anspec,form='unformatted')
+    write(anspec,'(i3.3)') ks
+    if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5)) then
+      if (ldirect.eq.1) then
+        open(unitoutgrid,file=path(2)(1:length(2))//'grid_conc_nest_' &
+             //adate// atime//'_'//anspec,form='unformatted')
+      else
+        open(unitoutgrid,file=path(2)(1:length(2))//'grid_time_nest_' &
+             //adate// atime//'_'//anspec,form='unformatted')
+      endif
+       write(unitoutgrid) itime
+     endif
+
+    if ((iout.eq.2).or.(iout.eq.3)) then      ! mixing ratio
+     open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_nest_' &
+          //adate// atime//'_'//anspec,form='unformatted')
+
+      write(unitoutgridppt) itime
     endif
-     write(unitoutgrid) itime
-   endif
-
-  if ((iout.eq.2).or.(iout.eq.3)) then      ! mixing ratio
-   open(unitoutgridppt,file=path(2)(1:length(2))//'grid_pptv_nest_' &
-        //adate// &
-        atime//'_'//anspec,form='unformatted')
-
-    write(unitoutgridppt) itime
-  endif
-
-  do kp=1,maxpointspec_act
-  do nage=1,nageclass
-
-    do jy=0,numygridn-1
-      do ix=0,numxgridn-1
-
-  ! WET DEPOSITION
-        if ((WETDEP).and.(ldirect.gt.0)) then
+
+    do kp=1,maxpointspec_act
+    do nage=1,nageclass
+
+      do jy=0,numygridn-1
+        do ix=0,numxgridn-1
+
+    ! WET DEPOSITION
+          if ((WETDEP).and.(ldirect.gt.0)) then
             do l=1,nclassunc
               auxgrid(l)=wetgriduncn(ix,jy,ks,kp,l,nage)
             end do
-            call mean(auxgrid,wetgrid(ix,jy), &
-                 wetgridsigma(ix,jy),nclassunc)
-  ! Multiply by number of classes to get total concentration
-            wetgrid(ix,jy)=wetgrid(ix,jy) &
-                 *nclassunc
-  ! Calculate standard deviation of the mean
-            wetgridsigma(ix,jy)= &
-                 wetgridsigma(ix,jy)* &
-                 sqrt(real(nclassunc))
-        endif
-
-  ! DRY DEPOSITION
-        if ((DRYDEP).and.(ldirect.gt.0)) then
+            call mean(auxgrid,wetgrid(ix,jy), wetgridsigma(ix,jy),nclassunc)
+    ! Multiply by number of classes to get total concentration
+            wetgrid(ix,jy)=wetgrid(ix,jy)*nclassunc
+    ! Calculate standard deviation of the mean
+            wetgridsigma(ix,jy)= wetgridsigma(ix,jy)* sqrt(real(nclassunc))
+          endif
+
+    ! DRY DEPOSITION
+          if ((DRYDEP).and.(ldirect.gt.0)) then
             do l=1,nclassunc
               auxgrid(l)=drygriduncn(ix,jy,ks,kp,l,nage)
             end do
-            call mean(auxgrid,drygrid(ix,jy), &
-                 drygridsigma(ix,jy),nclassunc)
-  ! Multiply by number of classes to get total concentration
-            drygrid(ix,jy)=drygrid(ix,jy)* &
-                 nclassunc
-  ! Calculate standard deviation of the mean
-            drygridsigma(ix,jy)= &
-                 drygridsigma(ix,jy)* &
-                 sqrt(real(nclassunc))
-        endif
-
-  ! CONCENTRATION OR MIXING RATIO
-        do kz=1,numzgrid
+            call mean(auxgrid,drygrid(ix,jy), drygridsigma(ix,jy),nclassunc)
+    ! Multiply by number of classes to get total concentration
+            drygrid(ix,jy)=drygrid(ix,jy)* nclassunc
+    ! Calculate standard deviation of the mean
+            drygridsigma(ix,jy)= drygridsigma(ix,jy)* sqrt(real(nclassunc))
+          endif
+
+    ! CONCENTRATION OR MIXING RATIO
+          do kz=1,numzgrid
             do l=1,nclassunc
               auxgrid(l)=griduncn(ix,jy,kz,ks,kp,l,nage)
             end do
-            call mean(auxgrid,grid(ix,jy,kz), &
-                 gridsigma(ix,jy,kz),nclassunc)
-  ! Multiply by number of classes to get total concentration
-            grid(ix,jy,kz)= &
-                 grid(ix,jy,kz)*nclassunc
-  ! Calculate standard deviation of the mean
-            gridsigma(ix,jy,kz)= &
-                 gridsigma(ix,jy,kz)* &
-                 sqrt(real(nclassunc))
+            call mean(auxgrid,grid(ix,jy,kz), gridsigma(ix,jy,kz),nclassunc)
+    ! Multiply by number of classes to get total concentration
+            grid(ix,jy,kz)= grid(ix,jy,kz)*nclassunc
+    ! Calculate standard deviation of the mean
+            gridsigma(ix,jy,kz)= gridsigma(ix,jy,kz)* sqrt(real(nclassunc))
+          end do
         end do
       end do
-    end do
-
-
-  !*******************************************************************
-  ! Generate output: may be in concentration (ng/m3) or in mixing
-  ! ratio (ppt) or both
-  ! Output the position and the values alternated multiplied by
-  ! 1 or -1, first line is number of values, number of positions
-  ! For backward simulations, the unit is seconds, stored in grid_time
-  !*******************************************************************
-
-  ! Concentration output
-  !*********************
-  if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5)) then
-
-  ! Wet deposition
-         sp_count_i=0
-         sp_count_r=0
-         sp_fact=-1.
-         sp_zer=.true.
-         if ((ldirect.eq.1).and.(WETDEP)) then
-         do jy=0,numygridn-1
-            do ix=0,numxgridn-1
-  !oncentraion greater zero
-              if (wetgrid(ix,jy).gt.smallnum) then
-                 if (sp_zer.eqv..true.) then ! first non zero value
-                    sp_count_i=sp_count_i+1
-                    sparse_dump_i(sp_count_i)=ix+jy*numxgridn
-                    sp_zer=.false.
-                    sp_fact=sp_fact*(-1.)
-                 endif
-                 sp_count_r=sp_count_r+1
-                 sparse_dump_r(sp_count_r)= &
-                      sp_fact*1.e12*wetgrid(ix,jy)/arean(ix,jy)
+
+
+    !*******************************************************************
+    ! Generate output: may be in concentration (ng/m3) or in mixing
+    ! ratio (ppt) or both
+    ! Output the position and the values alternated multiplied by
+    ! 1 or -1, first line is number of values, number of positions
+    ! For backward simulations, the unit is seconds, stored in grid_time
+    !*******************************************************************
+
+    ! Concentration output
+    !*********************
+    if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5)) then
+
+    ! Wet deposition
+      sp_count_i=0
+      sp_count_r=0
+      sp_fact=-1.
+      sp_zer=.true.
+      if ((ldirect.eq.1).and.(WETDEP)) then
+      do jy=0,numygridn-1
+        do ix=0,numxgridn-1
+    ! concentration greater zero
+          if (wetgrid(ix,jy).gt.smallnum) then
+            if (sp_zer.eqv..true.) then ! first non zero value
+              sp_count_i=sp_count_i+1
+              sparse_dump_i(sp_count_i)=ix+jy*numxgridn
+              sp_zer=.false.
+              sp_fact=sp_fact*(-1.)
+            endif
+            sp_count_r=sp_count_r+1
+            sparse_dump_r(sp_count_r)= sp_fact*1.e12*wetgrid(ix,jy)/arean(ix,jy)
   !                sparse_dump_u(sp_count_r)=
   !+                1.e12*wetgridsigma(ix,jy,ks,kp,nage)/area(ix,jy)
+          else ! concentration is zero
+            sp_zer=.true.
+          endif
+       end do
+      end do
+      else
+        sp_count_i=0
+        sp_count_r=0
+      endif
+      write(unitoutgrid) sp_count_i
+      write(unitoutgrid) (sparse_dump_i(i),i=1,sp_count_i)
+      write(unitoutgrid) sp_count_r
+      write(unitoutgrid) (sparse_dump_r(i),i=1,sp_count_r)
+    !       write(unitoutgrid) sp_count_u
+    !       write(unitoutgrid) (sparse_dump_u(i),i=1,sp_count_r)
+
+    ! Dry deposition
+      sp_count_i=0
+      sp_count_r=0
+      sp_fact=-1.
+      sp_zer=.true.
+      if ((ldirect.eq.1).and.(DRYDEP)) then
+       do jy=0,numygridn-1
+         do ix=0,numxgridn-1
+           if (drygrid(ix,jy).gt.smallnum) then
+             if (sp_zer.eqv..true.) then ! first non zero value
+                sp_count_i=sp_count_i+1
+                sparse_dump_i(sp_count_i)=ix+jy*numxgridn
+                sp_zer=.false.
+                sp_fact=sp_fact*(-1.)
+             endif
+             sp_count_r=sp_count_r+1
+             sparse_dump_r(sp_count_r)= sp_fact* &
+                  1.e12*drygrid(ix,jy)/arean(ix,jy)
+  !                sparse_dump_u(sp_count_r)=
+  !+                1.e12*drygridsigma(ix,jy,ks,kp,nage)/area(ix,jy)
+           else ! concentration is zero
+             sp_zer=.true.
+           endif
+         end do
+       end do
+      else
+        sp_count_i=0
+        sp_count_r=0
+      endif
+      write(unitoutgrid) sp_count_i
+      write(unitoutgrid) (sparse_dump_i(i),i=1,sp_count_i)
+      write(unitoutgrid) sp_count_r
+      write(unitoutgrid) (sparse_dump_r(i),i=1,sp_count_r)
+    !       write(*,*) sp_count_u
+    !       write(unitoutgrid) (sparse_dump_u(i),i=1,sp_count_r)
+
+
+
+    ! Concentrations
+      sp_count_i=0
+      sp_count_r=0
+      sp_fact=-1.
+      sp_zer=.true.
+      do kz=1,numzgrid
+        do jy=0,numygridn-1
+          do ix=0,numxgridn-1
+            if (grid(ix,jy,kz).gt.smallnum) then
+              if (sp_zer.eqv..true.) then ! first non zero value
+                sp_count_i=sp_count_i+1
+                sparse_dump_i(sp_count_i)= &
+                      ix+jy*numxgridn+kz*numxgridn*numygridn
+                sp_zer=.false.
+                sp_fact=sp_fact*(-1.)
+              endif
+              sp_count_r=sp_count_r+1
+              sparse_dump_r(sp_count_r)= sp_fact* grid(ix,jy,kz)* &
+                     factor3d(ix,jy,kz)/tot_mu(ks,kp)
+  !                 if ((factor(ix,jy,kz)/tot_mu(ks,kp)).eq.0)
+  !    +              write (*,*) factor(ix,jy,kz),tot_mu(ks,kp),ks,kp
+  !                sparse_dump_u(sp_count_r)=
+  !+               ,gridsigma(ix,jy,kz,ks,kp,nage)*
+  !+               factor(ix,jy,kz)/tot_mu(ks,kp)
+            else ! concentration is zero
+              sp_zer=.true.
+            endif
+          end do
+        end do
+      end do
+      write(unitoutgrid) sp_count_i
+      write(unitoutgrid) (sparse_dump_i(i),i=1,sp_count_i)
+      write(unitoutgrid) sp_count_r
+      write(unitoutgrid) (sparse_dump_r(i),i=1,sp_count_r)
+    !       write(unitoutgrid) sp_count_u
+    !       write(unitoutgrid) (sparse_dump_u(i),i=1,sp_count_r)
+
+
+
+      endif !  concentration output
+
+    ! Mixing ratio output
+    !********************
+
+      if ((iout.eq.2).or.(iout.eq.3)) then      ! mixing ratio
+
+      ! Wet deposition
+        sp_count_i=0
+        sp_count_r=0
+        sp_fact=-1.
+        sp_zer=.true.
+        if ((ldirect.eq.1).and.(WETDEP)) then
+          do jy=0,numygridn-1
+            do ix=0,numxgridn-1
+              if (wetgrid(ix,jy).gt.smallnum) then
+                if (sp_zer.eqv..true.) then ! first non zero value
+                  sp_count_i=sp_count_i+1
+                  sparse_dump_i(sp_count_i)= ix+jy*numxgridn
+                  sp_zer=.false.
+                  sp_fact=sp_fact*(-1.)
+                endif
+                sp_count_r=sp_count_r+1
+                sparse_dump_r(sp_count_r)= sp_fact* &
+                   1.e12*wetgrid(ix,jy)/arean(ix,jy)
+    !                sparse_dump_u(sp_count_r)=
+    !    +            ,1.e12*wetgridsigma(ix,jy,ks,kp,nage)/area(ix,jy)
               else ! concentration is zero
-                  sp_zer=.true.
+                sp_zer=.true.
               endif
             end do
-         end do
-         else
-            sp_count_i=0
-            sp_count_r=0
-         endif
-         write(unitoutgrid) sp_count_i
-         write(unitoutgrid) (sparse_dump_i(i),i=1,sp_count_i)
-         write(unitoutgrid) sp_count_r
-         write(unitoutgrid) (sparse_dump_r(i),i=1,sp_count_r)
-  !       write(unitoutgrid) sp_count_u
-  !       write(unitoutgrid) (sparse_dump_u(i),i=1,sp_count_r)
-
-  ! Dry deposition
-         sp_count_i=0
-         sp_count_r=0
-         sp_fact=-1.
-         sp_zer=.true.
-         if ((ldirect.eq.1).and.(DRYDEP)) then
+          end do
+        else
+          sp_count_i=0
+          sp_count_r=0
+        endif
+        write(unitoutgridppt) sp_count_i
+        write(unitoutgridppt) (sparse_dump_i(i),i=1,sp_count_i)
+        write(unitoutgridppt) sp_count_r
+        write(unitoutgridppt) (sparse_dump_r(i),i=1,sp_count_r)
+    !       write(unitoutgridppt) sp_count_u
+    !       write(unitoutgridppt) (sparse_dump_u(i),i=1,sp_count_r)
+
+
+      ! Dry deposition
+        sp_count_i=0
+        sp_count_r=0
+        sp_fact=-1.
+        sp_zer=.true.
+        if ((ldirect.eq.1).and.(DRYDEP)) then
           do jy=0,numygridn-1
             do ix=0,numxgridn-1
               if (drygrid(ix,jy).gt.smallnum) then
-                 if (sp_zer.eqv..true.) then ! first non zero value
-                    sp_count_i=sp_count_i+1
-                    sparse_dump_i(sp_count_i)=ix+jy*numxgridn
-                    sp_zer=.false.
-                    sp_fact=sp_fact*(-1.)
-                 endif
-                 sp_count_r=sp_count_r+1
-                 sparse_dump_r(sp_count_r)= &
-                      sp_fact* &
-                      1.e12*drygrid(ix,jy)/arean(ix,jy)
-  !                sparse_dump_u(sp_count_r)=
-  !+                1.e12*drygridsigma(ix,jy,ks,kp,nage)/area(ix,jy)
+                if (sp_zer.eqv..true.) then ! first non zero value
+                  sp_count_i=sp_count_i+1
+                  sparse_dump_i(sp_count_i)= ix+jy*numxgridn
+                  sp_zer=.false.
+                  sp_fact=sp_fact*(-1)
+                endif
+                sp_count_r=sp_count_r+1
+                sparse_dump_r(sp_count_r)= sp_fact* &
+                     1.e12*drygrid(ix,jy)/arean(ix,jy)
+    !                sparse_dump_u(sp_count_r)=
+    !    +            ,1.e12*drygridsigma(ix,jy,ks,kp,nage)/area(ix,jy)
               else ! concentration is zero
-                  sp_zer=.true.
+                sp_zer=.true.
               endif
             end do
           end do
-         else
-            sp_count_i=0
-            sp_count_r=0
-         endif
-         write(unitoutgrid) sp_count_i
-         write(unitoutgrid) (sparse_dump_i(i),i=1,sp_count_i)
-         write(unitoutgrid) sp_count_r
-         write(unitoutgrid) (sparse_dump_r(i),i=1,sp_count_r)
-  !       write(*,*) sp_count_u
-  !       write(unitoutgrid) (sparse_dump_u(i),i=1,sp_count_r)
-
-
-
-  ! Concentrations
-         sp_count_i=0
-         sp_count_r=0
-         sp_fact=-1.
-         sp_zer=.true.
-          do kz=1,numzgrid
-            do jy=0,numygridn-1
+        else
+          sp_count_i=0
+          sp_count_r=0
+        endif
+        write(unitoutgridppt) sp_count_i
+        write(unitoutgridppt) (sparse_dump_i(i),i=1,sp_count_i)
+        write(unitoutgridppt) sp_count_r
+        write(unitoutgridppt) (sparse_dump_r(i),i=1,sp_count_r)
+    !       write(unitoutgridppt) sp_count_u
+    !       write(unitoutgridppt) (sparse_dump_u(i),i=1,sp_count_r)
+
+
+      ! Mixing ratios
+        sp_count_i=0
+        sp_count_r=0
+        sp_fact=-1.
+        sp_zer=.true.
+        do kz=1,numzgrid
+           do jy=0,numygridn-1
               do ix=0,numxgridn-1
                 if (grid(ix,jy,kz).gt.smallnum) then
@@ -370,161 +475,33 @@
                     sp_count_i=sp_count_i+1
                     sparse_dump_i(sp_count_i)= &
-                         ix+jy*numxgridn+kz*numxgridn*numygridn
-                    sp_zer=.false.
-                    sp_fact=sp_fact*(-1.)
-                   endif
-                   sp_count_r=sp_count_r+1
-                   sparse_dump_r(sp_count_r)= &
-                        sp_fact* &
-                        grid(ix,jy,kz)* &
-                        factor3d(ix,jy,kz)/tot_mu(ks,kp)
-  !                 if ((factor(ix,jy,kz)/tot_mu(ks,kp)).eq.0)
-  !    +              write (*,*) factor(ix,jy,kz),tot_mu(ks,kp),ks,kp
-  !                sparse_dump_u(sp_count_r)=
-  !+               ,gridsigma(ix,jy,kz,ks,kp,nage)*
-  !+               factor(ix,jy,kz)/tot_mu(ks,kp)
-              else ! concentration is zero
-                  sp_zer=.true.
-              endif
-              end do
-            end do
-          end do
-         write(unitoutgrid) sp_count_i
-         write(unitoutgrid) (sparse_dump_i(i),i=1,sp_count_i)
-         write(unitoutgrid) sp_count_r
-         write(unitoutgrid) (sparse_dump_r(i),i=1,sp_count_r)
-  !       write(unitoutgrid) sp_count_u
-  !       write(unitoutgrid) (sparse_dump_u(i),i=1,sp_count_r)
-
-
-
-    endif !  concentration output
-
-  ! Mixing ratio output
-  !********************
-
-  if ((iout.eq.2).or.(iout.eq.3)) then      ! mixing ratio
-
-  ! Wet deposition
-         sp_count_i=0
-         sp_count_r=0
-         sp_fact=-1.
-         sp_zer=.true.
-         if ((ldirect.eq.1).and.(WETDEP)) then
-          do jy=0,numygridn-1
-            do ix=0,numxgridn-1
-                if (wetgrid(ix,jy).gt.smallnum) then
-                  if (sp_zer.eqv..true.) then ! first non zero value
-                    sp_count_i=sp_count_i+1
-                    sparse_dump_i(sp_count_i)= &
-                         ix+jy*numxgridn
+                        ix+jy*numxgridn+kz*numxgridn*numygridn
                     sp_zer=.false.
                     sp_fact=sp_fact*(-1.)
                  endif
                  sp_count_r=sp_count_r+1
-                 sparse_dump_r(sp_count_r)= &
-                      sp_fact* &
-                      1.e12*wetgrid(ix,jy)/arean(ix,jy)
-  !                sparse_dump_u(sp_count_r)=
-  !    +            ,1.e12*wetgridsigma(ix,jy,ks,kp,nage)/area(ix,jy)
-              else ! concentration is zero
-                  sp_zer=.true.
+                 sparse_dump_r(sp_count_r)= sp_fact* 1.e12*grid(ix,jy,kz) &
+                     /volumen(ix,jy,kz)/outnum* &
+                     weightair/weightmolar(ks)/densityoutgrid(ix,jy,kz)
+    !                sparse_dump_u(sp_count_r)=
+    !+              ,1.e12*gridsigma(ix,jy,kz,ks,kp,nage)/volume(ix,jy,kz)/
+    !+              outnum*weightair/weightmolar(ks)/
+    !+              densityoutgrid(ix,jy,kz)
+                else ! concentration is zero
+                sp_zer=.true.
               endif
             end do
           end do
-         else
-           sp_count_i=0
-           sp_count_r=0
-         endif
-         write(unitoutgridppt) sp_count_i
-         write(unitoutgridppt) (sparse_dump_i(i),i=1,sp_count_i)
-         write(unitoutgridppt) sp_count_r
-         write(unitoutgridppt) (sparse_dump_r(i),i=1,sp_count_r)
-  !       write(unitoutgridppt) sp_count_u
-  !       write(unitoutgridppt) (sparse_dump_u(i),i=1,sp_count_r)
-
-
-  ! Dry deposition
-         sp_count_i=0
-         sp_count_r=0
-         sp_fact=-1.
-         sp_zer=.true.
-         if ((ldirect.eq.1).and.(DRYDEP)) then
-          do jy=0,numygridn-1
-            do ix=0,numxgridn-1
-                if (drygrid(ix,jy).gt.smallnum) then
-                  if (sp_zer.eqv..true.) then ! first non zero value
-                    sp_count_i=sp_count_i+1
-                    sparse_dump_i(sp_count_i)= &
-                         ix+jy*numxgridn
-                    sp_zer=.false.
-                    sp_fact=sp_fact*(-1)
-                 endif
-                 sp_count_r=sp_count_r+1
-                 sparse_dump_r(sp_count_r)= &
-                      sp_fact* &
-                      1.e12*drygrid(ix,jy)/arean(ix,jy)
-  !                sparse_dump_u(sp_count_r)=
-  !    +            ,1.e12*drygridsigma(ix,jy,ks,kp,nage)/area(ix,jy)
-              else ! concentration is zero
-                  sp_zer=.true.
-              endif
-            end do
-          end do
-         else
-           sp_count_i=0
-           sp_count_r=0
-         endif
-         write(unitoutgridppt) sp_count_i
-         write(unitoutgridppt) (sparse_dump_i(i),i=1,sp_count_i)
-         write(unitoutgridppt) sp_count_r
-         write(unitoutgridppt) (sparse_dump_r(i),i=1,sp_count_r)
-  !       write(unitoutgridppt) sp_count_u
-  !       write(unitoutgridppt) (sparse_dump_u(i),i=1,sp_count_r)
-
-
-  ! Mixing ratios
-         sp_count_i=0
-         sp_count_r=0
-         sp_fact=-1.
-         sp_zer=.true.
-          do kz=1,numzgrid
-            do jy=0,numygridn-1
-              do ix=0,numxgridn-1
-                if (grid(ix,jy,kz).gt.smallnum) then
-                  if (sp_zer.eqv..true.) then ! first non zero value
-                    sp_count_i=sp_count_i+1
-                    sparse_dump_i(sp_count_i)= &
-                         ix+jy*numxgridn+kz*numxgridn*numygridn
-                    sp_zer=.false.
-                    sp_fact=sp_fact*(-1.)
-                 endif
-                 sp_count_r=sp_count_r+1
-                 sparse_dump_r(sp_count_r)= &
-                      sp_fact* &
-                      1.e12*grid(ix,jy,kz) &
-                      /volumen(ix,jy,kz)/outnum* &
-                      weightair/weightmolar(ks)/densityoutgrid(ix,jy,kz)
-  !                sparse_dump_u(sp_count_r)=
-  !+              ,1.e12*gridsigma(ix,jy,kz,ks,kp,nage)/volume(ix,jy,kz)/
-  !+              outnum*weightair/weightmolar(ks)/
-  !+              densityoutgrid(ix,jy,kz)
-              else ! concentration is zero
-                  sp_zer=.true.
-              endif
-              end do
-            end do
-          end do
-         write(unitoutgridppt) sp_count_i
-         write(unitoutgridppt) (sparse_dump_i(i),i=1,sp_count_i)
-         write(unitoutgridppt) sp_count_r
-         write(unitoutgridppt) (sparse_dump_r(i),i=1,sp_count_r)
-  !       write(unitoutgridppt) sp_count_u
-  !       write(unitoutgridppt) (sparse_dump_u(i),i=1,sp_count_r)
+        end do
+        write(unitoutgridppt) sp_count_i
+        write(unitoutgridppt) (sparse_dump_i(i),i=1,sp_count_i)
+        write(unitoutgridppt) sp_count_r
+        write(unitoutgridppt) (sparse_dump_r(i),i=1,sp_count_r)
+    !       write(unitoutgridppt) sp_count_u
+    !       write(unitoutgridppt) (sparse_dump_u(i),i=1,sp_count_r)
 
       endif ! output for ppt
 
-  end do
-  end do
+    end do
+    end do
 
     close(unitoutgridppt)
@@ -538,24 +515,9 @@
   !*************************
 
-  do ks=1,nspec
-  do kp=1,maxpointspec_act
-    do i=1,numreceptor
-      creceptor(i,ks)=0.
-    end do
-    do jy=0,numygridn-1
-      do ix=0,numxgridn-1
-        do l=1,nclassunc
-          do nage=1,nageclass
-            do kz=1,numzgrid
-              griduncn(ix,jy,kz,ks,kp,l,nage)=0.
-            end do
-          end do
-        end do
-      end do
-    end do
-  end do
-  end do
-
+  griduncn=0.
+  if (ldep_incr) then ! incremental deposition output
+    wetgriduncn=0.
+    drygriduncn=0.
+  endif
 
 end subroutine concoutput_nest
-
