| 1 |
## DESCRIPTION |
| 2 |
|
| 3 |
The input of this module is a single space time raster dataset, the |
| 4 |
output is a single raster map layer. A subset of the input space time |
| 5 |
raster dataset can be selected using the **where** option. The sorting |
| 6 |
of the raster map layer can be set using the **order** option. Be aware |
| 7 |
that the order of the maps can significantly influence the result of the |
| 8 |
aggregation (e.g.: slope). By default the maps are ordered by |
| 9 |
**start_time**. |
| 10 |
|
| 11 |
*t.rast.series* is a simple wrapper for the raster module **r.series**. |
| 12 |
It supports a subset of the aggregation methods of **r.series**. |
| 13 |
|
| 14 |
## NOTES |
| 15 |
|
| 16 |
To avoid problems with too many open files, by default, the maximum |
| 17 |
number of open files is set to 1000. If the number of input raster files |
| 18 |
exceeds this number, the **-z** flag will be invoked. Because this will |
| 19 |
slow down processing, the user can set a higher limit with the |
| 20 |
**file_limit** parameter. Note that **file_limit** limit should not |
| 21 |
exceed the user-specific limit on open files set by your operating |
| 22 |
system. See the |
| 23 |
[Wiki](https://grasswiki.osgeo.org/wiki/Large_raster_data_processing#Number_of_open_files_limitation) |
| 24 |
for more information. |
| 25 |
|
| 26 |
## Performance |
| 27 |
|
| 28 |
To enable parallel processing, the user can specify the number of |
| 29 |
threads to be used with the **nprocs** parameter (default 1). The |
| 30 |
**memory** parameter (default 300 MB) can also be provided to determine |
| 31 |
the size of the buffer in MB for computation. Both parameters are passed |
| 32 |
to [r.series](r.series.md). To take advantage of the parallelization, |
| 33 |
GRASS needs to be compiled with OpenMP enabled. |
| 34 |
|
| 35 |
## EXAMPLES |
| 36 |
|
| 37 |
### Estimate the average temperature for the whole time series |
| 38 |
|
| 39 |
Here the entire stack of input maps is considered: |
| 40 |
|
| 41 |
```sh |
| 42 |
t.rast.series input=tempmean_monthly output=tempmean_average method=average |
| 43 |
``` |
| 44 |
|
| 45 |
### Estimate the average temperature for a subset of the time series |
| 46 |
|
| 47 |
Here the stack of input maps is limited to a certain period of time: |
| 48 |
|
| 49 |
```sh |
| 50 |
t.rast.series input=tempmean_daily output=tempmean_season method=average \ |
| 51 |
where="start_time >= '2012-06' and start_time <= '2012-08'" |
| 52 |
``` |
| 53 |
|
| 54 |
### Climatology: single month in a multi-annual time series |
| 55 |
|
| 56 |
By considering only a single month in a multi-annual time series the |
| 57 |
so-called climatology can be computed. Estimate average temperature for |
| 58 |
all January maps in the time series: |
| 59 |
|
| 60 |
```sh |
| 61 |
t.rast.series input=tempmean_monthly \ |
| 62 |
method=average output=tempmean_january \ |
| 63 |
where="strftime('%m', start_time)='01'" |
| 64 |
|
| 65 |
# equivalently, we can use |
| 66 |
t.rast.series input=tempmean_monthly \ |
| 67 |
output=tempmean_january method=average \ |
| 68 |
where="start_time = datetime(start_time, 'start of year', '0 month')" |
| 69 |
|
| 70 |
# if we want also February and March averages |
| 71 |
|
| 72 |
t.rast.series input=tempmean_monthly \ |
| 73 |
output=tempmean_february method=average \ |
| 74 |
where="start_time = datetime(start_time, 'start of year', '1 month')" |
| 75 |
|
| 76 |
t.rast.series input=tempmean_monthly \ |
| 77 |
output=tempmean_march method=average \ |
| 78 |
where="start_time = datetime(start_time, 'start of year', '2 month')" |
| 79 |
``` |
| 80 |
|
| 81 |
Generalizing a bit, we can estimate monthly climatologies for all months |
| 82 |
by means of different methods |
| 83 |
|
| 84 |
```sh |
| 85 |
for i in `seq -w 1 12` ; do |
| 86 |
for m in average stddev minimum maximum ; do |
| 87 |
t.rast.series input=tempmean_monthly method=${m} output=tempmean_${m}_${i} \ |
| 88 |
where="strftime('%m', start_time)='${i}'" |
| 89 |
done |
| 90 |
done |
| 91 |
``` |
| 92 |
|
| 93 |
## SEE ALSO |
| 94 |
|
| 95 |
*[r.series](r.series.md), [t.create](t.create.md), [t.info](t.info.md)* |
| 96 |
|
| 97 |
[Temporal data processing |
| 98 |
Wiki](https://grasswiki.osgeo.org/wiki/Temporal_data_processing) |
| 99 |
|
| 100 |
## AUTHOR |
| 101 |
|
| 102 |
Sören Gebbert, Thünen Institute of Climate-Smart Agriculture |