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