[GRASS-user] Aggregating daily maps in relative strds per month
Nikos Alexandris
nik at nikosalexandris.net
Sat May 16 04:41:16 PDT 2015
Is there a better way to aggregate a *relative* spatio-temporal raster
data set composed by daily maps (output from r.sun.daily) in monthly
average strds-es?
At the moment I use the following csv and script:
--%<---
# month_start_end_day.csv
January|1|31
February|32|59
March|60|90
April|91|120
May|121|151
June|152|181
July|182|212
August|213|243
September|244|273
October|274|304
November|305|334
December|335|365
--->%--
and
--%<---
# loop over spatio-temporal raster data sets of interest
for STRDS in global_rad_zero beam_rad_zero diff_rad_zero insol_time
do
# loop over months (start day, end day, month name) in csv
for LINE in `cat month_start_end_day.csv`
do
# set positional parameters
set -- $(echo ${LINE} |tr "|" " ")
# aggregate
t.rast.aggregate input=${STRDS} output=${STRDS}_$1_average basename=${STRDS}_$1_average where="start_time >= $2 AND start_time <= $3" granularity=1 --o
done
done
--->%--
Any tip highly appreciated, Nikos
More information about the grass-user
mailing list