|
@@ -66,11 +66,11 @@ wget http://www-pool.math.tu-berlin.de/~soeren/grass/temperature_mean_1990_2000_
|
|
|
mkdir -p /tmp/grassdata/LL
|
|
|
|
|
|
# Start GRASS and create a new location with PERMANENT mapset
|
|
|
-grass71 -c EPSG:4326 /tmp/grassdata/LL/PERMANENT
|
|
|
+grass71 -c EPSG:4326 /tmp/grassdata/LL/PERMANENT
|
|
|
|
|
|
# Import the temperature data
|
|
|
-t.rast.import in=temperature_mean_1990_2000_daily_celsius.tar.gz \
|
|
|
- out=temperature_mean_1990_2000_daily_celsius extr=/tmp
|
|
|
+t.rast.import input=temperature_mean_1990_2000_daily_celsius.tar.gz \
|
|
|
+ output=temperature_mean_1990_2000_daily_celsius directory=/tmp
|
|
|
|
|
|
# We need to set the region correctly
|
|
|
g.region -p raster=`t.rast.list input=temperature_mean_1990_2000_daily_celsius column=name | tail -1`
|
|
@@ -95,7 +95,7 @@ g.region -p zoom=`t.rast.list input=temperature_mean_1990_2000_daily_celsius col
|
|
|
t.rast.accumulate input="temperature_mean_1990_2000_daily_celsius" \
|
|
|
output="temperature_mean_1990_2000_daily_celsius_accumulated_10_30" \
|
|
|
limits="10,30" start="1990-01-01" stop="2000-01-01" cycle="12 months" \
|
|
|
- base="temp_acc_daily_10_30" method="bedd"
|
|
|
+ basename="temp_acc_daily_10_30" method="bedd"
|
|
|
|
|
|
#############################################################################
|
|
|
#### ACCUMULATION PATTERN DETECTION #########################################
|
|
@@ -105,17 +105,17 @@ t.rast.accumulate input="temperature_mean_1990_2000_daily_celsius" \
|
|
|
# First cycle at 325°C - 427°C GDD
|
|
|
t.rast.accdetect input=temperature_mean_1990_2000_daily_celsius_accumulated_10_30@PERMANENT \
|
|
|
occ=leafhopper_occurrence_c1_1990_2000 start="1990-01-01" stop="2000-01-01" \
|
|
|
- cycle="12 months" range=325,427 base=lh_c1 indicator=leafhopper_indicator_c1_1990_2000
|
|
|
+ cycle="12 months" range=325,427 basename=lh_c1 indicator=leafhopper_indicator_c1_1990_2000
|
|
|
|
|
|
# Second cycle at 685°C - 813°C GDD
|
|
|
t.rast.accdetect input=temperature_mean_1990_2000_daily_celsius_accumulated_10_30@PERMANENT \
|
|
|
occ=leafhopper_occurrence_c2_1990_2000 start="1990-01-01" stop="2000-01-01" \
|
|
|
- cycle="12 months" range=685,813 base=lh_c2 indicator=leafhopper_indicator_c2_1990_2000
|
|
|
+ cycle="12 months" range=685,813 basename=lh_c2 indicator=leafhopper_indicator_c2_1990_2000
|
|
|
|
|
|
# Third cycle at 1047°C - 1179°C GDD
|
|
|
t.rast.accdetect input=temperature_mean_1990_2000_daily_celsius_accumulated_10_30@PERMANENT \
|
|
|
occ=leafhopper_occurrence_c3_1990_2000 start="1990-01-01" stop="2000-01-01" \
|
|
|
- cycle="12 months" range=1047,1179 base=lh_c3 indicator=leafhopper_indicator_c3_1990_2000
|
|
|
+ cycle="12 months" range=1047,1179 basename=lh_c3 indicator=leafhopper_indicator_c3_1990_2000
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
@@ -124,31 +124,31 @@ t.rast.accdetect input=temperature_mean_1990_2000_daily_celsius_accumulated_10_3
|
|
|
|
|
|
# Extract the areas that have full cycles
|
|
|
t.rast.aggregate input=leafhopper_indicator_c1_1990_2000 gran="1 year" \
|
|
|
- output=leafhopper_cycle_1_1990_2000_yearly method=maximum base=li_c1
|
|
|
+ output=leafhopper_cycle_1_1990_2000_yearly method=maximum basename=li_c1
|
|
|
|
|
|
-t.rast.mapcalc input=leafhopper_cycle_1_1990_2000_yearly base=lh_clean_c1 \
|
|
|
+t.rast.mapcalc input=leafhopper_cycle_1_1990_2000_yearly basename=lh_clean_c1 \
|
|
|
output=leafhopper_cycle_1_1990_2000_yearly_clean \
|
|
|
- expr="if(leafhopper_cycle_1_1990_2000_yearly == 3, 1, null())"
|
|
|
+ expression="if(leafhopper_cycle_1_1990_2000_yearly == 3, 1, null())"
|
|
|
|
|
|
t.rast.aggregate input=leafhopper_indicator_c2_1990_2000 gran="1 year" \
|
|
|
- output=leafhopper_cycle_2_1990_2000_yearly method=maximum base=li_c2
|
|
|
+ output=leafhopper_cycle_2_1990_2000_yearly method=maximum basename=li_c2
|
|
|
|
|
|
-t.rast.mapcalc input=leafhopper_cycle_2_1990_2000_yearly base=lh_clean_c2 \
|
|
|
+t.rast.mapcalc input=leafhopper_cycle_2_1990_2000_yearly basename=lh_clean_c2 \
|
|
|
output=leafhopper_cycle_2_1990_2000_yearly_clean \
|
|
|
- expr="if(leafhopper_cycle_2_1990_2000_yearly == 3, 2, null())"
|
|
|
+ expression="if(leafhopper_cycle_2_1990_2000_yearly == 3, 2, null())"
|
|
|
|
|
|
t.rast.aggregate input=leafhopper_indicator_c3_1990_2000 gran="1 year" \
|
|
|
- output=leafhopper_cycle_3_1990_2000_yearly method=maximum base=li_c3
|
|
|
+ output=leafhopper_cycle_3_1990_2000_yearly method=maximum basename=li_c3
|
|
|
|
|
|
-t.rast.mapcalc input=leafhopper_cycle_3_1990_2000_yearly base=lh_clean_c3 \
|
|
|
+t.rast.mapcalc input=leafhopper_cycle_3_1990_2000_yearly basename=lh_clean_c3 \
|
|
|
output=leafhopper_cycle_3_1990_2000_yearly_clean \
|
|
|
- expr="if(leafhopper_cycle_3_1990_2000_yearly == 3, 3, null())"
|
|
|
+ expression="if(leafhopper_cycle_3_1990_2000_yearly == 3, 3, null())"
|
|
|
|
|
|
|
|
|
t.rast.mapcalc input=leafhopper_cycle_1_1990_2000_yearly_clean,leafhopper_cycle_2_1990_2000_yearly_clean,leafhopper_cycle_3_1990_2000_yearly_clean \
|
|
|
- base=lh_cleann_all_cycles \
|
|
|
+ basename=lh_cleann_all_cycles \
|
|
|
output=leafhopper_all_cycles_1990_2000_yearly_clean \
|
|
|
- expr="if(isnull(leafhopper_cycle_3_1990_2000_yearly_clean), \
|
|
|
+ expression="if(isnull(leafhopper_cycle_3_1990_2000_yearly_clean), \
|
|
|
if(isnull(leafhopper_cycle_2_1990_2000_yearly_clean), \
|
|
|
if(isnull(leafhopper_cycle_1_1990_2000_yearly_clean), \
|
|
|
null() ,1),2),3)"
|
|
@@ -170,35 +170,35 @@ t.rast.colors input=leafhopper_all_cycles_1990_2000_yearly_clean rules=color.tab
|
|
|
|
|
|
# Extract the duration in days of the first cycle
|
|
|
t.rast.aggregate input=leafhopper_occurrence_c1_1990_2000 gran="1 year" \
|
|
|
- output=leafhopper_min_day_c1_1990_2000 method=minimum base=occ_min_day_c1
|
|
|
+ output=leafhopper_min_day_c1_1990_2000 method=minimum basename=occ_min_day_c1
|
|
|
t.rast.aggregate input=leafhopper_occurrence_c1_1990_2000 gran="1 year" \
|
|
|
- output=leafhopper_max_day_c1_1990_2000 method=maximum base=occ_max_day_c1
|
|
|
+ output=leafhopper_max_day_c1_1990_2000 method=maximum basename=occ_max_day_c1
|
|
|
t.rast.mapcalc input=leafhopper_min_day_c1_1990_2000,leafhopper_max_day_c1_1990_2000 \
|
|
|
- base=occ_duration_c1 \
|
|
|
+ basename=occ_duration_c1 \
|
|
|
output=leafhopper_duration_c1_1990_2000 \
|
|
|
- expr="leafhopper_max_day_c1_1990_2000 - leafhopper_min_day_c1_1990_2000"
|
|
|
+ expression="leafhopper_max_day_c1_1990_2000 - leafhopper_min_day_c1_1990_2000"
|
|
|
|
|
|
|
|
|
# Extract the duration in days of the second cycle
|
|
|
t.rast.aggregate input=leafhopper_occurrence_c2_1990_2000 gran="1 year" \
|
|
|
- output=leafhopper_min_day_c2_1990_2000 method=minimum base=occ_min_day_c2
|
|
|
+ output=leafhopper_min_day_c2_1990_2000 method=minimum basename=occ_min_day_c2
|
|
|
t.rast.aggregate input=leafhopper_occurrence_c2_1990_2000 gran="1 year" \
|
|
|
- output=leafhopper_max_day_c2_1990_2000 method=maximum base=occ_max_day_c2
|
|
|
+ output=leafhopper_max_day_c2_1990_2000 method=maximum basename=occ_max_day_c2
|
|
|
t.rast.mapcalc input=leafhopper_min_day_c2_1990_2000,leafhopper_max_day_c2_1990_2000 \
|
|
|
- base=occ_duration_c2 \
|
|
|
+ basename=occ_duration_c2 \
|
|
|
output=leafhopper_duration_c2_1990_2000 \
|
|
|
- expr="leafhopper_max_day_c2_1990_2000 - leafhopper_min_day_c2_1990_2000"
|
|
|
+ expression="leafhopper_max_day_c2_1990_2000 - leafhopper_min_day_c2_1990_2000"
|
|
|
|
|
|
|
|
|
# Extract the duration in days of the third cycle
|
|
|
t.rast.aggregate input=leafhopper_occurrence_c3_1990_2000 gran="1 year" \
|
|
|
- output=leafhopper_min_day_c3_1990_2000 method=minimum base=occ_min_day_c3
|
|
|
+ output=leafhopper_min_day_c3_1990_2000 method=minimum basename=occ_min_day_c3
|
|
|
t.rast.aggregate input=leafhopper_occurrence_c3_1990_2000 gran="1 year" \
|
|
|
- output=leafhopper_max_day_c3_1990_2000 method=maximum base=occ_max_day_c3
|
|
|
+ output=leafhopper_max_day_c3_1990_2000 method=maximum basename=occ_max_day_c3
|
|
|
t.rast.mapcalc input=leafhopper_min_day_c3_1990_2000,leafhopper_max_day_c3_1990_2000 \
|
|
|
- base=occ_duration_c3 \
|
|
|
+ basename=occ_duration_c3 \
|
|
|
output=leafhopper_duration_c3_1990_2000 \
|
|
|
- expr="leafhopper_max_day_c3_1990_2000 - leafhopper_min_day_c3_1990_2000"
|
|
|
+ expression="leafhopper_max_day_c3_1990_2000 - leafhopper_min_day_c3_1990_2000"
|
|
|
|
|
|
t.rast.colors input=leafhopper_duration_c1_1990_2000 color=rainbow
|
|
|
t.rast.colors input=leafhopper_duration_c2_1990_2000 color=rainbow
|
|
@@ -212,33 +212,33 @@ t.rast.colors input=leafhopper_duration_c3_1990_2000 color=rainbow
|
|
|
|
|
|
# First cycle
|
|
|
t.rast.aggregate input=leafhopper_indicator_c1_1990_2000 gran="1 month" \
|
|
|
- output=leafhopper_indi_min_month_c1_1990_2000 method=minimum base=occ_indi_min_month_c1
|
|
|
+ output=leafhopper_indi_min_month_c1_1990_2000 method=minimum basename=occ_indi_min_month_c1
|
|
|
t.rast.aggregate input=leafhopper_indicator_c1_1990_2000 gran="1 month" \
|
|
|
- output=leafhopper_indi_max_month_c1_1990_2000 method=maximum base=occ_indi_max_month_c1
|
|
|
+ output=leafhopper_indi_max_month_c1_1990_2000 method=maximum basename=occ_indi_max_month_c1
|
|
|
t.rast.mapcalc input=leafhopper_indi_min_month_c1_1990_2000,leafhopper_indi_max_month_c1_1990_2000 \
|
|
|
- base=indicator_monthly_c1 \
|
|
|
+ basename=indicator_monthly_c1 \
|
|
|
output=leafhopper_monthly_indicator_c1_1990_2000 \
|
|
|
- expr="if(leafhopper_indi_min_month_c1_1990_2000 == 1, 1, if(leafhopper_indi_max_month_c1_1990_2000 == 3, 3, 2))"
|
|
|
+ expression="if(leafhopper_indi_min_month_c1_1990_2000 == 1, 1, if(leafhopper_indi_max_month_c1_1990_2000 == 3, 3, 2))"
|
|
|
|
|
|
# Second cycle
|
|
|
t.rast.aggregate input=leafhopper_indicator_c2_1990_2000 gran="1 month" \
|
|
|
- output=leafhopper_indi_min_month_c2_1990_2000 method=minimum base=occ_indi_min_month_c2
|
|
|
+ output=leafhopper_indi_min_month_c2_1990_2000 method=minimum basename=occ_indi_min_month_c2
|
|
|
t.rast.aggregate input=leafhopper_indicator_c2_1990_2000 gran="1 month" \
|
|
|
- output=leafhopper_indi_max_month_c2_1990_2000 method=maximum base=occ_indi_max_month_c2
|
|
|
+ output=leafhopper_indi_max_month_c2_1990_2000 method=maximum basename=occ_indi_max_month_c2
|
|
|
t.rast.mapcalc input=leafhopper_indi_min_month_c2_1990_2000,leafhopper_indi_max_month_c2_1990_2000 \
|
|
|
- base=indicator_monthly_c2 \
|
|
|
+ basename=indicator_monthly_c2 \
|
|
|
output=leafhopper_monthly_indicator_c2_1990_2000 \
|
|
|
- expr="if(leafhopper_indi_min_month_c2_1990_2000 == 1, 1, if(leafhopper_indi_max_month_c2_1990_2000 == 3, 3, 2))"
|
|
|
+ expression="if(leafhopper_indi_min_month_c2_1990_2000 == 1, 1, if(leafhopper_indi_max_month_c2_1990_2000 == 3, 3, 2))"
|
|
|
|
|
|
# Third cycle
|
|
|
t.rast.aggregate input=leafhopper_indicator_c3_1990_2000 gran="1 month" \
|
|
|
- output=leafhopper_indi_min_month_c3_1990_2000 method=minimum base=occ_indi_min_month_c3
|
|
|
+ output=leafhopper_indi_min_month_c3_1990_2000 method=minimum basename=occ_indi_min_month_c3
|
|
|
t.rast.aggregate input=leafhopper_indicator_c3_1990_2000 gran="1 month" \
|
|
|
- output=leafhopper_indi_max_month_c3_1990_2000 method=maximum base=occ_indi_max_month_c3
|
|
|
+ output=leafhopper_indi_max_month_c3_1990_2000 method=maximum basename=occ_indi_max_month_c3
|
|
|
t.rast.mapcalc input=leafhopper_indi_min_month_c3_1990_2000,leafhopper_indi_max_month_c3_1990_2000 \
|
|
|
- base=indicator_monthly_c3 \
|
|
|
+ basename=indicator_monthly_c3 \
|
|
|
output=leafhopper_monthly_indicator_c3_1990_2000 \
|
|
|
- expr="if(leafhopper_indi_min_month_c3_1990_2000 == 1, 1, if(leafhopper_indi_max_month_c3_1990_2000 == 3, 3, 2))"
|
|
|
+ expression="if(leafhopper_indi_min_month_c3_1990_2000 == 1, 1, if(leafhopper_indi_max_month_c3_1990_2000 == 3, 3, 2))"
|
|
|
|
|
|
cat > color.table << EOF
|
|
|
3 red
|