// Find the mean
protected Entry getSpreadEntry(Request request, ServiceInput dpi,
                                   Entry sample, String climstartYear,
                                   String climendYear)
            throws Exception {
        Entry sprdEntry = null;
        //System.err.println("Creating spread");
        //String statName = "mean";
        String statName = "ens01";  // per Marty hoerling - just use the spread of one member
        // Find the mean
        List<Entry> mean = findStatisticEntry(request, sample, statName);
        if ((mean == null) || mean.isEmpty()) {
            //System.err.println("Couldn't find " + statName);
            // TODO: Should we just exit if no mean?
            sprdEntry = sample;
        } else if (mean.size() > 1) {
            System.err.println("found too many");
        } else {
            sprdEntry = mean.get(0);
            //System.err.println("found mean: " + sprdEntry);
        }
        //sprdEntry = sample;
        // Now make the spread from the mean
        String stail =
            getOutputHandler().getStorageManager().getFileTail(sprdEntry);
        sprdEntry = makeStatistic(request, sprdEntry, dpi, stail, "smegma",
                                  climstartYear, climendYear);
        return sprdEntry;
    }
//String statName = "mean";
String statName = "ens01"; // per Marty hoerling - just use the spread of one member
// Find the mean
List<Entry> mean = findStatisticEntry(request, sample, statName);
if ((mean == null) || mean.isEmpty()) {
protected Entry getSpreadEntry(Request request, ServiceInput dpi,
Entry sample, String climstartYear,
String climendYear)
throws Exception {
Entry sprdEntry = null;
//System.err.println("Creating spread");
//String statName = "mean";
String statName = "ens01"; // per Marty hoerling - just use the spread of one member
// Find the mean
List<Entry> mean = findStatisticEntry(request, sample, statName);
if ((mean == null) || mean.isEmpty()) {
//System.err.println("Couldn't find " + statName);
// TODO: Should we just exit if no mean?
sprdEntry = sample;
} else if (mean.size() > 1) {
System.err.println("found too many");
} else {
sprdEntry = mean.get(0);
//System.err.println("found mean: " + sprdEntry);
protected Entry getSpreadEntry(Request request, ServiceInput dpi,
Entry sample, String climstartYear,
String climendYear)
throws Exception {
Entry sprdEntry = null;
//System.err.println("Creating spread");
//String statName = "mean";
String statName = "ens01"; // per Marty hoerling - just use the spread of one member
// Find the mean
List<Entry> mean = findStatisticEntry(request, sample, statName);
if ((mean == null) || mean.isEmpty()) {
//System.err.println("Couldn't find " + statName);
// TODO: Should we just exit if no mean?
sprdEntry = sample;
} else if (mean.size() > 1) {
System.err.println("found too many");
} else {
sprdEntry = mean.get(0);
//System.err.println("found mean: " + sprdEntry);
}
//sprdEntry = sample;
// Now make the spread from the mean
String stail =
getOutputHandler().getStorageManager().getFileTail(sprdEntry);
sprdEntry = makeStatistic(request, sprdEntry, dpi, stail, "smegma",
climstartYear, climendYear);
return sprdEntry;
}