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

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


        //System.out.println("Start = " + start.toString() + "; End = " + end.toString());
        double[] mean = DataIO.getColumnDoubleValuesInterval(start, end, t, "runoff[0]", DataIO.PERIOD_MEAN);
        double[] min = DataIO.getColumnDoubleValuesInterval(start, end, t, "runoff[0]", DataIO.PERIOD_MIN);
        double[] max = DataIO.getColumnDoubleValuesInterval(start, end, t, "runoff[0]", DataIO.PERIOD_MAX);
        double[] median = DataIO.getColumnDoubleValuesInterval(start, end, t, "runoff[0]", DataIO.PERIOD_MEDIAN);
        double[] stdev = DataIO.getColumnDoubleValuesInterval(start, end, t, "runoff[0]", DataIO.PERIOD_STANDARD_DEVIATION);

        //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] = 283.90494296577947;
        goldenMin[0] = 31;
        goldenMax[0] = 2890;
        goldenMedian[0] = 138;
        goldenStdev[0] = 325.54260421929246;

        goldenMean[1] = 686.2520547945205;
        goldenMin[1] = 131;
        goldenMax[1] = 4740;
        goldenMedian[1] = 322;
        goldenStdev[1] = 692.1054096828143;
        
        goldenMean[2] = 876.9123287671233;
        goldenMin[2] = 140;
        goldenMax[2] = 6390;
        goldenMedian[2] = 446;
        goldenStdev[2] = 1080.6484826245241;
        
        goldenMean[3] = 679.6907216494845;
        goldenMin[3] = 208;
        goldenMax[3] = 2310;
        goldenMedian[3] = 482.5;
        goldenStdev[3] = 506.30640168591486;
        
        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-13;
            Assert.assertEquals(stdev[i], goldenStdev[i], allowedDelta_stdev);
        }
    }