[GRASS-user] Aggregating daily maps in relative strds per month
Nikos Alexandris
nik at nikosalexandris.net
Mon May 18 00:34:51 PDT 2015
* Veronica Andreo <veroandreo at gmail.com> [2015-05-17 17:07:30 -0300]:
> Hi Nikos!
Ciao Vero :-).
> If the data in fact represent daily data, why don't you register it as
> absolute time?? In that way, you would just loop over strds...
It is output from r.sun.daily. Below, looping over monthly Linke
Turbidity values.
--%<---
for LINE in `cat monthly_linke_map_start_day_end_day.csv`
do
set -- $(echo ${LINE} |tr "|" " ")
r.sun.daily elevation=srtm4 at PERMANENT aspect_value=0 slope_value=0.0 \
albedo=albedo at albedo linke=$1 at linke start_day=$2 end_day=$3 \
glob_rad_basename=global_rad_zero insol_time_basename=insol_time \
beam_rad_basename=beam_rad_zero diff_rad_basename=diff_rad_zero --o
done
--->%--
The script creates automatically
an "relative" strds, and for a good reason I guess. I can't think which
of the input's, for r.sun.daily, would fit for an absolute timestamping.
For sure it's not going to be the elevation model. Linke Turbidity and
albeo also not. Any help is highly appreciated if there is something
for which an absolute timestamping can be justified.
> for STRDS in global_rad_zero beam_rad_zero diff_rad_zero insol_time
> do
> t.rast.aggregate input=${STRDS} output=${STRDS}_monthly_average
> basename=${STRDS}_average granularity="1 month" method=average
> done
So, the above won't work :-(. I don't know how bad the idea of having
preset months (start and end days for such cases) to operate on relative
s-t data sets.
Plus, an idea I already expressed elsewhere in the list: will it be
useful to have support for multiple LinkeT maps? Not sure how the
implementation should look like yet.
> Cheers,
> Vero
Thanks for caring, Nikos
--%<---
Nikos:
> 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
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
--
Nikos Alexandris | Remote Sensing Scientist, Dr
Themidos 3, 42100, Trikala, Greece
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3
More information about the grass-user
mailing list