@Test
      public void testTimeStep_DAILY3_subdivide() throws Exception {
        printDebug("----------------------------");
        printDebug("DAILY with Subdivide: " + this.toString());
        printDebug("----------------------------");
      
        // Data
        CSTable t = DataIO.table(r, "obs");
        Assert.assertNotNull(t);
        
        // Subdivide data
        CSTable sdt = DataIO.table(sdr,"sd");
        Assert.assertNotNull(sdt);
        
        // 1 YEAR
        Date start = Conversions.convert("1980-10-01", Date.class);
        Date end = Conversions.convert("1981-11-30", Date.class);


        printDebug("Start = " + start.toString() + "; End = " + end.toString());
        
        int periodStart=Jan;
        boolean[] periodMask = null; 
        
        double[] subDivideData = DataIO.getColumnDoubleValuesInterval(start, end, sdt, "sd_data", DataIO.DAILY, 0, null, null);
        boolean[] subDivideMask = new boolean[subDivideData.length];
        for (int i=0; i<subDivideMask.length; i++) {
            subDivideMask[i] = (subDivideData[i] == 2);
            //System.out.println("SDmask["+i+"] = " + subDivideMask[i] + " with data " + subDivideData[i]);
        }
        
        
        double[] obsval = DataIO.getColumnDoubleValuesInterval(start, end, t, "runoff[0]", DataIO.DAILY, periodStart, periodMask, subDivideMask);
        printDebug("# values = " + obsval.length);
        Assert.assertTrue(obsval.length == 16);

        // Values directly from table
        double[] goldenVal = new double[16];

     
        goldenVal[0] = 105;
        goldenVal[1] = 102;
        goldenVal[2] = 99;
        goldenVal[3] = 97;
        goldenVal[4] = 96;
        goldenVal[5] = 93;
        goldenVal[6] = 94;
        goldenVal[7] = 92;
        goldenVal[8] = 91;
        goldenVal[9] = 90;
        goldenVal[10] = 93;
        goldenVal[11] = 91;
        goldenVal[12] = 89;
        goldenVal[13] = 86;
        goldenVal[14] = 89;
        goldenVal[15] = 78;
        
        for (int i = 0; i < obsval.length; i++) {
            printDebug("obs[" + i + "] = " + obsval[i] + ";\tGolden = " + goldenVal[i]);
        }

        Assert.assertArrayEquals(goldenVal, obsval, 0);
    }