Index: flexpart_code/fpmetbinary_mod.F90
===================================================================
--- flexpart_code/fpmetbinary_mod.F90	(revision d2d8a96317f1646745408d353ea1d5e77459f193)
+++ flexpart_code/fpmetbinary_mod.F90	(revision 1d9681bc53974649552528cde091da8ba210f420)
@@ -44,5 +44,5 @@
     USE com_mod
     USE conv_mod
-    USE par_mod, ONLY : nxmax, nymax, nzmax, nuvzmax, nwzmax, numclass
+    USE par_mod, ONLY : nxmax, nymax, nzmax, nuvzmax, nwzmax, numclass, maxspec
 
     USE netcdf
@@ -152,4 +152,6 @@
         ! Zeroes out, in local datastructures, the values dumped/loaded
         ! This was written primarily as a testing mechanism.
+        ! DJM -- 17 February 2017 -- I don't think this routine has been used
+        ! for anything in recent past.  Might want to consider 86'ing it.
         ! The lines here correspond to READ and WRITE in the dump/load routines
 
@@ -830,4 +832,14 @@
 
 
+            dim3dids = (/nxmax_dimid, nymax_dimid, maxspec/)
+
+            ncret = nf90_def_var(ncid, 'vdep', NF90_FLOAT, &
+&                                       dim3dids, ncvarid)
+            ncret = nf90_def_var_deflate(ncid, ncvarid,   &
+&                                        shuffle=0,     &
+&                                        deflate=1,     &
+&                                        deflate_level=DEF_LEVEL)
+            ncret = nf90_put_var(ncid, ncvarid, &
+&                                vdep(0:nxmax-1, 0:nymax-1, 1:maxspec, cm_index))
 
 
@@ -841,4 +853,87 @@
             WRITE(iounit) aknew(:)
             WRITE(iounit) bknew(:)
+
+            dim1dids = (/numclass/)
+
+            ncret = nf90_def_var(ncid, 'z0', NF90_FLOAT, &
+&                                       dim1dids, ncvarid)
+            ncret = nf90_def_var_deflate(ncid, ncvarid,   &
+&                                        shuffle=0,     &
+&                                        deflate=1,     &
+&                                        deflate_level=DEF_LEVEL)
+            ncret = nf90_put_var(ncid, ncvarid, &
+&                                z0(1:numclass))
+
+
+            dim1dids = (/nwzmax/)
+
+            ncret = nf90_def_var(ncid, 'akm', NF90_FLOAT, &
+&                                       dim1dids, ncvarid)
+            ncret = nf90_def_var_deflate(ncid, ncvarid,   &
+&                                        shuffle=0,     &
+&                                        deflate=1,     &
+&                                        deflate_level=DEF_LEVEL)
+            ncret = nf90_put_var(ncid, ncvarid, &
+&                                akm(1:nwzmax))
+
+            ncret = nf90_def_var(ncid, 'bkm', NF90_FLOAT, &
+&                                       dim1dids, ncvarid)
+            ncret = nf90_def_var_deflate(ncid, ncvarid,   &
+&                                        shuffle=0,     &
+&                                        deflate=1,     &
+&                                        deflate_level=DEF_LEVEL)
+            ncret = nf90_put_var(ncid, ncvarid, &
+&                                bkm(1:nwzmax))
+
+
+            dim1dids = (/nuvzmax/)
+
+            ncret = nf90_def_var(ncid, 'akz', NF90_FLOAT, &
+&                                       dim1dids, ncvarid)
+            ncret = nf90_def_var_deflate(ncid, ncvarid,   &
+&                                        shuffle=0,     &
+&                                        deflate=1,     &
+&                                        deflate_level=DEF_LEVEL)
+            ncret = nf90_put_var(ncid, ncvarid, &
+&                                akz(1:nuvzmax))
+
+            ncret = nf90_def_var(ncid, 'bkz', NF90_FLOAT, &
+&                                       dim1dids, ncvarid)
+            ncret = nf90_def_var_deflate(ncid, ncvarid,   &
+&                                        shuffle=0,     &
+&                                        deflate=1,     &
+&                                        deflate_level=DEF_LEVEL)
+            ncret = nf90_put_var(ncid, ncvarid, &
+&                                bkz(1:nuvzmax))
+
+
+            dim1dids = (/nzmax/)
+
+            ncret = nf90_def_var(ncid, 'aknew', NF90_FLOAT, &
+&                                       dim1dids, ncvarid)
+            ncret = nf90_def_var_deflate(ncid, ncvarid,   &
+&                                        shuffle=0,     &
+&                                        deflate=1,     &
+&                                        deflate_level=DEF_LEVEL)
+            ncret = nf90_put_var(ncid, ncvarid, &
+&                                aknew(1:nzmax))
+
+            ncret = nf90_def_var(ncid, 'bknew', NF90_FLOAT, &
+&                                       dim1dids, ncvarid)
+            ncret = nf90_def_var_deflate(ncid, ncvarid,   &
+&                                        shuffle=0,     &
+&                                        deflate=1,     &
+&                                        deflate_level=DEF_LEVEL)
+            ncret = nf90_put_var(ncid, ncvarid, &
+&                                bknew(1:nzmax))
+
+
+            PRINT *, 'SUM(bknew(1:nzmax)): ', &
+&                                        SUM(bknew(1:nzmax))
+
+
+
+
+
 
             ! Nested, scalar values (for each nest)
@@ -1156,5 +1251,4 @@
 
 
-
             ! 2d fields
             READ(iounit) ps(:,:,:,cm_index)
@@ -1247,4 +1341,7 @@
 
 
+            ncret = nf90_inq_varid(ncid, 'vdep', ncvarid)
+            ncret = nf90_get_var(ncid, ncvarid, vdep(0:nxmax-1,0:nymax-1,1:maxspec, cm_index))
+
 
 
@@ -1259,4 +1356,34 @@
             READ(iounit) aknew(:)
             READ(iounit) bknew(:)
+
+
+            ncret = nf90_inq_varid(ncid, 'z0', ncvarid)
+            ncret = nf90_get_var(ncid, ncvarid, z0(1:numclass))
+
+            ncret = nf90_inq_varid(ncid, 'akm', ncvarid)
+            ncret = nf90_get_var(ncid, ncvarid, akm(1:nwzmax))
+
+            ncret = nf90_inq_varid(ncid, 'bkm', ncvarid)
+            ncret = nf90_get_var(ncid, ncvarid, bkm(1:nwzmax))
+
+            ncret = nf90_inq_varid(ncid, 'akz', ncvarid)
+            ncret = nf90_get_var(ncid, ncvarid, akz(1:nuvzmax))
+
+            ncret = nf90_inq_varid(ncid, 'bkz', ncvarid)
+            ncret = nf90_get_var(ncid, ncvarid, bkz(1:nuvzmax))
+
+            ncret = nf90_inq_varid(ncid, 'aknew', ncvarid)
+            ncret = nf90_get_var(ncid, ncvarid, aknew(1:nzmax))
+
+            ncret = nf90_inq_varid(ncid, 'bknew', ncvarid)
+            ncret = nf90_get_var(ncid, ncvarid, bknew(1:nzmax))
+
+
+
+            PRINT *, 'SUM(bknew(1:nzmax)): ', &
+&                                        SUM(bknew(1:nzmax))
+
+
+
 
 
