Displaying differences for changeset
 
display as  

tools/MetaModelTools/src/data/interpretors/SOLFile.java

@@ -11,10 +11,206 @@
  */
 package data.interpretors;
 
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 /**
  *
  * @author <a href="mailto:shaun.case@colostate.edu">Shaun Case</a>
  */
 public class SOLFile {
-    
+
+    private static final Logger LOGGER = Logger.getLogger(IFCFile.class.getName());
+    //Logs for errors and warnings.
+
+    private String errorsInSolFile = "";    // list of variables adjusted on output
+    public String comments = "";
+
+    //File Line 4 values
+    public String soilName; // a) soil name for current OFE or channel - character (slid)
+    public String soilTexture; // b) soil texture for current OFE or channel - character (texid)
+    public int numLayers; // c) number of soil layers for current OFE or channel - integer (nsl)
+    public double salb; // d) albedo of the bare dry surface soil on the current OFE or channel - real (salb)
+    public double sat; // e) initial saturation level of the soil profile porosity (m/m) - real (sat)
+    public double ki; // f) baseline interrill erodibility parameter (kg*s/m4) - real (ki)
+    public double kr; // g) baseline rill erodibility parameter (s/m) - real (kr)
+    public double shcrit; // h) baseline critical shear parameter (N/m2) - real (shcrit)
+    public double avke; // i) effective hydraulic conductivity of surface soil (mm/h) - real (avke)    
+
+    //File starting line 5 values for each horizon/layer
+    public double[] solthk; // a) depth from soil surface to bottom of soil layer (mm) - real (solthk)
+    public double[] sand; // b) percentage of sand in the layer (%) - real (sand)
+    public double[] clay; // c) percentage of clay in the layer (%) - real (clay)
+    public double[] orgmat; // d) percentage of organic matter (volume) in the layer (%) - real (orgmat)
+    public double[] cec; // e) cation exchange capacity in the layer (meq/100 g of soil) - real (cec)
+    public double[] rfg; // f) percentage of rock fragments by volume in the layer (%) - real (rfg)
+
+    //File last line values:  Bedrock restricting layer info (Most of the soils are not going to have any bedrock layer defined so this line ends up being all 0's)
+    public int restrictingFlag; // a) flag to indicate if present
+    public int restrictingType; // b) type
+    public double anisotropyRatio; // c) anisotropy ratio
+    public double ksat; // d) ksat    
+
+    public SOLFile(String fileData) throws IOException {
+        readSol(fileData);
+    }
+
+    /**
+     * ********************************************************************************************************
+     */
+    /* reads line from file skipping comments */
+    private String readLine(BufferedReader inpf) {
+        String line;
+        try {
+            line = inpf.readLine();
+        } catch (IOException e) {
+            return null;
+        }
+        if (line == null || line.length() == 0) {
+            return null;
+        }
+
+        return line;
+    }
+
+    // Sol file description
+    // Line 1:  version control number (95.7) - real (datver)
+    // Line 2:  a) User comment line - character*80, (solcom)
+    // Line 3:  a) number of overland flow elements(OFE's) or channels integer (ntemp)
+    //          b) flag to to use internal hydraulic conductivity adjustments - integer (ksflag)
+    //              0 - do not use adjustments (conductivity will be held constant)
+    //              1 - use internal adjustments
+    //           [ALWAYS "1 1" if generated by us...
+    //      Lines 4 & 5 are repeated for the number of OFE's or channels on Line 3a.
+    // Line 4:  a) soil name for current OFE or channel - character (slid)
+    //          b) soil texture for current OFE or channel - character (texid)
+    //          c) number of soil layers for current OFE or channel - integer (nsl)
+    //          d) albedo of the bare dry surface soil on the current OFE or channel - real (salb)
+    //          e) initial saturation level of the soil profile porosity (m/m) - real (sat)
+    //          f) baseline interrill erodibility parameter (kg*s/m4) - real (ki)
+    //          g) baseline rill erodibility parameter (s/m) - real (kr)
+    //          h) baseline critical shear parameter (N/m2) - real (shcrit)
+    //          i) effective hydraulic conductivity of surface soil (mm/h) - real (avke)
+    // Line 5: (repeated for the number of soil layers indicated on Line 4c.)
+    //          a) depth from soil surface to bottom of soil layer (mm) - real (solthk)
+    //          b) percentage of sand in the layer (%) - real (sand)
+    //          c) percentage of clay in the layer (%) - real (clay)
+    //          d) percentage of organic matter (volume) in the layer (%) - real (orgmat)
+    //          e) cation exchange capacity in the layer (meq/100 g of soil) - real (cec)
+    //          f) percentage of rock fragments by volume in the layer (%) - real (rfg)
+    // Line 6: Bedrock restricting layer info (Most of the soils are not going to have any bedrock layer defined so this line ends up being all 0's)
+    //          a) flag to indicate if present
+    //          b) type
+    //          c) anisotropy ratio
+    //          d) ksat    
+    private void readNewSol(BufferedReader inpf) throws IOException {
+        try {
+            //Should now be starting with line 4:
+            String line4 = readLine(inpf);
+            String[] line4Parts = line4.trim().split(" ");
+            if (line4Parts.length != 9) {
+                throw new IOException("SOL file does not contain a valid line 4.  Expected 9 values on line 4 but found " + line4Parts.length);
+            }
+
+            //  Read initial data about soil
+            soilName = line4Parts[0];
+            soilTexture = line4Parts[1];
+            numLayers = Integer.parseInt(line4Parts[2]);
+            salb = Double.parseDouble(line4Parts[3]);
+            sat = Double.parseDouble(line4Parts[4]);
+            ki = Double.parseDouble(line4Parts[5]);
+            kr = Double.parseDouble(line4Parts[6]);
+            shcrit = Double.parseDouble(line4Parts[7]);
+            avke = Double.parseDouble(line4Parts[8]);
+
+            solthk = new double[numLayers];
+            sand = new double[numLayers];
+            clay = new double[numLayers];
+            orgmat = new double[numLayers];
+            cec = new double[numLayers];
+            rfg = new double[numLayers];
+            //  Read each soil horizon/layer present in file
+            for (int i = 0; i < numLayers; i++) {
+                String horizonLine = readLine(inpf);
+
+                if ((null != horizonLine) && (!horizonLine.isEmpty())) {
+                    String[] lineParts = horizonLine.trim().split(" ");
+
+                    if (lineParts.length != 6) {
+                        throw new IOException("Invlalid horizon line found in SOL file on line " + (5 + i)
+                                + ".  Line does not contain 6 values as expected, but has " + lineParts.length + " values instead.");
+                    }
+
+                    solthk[i] = Double.parseDouble(lineParts[0]);
+                    sand[i] = Double.parseDouble(lineParts[1]);
+                    clay[i] = Double.parseDouble(lineParts[2]);
+                    orgmat[i] = Double.parseDouble(lineParts[3]);
+                    cec[i] = Double.parseDouble(lineParts[4]);
+                    rfg[i] = Double.parseDouble(lineParts[5]);
+
+                } else {
+                    throw new IOException("Invalid horizon line found in SOL file on line " + (5 + i) + ".");
+                }
+
+            }
+
+            //  Now read bedrock line
+            String bedrockLine = readLine(inpf);
+            if ((null != bedrockLine) && (!bedrockLine.isEmpty())) {
+                String[] lineParts = bedrockLine.trim().split(" ");
+                if (lineParts.length != 4) {
+                    throw new IOException("SOL file does not contain a valid bedrock line.  Expected 4 values on line 4 but found " + lineParts.length);
+                }
+
+                restrictingFlag = Integer.parseInt(lineParts[0]);
+                restrictingType = Integer.parseInt(lineParts[1]);
+                anisotropyRatio = Double.parseDouble(lineParts[2]);
+                ksat = Double.parseDouble(lineParts[2]);
+                
+            } else {
+                throw new IOException("No bedrock line found in this SOL file.");
+            }
+
+        } finally {
+            try {
+                inpf.close();
+            } catch (IOException e) {
+                LOGGER.log(Level.SEVERE, "Unable to close soil input stream.", e);
+            }
+        }
+        //System.out.println(errorsInSolFile);
+    }
+
+    /**
+     *
+     * @param fileData
+     * @throws java.io.IOException
+     */
+    /* reads ifc file */
+    private void readSol(String fileData) throws IOException {
+        BufferedReader inpf;
+        inpf = new BufferedReader(new StringReader(fileData));
+
+        String firstLine = readLine(inpf);
+        if (firstLine.startsWith("2006.2")) {
+            comments = readLine(inpf);
+            if ((null != comments) && (!comments.isEmpty())) {
+                comments = comments.replace("Comments:", "").trim();
+            }
+            String line3 = readLine(inpf);
+            if (null != line3) {
+                line3 = line3.trim();
+                if (!line3.equalsIgnoreCase("1 1")) {
+                    throw new IOException("Invalid SOL File.  Line 3 shold be '1 1' but is: " + line3);
+                }
+            }
+            readNewSol(inpf);
+        } else {
+            throw new IOException("Invalid SOL File.  Version tag not found or does not match '2006.2'");
+        }
+    }
+
 }

tools/MetaModelTools/src/models/ModelArchive.java

@@ -65,12 +65,12 @@
     }
 
     public ModelArchive(JSONObject inputData) throws JSONException {
-    suid = inputData.getString("_id");
-    ctime = inputData.getString("ctime");
-    etime = inputData.getString("etime");
-    service = inputData.getString("service");
-    status = inputData.getString("status");
-    req_ip = inputData.getString("req_ip");
+    suid = inputData.getString(csip.ModelDataService.KEY_SUUID);
+    ctime = inputData.getString(csip.ModelDataService.KEY_TSTAMP);
+    etime = inputData.getString(csip.ModelDataService.KEY_EXPIRATION_DATE);
+    service = inputData.getString(csip.ModelDataService.KEY_SERVICE_URL);
+    status = inputData.getString(csip.ModelDataService.KEY_STATUS);
+    req_ip = inputData.getString(csip.ModelDataService.KEY_REQ_IP);        
     filename = suid + ".zip";
     }
 

tools/MetaModelTools/src/models/ModelArchiveFactory.java

@@ -5,7 +5,10 @@
  */
 package models;
 
+import java.io.IOException;
 import org.bson.Document;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
 
 /**
  *
@@ -27,7 +30,14 @@
             );
         } else {
             if (serviceName.contains("wepp/")) {
-
+                model = new WEPPModelArchive(doc.getString("_id"),
+                        doc.getString("ctime"),
+                        doc.getString("etime"),
+                        serviceName,
+                        doc.getString("status"),
+                        doc.getString("req_ip"),
+                        doc.getString("filename")
+                );
             } else {
                 //Not a service we are interested in...
             }
@@ -35,4 +45,71 @@
 
         return model;
     }
+
+    
+    public static ModelArchive getModelArchive(String serviceName, Document doc, byte[] fileData) throws IOException, JSONException {
+        ModelArchive model = null;
+
+        if (serviceName.contains("weps/5.2")) {
+            model = new WEPSModelArchive(doc.getString("_id"),
+                    doc.getString("ctime"),
+                    doc.getString("etime"),
+                    serviceName,
+                    doc.getString("status"),
+                    doc.getString("req_ip"),
+                    doc.getString("filename"),
+                    fileData
+            );
+        } else {
+            if (serviceName.contains("wepp/")) {
+                model = new WEPPModelArchive(doc.getString("_id"),
+                        doc.getString("ctime"),
+                        doc.getString("etime"),
+                        serviceName,
+                        doc.getString("status"),
+                        doc.getString("req_ip"),
+                        doc.getString("filename"),
+                        fileData
+                );
+            } else {
+                //Not a service we are interested in...
+            }
+        }
+
+        return model;
+    }
+    
+    public static ModelArchive getModelArchive(JSONObject metaData) throws JSONException {
+        ModelArchive model = null;
+        String serviceName = metaData.getString(csip.ModelDataService.KEY_SERVICE_URL);
+
+        if (serviceName.contains("weps/5.2")) {
+            model = new WEPSModelArchive(metaData);
+        } else {
+            if (serviceName.contains("wepp/")) {
+                model = new WEPPModelArchive(metaData);
+            } else {
+                //Not a service we are interested in...
+            }
+        }
+
+        return model;
+    }
+    
+    public static ModelArchive getModelArchive(JSONObject metaData, byte[] fileData) throws JSONException, IOException {
+        ModelArchive model = null;
+        String serviceName = metaData.getString(csip.ModelDataService.KEY_SERVICE_URL);
+
+        if (serviceName.contains("weps/5.2")) {
+            model = new WEPSModelArchive(metaData, fileData);
+        } else {
+            if (serviceName.contains("wepp/")) {
+                model = new WEPPModelArchive(metaData, fileData);
+            } else {
+                //Not a service we are interested in...
+            }
+        }
+
+        return model;
+    }    
 }

tools/MetaModelTools/src/models/WEPPModelArchive.java

@@ -54,6 +54,15 @@
     setFileDataEx(fileData);
     }
 
+    public WEPPModelArchive(JSONObject metaData) throws JSONException {
+    super(metaData);
+    }     
+    
+    public WEPPModelArchive(JSONObject metaData, byte[] fileData) throws JSONException, IOException {
+    super(metaData);
+        setFileDataEx(fileData);
+    }  
+    
     @Override
     public final void setFileDataEx(byte[] fileData) throws IOException, JSONException {
     super.setFileDataEx(fileData);
@@ -79,6 +88,7 @@
         }
     }
 
+        // TODO:  Change to getting the ROT file.
 //        try {
 //            management = getManagementFile(fileData);
 //        } catch (IOException ex) {
@@ -172,26 +182,17 @@
         weppMetaData = new WEPPMetaData();
     }
 //
-//  weppMetaData.suid(this.suid);
-//  weppMetaData.cokey(getOriginalRequest("soil"));
-//  weppMetaData.longitude(Double.parseDouble(getOriginalRequest("longitude")));
-//  weppMetaData.latitude(Double.parseDouble(getOriginalRequest("latitude")));    
-//  weppMetaData.annualPrecip(cligenData.annualAvgPrecip());
-//  weppMetaData.windEnergy(windData.simulationAverage());
-//  weppMetaData.componentName(solFile.componentName);
-//  weppMetaData.fractionSand(solFile.fractionSand);
-//  weppMetaData.fractionSilt(solFile.fractionSilt);
-//  weppMetaData.fractionClay(solFile.fractionClay);
-//  weppMetaData.crustStability(solFile.crustStability);
-//  weppMetaData.surfRockFrag(solFile.surfaceFragmentCover);
-//  weppMetaData.albedo(solFile.surfaceAlbedo);
-//  weppMetaData.num_layers(solFile.layerThickness.length);
-//  weppMetaData.surface_thickness(((int) solFile.layerThickness[0]));
-//  weppMetaData.slope_gradient(solFile.surfaceSlope);
-//
-//  //TODO:  Do we need to measure the layers before setting these??  WEPPSoilInput already filters/sorts layers, etc...
-//  weppMetaData.aggStability(solFile.aggregateStability[0]);
-//  weppMetaData.soilWiltPoint(solFile.wiltingPointSWC[0]);
+    weppMetaData.suid(this.suid);
+    weppMetaData.cokey(getOriginalRequest("soil"));
+    weppMetaData.longitude(Double.parseDouble(getOriginalRequest("longitude")));
+    weppMetaData.latitude(Double.parseDouble(getOriginalRequest("latitude")));    
+    weppMetaData.annualPrecip(cligenData.annualAvgPrecip());
+    weppMetaData.windEnergy(windData.simulationAverage());
+    weppMetaData.componentName(solFile.soilName);
+
+    weppMetaData.num_layers(solFile.numLayers);
+    weppMetaData.surface_thickness(((int) solFile.solthk[0]));
+
 
     String biomass_avg = getOriginalResponse("average_biomass");
     if (!biomass_avg.isEmpty()) {
@@ -202,24 +203,34 @@
         badModelMessage += "Missing biomass_avg result in WEPP output result file.";
     }
 
-    String stir_avg = getOriginalResponse("avg_all_stir");
-    if (!stir_avg.isEmpty()) {
-        weppMetaData.rotWeightSoilTillIntensity(Double.parseDouble(stir_avg));
+    String stir = getOriginalResponse("STIR");
+    if (!stir.isEmpty()) {
+        weppMetaData.rotWeightSoilTillIntensity(Double.parseDouble(stir));
     } else {
         badModelRun = true;
         badModelMessage += "##\n";
         badModelMessage += "Missing avg_all_stir result in WEPP output result file.";
     }
 
-    String wind_eros = getOriginalResponse("wind_eros");
-    if (!wind_eros.isEmpty()) {
-        weppMetaData.errosionRate(Double.parseDouble(wind_eros));
+    String soilLoss = getOriginalResponse("SoilLoss");
+    if (!soilLoss.isEmpty()) {
+        weppMetaData.erosionRate(Double.parseDouble(soilLoss));
     } else {
         badModelRun = true;
         badModelMessage += "##\n";
         badModelMessage += "Missing wind_eros result in WEPP output result file.";
     }
 
+    String respAvgAnnualPrecip = getOriginalResponse("Precipitation");
+    if (!respAvgAnnualPrecip.isEmpty()) {
+        weppMetaData.respAvgAnnualPrecip(Double.parseDouble(respAvgAnnualPrecip));
+    } else {
+        badModelRun = true;
+        badModelMessage += "##\n";
+        badModelMessage += "Missing wind_eros result in WEPP output result file.";
+    }    
+        
+        
     weppMetaData.errorMessages(badModelMessage);
 
     }
@@ -227,9 +238,9 @@
     private WEPSManagement getManagementFile(byte[] fileData) throws IOException {
     WEPSManagement weppManagement = new WEPSManagement(new Urls());
 
-    File managementFile = new File("management.man");
+    File managementFile = new File("management.rot");
     BufferedWriter bufferWriter = Files.newBufferedWriter(managementFile.toPath());
-    String data = getFileContents(fileData, ".man");
+    String data = getFileContents(fileData, ".rot");
     bufferWriter.write(data);
     bufferWriter.flush();
     bufferWriter.close();
@@ -265,7 +276,7 @@
     private SOLFile getSolFile(byte[] fileData) throws IOException {
     SOLFile requestData = null;
 
-    //requestData = new SOLFile(getFileContents(fileData, ".sol"));
+    requestData = new SOLFile(getFileContents(fileData, ".sol"));
 
     return requestData;
     }
@@ -323,21 +334,21 @@
     private String cokey;
     private double windEnergy;
     private double annualPrecip;
+        private double respAvgAnnualPrecip;        
+        private double avgAnnualPrecipEventDuration;
+        private double rillErodability;
+        private double wAvgSoilSandFraction;
+        private double wAvgSoilClayFraction;    
+        private double effectiveSurfaceConductivity;
+        private int contouring;
+        private double lsFactor;
+        private double erosionRate;       
     private double rotIrrEffect;
-    private double soilWiltPoint;
+        private double rotWeightCoverCropEffect;
     private double rotWeightResBiomass;
     private double rotWeightSoilTillIntensity;
     private double rotWeightResAddition;
-    private double aggStability;
-    private double crustStability;
-    private double surfRockFrag;
-    private double errosionRate;
     private String componentName;
-    private double[] fractionSand;
-    private double[] fractionSilt;
-    private double[] fractionClay;
-    private double albedo;
-    private double slope_gradient;
     private int surface_thickness;
     private int num_layers;
     private String suid;
@@ -366,15 +377,19 @@
     public double annualPrecip() {
         return annualPrecip;
     }
+        
+        public double respAvgAnnualPrecip(){
+            return respAvgAnnualPrecip;
+        }
 
+        public void respAvgAnnualPrecip( double value){
+             respAvgAnnualPrecip = value;
+        }
+        
     public double rotIrrEffect() {
         return rotIrrEffect;
     }
 
-    public double soilWiltPoint() {
-        return rotIrrEffect;
-    }
-
     public double rotWeightResBiomass() {
         return rotWeightResBiomass;
     }
@@ -387,22 +402,14 @@
         return rotWeightResAddition;
     }
 
-    public double aggStability() {
-        return aggStability;
+    public double erosionRate() {
+        return erosionRate;
     }
 
-    public double crustStability() {
-        return crustStability;
+    public void erosionRate(double value) {
+        erosionRate = value;
     }
-
-    public double surfRockFrag() {
-        return surfRockFrag;
-    }
-
-    public double errosionRate() {
-        return errosionRate;
-    }
-
+        
     public void windEnergy(double value) {
         windEnergy = value;
     }
@@ -415,10 +422,6 @@
         rotIrrEffect = value;
     }
 
-    public void soilWiltPoint(double value) {
-        rotIrrEffect = value;
-    }
-
     public void rotWeightResBiomass(double value) {
         rotWeightResBiomass = value;
     }
@@ -431,71 +434,14 @@
         rotWeightResAddition = value;
     }
 
-    public void aggStability(double value) {
-        aggStability = value;
-    }
-
-    public void crustStability(double value) {
-        crustStability = value;
-    }
-
-    public void surfRockFrag(double value) {
-        surfRockFrag = value;
-    }
-
-    public void errosionRate(double value) {
-        errosionRate = value;
-    }
-
     public String componentName() {
         return componentName;
     }
 
-    public double fractionSand(int index) {
-        if ((null != fractionSand) && (index < fractionSand.length)) {
-        return fractionSand[index];
-        }
-        return Double.NaN;
-    }
-
-    public double fractionSilt(int index) {
-        if ((null != fractionSand) && (index < fractionSilt.length)) {
-        return fractionSilt[index];
-        }
-        return Double.NaN;
-    }
-
-    public double fractionClay(int index) {
-        if ((null != fractionSand) && (index < fractionClay.length)) {
-        return fractionClay[index];
-        }
-        return Double.NaN;
-    }
-
     public void componentName(String value) {
         componentName = value;
     }
 
-    public void fractionSand(double[] value) {
-        fractionSand = value;
-    }
-
-    public void fractionSilt(double[] value) {
-        fractionSilt = value;
-    }
-
-    public void fractionClay(double[] value) {
-        fractionClay = value;
-    }
-
-    public void albedo(double value) {
-        albedo = value;
-    }
-
-    public void slope_gradient(double value) {
-        slope_gradient = value;
-    }
-
     public void surface_thickness(int value) {
         surface_thickness = value;
     }
@@ -504,14 +450,6 @@
         num_layers = value;
     }
 
-    public double albedo() {
-        return albedo;
-    }
-
-    public double slope_gradient() {
-        return slope_gradient;
-    }
-
     public int surface_thickness() {
         return surface_thickness;
     }
@@ -551,15 +489,12 @@
         results.put("wepp_archive_suid", weppMetaData.suid());
         results.put("annual_precipitation", weppMetaData.annualPrecip());
         results.put("wind_energy", weppMetaData.windEnergy());
-        results.put("crust_stability", weppMetaData.crustStability());
-        results.put("surface_rock_fragments", weppMetaData.surfRockFrag());
-        results.put("aggregate_stability", weppMetaData.aggStability());
-        results.put("soil_wilting_poiont", weppMetaData.soilWiltPoint());
+
         results.put("rotation_weighted_biomass", weppMetaData.rotWeightResBiomass());
         results.put("annual_precipitation", weppMetaData.annualPrecip());
 
         results.put("rotation_weighted_soil_tillage_intensity", weppMetaData.rotWeightSoilTillIntensity());
-        results.put("erosion_rate", weppMetaData.errosionRate());
+        results.put("erosion_rate", weppMetaData.erosionRate());
 
         ret_val.put(results);
         return ret_val;

tools/MetaModelTools/src/models/WEPSModelArchive.java

@@ -45,38 +45,47 @@
     private WEPSMetaData wepsMetaData;
 
     public WEPSModelArchive(String suid, String ctime, String etime, String service, String status, String req_ip, String filename) {
-    super(suid, ctime, etime, service, status, req_ip, filename);
+        super(suid, ctime, etime, service, status, req_ip, filename);
     }
 
     public WEPSModelArchive(String suid, String ctime, String etime, String service, String status, String req_ip, String filename, byte[] fileData) throws IOException, JSONException {
-    super(suid, ctime, etime, service, status, req_ip, filename, fileData);
-    setFileDataEx(fileData);
+        super(suid, ctime, etime, service, status, req_ip, filename, fileData);
+        setFileDataEx(fileData);
     }
 
+    public WEPSModelArchive(JSONObject metaData) throws JSONException {
+        super(metaData);
+    }
+
+    public WEPSModelArchive(JSONObject metaData, byte[] fileData) throws JSONException, IOException {
+    super(metaData);
+        setFileDataEx(fileData);
+    } 
+    
     @Override
     public final void setFileDataEx(byte[] fileData) throws IOException, JSONException {
-    super.setFileDataEx(fileData);
+        super.setFileDataEx(fileData);
 
-    try {
-        stdErrorFile = getStdErrorFile(fileData);
-    } catch (IOException ex) {
-        badModelRun = true;
-        badModelMessage += "##\n";
-        badModelMessage += ex.getMessage();
-    }
-    if (null != stdErrorFile) {
-        possibleBadModelRun = stdErrorFile.contains("IEEE_UNDERFLOW_FLAG") || stdErrorFile.contains("IEEE_DENORMAL");
+        try {
+            stdErrorFile = getStdErrorFile(fileData);
+        } catch (IOException ex) {
+            badModelRun = true;
+            badModelMessage += "##\n";
+            badModelMessage += ex.getMessage();
+        }
+        if (null != stdErrorFile) {
+            possibleBadModelRun = stdErrorFile.contains("IEEE_UNDERFLOW_FLAG") || stdErrorFile.contains("IEEE_DENORMAL");
 
-        if (possibleBadModelRun) {
-        badModelMessage += "##\nThe WEPS model executable stderr file contained: ";
-        badModelMessage += ((stdErrorFile.contains("IEEE_UNDERFLOW_FLAG")) ? "\nIEEE_UNDERFLOW_FLAG, Meaning that some values were rounded to zero because they were too small for the FORTRAN code to interpret." : "");
-        if (badModelMessage.contains("IEEE")) {
-            badModelMessage += "\n AND ";
-        }
-        badModelMessage += ((stdErrorFile.contains("IEEE_DENORMAL")) ? "\nIEEE_DENORMAL, Meaning that there are denormal numbers generated when running the code." : "");
-        badModelMessage += "\n This may be a hint about numerical problems in the model FORTRAN code, but it is not an error per se. Probably, the program finished successfully, but some result values may be suspect.";
-        }
-    }
+            if (possibleBadModelRun) {
+                badModelMessage += "##\nThe WEPS model executable stderr file contained: ";
+                badModelMessage += ((stdErrorFile.contains("IEEE_UNDERFLOW_FLAG")) ? "\nIEEE_UNDERFLOW_FLAG, Meaning that some values were rounded to zero because they were too small for the FORTRAN code to interpret." : "");
+                if (badModelMessage.contains("IEEE")) {
+                    badModelMessage += "\n AND ";
+                }
+                badModelMessage += ((stdErrorFile.contains("IEEE_DENORMAL")) ? "\nIEEE_DENORMAL, Meaning that there are denormal numbers generated when running the code." : "");
+                badModelMessage += "\n This may be a hint about numerical problems in the model FORTRAN code, but it is not an error per se. Probably, the program finished successfully, but some result values may be suspect.";
+            }
+        }
 
 //        try {
 //            management = getManagementFile(fileData);
@@ -85,483 +94,483 @@
 //            badModelMessage += "##\n";
 //            badModelMessage += ex.getMessage();
 //        }
-    try {
-        windData = getWindDataFile(fileData);
-    } catch (IOException ex) {
-        badModelRun = true;
-        badModelMessage += "##\n";
-        badModelMessage += ex.getMessage();
-    }
+        try {
+            windData = getWindDataFile(fileData);
+        } catch (IOException ex) {
+            badModelRun = true;
+            badModelMessage += "##\n";
+            badModelMessage += ex.getMessage();
+        }
 
-    if (windData.badWindData()) {
-        badModelMessage += "##\nThe Wind data associated with this model run has some qualifying messages: \n" + windData.windDataMessages();
-    }
+        if (windData.badWindData()) {
+            badModelMessage += "##\nThe Wind data associated with this model run has some qualifying messages: \n" + windData.windDataMessages();
+        }
 
-    try {
-        cligenData = getClimateDataFile(fileData);
-    } catch (IOException ex) {
-        badModelRun = true;
-        badModelMessage += "##\n";
-        badModelMessage += ex.getMessage();
-    }
+        try {
+            cligenData = getClimateDataFile(fileData);
+        } catch (IOException ex) {
+            badModelRun = true;
+            badModelMessage += "##\n";
+            badModelMessage += ex.getMessage();
+        }
 
-    if (cligenData.badClimateData()) {
-        badModelMessage += "##\nThe Cligen data associated with this model run has some qualifying messages: \n" + cligenData.cligenDataMessages();
-    }
+        if (cligenData.badClimateData()) {
+            badModelMessage += "##\nThe Cligen data associated with this model run has some qualifying messages: \n" + cligenData.cligenDataMessages();
+        }
 
-    try {
-        stdOutFile = getStdOutFile(fileData);
-    } catch (IOException ex) {
-        badModelRun = true;
-        badModelMessage += "##\n";
-        badModelMessage += ex.getMessage();
-    }
+        try {
+            stdOutFile = getStdOutFile(fileData);
+        } catch (IOException ex) {
+            badModelRun = true;
+            badModelMessage += "##\n";
+            badModelMessage += ex.getMessage();
+        }
 
-    try {
-        ifcFile = getIFCFile(fileData);
-    } catch (IOException ex) {
-        badModelRun = true;
-        badModelMessage += "##\n";
-        badModelMessage += ex.getMessage();
-    }
+        try {
+            ifcFile = getIFCFile(fileData);
+        } catch (IOException ex) {
+            badModelRun = true;
+            badModelMessage += "##\n";
+            badModelMessage += ex.getMessage();
+        }
 
-    if (!badModelRun && badModelMessage.isEmpty()) {
-        calcWEPSMetaData();
-    }
+        if (!badModelRun && badModelMessage.isEmpty()) {
+            calcWEPSMetaData();
+        }
     }
 
     public boolean questionableResults() {
-    return possibleBadModelRun;
+        return possibleBadModelRun;
     }
 
     public boolean badModelRun() {
-    return badModelRun;
+        return badModelRun;
     }
 
     public String badModelMessage() {
-    return badModelMessage;
+        return badModelMessage;
     }
 
     public IFCFile iFCFile() {
-    return ifcFile;
+        return ifcFile;
     }
 
     public WindGenData windData() {
-    return windData;
+        return windData;
     }
 
     public CligenData cligenData() {
-    return cligenData;
+        return cligenData;
     }
 
     public String stdErrorFile() {
-    return stdErrorFile;
+        return stdErrorFile;
     }
 
     public String stdOutFile() {
-    return stdOutFile;
+        return stdOutFile;
     }
 
     public WEPSMetaData getWEPSMetaData() {
-    return wepsMetaData;
+        return wepsMetaData;
     }
 
     public void calcWEPSMetaData() {
-    if (null == wepsMetaData) {
-        wepsMetaData = new WEPSMetaData();
-    }
+        if (null == wepsMetaData) {
+            wepsMetaData = new WEPSMetaData();
+        }
 
-    wepsMetaData.suid(this.suid);
-    wepsMetaData.cokey(getOriginalRequest("soil"));
-    wepsMetaData.longitude(Double.parseDouble(getOriginalRequest("longitude")));
-    wepsMetaData.latitude(Double.parseDouble(getOriginalRequest("latitude")));    
-    wepsMetaData.annualPrecip(cligenData.annualAvgPrecip());
-    wepsMetaData.windEnergy(windData.simulationAverage());
-    wepsMetaData.componentName(ifcFile.componentName);
-    wepsMetaData.fractionSand(ifcFile.fractionSand);
-    wepsMetaData.fractionSilt(ifcFile.fractionSilt);
-    wepsMetaData.fractionClay(ifcFile.fractionClay);
-    wepsMetaData.crustStability(ifcFile.crustStability);
-    wepsMetaData.surfRockFrag(ifcFile.surfaceFragmentCover);
-    wepsMetaData.albedo(ifcFile.surfaceAlbedo);
-    wepsMetaData.num_layers(ifcFile.layerThickness.length);
-    wepsMetaData.surface_thickness(((int) ifcFile.layerThickness[0]));
-    wepsMetaData.slope_gradient(ifcFile.surfaceSlope);
+        wepsMetaData.suid(this.suid);
+        wepsMetaData.cokey(getOriginalRequest("soil"));
+        wepsMetaData.longitude(Double.parseDouble(getOriginalRequest("longitude")));
+        wepsMetaData.latitude(Double.parseDouble(getOriginalRequest("latitude")));
+        wepsMetaData.annualPrecip(cligenData.annualAvgPrecip());
+        wepsMetaData.windEnergy(windData.simulationAverage());
+        wepsMetaData.componentName(ifcFile.componentName);
+        wepsMetaData.fractionSand(ifcFile.fractionSand);
+        wepsMetaData.fractionSilt(ifcFile.fractionSilt);
+        wepsMetaData.fractionClay(ifcFile.fractionClay);
+        wepsMetaData.crustStability(ifcFile.crustStability);
+        wepsMetaData.surfRockFrag(ifcFile.surfaceFragmentCover);
+        wepsMetaData.albedo(ifcFile.surfaceAlbedo);
+        wepsMetaData.num_layers(ifcFile.layerThickness.length);
+        wepsMetaData.surface_thickness(((int) ifcFile.layerThickness[0]));
+        wepsMetaData.slope_gradient(ifcFile.surfaceSlope);
 
-    //TODO:  Do we need to measure the layers before setting these??  WEPSSoilInput already filters/sorts layers, etc...
-    wepsMetaData.aggStability(ifcFile.aggregateStability[0]);
-    wepsMetaData.soilWiltPoint(ifcFile.wiltingPointSWC[0]);
+        //TODO:  Do we need to measure the layers before setting these??  WEPSSoilInput already filters/sorts layers, etc...
+        wepsMetaData.aggStability(ifcFile.aggregateStability[0]);
+        wepsMetaData.soilWiltPoint(ifcFile.wiltingPointSWC[0]);
 
-    String biomass_avg = getOriginalResponse("average_biomass");
-    if (!biomass_avg.isEmpty()) {
-        wepsMetaData.rotWeightResBiomass(Double.parseDouble(biomass_avg) * 2000);
-    } else {
-        badModelRun = true;
-        badModelMessage += "##\n";
-        badModelMessage += "Missing biomass_avg result in WEPS output result file.";
-    }
+        String biomass_avg = getOriginalResponse("average_biomass");
+        if (!biomass_avg.isEmpty()) {
+            wepsMetaData.rotWeightResBiomass(Double.parseDouble(biomass_avg) * 2000);
+        } else {
+            badModelRun = true;
+            badModelMessage += "##\n";
+            badModelMessage += "Missing biomass_avg result in WEPS output result file.";
+        }
 
-    String stir_avg = getOriginalResponse("avg_all_stir");
-    if (!stir_avg.isEmpty()) {
-        wepsMetaData.rotWeightSoilTillIntensity(Double.parseDouble(stir_avg));
-    } else {
-        badModelRun = true;
-        badModelMessage += "##\n";
-        badModelMessage += "Missing avg_all_stir result in WEPS output result file.";
-    }
+        String stir_avg = getOriginalResponse("avg_all_stir");
+        if (!stir_avg.isEmpty()) {
+            wepsMetaData.rotWeightSoilTillIntensity(Double.parseDouble(stir_avg));
+        } else {
+            badModelRun = true;
+            badModelMessage += "##\n";
+            badModelMessage += "Missing avg_all_stir result in WEPS output result file.";
+        }
 
-    String wind_eros = getOriginalResponse("wind_eros");
-    if (!wind_eros.isEmpty()) {
-        wepsMetaData.errosionRate(Double.parseDouble(wind_eros));
-    } else {
-        badModelRun = true;
-        badModelMessage += "##\n";
-        badModelMessage += "Missing wind_eros result in WEPS output result file.";
-    }
+        String wind_eros = getOriginalResponse("wind_eros");
+        if (!wind_eros.isEmpty()) {
+            wepsMetaData.erosionRate(Double.parseDouble(wind_eros));
+        } else {
+            badModelRun = true;
+            badModelMessage += "##\n";
+            badModelMessage += "Missing wind_eros result in WEPS output result file.";
+        }
 
-    wepsMetaData.errorMessages(badModelMessage);
+        wepsMetaData.errorMessages(badModelMessage);
 
     }
 
     private WEPSManagement getManagementFile(byte[] fileData) throws IOException {
-    WEPSManagement wepsManagement = new WEPSManagement(new Urls());
+        WEPSManagement wepsManagement = new WEPSManagement(new Urls());
 
-    File managementFile = new File("management.man");
-    BufferedWriter bufferWriter = Files.newBufferedWriter(managementFile.toPath());
-    String data = getFileContents(fileData, ".man");
-    bufferWriter.write(data);
-    bufferWriter.flush();
-    bufferWriter.close();
+        File managementFile = new File("management.man");
+        BufferedWriter bufferWriter = Files.newBufferedWriter(managementFile.toPath());
+        String data = getFileContents(fileData, ".man");
+        bufferWriter.write(data);
+        bufferWriter.flush();
+        bufferWriter.close();
 
-    try {
-        wepsManagement.readManData(managementFile);
-    } catch (ParserException | ServiceException ex) {
-        Logger.getLogger(WEPSModelArchive.class.getName()).log(Level.SEVERE, null, ex);
-        badModelRun = true;
-        badModelMessage += "##\n";
-        badModelMessage += "Error parsing the WEPS management file:  " + ex.getMessage();
-    }
+        try {
+            wepsManagement.readManData(managementFile);
+        } catch (ParserException | ServiceException ex) {
+            Logger.getLogger(WEPSModelArchive.class.getName()).log(Level.SEVERE, null, ex);
+            badModelRun = true;
+            badModelMessage += "##\n";
+            badModelMessage += "Error parsing the WEPS management file:  " + ex.getMessage();
+        }
 
-    return wepsManagement;
+        return wepsManagement;
     }
 
     private WindGenData getWindDataFile(byte[] fileData) throws IOException {
-    WindGenData wind;
+        WindGenData wind;
 
-    wind = new WindGenData(getFileContents(fileData, ".win"));
+        wind = new WindGenData(getFileContents(fileData, ".win"));
 
-    return wind;
+        return wind;
     }
 
     private CligenData getClimateDataFile(byte[] fileData) throws IOException {
-    CligenData climate;
+        CligenData climate;
 
-    climate = new CligenData(getFileContents(fileData, ".cli"));
+        climate = new CligenData(getFileContents(fileData, ".cli"));
 
-    return climate;
+        return climate;
     }
 
     private IFCFile getIFCFile(byte[] fileData) throws IOException {
-    IFCFile requestData;
+        IFCFile requestData;
 
-    requestData = new IFCFile(getFileContents(fileData, ".ifc"));
+        requestData = new IFCFile(getFileContents(fileData, ".ifc"));
 
-    return requestData;
+        return requestData;
     }
 
     private String getStdErrorFile(byte[] fileData) throws IOException {
-    String fileString = null;
+        String fileString = null;
 
-    try (ZipInputStream zin = new ZipInputStream(new ByteArrayInputStream(fileData))) {
-        ZipEntry entry;
+        try (ZipInputStream zin = new ZipInputStream(new ByteArrayInputStream(fileData))) {
+            ZipEntry entry;
 
-        while ((entry = zin.getNextEntry()) != null) {
-        if (entry.getName().contains("weps.") && entry.getName().contains("stderr.txt")) {
-            BufferedReader bReader = new BufferedReader(new InputStreamReader(zin));
-            StringBuilder fileContent = new StringBuilder();
-            String inputStr;
-            while ((inputStr = bReader.readLine()) != null) {
-            fileContent.append(inputStr).append(System.lineSeparator());
-            }
-            fileString = fileContent.toString();
-            break;
-        }
-        }
-    }
+            while ((entry = zin.getNextEntry()) != null) {
+                if (entry.getName().contains("weps.") && entry.getName().contains("stderr.txt")) {
+                    BufferedReader bReader = new BufferedReader(new InputStreamReader(zin));
+                    StringBuilder fileContent = new StringBuilder();
+                    String inputStr;
+                    while ((inputStr = bReader.readLine()) != null) {
+                        fileContent.append(inputStr).append(System.lineSeparator());
+                    }
+                    fileString = fileContent.toString();
+                    break;
+                }
+            }
+        }
 
-    return fileString;
+        return fileString;
     }
 
     private String getStdOutFile(byte[] fileData) throws IOException {
-    String fileString = null;
+        String fileString = null;
 
-    try (ZipInputStream zin = new ZipInputStream(new ByteArrayInputStream(fileData))) {
-        ZipEntry entry;
+        try (ZipInputStream zin = new ZipInputStream(new ByteArrayInputStream(fileData))) {
+            ZipEntry entry;
 
-        while ((entry = zin.getNextEntry()) != null) {
-        if (entry.getName().contains("weps.exe") && entry.getName().contains("stdout.txt")) {
-            BufferedReader bReader = new BufferedReader(new InputStreamReader(zin));
-            StringBuilder fileContent = new StringBuilder();
-            String inputStr;
-            while ((inputStr = bReader.readLine()) != null) {
-            fileContent.append(inputStr).append(System.lineSeparator());
-            }
-            fileString = fileContent.toString();
-            break;
-        }
-        }
-    }
+            while ((entry = zin.getNextEntry()) != null) {
+                if (entry.getName().contains("weps.exe") && entry.getName().contains("stdout.txt")) {
+                    BufferedReader bReader = new BufferedReader(new InputStreamReader(zin));
+                    StringBuilder fileContent = new StringBuilder();
+                    String inputStr;
+                    while ((inputStr = bReader.readLine()) != null) {
+                        fileContent.append(inputStr).append(System.lineSeparator());
+                    }
+                    fileString = fileContent.toString();
+                    break;
+                }
+            }
+        }
 
-    return fileString;
+        return fileString;
     }
 
     public class WEPSMetaData {
 
-    private double latitude;
-    private double longitude;
-    private String cokey;
-    private double windEnergy;
-    private double annualPrecip;
-    private double rotIrrEffect;
-    private double soilWiltPoint;
-    private double rotWeightResBiomass;
-    private double rotWeightSoilTillIntensity;
-    private double rotWeightResAddition;
-    private double aggStability;
-    private double crustStability;
-    private double surfRockFrag;
-    private double errosionRate;
-    private String componentName;
-    private double[] fractionSand;
-    private double[] fractionSilt;
-    private double[] fractionClay;
-    private double albedo;
-    private double slope_gradient;
-    private int surface_thickness;
-    private int num_layers;
-    private String suid;
-    private String errorMessages = "";
+        private double latitude;
+        private double longitude;
+        private String cokey;
+        private double windEnergy;
+        private double annualPrecip;
+        private double rotIrrEffect;
+        private double soilWiltPoint;
+        private double rotWeightResBiomass;
+        private double rotWeightSoilTillIntensity;
+        private double rotWeightResAddition;
+        private double aggStability;
+        private double crustStability;
+        private double surfRockFrag;
+        private double erosionRate;
+        private String componentName;
+        private double[] fractionSand;
+        private double[] fractionSilt;
+        private double[] fractionClay;
+        private double albedo;
+        private double slope_gradient;
+        private int surface_thickness;
+        private int num_layers;
+        private String suid;
+        private String errorMessages = "";
 
-    public String errorMessages() {
-        return errorMessages;
-    }
+        public String errorMessages() {
+            return errorMessages;
+        }
 
-    public void errorMessages(String value) {
-        errorMessages = value;
-    }
+        public void errorMessages(String value) {
+            errorMessages = value;
+        }
 
-    public String suid() {
-        return suid;
-    }
+        public String suid() {
+            return suid;
+        }
 
-    public void suid(String value) {
-        suid = value;
-    }
+        public void suid(String value) {
+            suid = value;
+        }
 
-    public double windEnergy() {
-        return windEnergy;
-    }
+        public double windEnergy() {
+            return windEnergy;
+        }
 
-    public double annualPrecip() {
-        return annualPrecip;
-    }
+        public double annualPrecip() {
+            return annualPrecip;
+        }
 
-    public double rotIrrEffect() {
-        return rotIrrEffect;
-    }
+        public double rotIrrEffect() {
+            return rotIrrEffect;
+        }
 
-    public double soilWiltPoint() {
-        return rotIrrEffect;
-    }
+        public double soilWiltPoint() {
+            return soilWiltPoint;
+        }
 
-    public double rotWeightResBiomass() {
-        return rotWeightResBiomass;
-    }
+        public double rotWeightResBiomass() {
+            return rotWeightResBiomass;
+        }
 
-    public double rotWeightSoilTillIntensity() {
-        return rotWeightSoilTillIntensity;
-    }
+        public double rotWeightSoilTillIntensity() {
+            return rotWeightSoilTillIntensity;
+        }
 
-    public double rotWeightResAddition() {
-        return rotWeightResAddition;
-    }
+        public double rotWeightResAddition() {
+            return rotWeightResAddition;
+        }
 
-    public double aggStability() {
-        return aggStability;
-    }
+        public double aggStability() {
+            return aggStability;
+        }
 
-    public double crustStability() {
-        return crustStability;
-    }
+        public double crustStability() {
+            return crustStability;
+        }
 
-    public double surfRockFrag() {
-        return surfRockFrag;
-    }
+        public double surfRockFrag() {
+            return surfRockFrag;
+        }
 
-    public double errosionRate() {
-        return errosionRate;
-    }
+        public double erosionRate() {
+            return erosionRate;
+        }
 
-    public void windEnergy(double value) {
-        windEnergy = value;
-    }
+        public void windEnergy(double value) {
+            windEnergy = value;
+        }
 
-    public void annualPrecip(double value) {
-        annualPrecip = value;
-    }
+        public void annualPrecip(double value) {
+            annualPrecip = value;
+        }
 
-    public void rotIrrEffect(double value) {
-        rotIrrEffect = value;
-    }
+        public void rotIrrEffect(double value) {
+            rotIrrEffect = value;
+        }
 
-    public void soilWiltPoint(double value) {
-        rotIrrEffect = value;
-    }
+        public void soilWiltPoint(double value) {
+            soilWiltPoint = value;
+        }
 
-    public void rotWeightResBiomass(double value) {
-        rotWeightResBiomass = value;
-    }
+        public void rotWeightResBiomass(double value) {
+            rotWeightResBiomass = value;
+        }
 
-    public void rotWeightSoilTillIntensity(double value) {
-        rotWeightSoilTillIntensity = value;
-    }
+        public void rotWeightSoilTillIntensity(double value) {
+            rotWeightSoilTillIntensity = value;
+        }
 
-    public void rotWeightResAddition(double value) {
-        rotWeightResAddition = value;
-    }
+        public void rotWeightResAddition(double value) {
+            rotWeightResAddition = value;
+        }
 
-    public void aggStability(double value) {
-        aggStability = value;
-    }
+        public void aggStability(double value) {
+            aggStability = value;
+        }
 
-    public void crustStability(double value) {
-        crustStability = value;
-    }
+        public void crustStability(double value) {
+            crustStability = value;
+        }
 
-    public void surfRockFrag(double value) {
-        surfRockFrag = value;
-    }
+        public void surfRockFrag(double value) {
+            surfRockFrag = value;
+        }
 
-    public void errosionRate(double value) {
-        errosionRate = value;
-    }
+        public void erosionRate(double value) {
+            erosionRate = value;
+        }
 
-    public String componentName() {
-        return componentName;
-    }
+        public String componentName() {
+            return componentName;
+        }
 
-    public double fractionSand(int index) {
-        if ((null != fractionSand) && (index < fractionSand.length)) {
-        return fractionSand[index];
-        }
-        return Double.NaN;
-    }
+        public double fractionSand(int index) {
+            if ((null != fractionSand) && (index < fractionSand.length)) {
+                return fractionSand[index];
+            }
+            return Double.NaN;
+        }
 
-    public double fractionSilt(int index) {
-        if ((null != fractionSand) && (index < fractionSilt.length)) {
-        return fractionSilt[index];
-        }
-        return Double.NaN;
-    }
+        public double fractionSilt(int index) {
+            if ((null != fractionSand) && (index < fractionSilt.length)) {
+                return fractionSilt[index];
+            }
+            return Double.NaN;
+        }
 
-    public double fractionClay(int index) {
-        if ((null != fractionSand) && (index < fractionClay.length)) {
-        return fractionClay[index];
-        }
-        return Double.NaN;
-    }
+        public double fractionClay(int index) {
+            if ((null != fractionSand) && (index < fractionClay.length)) {
+                return fractionClay[index];
+            }
+            return Double.NaN;
+        }
 
-    public void componentName(String value) {
-        componentName = value;
-    }
+        public void componentName(String value) {
+            componentName = value;
+        }
 
-    public void fractionSand(double[] value) {
-        fractionSand = value;
-    }
+        public void fractionSand(double[] value) {
+            fractionSand = value;
+        }
 
-    public void fractionSilt(double[] value) {
-        fractionSilt = value;
-    }
+        public void fractionSilt(double[] value) {
+            fractionSilt = value;
+        }
 
-    public void fractionClay(double[] value) {
-        fractionClay = value;
-    }
+        public void fractionClay(double[] value) {
+            fractionClay = value;
+        }
 
-    public void albedo(double value) {
-        albedo = value;
-    }
+        public void albedo(double value) {
+            albedo = value;
+        }
 
-    public void slope_gradient(double value) {
-        slope_gradient = value;
-    }
+        public void slope_gradient(double value) {
+            slope_gradient = value;
+        }
 
-    public void surface_thickness(int value) {
-        surface_thickness = value;
-    }
+        public void surface_thickness(int value) {
+            surface_thickness = value;
+        }
 
-    public void num_layers(int value) {
-        num_layers = value;
-    }
+        public void num_layers(int value) {
+            num_layers = value;
+        }
 
-    public double albedo() {
-        return albedo;
-    }
+        public double albedo() {
+            return albedo;
+        }
 
-    public double slope_gradient() {
-        return slope_gradient;
-    }
+        public double slope_gradient() {
+            return slope_gradient;
+        }
 
-    public int surface_thickness() {
-        return surface_thickness;
-    }
+        public int surface_thickness() {
+            return surface_thickness;
+        }
 
-    public int num_layers() {
-        return num_layers;
-    }
+        public int num_layers() {
+            return num_layers;
+        }
 
-    public double latitude() {
-        return latitude;
-    }
+        public double latitude() {
+            return latitude;
+        }
 
-    public double longitude() {
-        return longitude;
-    }
+        public double longitude() {
+            return longitude;
+        }
 
-    public String cokey() {
-        return cokey;
-    }
+        public String cokey() {
+            return cokey;
+        }
 
-    public void latitude(double value) {
-        latitude = value;
-    }
+        public void latitude(double value) {
+            latitude = value;
+        }
 
-    public void longitude(double value) {
-        longitude = value;
-    }
+        public void longitude(double value) {
+            longitude = value;
+        }
 
-    public void cokey(String value) {
-        cokey = value;
-    }
+        public void cokey(String value) {
+            cokey = value;
+        }
 
-    public JSONArray toJSON() throws JSONException {
-        JSONArray ret_val = new JSONArray();
-        JSONObject results = new JSONObject();
+        public JSONArray toJSON() throws JSONException {
+            JSONArray ret_val = new JSONArray();
+            JSONObject results = new JSONObject();
 
-        results.put("weps_archive_suid", wepsMetaData.suid());
-        results.put("annual_precipitation", wepsMetaData.annualPrecip());
-        results.put("wind_energy", wepsMetaData.windEnergy());
-        results.put("crust_stability", wepsMetaData.crustStability());
-        results.put("surface_rock_fragments", wepsMetaData.surfRockFrag());
-        results.put("aggregate_stability", wepsMetaData.aggStability());
-        results.put("soil_wilting_poiont", wepsMetaData.soilWiltPoint());
-        results.put("rotation_weighted_biomass", wepsMetaData.rotWeightResBiomass());
-        results.put("annual_precipitation", wepsMetaData.annualPrecip());
+            results.put("weps_archive_suid", wepsMetaData.suid());
+            results.put("annual_precipitation", wepsMetaData.annualPrecip());
+            results.put("wind_energy", wepsMetaData.windEnergy());
+            results.put("crust_stability", wepsMetaData.crustStability());
+            results.put("surface_rock_fragments", wepsMetaData.surfRockFrag());
+            results.put("aggregate_stability", wepsMetaData.aggStability());
+            results.put("soil_wilting_poiont", wepsMetaData.soilWiltPoint());
+            results.put("rotation_weighted_biomass", wepsMetaData.rotWeightResBiomass());
+            results.put("annual_precipitation", wepsMetaData.annualPrecip());
 
-        results.put("rotation_weighted_soil_tillage_intensity", wepsMetaData.rotWeightSoilTillIntensity());
-        results.put("erosion_rate", wepsMetaData.errosionRate());
+            results.put("rotation_weighted_soil_tillage_intensity", wepsMetaData.rotWeightSoilTillIntensity());
+            results.put("erosion_rate", wepsMetaData.erosionRate());
 
-        ret_val.put(results);
-        return ret_val;
-    }
+            ret_val.put(results);
+            return ret_val;
+        }
     }
 }