Displaying differences for changeset
 
display as  

src/java/m/rhem/model/AoA.java

@@ -38,7 +38,7 @@
             String slopeShape, double slopeSteepness,
             double bunchGgrassCanopyCover, double forbsCanopyCover,
             double shrubsCanopyCover, double sodGrassCanopyCover, double basalCover,
-            double rockCover, double litterCover, double cryptogamsCover) {
+            double rockCover, double litterCover, double cryptogamsCover, double moisturecontent) {
         this.aoaId = aoaId;
         this.rhemSiteId = rhemSiteId;
         this.scenarioName = scenarioName;

src/java/m/rhem/rhem01_runmodel/V1_0.java

@@ -57,7 +57,6 @@
 
     String cligen_db = Config.getString("rhem.cligen_db", "file:/Users/rumpal/Documents/Work/csipDocuments/RHEM/cligen");
 
-
     @Override
     public void preProcess() throws ServiceException {
         try {
@@ -69,7 +68,6 @@
             String stateId = getStringParam("stateid");
             String climatestationId = getStringParam("climatestationid");
             String soilTexture = getStringParam("soiltexture");
-            double slopeLength = getDoubleParam("slopelength", 0.0);
             String slopeShape = getStringParam("slopeshape");
             double slopeSteepness = getDoubleParam("slopesteepness", 0.0);
             double bunchGgrassCanopyCover = getDoubleParam("bunchgrasscanopycover", 0.0);
@@ -87,20 +85,25 @@
                 LOG.log(Level.SEVERE, "RHEM-01: Invalid unit");
                 throw new ServiceException("Unit should be 1-metric or 2 - English. Digit " + unit + " is not valid.");
             }
+            double slopeLength;
+            if (unit == 1) {
+                slopeLength = 50;
+            } else {
+                slopeLength = 164.04;
+            }
 
             aoa = new AoA(aoaId, rhemSiteId, scenarioName,
                     scenarioDescription, unit, stateId, climatestationId,
                     soilTexture, slopeLength, slopeShape, slopeSteepness,
                     bunchGgrassCanopyCover, forbsCanopyCover, shrubsCanopyCover,
                     sodGrassCanopyCover, basalCover, rockCover, litterCover,
-                    cryptogamsCover);
+                    cryptogamsCover, 25);
         } catch (ServiceException ex) {
             LOG.log(Level.SEVERE, "RHEM-01: Error in processing the request JSON.", ex);
             throw new ServiceException("Error in processing the request JSON.", ex);
         }
     }
 
-
     @Override
     public void doProcess() throws ServiceException, IOException {
         SimpleDateFormat sdf = new SimpleDateFormat("MMMM dd, YYYY, hh:mm a");
@@ -132,7 +135,7 @@
         rhemModel.generateParamFile(parameter);
         rhemModel.generateStormFile(cligen_db, Double.parseDouble(parameter.getKe()));
         rhemModel.generateRunFile();
-        
+
         runModel();
 
         //If the run is successful then edit the summary file.
@@ -159,7 +162,6 @@
         }
     }
 
-
     @Override
     public void postProcess() {
         putResult("AoAID", aoa.getAoaId(), "Area of Analysis Identifier");

src/java/m/rhem/rhem01_runmodel/V1_0.json

@@ -42,19 +42,6 @@
             "value": "Clay Loam"
         },
         {
-            "name": "moisturecontent",
-            "description": "",
-            "value": 25
-        },
-        {
-            "name": "slopelength",
-            "description": "Slope Length",
-            "value": 50,
-            "unit": "ft/m",
-            "min": 0.01,
-            "max": "394 feet/120 meters"
-        },
-        {
             "name": "slopeshape",
             "description": "Slope Shape",
             "value": "Uniform"