Displaying differences for changeset
 
display as  

src/java/m/cfa/flood/Bulletin17B.java

@@ -531,8 +531,8 @@
         pplot(pp, K, dataout, GD, directory, database, stationId, stationName, showLargeFloods, plotref, plottype);
 
         //Assemble a summary of return periods and flow values    (Tyler)
-        String[][] summaryTable = probFreqData(dataout);
-        return summaryTable;
+        String[][] summaryTableWeightedGenSkew = probFreqData(dataout);
+        return summaryTableWeightedGenSkew;
     }
     /**
      * stationStats:  used to calculate Station Statistics Skew and Standard Deviation

src/java/m/cfa/flood/V1_0.java

@@ -58,8 +58,9 @@
         resultPayload.put("end", model.getEnd());
         resultPayload.put("data_source", model.getDataSource());
         resultPayload.put("skewErrorMessage", model.getSkewErrorMessage());
-        String output = FileUtils.readFileToString(model.getOutput());
+        String output = FileUtils.readFileToString(model.getOutputWeightedGenSkew(), "UTF-8");
         resultPayload.put("output", output);
+        resultPayload.put("floodSummary_weightedGenSkew", model.getOutputWeightedGenSkew());
         resultPayload.put("graph", model.getGraph());
     }
 }

src/java/m/cfa/flood/guiFlood_Model.java

@@ -43,7 +43,7 @@
     String skewErrorMessage = "?";
     
     //Gets
-    public File getOutput(){ return new File(directory, "flood_summary.txt"); }
+    public File getOutputWeightedGenSkew(){ return new File(directory, "flood_summary.txt"); }
     public String getGraph(){ return "flood_graph.jpg"; }
     public String getLen(){ return len; }
     public String getStart(){ return start; }
@@ -74,8 +74,8 @@
      * @param dynamicSummary  string[][] array to be written as each line of the text file
      * @throws IOException
      */
-    public void writeSummary(String[][] dynamicSummary) throws IOException{
-        String path = directory + File.separator + getOutput().getName();
+    public void writeSummary(String[][] dynamicSummary, String resultFileName) throws IOException{
+        String path = directory + File.separator + resultFileName;
         FileWriter writer =  new FileWriter(path, false);
         PrintWriter print_line = new PrintWriter(writer);
 
@@ -152,14 +152,14 @@
             
             //Run Bulletin 17 function and return graph
             Bulletin17B bulletin17B = new Bulletin17B();
-            String[][] dataSummary = bulletin17B.b17(peakFlowData_combined, gg, MSERbar, directory, database, stationId, stationName, showLargeFloods, plotref, plottype);
+            String[][] dataSummaryWeightedGenSkew = bulletin17B.b17(peakFlowData_combined, gg, MSERbar, directory, database, stationId, stationName, showLargeFloods, plotref, plottype);
             len = String.valueOf(peakFlowData_combined.length);
             start = String.valueOf(peakFlowData_combined[0][0]);
             end = String.valueOf(peakFlowData_combined[peakFlowData_combined.length - 1][0]);
             skewErrorMessage = bulletin17B.skewErrorMessage;
 
             //Write out the data summary to be displayed with the graph
-            writeSummary(dataSummary);
+            writeSummary(dataSummaryWeightedGenSkew, getOutputWeightedGenSkew().getName());
             
         }else{
             throw new IOException("Error: Flood analysis method specified is not 'B17'");