@Test
    public void testTimeStep_PERIOD2() throws Exception {
        printDebug("----------------------------");
        printDebug("PERIOD2: " + this.toString());
        printDebug("----------------------------");
        
        CSTable t = DataIO.table(r, "obs");
        Assert.assertNotNull(t);

        
        // 4 YEARS
        Date start = Conversions.convert("1981-11-15", Date.class);
        Date end = Conversions.convert("1984-7-20", Date.class);


        //System.out.println("Start = " + start.toString() + "; End = " + end.toString());
        int periodStart=May;
        boolean[] periodMask = new boolean[12];
        periodMask[Jan] = true;
        periodMask[Feb] = true;
        periodMask[Mar] = true;
        periodMask[Apr] = false;
        periodMask[May] = false;
        periodMask[Jun] = false;
        periodMask[Jul] = true;
        periodMask[Aug] = true;
        periodMask[Sep] = false;
        periodMask[Oct] = true;
        periodMask[Nov] = true;
        periodMask[Dec] = true;
        
        double[] mean = DataIO.getColumnDoubleValuesInterval(start, end, t, "runoff[0]", DataIO.PERIOD_MEAN, periodStart, periodMask, null);
        double[] min = DataIO.getColumnDoubleValuesInterval(start, end, t, "runoff[0]", DataIO.PERIOD_MIN, periodStart, periodMask, null);
        double[] max = DataIO.getColumnDoubleValuesInterval(start, end, t, "runoff[0]", DataIO.PERIOD_MAX, periodStart, periodMask, null);
        double[] median = DataIO.getColumnDoubleValuesInterval(start, end, t, "runoff[0]", DataIO.PERIOD_MEDIAN, periodStart, periodMask, null);
        double[] stdev = DataIO.getColumnDoubleValuesInterval(start, end, t, "runoff[0]", DataIO.PERIOD_STANDARD_DEVIATION, periodStart, periodMask, null);

        //System.out.println("# values = " + obsval.length);
        Assert.assertTrue(mean.length == 4);
        Assert.assertTrue(min.length == 4);
        Assert.assertTrue(max.length == 4);
        Assert.assertTrue(median.length == 4);
        Assert.assertTrue(stdev.length == 4);

        double[] goldenMean = new double[4];
        double[] goldenMin = new double[4];
        double[] goldenMax = new double[4];
        double[] goldenMedian = new double[4];
        double[] goldenStdev = new double[4];
     
 


        goldenMean[0] =451.3284671532847;
        goldenMin[0] = 158;
        goldenMax[0] = 4740;
        goldenMedian[0] = 289;
        goldenStdev[0] = 551.5395587;

        goldenMean[1] = 397.5245901639344;
        goldenMin[1] = 131;
        goldenMax[1] = 1630;
        goldenMedian[1] = 316.5;
        goldenStdev[1] = 249.8383646;
        
        goldenMean[2] = 522.2367346938776;
        goldenMin[2] = 140;
        goldenMax[2] = 2800;
        goldenMedian[2] = 355;
        goldenStdev[2] = 473.2054318;
        
        
        goldenMean[3] = 464.4;
        goldenMin[3] = 323;
        goldenMax[3] = 667;
        goldenMedian[3] = 405.5;
        goldenStdev[3] = 123.6561361;
        
        
        for (int i=0; i<mean.length; i++) {
            printDebug("Year " + i + ":");
            printDebug("Mean["+i+"] = " + mean[i] + ";  \tGolden = " + goldenMean[i]);
            printDebug("Min["+i+"] = " + min[i] + ";  \tGolden = " + goldenMin[i]);
            printDebug("Max["+i+"] = " + max[i] + ";  \tGolden = " + goldenMax[i]);
            printDebug("Median["+i+"] = " + median[i] + ";  \tGolden = " + goldenMedian[i]);
            printDebug("StDev["+i+"] = " + stdev[i] + ";  \tGolden = " + goldenStdev[i] + "; Delta = " + (goldenStdev[i] - stdev[i]));
            printDebug("");
        
            Assert.assertTrue(mean[i] == goldenMean[i]);
            Assert.assertTrue(min[i] == goldenMin[i]);
            Assert.assertTrue(max[i] == goldenMax[i]);
            Assert.assertTrue(median[i] == goldenMedian[i]);
            double allowedDelta_stdev = 2.28E-7;
            Assert.assertEquals(stdev[i], goldenStdev[i], allowedDelta_stdev);
        }
    }