changeset 113:bb61458966df draft

Uploaded
author greg
date Tue, 29 May 2018 13:11:25 -0400
parents bcb12b7e8563
children 3bbb4ff3b5f2
files insect_phenology_model.xml
diffstat 1 files changed, 21 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/insect_phenology_model.xml	Tue May 29 09:00:25 2018 -0400
+++ b/insect_phenology_model.xml	Tue May 29 13:11:25 2018 -0400
@@ -8,6 +8,7 @@
 #set output_data_dir = "output_data_dir"
 #set output_plots_dir = "output_plots_dir"
 #set error_file = $os.path.join($output_data_dir, "04_combined_generations.csv")
+#set custom_date_interval = $custom_date_interval_cond.custom_date_interval
 #set life_stages = list()
 #set plot_adult_life_stage = $plot_adult_life_stage_cond.plot_adult_life_stage
 #set plot_nymph_life_stage = $plot_nymph_life_stage_cond.plot_nymph_life_stage
@@ -51,9 +52,13 @@
 --old_nymph_accumulation $old_nymph_accumulation
 --oviposition $oviposition
 --photoperiod $photoperiod
---replications $replications
 --plot_generations_separately $plot_generations_separately
 --plot_std_error $plot_std_error
+--replications $replications
+#if str($custom_date_interval) == "yes":
+    --start_date '$start_date'
+    --end_date '$end_date'
+#end if
 --young_nymph_accumulation $young_nymph_accumulation
 &>ipm_log.txt;
 if [[ $? -ne 0 ]]; then
@@ -92,6 +97,21 @@
         <param name="young_nymph_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (egg->young nymph)"/>
         <param name="old_nymph_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (young nymph->old nymph)"/>
         <param name="adult_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (old nymph->adult)"/>
+        <conditional name="custom_date_interval_cond">
+            <param name="custom_date_interval" type="select" label="Set custom date interval for plots?">
+                <option value="no" selected="true">No</option>
+                <option value="yes">Yes</option>
+            </param>
+            <when value="no"/>
+            <when value="yes">
+                <param name="start_date" type="text" value="" label="Start date" help="Format must be yyyy-mm-dd">
+                    <validator type="expression" message="Date must have the format yyyy-mm-dd">value == datetime.strptime(value, "%Y-%m-%d").strftime('%Y-%m-%d')</validator>
+                </param>
+                <param name="end_date" type="text" value="" label="End date" help="Format must be yyyy-mm-dd">
+                    <validator type="expression" message="Date must have the format yyyy-mm-dd">value == datetime.strptime(value, "%Y-%m-%d").strftime('%Y-%m-%d')</validator>
+                </param>
+            </when>
+        </conditional>
         <param name="plot_generations_separately" type="select" label="Plot generations separately?">
             <option value="yes" selected="True">Yes</option>
             <option value="no">No</option>