@@ -1,9 +1,5 @@ |
-/* |
- * To change this license header, choose License Headers in Project Properties. |
- * To change this template file, choose Tools | Templates |
- * and open the template in the editor. |
- */ |
package m.wqm.pesticidesarp; |
+ |
import csip.ModelDataService; |
import static csip.ModelDataService.EXEC_OK; |
import java.util.ArrayList; |
@@ -18,116 +14,106 @@ |
/** |
* |
* @ Srinivas |
+ * @ update Rumpal Sidhu |
*/ |
-@Name("Pesticide Soil Adsorbed Runoff Potential (PesticideSARP)") |
-@Description("Clculating Pesticide Soil Adsorbed Runoff Potential") |
+@Name("WQM-9:Pesticide Soil Adsorbed Runoff Potential (PesticideSARP)") |
+@Description("Calculating Pesticide Soil Adsorbed Runoff Potential") |
@Path("m/pesticide_sarp/1.0") |
|
-public class V1_0 extends ModelDataService{ |
- String comp_sarp[]=new String[]{"","LOW","INTERMEDIATE","HIGH"}; |
+public class V1_0 extends ModelDataService { |
+ |
+ String comp_sarp[] = new String[]{"", "LOW", "INTERMEDIATE", "HIGH"}; |
int comp_sarp_number; |
String aoa_sarp; |
|
//JSONArray getArray |
- ArrayList<Input> components=new ArrayList<>(); // store the set of all input soilcomponents as objects |
- ArrayList<Result1> result1=new ArrayList<>(); // store the result as objects |
- @Override |
- // reading the inputs from the json file into input object and placing it in the arraylist |
- protected void preProcess() throws Exception { |
- JSONArray groups = getJSONArrayParam("soilcomponents"); |
- for(int i=0;i<groups.length();i++) |
- { |
- Map<String, JSONObject> group = JSONUtils.preprocess(groups.getJSONArray(i)); |
- |
- |
- int AoAId = JSONUtils.getIntParam(group, "AoAId", 0); |
- String cokey=JSONUtils.getStringParam(group,"cokey","err"); |
- double aoa_comp_area=JSONUtils.getDoubleParam(group,"aoa_comp_area",0); |
- String aoa_comp_hsg=JSONUtils.getStringParam(group,"aoa_comp_hsg","err"); |
- double aoa_comp_kfact=JSONUtils.getDoubleParam(group,"aoa_comp_kfact",0); |
- boolean aoa_comp_slopegr15=JSONUtils.getBooleanParam(group,"aoa_comp_slopegr15",false); |
- boolean aoa_comp_drained=JSONUtils.getBooleanParam(group,"aoa_comp_drained",false); |
- Input input=new Input(AoAId,cokey,aoa_comp_area,aoa_comp_hsg,aoa_comp_kfact,aoa_comp_slopegr15,aoa_comp_drained); |
- components.add(input); |
- } |
- } |
+ ArrayList<Input> components;// store the set of all input soilcomponents as objects |
+ ArrayList<Result1> result1; // store the result as objects |
|
@Override |
- protected String process() throws Exception |
- { |
+ // reading the inputs from the json file into input object and placing it in the arraylist |
+ protected void preProcess() throws Exception { |
+ components = new ArrayList<>(); |
+ JSONArray groups = getJSONArrayParam("soilcomponents"); |
+ for (int i = 0; i < groups.length(); i++) { |
+ Map<String, JSONObject> group = JSONUtils.preprocess(groups.getJSONArray(i)); |
+ int AoAId = JSONUtils.getIntParam(group, "AoAId", 0); |
+ String cokey = JSONUtils.getStringParam(group, "cokey", "err"); |
+ double aoa_comp_area = JSONUtils.getDoubleParam(group, "aoa_comp_area", 0); |
+ String aoa_comp_hsg = JSONUtils.getStringParam(group, "aoa_comp_hsg", "err"); |
+ double aoa_comp_kfact = JSONUtils.getDoubleParam(group, "aoa_comp_kfact", 0); |
+ boolean aoa_comp_slopegr15 = JSONUtils.getBooleanParam(group, "aoa_comp_slopegr15", false); |
+ boolean aoa_comp_drained = JSONUtils.getBooleanParam(group, "aoa_comp_drained", false); |
+ Input input = new Input(AoAId, cokey, aoa_comp_area, aoa_comp_hsg, aoa_comp_kfact, aoa_comp_slopegr15, aoa_comp_drained); |
+ components.add(input); |
+ } |
+ } |
+ |
+ @Override |
+ protected String process() throws Exception { |
+ result1 = new ArrayList<>(); |
for (Input ip : components) { |
- if(((ip.aoa_comp_hsg.equals("C"))&&(ip.aoa_comp_kfact>=0.21))||((ip.aoa_comp_hsg.equals("D"))&&(ip.aoa_comp_kfact>=0.10))) |
- { |
- |
- comp_sarp_number=3; |
- } |
- else if(((ip.aoa_comp_hsg.equals("A")||ip.aoa_comp_hsg.equals("B"))&&(ip.aoa_comp_kfact<=0.10))||(ip.aoa_comp_hsg.equals("C")&&(ip.aoa_comp_kfact<=0.07))||(ip.aoa_comp_hsg.equals("D")&&(ip.aoa_comp_kfact<=0.02))||((ip.aoa_comp_hsg.equals("A/D")||ip.aoa_comp_hsg.equals("B/D"))&&(ip.aoa_comp_kfact<=0.10)&&ip.aoa_comp_drained==true)||((ip.aoa_comp_hsg.equals("C/D"))&&(ip.aoa_comp_kfact<=0.07)&&ip.aoa_comp_drained==true)||((ip.aoa_comp_hsg.equals("A/D")||ip.aoa_comp_hsg.equals("B/D")||ip.aoa_comp_hsg.equals("C/D"))&&(ip.aoa_comp_kfact<=0.02)&&ip.aoa_comp_drained==false)) |
- { |
- if(!ip.aoa_comp_slopegr15) |
- { |
- comp_sarp_number=1; |
- } |
- else |
- { |
- comp_sarp_number=2; |
- } |
- } |
- else |
- { |
- if(!ip.aoa_comp_slopegr15) |
- { |
- comp_sarp_number=2; |
- } |
- else |
- { |
- comp_sarp_number=3; |
- } |
- } |
- Result1 result=new Result1(ip.AoAId,ip.cokey,ip.aoa_comp_area,comp_sarp[comp_sarp_number],comp_sarp_number); |
+ if ((ip.aoa_comp_hsg.equals("C") && ip.aoa_comp_kfact >= 0.21) |
+ || (ip.aoa_comp_hsg.equals("D") && ip.aoa_comp_kfact >= 0.10) |
+ || (ip.aoa_comp_hsg.equals("C\\/D") && ip.aoa_comp_drained && ip.aoa_comp_kfact >= 0.21)) { |
+ comp_sarp_number = 3; |
+ } else if (ip.aoa_comp_hsg.equals("A") |
+ || (ip.aoa_comp_hsg.equals("B") && ip.aoa_comp_kfact <= 0.10) |
+ || (ip.aoa_comp_hsg.equals("C") && ip.aoa_comp_kfact <= 0.07) |
+ || (ip.aoa_comp_hsg.equals("D") && ip.aoa_comp_kfact <= 0.02) |
+ || (ip.aoa_comp_hsg.equals("A\\/D") && ip.aoa_comp_drained) |
+ || (ip.aoa_comp_hsg.equals("B\\/D") && ip.aoa_comp_kfact <= 0.10 && ip.aoa_comp_drained) |
+ || (ip.aoa_comp_hsg.equals("C\\/D") && ip.aoa_comp_kfact <= 0.07 && ip.aoa_comp_drained) |
+ || ((ip.aoa_comp_hsg.equals("A\\/D") || ip.aoa_comp_hsg.equals("B\\/D") || ip.aoa_comp_hsg.equals("C\\/D")) && ip.aoa_comp_kfact <= 0.02 && !ip.aoa_comp_drained)) { |
+ if (!ip.aoa_comp_slopegr15) { |
+ comp_sarp_number = 1; |
+ } else { |
+ comp_sarp_number = 2; |
+ } |
+ } else { |
+ if (!ip.aoa_comp_slopegr15) { |
+ comp_sarp_number = 2; |
+ } else { |
+ comp_sarp_number = 3; |
+ } |
+ } |
+ Result1 result = new Result1(ip.AoAId, ip.cokey, ip.aoa_comp_area, comp_sarp[comp_sarp_number], comp_sarp_number); |
result1.add(result); |
} |
calAoANutSLP(result1); |
- return EXEC_OK; |
+ return EXEC_OK; |
} |
- @Override |
- //writing the results back to JSON |
+ |
+ @Override |
+ //writing the results back to JSON |
protected void postProcess() throws Exception { |
- for(int i=0;i<result1.size();i++) |
- { |
- |
- Result1 temp=result1.get(i); |
- putResult("AoAId",temp.AoAId,"Area of Analysis ID"); |
- putResult("cokey",temp.cokey,"cokey"); |
- putResult("aoa_comp_area",temp.aoa_comp_area,"Area of the soil component in the AoA"); |
- putResult("comp_sarp",temp.comp_sarp,"Pesticide Soil Adsorbed Runoff Potential"); |
- putResult("comp_sarp_number",temp.comp_sarp_number,"Integer Representinf Pesticide Soil Adsorbed Runoff Potential"); |
- } |
- putResult("aoa_sarp",aoa_sarp,"Pesticide Soil Adsorbed Runoff Potential of AoA"); |
+ for (int i = 0; i < result1.size(); i++) { |
+ Result1 temp = result1.get(i); |
+ putResult("AoAId", temp.AoAId, "Area of Analysis ID"); |
+ putResult("cokey", temp.cokey, "cokey"); |
+ putResult("aoa_comp_area", temp.aoa_comp_area, "Area of the soil component in the AoA"); |
+ putResult("comp_sarp", temp.comp_sarp, "Pesticide Soil Adsorbed Runoff Potential"); |
+ putResult("comp_sarp_number", temp.comp_sarp_number, "Integer Representinf Pesticide Soil Adsorbed Runoff Potential"); |
+ } |
+ putResult("aoa_sarp", aoa_sarp, "Pesticide Soil Adsorbed Runoff Potential of AoA"); |
} |
- // calculate the aoa_nslp |
- void calAoANutSLP(ArrayList<Result1> source) |
- { |
- double cum_pslp_product=0; |
- double aoa_area=0; |
- |
- for(Result1 tmp:source) |
- { |
- cum_pslp_product+=(tmp.comp_sarp_number*tmp.aoa_comp_area); |
- aoa_area+=tmp.aoa_comp_area; |
+ |
+ //#Compute weighted average pesticide soil adsorbed runoff potential for the AoA |
+ void calAoANutSLP(ArrayList<Result1> source) { |
+ double cum_sarp_product = 0; |
+ double aoa_area = 0; |
+ |
+ for (Result1 tmp : source) { |
+ cum_sarp_product += (tmp.comp_sarp_number * tmp.aoa_comp_area); |
+ aoa_area += tmp.aoa_comp_area; |
} |
- double aoa_pslp_fract=cum_pslp_product/aoa_area; |
- if(aoa_pslp_fract<=1.50) |
- { |
- aoa_sarp="LOW"; |
- } |
- else if(aoa_pslp_fract>1.50&&aoa_pslp_fract<=2.50) |
- { |
- aoa_sarp="INTERMEDIATE"; |
- } |
- |
- else |
- { |
- aoa_sarp="HIGH"; |
+ double aoa_sarp_fract = cum_sarp_product / aoa_area; |
+ if (aoa_sarp_fract <= 1.50) { |
+ aoa_sarp = "LOW"; |
+ } else if (aoa_sarp_fract > 1.50 && aoa_sarp_fract <= 2.50) { |
+ aoa_sarp = "INTERMEDIATE"; |
+ } else { |
+ aoa_sarp = "HIGH"; |
} |
} |
} |
@@ -1,201 +1,197 @@ |
{ |
- "metainfo": { |
- }, |
- "parameter": [ |
- { |
- "name": "soilcomponents", |
- "value": [ |
- [ |
- { |
- "name": "AoAId", |
- "value": 1 |
- }, |
- { |
- "name": "cokey", |
- "value": "11510284" |
- }, |
- { |
- "name": "aoa_comp_area", |
- "value": 45.84, |
- "description":"Area of the soil component in the AoA" |
- |
- }, |
- { |
- "name": "aoa_comp_hsg", |
- "value": "A", |
- "description":"Hydrologic soil group of the soil component" |
- |
- }, |
- { |
- "name": "aoa_comp_kfact", |
- "value": 0.24, |
- "description":"#K factor of the horizon representing the soil component; usually the surface horizon" |
- }, |
- { |
- "name":"aoa_comp_slopegr15", |
- "value":true, |
- "description":"#Whether soil component representative slope is greater than 15% (true, false)" |
- }, |
- { |
- "name":"aoa_comp_drained", |
- "value":false, |
- "description":"#Whether this soil component instance is drained" |
- } |
- ], |
- [ |
- { |
- "name": "AoAId", |
- "value": 1 |
- }, |
- { |
- "name": "cokey", |
- "value": "11510284" |
- }, |
- { |
- "name": "aoa_comp_area", |
- "value": 25.84, |
- "description":"Area of the soil component in the AoA" |
- |
- }, |
- { |
- "name": "aoa_comp_hsg", |
- "value": "B", |
- "description":"Hydrologic soil group of the soil component" |
- |
- }, |
- { |
- "name": "aoa_comp_kfact", |
- "value": 0.34, |
- "description":"#K factor of the horizon representing the soil component; usually the surface horizon" |
- }, |
- |
- { |
- "name":"aoa_comp_slopegr15", |
- "value":false, |
- "description":"#Whether soil component representative slope is greater than 15% (true, false)" |
- }, |
- { |
- "name":"aoa_comp_drained", |
- "value":true, |
- "description":"#Whether this soil component instance is drained" |
- } |
- ], |
- [ |
- { |
- "name": "AoAId", |
- "value": 1 |
- }, |
- { |
- "name": "cokey", |
- "value": "11510284" |
- }, |
- { |
- "name": "aoa_comp_area", |
- "value": 15.84, |
- "description":"Area of the soil component in the AoA" |
- |
- }, |
- { |
- "name": "aoa_comp_hsg", |
- "value": "A/D", |
- "description":"Hydrologic soil group of the soil component" |
- |
- }, |
- { |
- "name": "aoa_comp_kfact", |
- "value": 0.34, |
- "description":"#K factor of the horizon representing the soil component; usually the surface horizon" |
- }, |
- |
- { |
- "name":"aoa_comp_slopegr15", |
- "value":true, |
- "description":"#Whether soil component representative slope is greater than 15% (true, false)" |
- }, |
- { |
- "name":"aoa_comp_drained", |
- "value":false, |
- "description":"#Whether this soil component instance is drained" |
- } |
- ], |
- [ |
- { |
- "name": "AoAId", |
- "value": 1 |
- }, |
- { |
- "name": "cokey", |
- "value": "11510284" |
- }, |
- { |
- "name": "aoa_comp_area", |
- "value": 55.84, |
- "description":"Area of the soil component in the AoA" |
- |
- }, |
- { |
- "name": "aoa_comp_hsg", |
- "value": "B/D", |
- "description":"Hydrologic soil group of the soil component" |
- |
- }, |
- { |
- "name": "aoa_comp_kfact", |
- "value": 0.34, |
- "description":"#K factor of the horizon representing the soil component; usually the surface horizon" |
- }, |
- |
- { |
- "name":"aoa_comp_slopegr15", |
- "value":false, |
- "description":"#Whether soil component representative slope is greater than 15% (true, false)" |
- }, |
- { |
- "name":"aoa_comp_drained", |
- "value":false, |
- "description":"#Whether this soil component instance is drained" |
- } |
- ], |
- [ |
- { |
- "name": "AoAId", |
- "value": 1 |
- }, |
- { |
- "name": "cokey", |
- "value": "11510284" |
- }, |
- { |
- "name": "aoa_comp_area", |
- "value": 45.84, |
- "description":"Area of the soil component in the AoA" |
- |
- }, |
- { |
- "name": "aoa_comp_hsg", |
- "value": "C/D", |
- "description":"Hydrologic soil group of the soil component" |
- |
- }, |
- { |
- "name": "aoa_comp_kfact", |
- "value": 0.24, |
- "description":"#K factor of the horizon representing the soil component; usually the surface horizon" |
- }, |
- |
- { |
- "name":"aoa_comp_slopegr15", |
- "value":false, |
- "description":"#Whether soil component representative slope is greater than 15% (true, false)" |
- }, |
- { |
- "name":"aoa_comp_drained", |
- "value":true, |
- "description":"#Whether this soil component instance is drained" |
- } |
+ "metainfo": { |
+ }, |
+ "parameter": [ |
+ { |
+ "name": "soilcomponents", |
+ "value": [ |
+ [ |
+ { |
+ "name": "AoAId", |
+ "value": 1 |
+ }, |
+ { |
+ "name": "cokey", |
+ "value": "11510284" |
+ }, |
+ { |
+ "name": "aoa_comp_area", |
+ "value": 45.84, |
+ "description": "Area of the soil component in the AoA" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_hsg", |
+ "value": "A", |
+ "description": "Hydrologic soil group of the soil component" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_kfact", |
+ "value": 0.24, |
+ "description": "#K factor of the horizon representing the soil component; usually the surface horizon" |
+ }, |
+ { |
+ "name": "aoa_comp_slopegr15", |
+ "value": true, |
+ "description": "#Whether soil component representative slope is greater than 15% (true, false)" |
+ }, |
+ { |
+ "name": "aoa_comp_drained", |
+ "value": false, |
+ "description": "#Whether this soil component instance is drained" |
+ } |
+ ], |
+ [ |
+ { |
+ "name": "AoAId", |
+ "value": 1 |
+ }, |
+ { |
+ "name": "cokey", |
+ "value": "11510284" |
+ }, |
+ { |
+ "name": "aoa_comp_area", |
+ "value": 25.84, |
+ "description": "Area of the soil component in the AoA" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_hsg", |
+ "value": "B", |
+ "description": "Hydrologic soil group of the soil component" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_kfact", |
+ "value": 0.34, |
+ "description": "#K factor of the horizon representing the soil component; usually the surface horizon" |
+ }, |
+ { |
+ "name": "aoa_comp_slopegr15", |
+ "value": false, |
+ "description": "#Whether soil component representative slope is greater than 15% (true, false)" |
+ }, |
+ { |
+ "name": "aoa_comp_drained", |
+ "value": true, |
+ "description": "#Whether this soil component instance is drained" |
+ } |
+ ], |
+ [ |
+ { |
+ "name": "AoAId", |
+ "value": 1 |
+ }, |
+ { |
+ "name": "cokey", |
+ "value": "11510284" |
+ }, |
+ { |
+ "name": "aoa_comp_area", |
+ "value": 15.84, |
+ "description": "Area of the soil component in the AoA" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_hsg", |
+ "value": "A/D", |
+ "description": "Hydrologic soil group of the soil component" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_kfact", |
+ "value": 0.34, |
+ "description": "#K factor of the horizon representing the soil component; usually the surface horizon" |
+ }, |
+ { |
+ "name": "aoa_comp_slopegr15", |
+ "value": true, |
+ "description": "#Whether soil component representative slope is greater than 15% (true, false)" |
+ }, |
+ { |
+ "name": "aoa_comp_drained", |
+ "value": false, |
+ "description": "#Whether this soil component instance is drained" |
+ } |
+ ], |
+ [ |
+ { |
+ "name": "AoAId", |
+ "value": 1 |
+ }, |
+ { |
+ "name": "cokey", |
+ "value": "11510284" |
+ }, |
+ { |
+ "name": "aoa_comp_area", |
+ "value": 55.84, |
+ "description": "Area of the soil component in the AoA" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_hsg", |
+ "value": "B/D", |
+ "description": "Hydrologic soil group of the soil component" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_kfact", |
+ "value": 0.34, |
+ "description": "#K factor of the horizon representing the soil component; usually the surface horizon" |
+ }, |
+ { |
+ "name": "aoa_comp_slopegr15", |
+ "value": false, |
+ "description": "#Whether soil component representative slope is greater than 15% (true, false)" |
+ }, |
+ { |
+ "name": "aoa_comp_drained", |
+ "value": false, |
+ "description": "#Whether this soil component instance is drained" |
+ } |
+ ], |
+ [ |
+ { |
+ "name": "AoAId", |
+ "value": 1 |
+ }, |
+ { |
+ "name": "cokey", |
+ "value": "11510284" |
+ }, |
+ { |
+ "name": "aoa_comp_area", |
+ "value": 45.84, |
+ "description": "Area of the soil component in the AoA" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_hsg", |
+ "value": "C/D", |
+ "description": "Hydrologic soil group of the soil component" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_kfact", |
+ "value": 0.24, |
+ "description": "#K factor of the horizon representing the soil component; usually the surface horizon" |
+ }, |
+ { |
+ "name": "aoa_comp_slopegr15", |
+ "value": false, |
+ "description": "#Whether soil component representative slope is greater than 15% (true, false)" |
+ }, |
+ { |
+ "name": "aoa_comp_drained", |
+ "value": true, |
+ "description": "#Whether this soil component instance is drained" |
+ } |
+ ] |
+ |
+ ] |
+ } |
] |
- |
- ] |
- } |
- ] |
} |
@@ -1,13 +1,9 @@ |
-/* |
- * To change this license header, choose License Headers in Project Properties. |
- * To change this template file, choose Tools | Templates |
- * and open the template in the editor. |
- */ |
package m.wqm.scpestslp; |
|
/** |
- * |
+ * |
* @author Lenovo |
+ * @update by Rumpal Sidhu |
*/ |
// this class is mainly used to store the input soil components |
public class Input { |
@@ -21,18 +17,20 @@ |
int aoa_comp_hzdepth; |
boolean aoa_comp_cracksgr24; |
boolean aoa_comp_hwt_lt_24; |
- public Input(int AoAId,String cokey,double aoa_comp_area,String aoa_comp_hsg,double aoa_comp_kfact,double aoa_comp_om, int aoa_comp_hzdepth, boolean aoa_comp_cracksgr24,boolean aoa_comp_hwt_lt_24) |
- { |
- this.AoAId=AoAId; |
- this.cokey=cokey; |
- this.aoa_comp_area=aoa_comp_area; |
- this.aoa_comp_hsg=aoa_comp_hsg; |
- this.aoa_comp_kfact=aoa_comp_kfact; |
- this.aoa_comp_om=aoa_comp_om; |
- this.aoa_comp_hzdepth=aoa_comp_hzdepth; |
- this.aoa_comp_cracksgr24=aoa_comp_cracksgr24; |
- this.aoa_comp_hwt_lt_24=aoa_comp_hwt_lt_24; |
+ |
+ public Input(int AoAId, String cokey, double aoa_comp_area, |
+ String aoa_comp_hsg, double aoa_comp_kfact, double aoa_comp_om, |
+ int aoa_comp_hzdepth, boolean aoa_comp_cracksgr24, |
+ boolean aoa_comp_hwt_lt_24) { |
+ this.AoAId = AoAId; |
+ this.cokey = cokey; |
+ this.aoa_comp_area = aoa_comp_area; |
+ this.aoa_comp_hsg = aoa_comp_hsg; |
+ this.aoa_comp_kfact = aoa_comp_kfact; |
+ this.aoa_comp_om = aoa_comp_om; |
+ this.aoa_comp_hzdepth = aoa_comp_hzdepth; |
+ this.aoa_comp_cracksgr24 = aoa_comp_cracksgr24; |
+ this.aoa_comp_hwt_lt_24 = aoa_comp_hwt_lt_24; |
} |
- |
+ |
} |
- |
@@ -1,11 +1,6 @@ |
-/* |
- * To change this license header, choose License Headers in Project Properties. |
- * To change this template file, choose Tools | Templates |
- * and open the template in the editor. |
- */ |
package m.wqm.scpestslp; |
+ |
import csip.ModelDataService; |
-import static csip.ModelDataService.EXEC_OK; |
import java.util.ArrayList; |
import javax.ws.rs.Path; |
import oms3.annotations.Description; |
@@ -18,143 +13,115 @@ |
/** |
* |
* @ Srinivas |
+ * @ Update Rumpal Sidhu |
*/ |
-@Name("Pesticide Soil Leaching Potential (PesticideSLP)") |
-@Description("Clculating Pesticide Soil Leaching Potential") |
+@Name("WQM-7:Pesticide Soil Leaching Potential (PesticideSLP)") |
+@Description("Calculating Pesticide Soil Leaching Potential") |
@Path("m/pesticide_slp/1.0") |
|
-public class V1_0 extends ModelDataService{ |
- String comp_pslp[]=new String[]{"","VERY LOW","LOW","INTERMEDIATE","HIGH"}; |
+public class V1_0 extends ModelDataService { |
+ |
+ String comp_pslp[] = new String[]{"", "VERY LOW", "LOW", "INTERMEDIATE", "HIGH"}; |
int comp_pslp_number; |
String aoa_pslp; |
|
- //JSONArray getArray |
- ArrayList<Input> components=new ArrayList<>(); // store the set of all input soilcomponents as objects |
- ArrayList<Result1> result1=new ArrayList<>(); // store the result as objects |
- @Override |
- // reading the inputs from the json file into input object and placing it in the arraylist |
- protected void preProcess() throws Exception { |
- JSONArray groups = getJSONArrayParam("soilcomponents"); |
- for(int i=0;i<groups.length();i++) |
- { |
- Map<String, JSONObject> group = JSONUtils.preprocess(groups.getJSONArray(i)); |
- |
- |
- int AoAId = JSONUtils.getIntParam(group, "AoAId", 0); |
- String cokey=JSONUtils.getStringParam(group,"cokey","err"); |
- double aoa_comp_area=JSONUtils.getDoubleParam(group,"aoa_comp_area",0); |
- String aoa_comp_hsg=JSONUtils.getStringParam(group,"aoa_comp_hsg","err"); |
- double aoa_comp_kfact=JSONUtils.getDoubleParam(group,"aoa_comp_kfact",0); |
- double aoa_comp_om=JSONUtils.getDoubleParam(group, "aoa_comp_om", 0); |
- int aoa_comp_hzdepth=JSONUtils.getIntParam(group, "aoa_comp_hzdepth", 0); |
- boolean aoa_comp_cracksgr24=JSONUtils.getBooleanParam(group,"aoa_comp_cracksgr24",false); |
- boolean aoa_comp_hwt_lt_24=JSONUtils.getBooleanParam(group,"aoa_comp_hwt_lt_24",false); |
- Input input=new Input(AoAId,cokey,aoa_comp_area,aoa_comp_hsg,aoa_comp_kfact,aoa_comp_om,aoa_comp_hzdepth,aoa_comp_cracksgr24,aoa_comp_hwt_lt_24); |
- components.add(input); |
- } |
- } |
+ //request |
+ ArrayList<Input> components; // store the set of all input soilcomponents as objects |
+ //response |
+ ArrayList<Result1> result1; // store the result as objects |
|
@Override |
- protected String process() throws Exception |
- { |
+ // reading the inputs from the json file into input object and placing it in the arraylist |
+ protected void preProcess() throws Exception { |
+ components = new ArrayList<>(); |
+ JSONArray groups = getJSONArrayParam("soilcomponents"); |
+ for (int i = 0; i < groups.length(); i++) { |
+ Map<String, JSONObject> group = JSONUtils.preprocess(groups.getJSONArray(i)); |
+ int AoAId = JSONUtils.getIntParam(group, "AoAId", 0); |
+ String cokey = JSONUtils.getStringParam(group, "cokey", "err"); |
+ double aoa_comp_area = JSONUtils.getDoubleParam(group, "aoa_comp_area", 0); |
+ String aoa_comp_hsg = JSONUtils.getStringParam(group, "aoa_comp_hsg", "err"); |
+ double aoa_comp_kfact = JSONUtils.getDoubleParam(group, "aoa_comp_kfact", 0); |
+ double aoa_comp_om = JSONUtils.getDoubleParam(group, "aoa_comp_om", 0); |
+ int aoa_comp_hzdepth = JSONUtils.getIntParam(group, "aoa_comp_hzdepth", 0); |
+ boolean aoa_comp_cracksgr24 = JSONUtils.getBooleanParam(group, "aoa_comp_cracksgr24", false); |
+ boolean aoa_comp_hwt_lt_24 = JSONUtils.getBooleanParam(group, "aoa_comp_hwt_lt_24", false); |
+ Input input = new Input(AoAId, cokey, aoa_comp_area, aoa_comp_hsg, aoa_comp_kfact, aoa_comp_om, aoa_comp_hzdepth, aoa_comp_cracksgr24, aoa_comp_hwt_lt_24); |
+ components.add(input); |
+ } |
+ } |
+ |
+ @Override |
+ protected String process() throws Exception { |
+ result1 = new ArrayList<>(); |
for (Input ip : components) { |
- if(ip.aoa_comp_hwt_lt_24) |
- { |
- |
- comp_pslp_number=4; |
- } |
- else if(((ip.aoa_comp_hsg.equals("A")||ip.aoa_comp_hsg.equals("A/D"))&& (ip.aoa_comp_hzdepth*ip.aoa_comp_om<=30))||((ip.aoa_comp_hsg.equals("B")||ip.aoa_comp_hsg.equals("B/D"))&& (ip.aoa_comp_hzdepth*ip.aoa_comp_om<=9)&&ip.aoa_comp_kfact<=0.48)||((ip.aoa_comp_hsg.equals("B")||ip.aoa_comp_hsg.equals("B/D"))&& (ip.aoa_comp_hzdepth*ip.aoa_comp_om<=15)&&ip.aoa_comp_kfact<=0.26)) |
- { |
- |
- comp_pslp_number=4; |
- } |
- else if(((ip.aoa_comp_hsg.equals("B")||ip.aoa_comp_hsg.equals("B/D"))&& (ip.aoa_comp_hzdepth*ip.aoa_comp_om>=35)&&ip.aoa_comp_kfact<=0.48)||((ip.aoa_comp_hsg.equals("B")||ip.aoa_comp_hsg.equals("B/D"))&& (ip.aoa_comp_hzdepth*ip.aoa_comp_om>=35)&&ip.aoa_comp_kfact>=0.20)||((ip.aoa_comp_hsg.equals("C")||ip.aoa_comp_hsg.equals("C/D"))&& (ip.aoa_comp_hzdepth*ip.aoa_comp_om<=10)&&ip.aoa_comp_kfact<=0.28)||((ip.aoa_comp_hsg.equals("C")||ip.aoa_comp_hsg.equals("C/D"))&& (ip.aoa_comp_hzdepth*ip.aoa_comp_om>=10))) |
- { |
- if(!ip.aoa_comp_cracksgr24) |
- { |
- |
- comp_pslp_number=2; |
- } |
- else |
- { |
- |
- comp_pslp_number=3; |
- } |
- |
- } |
- else if(ip.aoa_comp_hsg.equals("D")) |
- { |
- if(!ip.aoa_comp_cracksgr24) |
- { |
- |
- comp_pslp_number=1; |
- } |
- else |
- { |
- |
- comp_pslp_number=2; |
- } |
- } |
- else |
- { |
- if(!ip.aoa_comp_cracksgr24) |
- { |
- |
- comp_pslp_number=3; |
- } |
- else |
- { |
- |
- comp_pslp_number=4; |
- } |
- } |
- Result1 result=new Result1(ip.AoAId,ip.cokey,ip.aoa_comp_area,comp_pslp[comp_pslp_number],comp_pslp_number); |
+ if (ip.aoa_comp_hwt_lt_24) { |
+ comp_pslp_number = 4; |
+ } else if (((ip.aoa_comp_hsg.equals("A") || ip.aoa_comp_hsg.equals("A\\/D")) && (ip.aoa_comp_hzdepth * ip.aoa_comp_om <= 30)) |
+ || ((ip.aoa_comp_hsg.equals("B") || ip.aoa_comp_hsg.equals("B\\/D")) && (ip.aoa_comp_hzdepth * ip.aoa_comp_om <= 9) && ip.aoa_comp_kfact <= 0.48) |
+ || ((ip.aoa_comp_hsg.equals("B") || ip.aoa_comp_hsg.equals("B\\/D")) && (ip.aoa_comp_hzdepth * ip.aoa_comp_om <= 15) && ip.aoa_comp_kfact <= 0.26)) { |
+ comp_pslp_number = 4; |
+ } else if (((ip.aoa_comp_hsg.equals("B") || ip.aoa_comp_hsg.equals("B\\/D")) && (ip.aoa_comp_hzdepth * ip.aoa_comp_om >= 35) && ip.aoa_comp_kfact >= 0.40) |
+ || ((ip.aoa_comp_hsg.equals("B") || ip.aoa_comp_hsg.equals("B\\/D")) && (ip.aoa_comp_hzdepth * ip.aoa_comp_om >= 45) && ip.aoa_comp_kfact >= 0.20) |
+ || ((ip.aoa_comp_hsg.equals("C") || ip.aoa_comp_hsg.equals("C\\/D")) && (ip.aoa_comp_hzdepth * ip.aoa_comp_om <= 10) && ip.aoa_comp_kfact <= 0.28) |
+ || ((ip.aoa_comp_hsg.equals("C") || ip.aoa_comp_hsg.equals("C\\/D")) && (ip.aoa_comp_hzdepth * ip.aoa_comp_om >= 10))) { |
+ if (!ip.aoa_comp_cracksgr24) { |
+ comp_pslp_number = 2; |
+ } else { |
+ comp_pslp_number = 3; |
+ } |
+ } else if (ip.aoa_comp_hsg.equals("D")) { |
+ if (!ip.aoa_comp_cracksgr24) { |
+ comp_pslp_number = 1; |
+ } else { |
+ comp_pslp_number = 2; |
+ } |
+ } else { |
+ if (!ip.aoa_comp_cracksgr24) { |
+ comp_pslp_number = 3; |
+ } else { |
+ comp_pslp_number = 4; |
+ } |
+ } |
+ Result1 result = new Result1(ip.AoAId, ip.cokey, ip.aoa_comp_area, comp_pslp[comp_pslp_number], comp_pslp_number); |
result1.add(result); |
} |
calAoANutSLP(result1); |
- return EXEC_OK; |
+ return EXEC_OK; |
} |
- @Override |
- //writing the results back to JSON |
+ |
+ @Override |
+ //writing the results back to JSON |
protected void postProcess() throws Exception { |
- for(int i=0;i<result1.size();i++) |
- { |
- Result1 temp=result1.get(i); |
- putResult("AoAId",temp.AoAId,"Area of Analysis ID"); |
- putResult("cokey",temp.cokey,"cokey"); |
- putResult("aoa_comp_area",temp.aoa_comp_area,"Area of the soil component in the AoA"); |
- putResult("comp_nslp",temp.comp_pslp,"Pesticide soil leaching potential representing the soil component"); |
- putResult("comp_nslp_number",temp.comp_pslp_number,"Integer Representinf Pesticide Soil Leaching Potential"); |
- } |
- putResult("aoa_nslp",aoa_pslp,"Pesticide soil leaching potential representing the AoA"); |
+ for (int i = 0; i < result1.size(); i++) { |
+ Result1 temp = result1.get(i); |
+ putResult("AoAId", temp.AoAId, "Area of Analysis ID"); |
+ putResult("cokey", temp.cokey, "cokey"); |
+ putResult("aoa_comp_area", temp.aoa_comp_area, "Area of the soil component in the AoA"); |
+ putResult("comp_pslp", temp.comp_pslp, "Pesticide soil leaching potential representing the soil component"); |
+ putResult("comp_pslp_number", temp.comp_pslp_number, "Integer Representinf Pesticide Soil Leaching Potential"); |
+ } |
+ putResult("aoa_pslp", aoa_pslp, "Pesticide soil leaching potential representing the AoA"); |
} |
- // calculate the aoa_nslp |
- void calAoANutSLP(ArrayList<Result1> source) |
- { |
- double cum_pslp_product=0; |
- double aoa_area=0; |
- |
- for(Result1 tmp:source) |
- { |
- cum_pslp_product+=(tmp.comp_pslp_number*tmp.aoa_comp_area); |
- aoa_area+=tmp.aoa_comp_area; |
+ |
+ // calculate the aoa_nslp |
+ void calAoANutSLP(ArrayList<Result1> source) { |
+ double cum_pslp_product = 0; |
+ double aoa_area = 0; |
+ |
+ for (Result1 tmp : source) { |
+ cum_pslp_product += (tmp.comp_pslp_number * tmp.aoa_comp_area); |
+ aoa_area += tmp.aoa_comp_area; |
} |
- double aoa_pslp_fract=cum_pslp_product/aoa_area; |
- if(aoa_pslp_fract<=1.50) |
- { |
- aoa_pslp="VERY LOW"; |
- } |
- else if(aoa_pslp_fract>1.50&&aoa_pslp_fract<=2.50) |
- { |
- aoa_pslp="LOW"; |
- } |
- else if(aoa_pslp_fract>2.50&&aoa_pslp_fract<=3.50) |
- { |
- aoa_pslp="INTERMEDIATE"; |
- } |
- else |
- { |
- aoa_pslp="HIGH"; |
+ double aoa_pslp_fract = cum_pslp_product / aoa_area; |
+ if (aoa_pslp_fract <= 1.50) { |
+ aoa_pslp = "VERY LOW"; |
+ } else if (aoa_pslp_fract > 1.50 && aoa_pslp_fract <= 2.50) { |
+ aoa_pslp = "LOW"; |
+ } else if (aoa_pslp_fract > 2.50 && aoa_pslp_fract <= 3.50) { |
+ aoa_pslp = "INTERMEDIATE"; |
+ } else { |
+ aoa_pslp = "HIGH"; |
} |
} |
} |
@@ -1,252 +1,252 @@ |
{ |
- "metainfo": { |
- }, |
- "parameter": [ |
- { |
- "name": "soilcomponents", |
- "value": [ |
- [ |
- { |
- "name": "AoAId", |
- "value": 1 |
- }, |
- { |
- "name": "cokey", |
- "value": "11510284" |
- }, |
- { |
- "name": "aoa_comp_area", |
- "value": 45.84, |
- "description":"Area of the soil component in the AoA" |
- |
- }, |
- { |
- "name": "aoa_comp_hsg", |
- "value": "A", |
- "description":"Hydrologic soil group of the soil component" |
- |
- }, |
- { |
- "name": "aoa_comp_kfact", |
- "value": 0.24, |
- "description":"#K factor of the horizon representing the soil component; usually the surface horizon" |
- }, |
- { |
- "name":" aoa_comp_om", |
- "value":2.30, |
- "description":"#Organic matter content of the horizon representing the soil component" |
- }, |
- { |
- "name":"aoa_comp_hzdepth", |
- "value":14, |
- "unit":"inches", |
- "description":"#Thickness of horizon representing the soil component" |
- }, |
- { |
- "name":"aoa_comp_cracksgr24", |
- "value":true, |
- "description":"#Whether the soil has surface connected macropores to 24 inches" |
- }, |
- { |
- "name":"aoa_comp_hwt_lt_24", |
- "value":false, |
- "description":"#Whether the soil has a water table less than 24 inches from the surface" |
- } |
- ], |
- [ |
- { |
- "name": "AoAId", |
- "value": 1 |
- }, |
- { |
- "name": "cokey", |
- "value": "11510284" |
- }, |
- { |
- "name": "aoa_comp_area", |
- "value": 25.84, |
- "description":"Area of the soil component in the AoA" |
- |
- }, |
- { |
- "name": "aoa_comp_hsg", |
- "value": "B", |
- "description":"Hydrologic soil group of the soil component" |
- |
- }, |
- { |
- "name": "aoa_comp_kfact", |
- "value": 0.34, |
- "description":"#K factor of the horizon representing the soil component; usually the surface horizon" |
- }, |
- { |
- "name":" aoa_comp_om", |
- "value":2.30, |
- "description":"#Organic matter content of the horizon representing the soil component" |
- }, |
- { |
- "name":"aoa_comp_hzdepth", |
- "value":20, |
- "unit":"inches", |
- "description":"#Thickness of horizon representing the soil component" |
- }, |
- { |
- "name":"aoa_comp_cracksgr24", |
- "value":true, |
- "description":"#Whether the soil has surface connected macropores to 24 inches" |
- }, |
- { |
- "name":"aoa_comp_hwt_lt_24", |
- "value":false, |
- "description":"#Whether the soil has a water table less than 24 inches from the surface" |
- } |
- ], |
- [ |
- { |
- "name": "AoAId", |
- "value": 1 |
- }, |
- { |
- "name": "cokey", |
- "value": "11510284" |
- }, |
- { |
- "name": "aoa_comp_area", |
- "value": 15.84, |
- "description":"Area of the soil component in the AoA" |
- |
- }, |
- { |
- "name": "aoa_comp_hsg", |
- "value": "A/D", |
- "description":"Hydrologic soil group of the soil component" |
- |
- }, |
- { |
- "name": "aoa_comp_kfact", |
- "value": 0.34, |
- "description":"#K factor of the horizon representing the soil component; usually the surface horizon" |
- }, |
- { |
- "name":" aoa_comp_om", |
- "value":1.30, |
- "description":"#Organic matter content of the horizon representing the soil component" |
- }, |
- { |
- "name":"aoa_comp_hzdepth", |
- "value":45, |
- "unit":"inches", |
- "description":"#Thickness of horizon representing the soil component" |
- }, |
- { |
- "name":"aoa_comp_cracksgr24", |
- "value":true, |
- "description":"#Whether the soil has surface connected macropores to 24 inches" |
- }, |
- { |
- "name":"aoa_comp_hwt_lt_24", |
- "value":false, |
- "description":"#Whether the soil has a water table less than 24 inches from the surface" |
- } |
- ], |
- [ |
- { |
- "name": "AoAId", |
- "value": 1 |
- }, |
- { |
- "name": "cokey", |
- "value": "11510284" |
- }, |
- { |
- "name": "aoa_comp_area", |
- "value": 55.84, |
- "description":"Area of the soil component in the AoA" |
- |
- }, |
- { |
- "name": "aoa_comp_hsg", |
- "value": "B/D", |
- "description":"Hydrologic soil group of the soil component" |
- |
- }, |
- { |
- "name": "aoa_comp_kfact", |
- "value": 0.34, |
- "description":"#K factor of the horizon representing the soil component; usually the surface horizon" |
- }, |
- { |
- "name":" aoa_comp_om", |
- "value":3.30, |
- "description":"#Organic matter content of the horizon representing the soil component" |
- }, |
- { |
- "name":"aoa_comp_hzdepth", |
- "value":64, |
- "unit":"inches", |
- "description":"#Thickness of horizon representing the soil component" |
- }, |
- { |
- "name":"aoa_comp_cracksgr24", |
- "value":false, |
- "description":"#Whether the soil has surface connected macropores to 24 inches" |
- }, |
- { |
- "name":"aoa_comp_hwt_lt_24", |
- "value":false, |
- "description":"#Whether the soil has a water table less than 24 inches from the surface" |
- } |
- ], |
- [ |
- { |
- "name": "AoAId", |
- "value": 1 |
- }, |
- { |
- "name": "cokey", |
- "value": "11510284" |
- }, |
- { |
- "name": "aoa_comp_area", |
- "value": 45.84, |
- "description":"Area of the soil component in the AoA" |
- |
- }, |
- { |
- "name": "aoa_comp_hsg", |
- "value": "C/D", |
- "description":"Hydrologic soil group of the soil component" |
- |
- }, |
- { |
- "name": "aoa_comp_kfact", |
- "value": 0.24, |
- "description":"#K factor of the horizon representing the soil component; usually the surface horizon" |
- }, |
- { |
- "name":" aoa_comp_om", |
- "value":4.00, |
- "description":"#Organic matter content of the horizon representing the soil component" |
- }, |
- { |
- "name":"aoa_comp_hzdepth", |
- "value":14, |
- "unit":"inches", |
- "description":"#Thickness of horizon representing the soil component" |
- }, |
- { |
- "name":"aoa_comp_cracksgr24", |
- "value":false, |
- "description":"#Whether the soil has surface connected macropores to 24 inches" |
- }, |
- { |
- "name":"aoa_comp_hwt_lt_24", |
- "value":true, |
- "description":"#Whether the soil has a water table less than 24 inches from the surface" |
- } |
+ "metainfo": { |
+ }, |
+ "parameter": [ |
+ { |
+ "name": "soilcomponents", |
+ "value": [ |
+ [ |
+ { |
+ "name": "AoAId", |
+ "value": 1 |
+ }, |
+ { |
+ "name": "cokey", |
+ "value": "11510284" |
+ }, |
+ { |
+ "name": "aoa_comp_area", |
+ "value": 45.84, |
+ "description": "Area of the soil component in the AoA" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_hsg", |
+ "value": "A", |
+ "description": "Hydrologic soil group of the soil component" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_kfact", |
+ "value": 0.24, |
+ "description": "#K factor of the horizon representing the soil component; usually the surface horizon" |
+ }, |
+ { |
+ "name": "aoa_comp_om", |
+ "value": 2.30, |
+ "description": "#Organic matter content of the horizon representing the soil component" |
+ }, |
+ { |
+ "name": "aoa_comp_hzdepth", |
+ "value": 14, |
+ "unit": "inches", |
+ "description": "#Thickness of horizon representing the soil component" |
+ }, |
+ { |
+ "name": "aoa_comp_cracksgr24", |
+ "value": true, |
+ "description": "#Whether the soil has surface connected macropores to 24 inches" |
+ }, |
+ { |
+ "name": "aoa_comp_hwt_lt_24", |
+ "value": false, |
+ "description": "#Whether the soil has a water table less than 24 inches from the surface" |
+ } |
+ ], |
+ [ |
+ { |
+ "name": "AoAId", |
+ "value": 1 |
+ }, |
+ { |
+ "name": "cokey", |
+ "value": "11510284" |
+ }, |
+ { |
+ "name": "aoa_comp_area", |
+ "value": 25.84, |
+ "description": "Area of the soil component in the AoA" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_hsg", |
+ "value": "B", |
+ "description": "Hydrologic soil group of the soil component" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_kfact", |
+ "value": 0.34, |
+ "description": "#K factor of the horizon representing the soil component; usually the surface horizon" |
+ }, |
+ { |
+ "name": "aoa_comp_om", |
+ "value": 2.30, |
+ "description": "#Organic matter content of the horizon representing the soil component" |
+ }, |
+ { |
+ "name": "aoa_comp_hzdepth", |
+ "value": 20, |
+ "unit": "inches", |
+ "description": "#Thickness of horizon representing the soil component" |
+ }, |
+ { |
+ "name": "aoa_comp_cracksgr24", |
+ "value": true, |
+ "description": "#Whether the soil has surface connected macropores to 24 inches" |
+ }, |
+ { |
+ "name": "aoa_comp_hwt_lt_24", |
+ "value": false, |
+ "description": "#Whether the soil has a water table less than 24 inches from the surface" |
+ } |
+ ], |
+ [ |
+ { |
+ "name": "AoAId", |
+ "value": 1 |
+ }, |
+ { |
+ "name": "cokey", |
+ "value": "11510284" |
+ }, |
+ { |
+ "name": "aoa_comp_area", |
+ "value": 15.84, |
+ "description": "Area of the soil component in the AoA" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_hsg", |
+ "value": "A/D", |
+ "description": "Hydrologic soil group of the soil component" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_kfact", |
+ "value": 0.34, |
+ "description": "#K factor of the horizon representing the soil component; usually the surface horizon" |
+ }, |
+ { |
+ "name": "aoa_comp_om", |
+ "value": 1.30, |
+ "description": "#Organic matter content of the horizon representing the soil component" |
+ }, |
+ { |
+ "name": "aoa_comp_hzdepth", |
+ "value": 45, |
+ "unit": "inches", |
+ "description": "#Thickness of horizon representing the soil component" |
+ }, |
+ { |
+ "name": "aoa_comp_cracksgr24", |
+ "value": true, |
+ "description": "#Whether the soil has surface connected macropores to 24 inches" |
+ }, |
+ { |
+ "name": "aoa_comp_hwt_lt_24", |
+ "value": false, |
+ "description": "#Whether the soil has a water table less than 24 inches from the surface" |
+ } |
+ ], |
+ [ |
+ { |
+ "name": "AoAId", |
+ "value": 1 |
+ }, |
+ { |
+ "name": "cokey", |
+ "value": "11510284" |
+ }, |
+ { |
+ "name": "aoa_comp_area", |
+ "value": 55.84, |
+ "description": "Area of the soil component in the AoA" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_hsg", |
+ "value": "B/D", |
+ "description": "Hydrologic soil group of the soil component" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_kfact", |
+ "value": 0.34, |
+ "description": "#K factor of the horizon representing the soil component; usually the surface horizon" |
+ }, |
+ { |
+ "name": "aoa_comp_om", |
+ "value": 3.30, |
+ "description": "#Organic matter content of the horizon representing the soil component" |
+ }, |
+ { |
+ "name": "aoa_comp_hzdepth", |
+ "value": 64, |
+ "unit": "inches", |
+ "description": "#Thickness of horizon representing the soil component" |
+ }, |
+ { |
+ "name": "aoa_comp_cracksgr24", |
+ "value": false, |
+ "description": "#Whether the soil has surface connected macropores to 24 inches" |
+ }, |
+ { |
+ "name": "aoa_comp_hwt_lt_24", |
+ "value": false, |
+ "description": "#Whether the soil has a water table less than 24 inches from the surface" |
+ } |
+ ], |
+ [ |
+ { |
+ "name": "AoAId", |
+ "value": 1 |
+ }, |
+ { |
+ "name": "cokey", |
+ "value": "11510284" |
+ }, |
+ { |
+ "name": "aoa_comp_area", |
+ "value": 45.84, |
+ "description": "Area of the soil component in the AoA" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_hsg", |
+ "value": "C/D", |
+ "description": "Hydrologic soil group of the soil component" |
+ |
+ }, |
+ { |
+ "name": "aoa_comp_kfact", |
+ "value": 0.24, |
+ "description": "#K factor of the horizon representing the soil component; usually the surface horizon" |
+ }, |
+ { |
+ "name": "aoa_comp_om", |
+ "value": 4.00, |
+ "description": "#Organic matter content of the horizon representing the soil component" |
+ }, |
+ { |
+ "name": "aoa_comp_hzdepth", |
+ "value": 14, |
+ "unit": "inches", |
+ "description": "#Thickness of horizon representing the soil component" |
+ }, |
+ { |
+ "name": "aoa_comp_cracksgr24", |
+ "value": false, |
+ "description": "#Whether the soil has surface connected macropores to 24 inches" |
+ }, |
+ { |
+ "name": "aoa_comp_hwt_lt_24", |
+ "value": true, |
+ "description": "#Whether the soil has a water table less than 24 inches from the surface" |
+ } |
+ ] |
+ |
+ ] |
+ } |
] |
- |
- ] |
- } |
- ] |
} |