Displaying differences for changeset
 
display as  

src/java/cfa/CDPHE_lowFlowStats.java

@@ -1,32 +1,20 @@
 package cfa;
 
-import java.io.File;
-import java.io.FileWriter;
 import java.io.IOException;
-import java.io.PrintWriter;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
-import java.util.Date;
 
 /**
-* Last Updated: 6-January-2015
+* Last Updated: 20-January-2015
 * @author Tyler Wible
 * @since 16-December-2014
 */
 public class CDPHE_lowFlowStats {
-     //Gets
-    public String getFlowStatistics_summary() {
-        return "cdphe_lowflow.csv";
-    }
     /**
      * Calculate the CDPHE "extreme value" design flow (see DFLOW user manual) 
      * based on an 'm'-day average low flow of each year fitted to a Log-Pearson
      * Type III distribution and interpolated for a return period of 'R' years
-     * @param mainFolder  the file path where the summary will be saved
-     * @param stationID  the station ID for the current station, used to label the output
-     * @param stationName  the station name for the current station, used to label the  output
      * @param flowData  flow data, column1 = dates (format yyyy-mm-dd), column2 = flow values
      * @param m  the number of days to average for annual low flow analysis (m-day average)
      * @param R  the desired return period of the m-day low flow (in years)
@@ -35,39 +23,13 @@
      * @throws IOException
      * @throws ParseException 
      */
-    public double CDPHE_ExtremeValue(String mainFolder,
-                                     String stationID,
-                                     String stationName,
-                                     String[][] flowData,
+    public double CDPHE_ExtremeValue(String[][] flowData,
                                      int m,
                                      double R,
                                      String waterYearBegin) throws IOException, ParseException{
         DoubleArray doubleArray =  new DoubleArray();
         DoubleMath doubleMath = new DoubleMath();
         
-        //Get today's date for output purposes
-        Date currentDate = new Date();
-        SimpleDateFormat desiredDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
-        String today = desiredDateFormat.format(currentDate);
-        stationName = stationName.replace(",", "");
-        
-        //Initialize the summary result table
-        String[][] statsSummaryTable = new String[6][2];
-        statsSummaryTable[0][0] = "CDPHE DFlow Statistics for " + stationID + "; " + stationName + "; created on " + today;
-        statsSummaryTable[1][0] = "Analysis Period (water year beginning " + waterYearBegin +")";
-        statsSummaryTable[2][0] = "Extreme Value-based Design Low Flow, (" + m + "-day minimum) [cfs]";
-        statsSummaryTable[3][0] = "Annual Low Flow (" + m + "-day minimum) [cfs]";
-        statsSummaryTable[4][0] = "Low Flow Statistics based on 'DFLOW' User's Manual:";
-        statsSummaryTable[5][0] = "Rossman, L.A. 'DFLOW User's Manual' U.S. Environmental Protection Agency Cincinnati, Ohio 45265.";
-        
-        statsSummaryTable[0][1] = "";
-        statsSummaryTable[1][1] = "";
-        statsSummaryTable[2][1] = "to be added later";
-        statsSummaryTable[3][1] = "--";
-        statsSummaryTable[4][1] = "";
-        statsSummaryTable[5][1] = "";
-        
-        
         int currentYear = Integer.parseInt(flowData[0][0].substring(0,4));
         int finalYear = Integer.parseInt(flowData[flowData.length - 1][0].substring(0,4));
 //        //Start by pulling the first complete water year (determine if this is necessary
@@ -99,11 +61,6 @@
                 double mDay_min = doubleMath.min(average_Mday);
                 if(mDay_min > 0) mDay_annualNonZero.add(mDay_min);
                 mDay_annual++;
-
-                //Add this water year's statistics to the existing results
-                String waterYearHeader = "Water Year " + String.valueOf(currentYear);
-                String[] additionalSummary = {"", waterYearHeader, "--", String.valueOf(mDay_min), "", ""};
-                statsSummaryTable = doubleArray.appendcolumn_Matrix(statsSummaryTable, additionalSummary);
             }
             
             //Check if this is the last year
@@ -147,33 +104,26 @@
         
         //Call file writer for outputs fo flow statistics
         designFlow = doubleMath.round(designFlow, 3);
-        statsSummaryTable[2][0] = String.valueOf(designFlow);
-        writeStatsSummaryFile(mainFolder, statsSummaryTable);
         
         return designFlow;
     }
     /**
      * Calculate the CDPHE "biologically-based" design flow (see DFLOW user manual) 
-     * which is an 'm'-day harmonic average low flow based on a certain excursion count (exceedance?)
-     * @param mainFolder  the file path where the summary will be saved
-     * @param stationID  the station ID for the current station, used to label the output
-     * @param stationName  the station name for the current station, used to label the  output
-     * @param flowData  flow data, column1 = dates (format yyyy-mm-dd), column2 = flow values
+     * which is an 'm'-day harmonic average low flow based on a certain excursion count (exceedance?), 
+     * performs this calculation for the entire flow record as well as each month of the year
+     * @param data_all  a String[][] of flow data, column1 = dates (format yyyy-mm-dd), column2 = flow values
      * @param m  the number of days to average for annual low flow analysis (m-day average)
      * @param R  the desired return period of the m-day low flow (in years)
      * @param clusterLength  the length of time for the definition of a 'cluster' of excursion 
-     * periods (default is 120). All excursion periods within this amount of time of each other 
-     * will be counted, subject to the clusterCountMax below.
-     * @param clusterCountMax  the upper count limit on how many excursion periods will be 
-     * counted within an excursion cluster (default is 5)
+     * periods (default should be 120). All excursion periods within this amount of 
+     * time of each other will be counted, subject to the clusterCountMax below.
+     * @param clusterCountMax  the upper count limit on how many excursion periods 
+     * will be counted within an excursion cluster (default should be 5)
      * @return
      * @throws IOException
      * @throws ParseException 
      */
-    public double CDPHE_Biological(String mainFolder,
-                                   String stationID,
-                                   String stationName,
-                                   String[][] flowData,
+    public double[] CDPHE_Biological(String[][] data_all,
                                    int m,
                                    int R,
                                    int clusterLength,
@@ -181,27 +131,60 @@
         DoubleArray doubleArray =  new DoubleArray();
         DoubleMath doubleMath = new DoubleMath();
         
-        //Get today's date for output purposes
-        Date currentDate = new Date();
-        SimpleDateFormat desiredDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
-        String today = desiredDateFormat.format(currentDate);
-        stationName = stationName.replace(",", "");
+        //Pull data
+        String[][] data_jan = doubleArray.getSeasonalData(data_all, "01-01", "01-31");
+        String[][] data_feb = doubleArray.getSeasonalData(data_all, "02-01", "02-28");
+        String[][] data_mar = doubleArray.getSeasonalData(data_all, "03-01", "03-31");
+        String[][] data_apr = doubleArray.getSeasonalData(data_all, "04-01", "04-30");
+        String[][] data_may = doubleArray.getSeasonalData(data_all, "05-01", "05-31");
+        String[][] data_jun = doubleArray.getSeasonalData(data_all, "06-01", "06-30");
+        String[][] data_jul = doubleArray.getSeasonalData(data_all, "07-01", "07-31");
+        String[][] data_aug = doubleArray.getSeasonalData(data_all, "08-01", "08-31");
+        String[][] data_sep = doubleArray.getSeasonalData(data_all, "09-01", "09-30");
+        String[][] data_oct = doubleArray.getSeasonalData(data_all, "10-01", "10-31");
+        String[][] data_nov = doubleArray.getSeasonalData(data_all, "11-01", "11-30");
+        String[][] data_dec = doubleArray.getSeasonalData(data_all, "12-01", "12-31");
         
-        //Initialize the summary result table
-        String[][] statsSummaryTable = new String[6][2];
-        statsSummaryTable[0][0] = "CDPHE DFlow Statistics for " + stationID + "; " + stationName + "; created on " + today;
-//        statsSummaryTable[1][0] = "Analysis Period";
-        statsSummaryTable[2][0] = "Biologically-based Design Low Flow, (" + m + "-day minimum) [cfs]";
-//        statsSummaryTable[3][0] = "Annual Low Flow (" + m + "-day minimum) [cfs]";
-        statsSummaryTable[4][0] = "Low Flow Statistics based on 'DFLOW' User's Manual:";
-        statsSummaryTable[5][0] = "Rossman, L.A. 'DFLOW User's Manual' U.S. Environmental Protection Agency Cincinnati, Ohio 45265.";
+        //Calculate design flows
+        double[] designFlows = new double[13];
+        designFlows[0] = doubleMath.round(CDPHE_Biological_calcs(data_all, m, R, clusterLength, clusterCountMax), 3);   //entire record
+        designFlows[1] = doubleMath.round(CDPHE_Biological_calcs(data_jan, m, R, clusterLength, clusterCountMax), 3);   //January
+        designFlows[2] = doubleMath.round(CDPHE_Biological_calcs(data_feb, m, R, clusterLength, clusterCountMax), 3);   //February
+        designFlows[3] = doubleMath.round(CDPHE_Biological_calcs(data_mar, m, R, clusterLength, clusterCountMax), 3);   //March
+        designFlows[4] = doubleMath.round(CDPHE_Biological_calcs(data_apr, m, R, clusterLength, clusterCountMax), 3);   //April
+        designFlows[5] = doubleMath.round(CDPHE_Biological_calcs(data_may, m, R, clusterLength, clusterCountMax), 3);   //May
+        designFlows[6] = doubleMath.round(CDPHE_Biological_calcs(data_jun, m, R, clusterLength, clusterCountMax), 3);   //June
+        designFlows[7] = doubleMath.round(CDPHE_Biological_calcs(data_jul, m, R, clusterLength, clusterCountMax), 3);   //July
+        designFlows[8] = doubleMath.round(CDPHE_Biological_calcs(data_aug, m, R, clusterLength, clusterCountMax), 3);   //August
+        designFlows[9] = doubleMath.round(CDPHE_Biological_calcs(data_sep, m, R, clusterLength, clusterCountMax), 3);   //September
+        designFlows[10] = doubleMath.round(CDPHE_Biological_calcs(data_oct, m, R, clusterLength, clusterCountMax), 3);  //October
+        designFlows[11] = doubleMath.round(CDPHE_Biological_calcs(data_nov, m, R, clusterLength, clusterCountMax), 3);  //November
+        designFlows[12] = doubleMath.round(CDPHE_Biological_calcs(data_dec, m, R, clusterLength, clusterCountMax), 3);  //December
         
-        statsSummaryTable[0][1] = "";
-        statsSummaryTable[1][1] = "";
-        statsSummaryTable[2][1] = "to be added later";
-        statsSummaryTable[3][1] = "--";
-        statsSummaryTable[4][1] = "";
-        statsSummaryTable[5][1] = "";
+        return designFlows;
+    }
+    /**
+     * Calculate the CDPHE "biologically-based" design flow (see DFLOW user manual) 
+     * which is an 'm'-day harmonic average low flow based on a certain excursion count (exceedance?)
+     * @param flowData  flow data, column1 = dates (format yyyy-mm-dd), column2 = flow values
+     * @param m  the number of days to average for annual low flow analysis (m-day average)
+     * @param R  the desired return period of the m-day low flow (in years)
+     * @param clusterLength  the length of time for the definition of a 'cluster' of excursion 
+     * periods (default should be 120). All excursion periods within this amount of 
+     * time of each other will be counted, subject to the clusterCountMax below.
+     * @param clusterCountMax  the upper count limit on how many excursion periods 
+     * will be counted within an excursion cluster (default should be 5)
+     * @return
+     * @throws IOException
+     * @throws ParseException 
+     */
+    private double CDPHE_Biological_calcs(String[][] flowData,
+                                   int m,
+                                   int R,
+                                   int clusterLength,
+                                   int clusterCountMax) throws IOException, ParseException{
+        DoubleArray doubleArray =  new DoubleArray();
+        DoubleMath doubleMath = new DoubleMath();
         
         //Calculate m-day statistics
         Object[] resultArray = doubleArray.getMdayData(flowData, m, "harmonic");
@@ -209,7 +192,7 @@
         ArrayList<Double> average_Mday = (ArrayList<Double>) resultArray[1];
         
         //Get extreme-value based design flow (as a trial design flow to start searching for the biologically based one, note this still uses an arithmetic mean)
-        double trialDFLOW = CDPHE_ExtremeValue(mainFolder, stationID, stationName, flowData, m, R, "04-01");
+        double trialDFLOW = CDPHE_ExtremeValue(flowData, m, R, "04-01");
         double trialDFLOW_excursions = countExcursions(average_Mday_date, average_Mday, m, trialDFLOW, clusterLength, clusterCountMax);
         
         //Get allowed number of excursions
@@ -247,8 +230,6 @@
         
         //Call file writer for outputs fo flow statistics
         designFlow = doubleMath.round(designFlow, 3);
-        statsSummaryTable[2][0] = String.valueOf(designFlow);
-        writeStatsSummaryFile(mainFolder, statsSummaryTable);
         
         return designFlow;
     }
@@ -378,79 +359,23 @@
     /**
      * Calculate the CDPHE "human health" design flow (see DFLOW user manual) 
      * which is the harmonic mean of the flows
-     * @param mainFolder  the file path where the summary will be saved
-     * @param stationID  the station ID for the current station, used to label the output
-     * @param stationName  the station name for the current station, used to label the  output
      * @param flowData  flow data, column1 = dates (format yyyy-mm-dd), column2 = flow values
      * @return
      * @throws IOException
      * @throws ParseException 
      */
-    public double CDPHE_HumanHealth(String mainFolder,
-                                    String stationID,
-                                    String stationName,
-                                    String[][] flowData) throws IOException, ParseException{
+    public double CDPHE_HumanHealth(String[][] flowData) throws IOException, ParseException{
         DoubleMath doubleMath = new DoubleMath();
         
-        //Get today's date for output purposes
-        Date currentDate = new Date();
-        SimpleDateFormat desiredDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
-        String today = desiredDateFormat.format(currentDate);
-        stationName = stationName.replace(",", "");
-        String beginDate = flowData[0][0];
-        String endDate = flowData[flowData.length - 1][0];
-        
-        //Calculate properties of harmonic mean
+        //Pull data
         double[] flowOnlyData = new double[flowData.length];
         for(int i=0; i<flowData.length; i++){
             flowOnlyData[i] = Double.parseDouble(flowData[i][1]);
         }
-        double designFlow = doubleMath.meanHarmonic(flowOnlyData);
-        designFlow = doubleMath.round(designFlow, 3);
         
-        //Initialize the summary result table
-        String[][] statsSummaryTable = new String[5][2];
-        statsSummaryTable[0][0] = "CDPHE DFlow Statistics for " + stationID + "; " + stationName + "; created on " + today;
-        statsSummaryTable[1][0] = "Analysis Period";
-        statsSummaryTable[2][0] = "Human Health-based Design Low Flow, harmonic mean [cfs]";
-        statsSummaryTable[3][0] = "Low Flow Statistics based on 'DFLOW' User's Manual:";
-        statsSummaryTable[4][0] = "Rossman, L.A. 'DFLOW User's Manual' U.S. Environmental Protection Agency Cincinnati, Ohio 45265.";
-        
-        statsSummaryTable[0][1] = "";
-        statsSummaryTable[1][1] = beginDate + " to " + endDate;
-        statsSummaryTable[2][1] = String.valueOf(designFlow);
-        statsSummaryTable[3][1] = "";
-        statsSummaryTable[4][1] = "";
-        
-        
-        //Call file writer for outputs fo flow statistics
-        writeStatsSummaryFile(mainFolder, statsSummaryTable);
+        //Calculate design flows
+        double designFlow = doubleMath.round(doubleMath.meanHarmonic(flowOnlyData), 3);
         
         return designFlow;
     }
-    /**
-     * Writes the provided array to a CSV result file
-     * @param mainFolder  the folder location for the result file
-     * @param statsSummary  the desired contents of the file
-     * @throws IOException 
-     */
-    private void writeStatsSummaryFile(String mainFolder, String[][] statsSummary) throws IOException{
-        //Open a file writer for the summary of the flow statistcs per year
-        String path = mainFolder + File.separator + getFlowStatistics_summary();
-        FileWriter newFile =  new FileWriter(path, false);
-        PrintWriter writer = new PrintWriter(newFile);
-        
-        for(int i=0; i<statsSummary.length; i++){
-            String currentLine = statsSummary[i][0];
-            for(int j=1; j<statsSummary[i].length; j++){
-                currentLine = currentLine + "," + statsSummary[i][j];
-            }
-            writer.printf("%s" + "\r\n", currentLine);
-        }
-        
-        //Close file writer
-        newFile.close();
-        writer.close();
-        System.out.println("Text File located at:\t" + path);
-    }
 }

src/java/cfa/guiLOADEST_Model.java

@@ -888,9 +888,10 @@
         }else if(database.equalsIgnoreCase("CDWR")){
             this.dataSource = "Stream flow data and water quality test data retrieved from the Colorado Division of Water Resources, CDWR. http://www.dwr.state.co.us accessed: " + today;
         }
-        this.start = sortedData[0][0];
-        this.end = sortedData[sortedData.length - 1][0];
-        this.flowLen = String.valueOf(sortedData.length);
+        this.start = sortedData_combined[0][0];
+        this.end = sortedData_combined[sortedData_combined.length - 1][0];
+        this.flowLen = String.valueOf(sortedData_combined.length);
+        this.wqLen = String.valueOf(WQdata_combined.length);
         this.wqUnits = graphUnits;
     }
     public static void main(String[] args) throws IOException, InterruptedException, Exception {

src/java/cfa/guiTimeseries_Model.java

@@ -49,7 +49,7 @@
     String mainFolder = "C:/Projects/TylerWible/CodeDirectories/NetBeans/CSIP/data/CFA/Timeseries";
     String database = "USGS";//"CDWR";//"STORET";//"UserData";//
     String organizationName = "USGS";//"Co. Division of Water Resources";//"Colorado Dept. of Public Health & Environment";//
-    String stationID = "06764880";//"CLAGRECO";//"000028";//
+    String stationID = "09034250";//"06764880";//"CLAGRECO";//"000028";//
     String stationName = "South Platte River at Roscoe, Nebr.";//"Cache La Poudre Near Greeley";//"BIG THOMPSON R NEAR MOUTH";//
     String wqTest = "flow";//"00600 Total nitrogen, water, unfiltered, milligrams per liter -- mg/L";//"00625 Ammonia-nitrogen as N -- mg/L";//
     String beginDate = "";
@@ -89,7 +89,19 @@
     String units = "?";
     String dataSource = "?";
     double extremeValueDFLOW = -1;
-    double biologicalDFLOW = -1;
+    double biologicalDFLOW_all = -1;
+    double biologicalDFLOW_jan = -1;
+    double biologicalDFLOW_feb = -1;
+    double biologicalDFLOW_mar = -1;
+    double biologicalDFLOW_apr = -1;
+    double biologicalDFLOW_may = -1;
+    double biologicalDFLOW_jun = -1;
+    double biologicalDFLOW_jul = -1;
+    double biologicalDFLOW_aug = -1;
+    double biologicalDFLOW_sep = -1;
+    double biologicalDFLOW_oct = -1;
+    double biologicalDFLOW_nov = -1;
+    double biologicalDFLOW_dec = -1;
     double humanHealthDFLOW = -1;
     double max = -1;
     double min = -1;
@@ -219,8 +231,44 @@
     public String getCDPHE_ExtremeValueDFLOW(){
         return String.valueOf(extremeValueDFLOW);
     }
-    public String getCDPHE_BiologicalDFLOW(){
-        return String.valueOf(biologicalDFLOW);
+    public String getCDPHE_BiologicalDFLOW_all(){
+        return String.valueOf(biologicalDFLOW_all);
+    }
+    public String getCDPHE_BiologicalDFLOW_jan(){
+        return String.valueOf(biologicalDFLOW_jan);
+    }
+    public String getCDPHE_BiologicalDFLOW_feb(){
+        return String.valueOf(biologicalDFLOW_feb);
+    }
+    public String getCDPHE_BiologicalDFLOW_mar(){
+        return String.valueOf(biologicalDFLOW_mar);
+    }
+    public String getCDPHE_BiologicalDFLOW_apr(){
+        return String.valueOf(biologicalDFLOW_apr);
+    }
+    public String getCDPHE_BiologicalDFLOW_may(){
+        return String.valueOf(biologicalDFLOW_may);
+    }
+    public String getCDPHE_BiologicalDFLOW_jun(){
+        return String.valueOf(biologicalDFLOW_jun);
+    }
+    public String getCDPHE_BiologicalDFLOW_jul(){
+        return String.valueOf(biologicalDFLOW_jul);
+    }
+    public String getCDPHE_BiologicalDFLOW_aug(){
+        return String.valueOf(biologicalDFLOW_aug);
+    }
+    public String getCDPHE_BiologicalDFLOW_sep(){
+        return String.valueOf(biologicalDFLOW_sep);
+    }
+    public String getCDPHE_BiologicalDFLOW_oct(){
+        return String.valueOf(biologicalDFLOW_oct);
+    }
+    public String getCDPHE_BiologicalDFLOW_nov(){
+        return String.valueOf(biologicalDFLOW_nov);
+    }
+    public String getCDPHE_BiologicalDFLOW_dec(){
+        return String.valueOf(biologicalDFLOW_dec);
     }
     public String getCDPHE_HumanHealthDFLOW(){
         return String.valueOf(humanHealthDFLOW);
@@ -1912,21 +1960,47 @@
                 CDPHE_lowFlowStats cdphe_lowflow = new CDPHE_lowFlowStats();
                 if(CDPHE_lowFlowType.equalsIgnoreCase("extreme-value")){
                     //Calculate the Extreme-value based design flow:
-                    this.extremeValueDFLOW = cdphe_lowflow.CDPHE_ExtremeValue(mainFolder, stationID, stationName, sortedData_combined, CDPHE_m, CDPHE_R, CDPHE_waterYearBegin);
+                    this.extremeValueDFLOW = cdphe_lowflow.CDPHE_ExtremeValue(sortedData_combined, CDPHE_m, CDPHE_R, CDPHE_waterYearBegin);
                     
                 }else if(CDPHE_lowFlowType.equalsIgnoreCase("biological")){
                     //Calculate the Biologically based design flow:
-                    this.biologicalDFLOW = cdphe_lowflow.CDPHE_Biological(mainFolder, stationID, stationName, sortedData_combined, CDPHE_m, CDPHE_R, CDPHE_clusterLength, CDPHE_clusterCountMax);
+                    double[] biologial_flows = cdphe_lowflow.CDPHE_Biological(sortedData_combined, CDPHE_m, CDPHE_R, CDPHE_clusterLength, CDPHE_clusterCountMax);
+                    this.biologicalDFLOW_all = biologial_flows[0];
+                    this.biologicalDFLOW_jan = biologial_flows[1];
+                    this.biologicalDFLOW_feb = biologial_flows[2];
+                    this.biologicalDFLOW_mar = biologial_flows[3];
+                    this.biologicalDFLOW_apr = biologial_flows[4];
+                    this.biologicalDFLOW_may = biologial_flows[5];
+                    this.biologicalDFLOW_jun = biologial_flows[6];
+                    this.biologicalDFLOW_jul = biologial_flows[7];
+                    this.biologicalDFLOW_aug = biologial_flows[8];
+                    this.biologicalDFLOW_sep = biologial_flows[9];
+                    this.biologicalDFLOW_oct = biologial_flows[10];
+                    this.biologicalDFLOW_nov = biologial_flows[11];
+                    this.biologicalDFLOW_dec = biologial_flows[12];
                     
                 }else if(CDPHE_lowFlowType.equalsIgnoreCase("human-health")){
                     //Calculate the Human-health based design flow:
-                    this.humanHealthDFLOW = cdphe_lowflow.CDPHE_HumanHealth(mainFolder, stationID, stationName, sortedData_combined);
+                    this.humanHealthDFLOW = cdphe_lowflow.CDPHE_HumanHealth(sortedData_combined);
                     
                 }else if(CDPHE_lowFlowType.equalsIgnoreCase("all")){
                     //Calculate all 3 design flows
-                    this.extremeValueDFLOW = cdphe_lowflow.CDPHE_ExtremeValue(mainFolder, stationID, stationName, sortedData_combined, CDPHE_m, CDPHE_R, CDPHE_waterYearBegin);
-                    this.biologicalDFLOW = cdphe_lowflow.CDPHE_Biological(mainFolder, stationID, stationName, sortedData_combined, CDPHE_m, CDPHE_R, CDPHE_clusterLength, CDPHE_clusterCountMax);
-                    this.humanHealthDFLOW = cdphe_lowflow.CDPHE_HumanHealth(mainFolder, stationID, stationName, sortedData_combined);
+                    this.extremeValueDFLOW = cdphe_lowflow.CDPHE_ExtremeValue(sortedData_combined, CDPHE_m, CDPHE_R, CDPHE_waterYearBegin);
+                    double[] biologial_flows = cdphe_lowflow.CDPHE_Biological(sortedData_combined, CDPHE_m, CDPHE_R, CDPHE_clusterLength, CDPHE_clusterCountMax);
+                    this.biologicalDFLOW_all = biologial_flows[0];
+                    this.biologicalDFLOW_jan = biologial_flows[1];
+                    this.biologicalDFLOW_feb = biologial_flows[2];
+                    this.biologicalDFLOW_mar = biologial_flows[3];
+                    this.biologicalDFLOW_apr = biologial_flows[4];
+                    this.biologicalDFLOW_may = biologial_flows[5];
+                    this.biologicalDFLOW_jun = biologial_flows[6];
+                    this.biologicalDFLOW_jul = biologial_flows[7];
+                    this.biologicalDFLOW_aug = biologial_flows[8];
+                    this.biologicalDFLOW_sep = biologial_flows[9];
+                    this.biologicalDFLOW_oct = biologial_flows[10];
+                    this.biologicalDFLOW_nov = biologial_flows[11];
+                    this.biologicalDFLOW_dec = biologial_flows[12];
+                    this.humanHealthDFLOW = cdphe_lowflow.CDPHE_HumanHealth(sortedData_combined);
                 }
             }
         }else{

src/java/m/cfa/Timeseries_V1_0.java

@@ -116,7 +116,19 @@
         result.put(JSONUtils.data("data_source", model.getDataSource()));
         //Get CDPHE low flow results
         result.put(JSONUtils.data("cdphe_extremeValueDFLOW", model.getCDPHE_ExtremeValueDFLOW()));
-        result.put(JSONUtils.data("cdphe_biologicalDFLOW", model.getCDPHE_BiologicalDFLOW()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_all", model.getCDPHE_BiologicalDFLOW_all()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_jan", model.getCDPHE_BiologicalDFLOW_jan()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_feb", model.getCDPHE_BiologicalDFLOW_feb()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_mar", model.getCDPHE_BiologicalDFLOW_mar()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_apr", model.getCDPHE_BiologicalDFLOW_apr()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_may", model.getCDPHE_BiologicalDFLOW_may()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_jun", model.getCDPHE_BiologicalDFLOW_jun()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_jul", model.getCDPHE_BiologicalDFLOW_jul()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_aug", model.getCDPHE_BiologicalDFLOW_aug()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_sep", model.getCDPHE_BiologicalDFLOW_sep()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_oct", model.getCDPHE_BiologicalDFLOW_oct()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_nov", model.getCDPHE_BiologicalDFLOW_nov()));
+        result.put(JSONUtils.data("cdphe_biologicalDFLOW_dec", model.getCDPHE_BiologicalDFLOW_dec()));
         result.put(JSONUtils.data("cdphe_humanHealthDFLOW", model.getCDPHE_HumanHealthDFLOW()));
         //Get all data results
         result.put(JSONUtils.data("max", model.getMax()));