public class ExperimentHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ExperimentHelper.EventType
Event Type
|
| Constructor and Description |
|---|
ExperimentHelper() |
| Modifier and Type | Method and Description |
|---|---|
static HashMap<String,String> |
createEvent(HashMap data,
String typeStr,
String dap,
HashMap<String,String> info,
boolean isStrictID)
Generate
event data with given information |
static ArrayList<ArrayList<HashMap<String,String>>> |
getAutoEvent(Map data) |
static ArrayList<ArrayList<HashMap<String,String>>> |
getAutoEventDate(Map data)
This function will clone the original management events for each year in
the experiment duration.
|
static ArrayList<ArrayList<HashMap<String,String>>> |
getAutoEventDate(Map data,
String[] pdates)
This function will clone the original management events based on given
new planting dates.
|
static HashMap<String,ArrayList<String>> |
getAutoFillPlantingDate(HashMap data,
String eDate,
String lDate,
String rain,
String days)
This function will calculate the planting date which is the first date
within the planting window
that has an accumulated rainfall amount (P) in the previous n days. |
static ArrayList<HashMap<String,String>> |
getAutoIrrigationEvent(HashMap data,
String irrNum,
String baseTemp,
String[] gddArr,
String[] irvalArr) |
static HashMap<String,ArrayList<String>> |
getAutoPlantingDate(HashMap data,
String eDate,
String lDate,
String rain,
String days)
This function will calculate the planting date which is the first date
within the planting window
that has an accumulated rainfall amount (P) in the previous n days. |
static ArrayList<HashMap<String,String>> |
getFertDistribution(HashMap data,
String num,
String fecd,
String feacd,
String fedep,
String[] offsets,
String[] ptps)
Often the total amount of fertilizer in a growing season has been
recorded, but no details of application dates, types of fertilizer,etc.
|
static String |
getFstPdate(Map data,
String defValue)
Get the first planting date from given data set.
|
protected static ArrayList |
getICLayer(HashMap data)
Get initial condition soil layer data array from data holder.
|
static ArrayList<HashMap<String,String>> |
getOMDistribution(HashMap expData,
String offset,
String omcd,
String omc2n,
String omdep,
String ominp,
String dmr)
Organic matter applications include manure, crop residues, etc.
|
static ArrayList<HashMap<String,String>> |
getPaddyIrrigation(HashMap data,
String bundNum,
String percRate,
String plowpanDept,
String[] offsets,
String[] maxVals,
String[] minVals)
This function allows standard paddy management inputs to be generalized
for a field or group of fields.
|
static HashMap<String,ArrayList<String>> |
getStableCDistribution(HashMap data,
String som3_0,
String pp,
String rd)
Calculate Stable C (g[C]/100g[soil]) fraction distribution in soil layers
and save the result into initial condition layers
|
public static HashMap<String,ArrayList<String>> getAutoPlantingDate(HashMap data, String eDate, String lDate, String rain, String days)
data - The HashMap of experiment (including weather data)eDate - Earliest planting date (mm-dd or mmdd)lDate - Latest planting date (mm-dd or mmdd)rain - Threshold rainfall amount (mm)days - Number of days of accumulationArrayList of pdate for each year in the
weather data.public static HashMap<String,ArrayList<String>> getAutoFillPlantingDate(HashMap data, String eDate, String lDate, String rain, String days)
data - The HashMap of experiment (including weather data)eDate - Earliest planting date (mm-dd or mmdd)lDate - Latest planting date (mm-dd or mmdd)rain - Threshold rainfall amount (mm)days - Number of days of accumulationArrayList of pdate for each year in the
weather data.public static ArrayList<HashMap<String,String>> getFertDistribution(HashMap data, String num, String fecd, String feacd, String fedep, String[] offsets, String[] ptps)
num - Number of fertilizer applicationsfecd - The code for type of fertilizer addedfeacd - The code for fertilizer application methodfedep - The depth at which fertilizer is applied (cm)offsets - The array of date as offset from planting date (days)
(must be paired with ptps)ptps - The array of proportion of total N added (%) (must be paired
with offsets, the sum must be 100%)data - The experiment data holderArrayList of generated fertilizer event based
on each planting datepublic static ArrayList<HashMap<String,String>> getOMDistribution(HashMap expData, String offset, String omcd, String omc2n, String omdep, String ominp, String dmr)
expData - The experiment data holderoffset - application date as days before (-) or after (+) planting
date (days)omcd - code for type of fertilizer addedomc2n - C:N ratio for applied organic matteromdep - depth at which organic matter is incorporated (cm)ominp - percentage incorporation of organic matter (%)dmr - ArrayList of event, the generated or
updated Organic matter event will be included and sorted inside
the ArrayListpublic static HashMap<String,ArrayList<String>> getStableCDistribution(HashMap data, String som3_0, String pp, String rd)
data - The experiment data holdersom3_0 - fraction of total soil organic C which is stable, at
surface (fraction)pp - depth of topsoil where maximum SOM3 fraction is relatively
constant (cm)rd - depth at which soil C is relatively stable (~98% stable C) (cm)ArrayList of calculated SLSC for each layer of
given soilpublic static ArrayList<ArrayList<HashMap<String,String>>> getAutoEventDate(Map data)
data - The HashMap of experiment (including weather data)ArrayList of Event for each
year in the experiment duration. The original group of Event will
only be included when duration > 1.public static ArrayList<ArrayList<HashMap<String,String>>> getAutoEventDate(Map data, String[] pdates)
data - The HashMap of experiment (including weather data)pdates - The given planting dates for generationArrayList of Event for each
planting date in the experiment duration.public static ArrayList<HashMap<String,String>> getPaddyIrrigation(HashMap data, String bundNum, String percRate, String plowpanDept, String[] offsets, String[] maxVals, String[] minVals)
data - The experiment data holderbundNum - Number of Bund height entriespercRate - The Percolation rate (mm/d)plowpanDept - The Plowpan depth (mm)offsets - The array of date as offset from planting date (days)
(must be paired with Max and Min)maxVals - The array of Max flood (bund) height (mm)minVals - The array of Min flood height (mm)ArrayList of generated irrigation event based
on first planting datepublic static String getFstPdate(Map data, String defValue)
data - The experiment data holderdefValue - The value used for return when planting date is unavailablepublic static HashMap<String,String> createEvent(HashMap data, String typeStr, String dap, HashMap<String,String> info, boolean isStrictID)
event data with given informationdata - experiment data holdertypeStr - The event typedap - The days after planting to operate the eventinfo - The given event informationisStrictID - The flag for if check the id is only belong the given event typeeventpublic static ArrayList<HashMap<String,String>> getAutoIrrigationEvent(HashMap data, String irrNum, String baseTemp, String[] gddArr, String[] irvalArr)
Copyright © 2014. All Rights Reserved.