Index: /trunk/tools/validation_sim.py
===================================================================
--- /trunk/tools/validation_sim.py	(revision 525)
+++ /trunk/tools/validation_sim.py	(revision 526)
@@ -1940,4 +1940,5 @@
     for kst in range(Nstsim):
         timedn = prestdescsim[kst] + 'time'
+        print '    ' + prestdescsim[kst] + ' ...'
 
         if stdescsim[kst] == 'E':
@@ -1947,51 +1948,57 @@
               ovobs, exacttvalues, oFillValue, Ngrid, 'instantaneous')
 
-            vname = prestdescsim[kst] + 'time'
- 
-            newvar = onewnc.createVariable(vname,'f8', (timedn))
-            basicvardef(newvar, vname, 'exact coincident time observations and ' +   \
-              'simulation', obstunits)
-            set_attribute(newvar, 'calendar', 'standard')
-            newvar[:] = exacttvalues[:,3]
-
-        elif == stdescsim[kst] == 'C':
+            if ivar == 0:
+                vname = prestdescsim[kst] + 'time'
+                newvar = onewnc.createVariable(vname,'f8', (timedn))
+                basicvardef(newvar, vname, 'exact coincident time observations and '+\
+                  'simulation', obstunits)
+                set_attribute(newvar, 'calendar', 'standard')
+                newvar[:] = exacttvalues[:,3]
+
+            dimt = Nexactt
+
+        elif stdescsim[kst] == 'C':
 # Simualted closest to Observed times
             simobsvalues, simobsSvalues, simobsTtvalues, trjsim =                    \
               getting_ValidationValues(obskind, Nclosest, dims, trajpos, ovsim,      \
               ovobs, closesttvalues, oFillValue, Ngrid, 'instantaneous')
-
-            vname = prestdescsim[kst] + 'time'
-
-            newvar = onewnc.createVariable(vname,'f8', (timedn))
-            basicvardef(newvar, vname, 'time simulations closest to observed values',\
-              obstunits )
-            set_attribue(newvar, 'calendar', 'standard')
-            newvar[:] = closesttvalues[:,2]
-
-            vname  = (prestdescsim[kst] + 'obstime'
-            newvar = onewnc.createVariable(vname,'f8', (vname))
-            basicvardef(newvar, vname, 'closest time observations', obstunits)
-            set_attribute(newvar, 'calendar', 'standard')
-            newvar[:] = closesttvalues[:,3]
-
-        elif == stdescsim[kst] == 'B':
+            dimt = Nclosest
+
+
+            if ivar == 0:
+                vname = prestdescsim[kst] + 'time'
+                newvar = onewnc.createVariable(vname,'f8', (timedn))
+                basicvardef(newvar, vname, 'time simulations closest to observed ' + \
+                  'values', obstunits )
+                set_attribute(newvar, 'calendar', 'standard')
+                newvar[:] = closesttvalues[:,2]
+
+                vname  = prestdescsim[kst] + 'obstime'
+                newvar = onewnc.createVariable(vname,'f8', (vname))
+                basicvardef(newvar, vname, 'closest time observations', obstunits)
+                set_attribute(newvar, 'calendar', 'standard')
+                newvar[:] = closesttvalues[:,3]
+
+        elif stdescsim[kst] == 'B':
 # Observed values temporally around coincident times
             simobsvalues, simobsSvalues, simobsTtvalues, trjsim =                    \
               getting_ValidationValues(obskind, Ncoindt, dims, trajpos, ovsim, ovobs,\
               coindtvalues, oFillValue, Ngrid, 'tbackwardSmean')
-
-            vname = prestdescsim[kst] + 'time'
-            newvar = onewnc.createVariable(vname,'f8', (timedn))
-            basicvardef(newvar, vname, 'simulation time between observations',       \
-              obstunits )
-            set_attribute(newvar, 'calendar', 'standard')
-            set_attribute(newvar, 'bounds', 'time_bnds')
-            newvar[:] = simobsTtvalues[:,1]
-
-            vname = prestdescsim[kst] + 'obstime'
-            newvar = onewnc.createVariable(vname,'f8', (vname))
-            basicvardef(newvar, vname, 'observed between time', obstunits )
-            set_attribute(newvar, 'calendar', 'standard')
-            newvar[:] = np.unique(coindtvalues[:,2])
+            dimt = Ncoindt
+
+            if ivar == 0:
+                vname = prestdescsim[kst] + 'time'
+                newvar = onewnc.createVariable(vname,'f8', (timedn))
+                basicvardef(newvar, vname, 'simulation time between observations',   \
+                  obstunits )
+                set_attribute(newvar, 'calendar', 'standard')
+                set_attribute(newvar, 'bounds', 'time_bnds')
+                newvar[:] = simobsTtvalues[:,1]
+
+                vname = prestdescsim[kst] + 'obstime'
+                newvar = onewnc.createVariable(vname,'f8', (vname))
+                basicvardef(newvar, vname, 'observed between time', obstunits )
+                set_attribute(newvar, 'calendar', 'standard')
+                newvar[:] = np.unique(coindtvalues[:,2])
 
 # Re-arranging values...
@@ -2041,5 +2048,5 @@
 # Statistics sim-obs
         simobsstats = np.zeros((Nstsim,13), dtype=np.float)
-        diffvals = np.zeros((Ncoindt), dtype=np.float)
+        diffvals = np.zeros((dimt), dtype=np.float)
 
         diffvals = arrayvals[:,0] - obsmask
@@ -2091,10 +2098,10 @@
         simobsstats[kst,11] = 1. - sumdiff2/(abssimobsbias2series.sum())
 # Fractional Mean Bias (FMB)
-        simobsstats[ksy,12]=(simstats[ksy,0]-obsstats[kst,0])/(0.5*(simstats[kst,0] +\
+        simobsstats[kst,12]=(simstats[kst,0]-obsstats[kst,0])/(0.5*(simstats[kst,0] +\
           obsstats[kst,0]))
 
 # Statistics around sim values
-        aroundstats = np.zeros((5,Ncoindt), dtype=np.float)
-        for it in range(Ncoindt):
+        aroundstats = np.zeros((5,dimt), dtype=np.float)
+        for it in range(dimt):
             aroundstats[0,it] = np.min(simobsSvalues[it,])
             aroundstats[1,it] = np.max(simobsSvalues[it,])
@@ -2156,23 +2163,8 @@
         if stdescsim[kst] == 'B':
             if not searchInlist(onewnc.variables, 'time_bnds'):
-                newvar = onewnc.createVariable('time_bnds','f8',(imedn,'bnds'))
+                newvar = onewnc.createVariable('time_bnds','f8',(timedn,'bnds'))
                 basicvardef(newvar, 'time_bnds', timedn, obstunits )
                 set_attribute(newvar, 'calendar', 'standard')
                 newvar[:] = simobsTtvalues
-
-# around obs Statistics between
-        if not searchInlist(onewnc.variables, prestdescsim[kst] + valvars[ivar][1] + \
-          'staround'):
-            vname = prestdescsim[kst] + valvars[ivar][1] + 'staround'
-        else:
-            vname = prestdescsim[kst] + valvars[ivar][1] + 'Staround'
-
-        newvar = onewnc.createVariable(vname, 'f', (timedn,'tstats'),                \
-          fill_value=fillValueF)
-        descvar = prestdescsim[kst] + ' around temporal observed statisitcs: ' +     \
-          valvars[ivar][1]
-        basicvardef(newvar, vname, descvar, ovobs.getncattr('units'))
-        set_attribute(newvar, 'cell_methods', 'time_bnds')
-        newvar[:] = aroundostats.transpose()
 
 # sim Statistics
