# FreeBSD Manual Pages

r.series(1) GRASS GIS User's Manual r.series(1)NAMEr.series- Makes each output cell value a function of the values as- signed to the corresponding cells in the input raster map layers.KEYWORDSraster, aggregation, seriesSYNOPSISr.seriesr.series--helpr.series[-nz] [input=name[,name,...]] [file=name]out-put=name[,name,...]method=string[,string,...] [quan-tile=float[,float,...]] [weights=float[,float,...]] [range=lo,hi] [--overwrite] [--help] [--verbose] [--quiet] [--ui]Flags:-nPropagate NULLs-zDo not keep files open--overwriteAllow output files to overwrite existing files--helpPrint usage summary--verboseVerbose module output--quietQuiet module output--uiForce launching GUI dialogParameters:input=name[,name,...] Name of input raster map(s)file=nameInput file with one raster map name and optional one weight per line, field separator between name and weight is |output=name[,name,...]A[required]Name for output raster mapmethod=string[,string,...]A[required]Aggregate operation Options:average,count,median,mode,minimum,min_raster,maxi-mum,max_raster,stddev,range,sum,variance,diversity,slope,offset,detcoeff,tvalue,quart1,quart3,perc90,quantile,skew-ness,kurtosisquantile=float[,float,...] Quantile to calculate for method=quantile Options:0.0-1.0weights=float[,float,...] Weighting factor for each input map, default value is 1.0 for each input maprange=lo,hiIgnore values outside this rangeDESCRIPTIONr.seriesmakes each output cell value a function of the values assigned to the corresponding cells in the input raster map layers. Following methods are available:oaverage: average valueocount: count of non-NULL cellsomedian: median valueomode: most frequently occurring valueominimum: lowest valueomin_raster: raster map number with the minimum time-series valueomaximum: highest valueomax_raster: raster map number with the maximum time-series valueostddev: standard deviationorange: range of values (max - min)osum: sum of valuesovariance: statistical varianceodiversity: number of different valuesoslope: linear regression slopeooffset: linear regression offsetodetcoeff: linear regression coefficient of determinationotvalue: linear regression t-valueoquart1: first quartileoquart3: third quartileoperc90: ninetieth percentileoquantile: arbitrary quantileoskewness: skewnessokurtosis: kurtosis Note that most parameters accept multiple answers, allowing multiple aggregates to be computed in a single run, e.g.: r.series input=map1,...,mapN \ output=map.mean,map.stddev \ method=average,stddev or: r.series input=map1,...,mapN \ output=map.p10,map.p50,map.p90 \ method=quantile,quantile,quantile \ quantile=0.1,0.5,0.9 The same number of values must be provided for all options.NOTESNo-data(NULL)handlingWith-nflag, any cell for which any of the corresponding input cells are NULL is automatically set to NULL (NULL propagation). The aggre- gate function is not called, so all methods behave this way with re- spect to the-nflag. Without-nflag, the complete list of inputs for each cell (including NULLs) is passed to the aggregate function. Individual aggregates can handle data as they choose. Mostly, they just compute the aggregate over the non-NULL values, producing a NULL result only if all inputs are NULL.MinimumandmaximumanalysisThemin_rasterandmax_rastermethods generate a map with the number of the raster map that holds the minimum/maximum value of the time-series. The numbering starts at0up tonfor the first and the last raster listed ininput=, respectively.RangeanalysisIf therange=option is given, any values which fall outside that range will be treated as if they were NULL. Therangeparameter can be set tolow,highthresholds: values outside of this range are treated as NULL (i.e., they will be ignored by most aggregates, or will cause the re- sult to be NULL if -n is given). Thelow,highthresholds are floating point, so use-inforinffor a single threshold (e.g.,range=0,infto ignore negative values, orrange=-inf,-200.4to ignore values above -200.4).LinearregressionLinear regression (slope, offset, coefficient of determination, t-value) assumes equal time intervals. If the data have irregular time intervals, NULL raster maps can be inserted into time series to make time intervals equal (see example).Quantilesr.seriescan calculate arbitrary quantiles.MemoryconsumptionMemory usage is not an issue, asr.seriesonly needs to hold one row from each map at a time.ManagementofopenfilelimitsThe maximum number of raster maps that can be processed is given by the user-specific limit of the operating system. For example, the soft lim- its for users are typically 1024 files. The soft limit can be changed with e.g. ulimit -n 4096 (UNIX-based operating systems) but it cannot be higher than the hard limit. If the latter is too low, you can as su- peruser add an entry in: /etc/security/limits.conf # <domain> <type> <item> <value> your_username hard nofile 4096 This will raise the hard limit to 4096 files. Also have a look at the overall limit of the operating system cat /proc/sys/fs/file-max which on modern Linux systems is several 100,000 files. For each map a weighting factor can be specified using theweightsop- tion. Using weights can be meaningful when computing the sum or average of maps with different temporal extent. The default weight is 1.0. The number of weights must be identical to the number of input maps and must have the same order. Weights can also be specified in the input file. Use the-zflag to analyze large amounts of raster maps without hitting open files limit and thefileoption to avoid hitting the size limit of command line arguments. Note that the computation using thefileop- tion is slower than with theinputoption. For every single row in the output map(s) all input maps are opened and closed. The amount of RAM will rise linearly with the number of specified input maps. Theinputandfileoptions are mutually exclusive: the former is a comma sepa- rated list of raster map names and the latter is a text file with a new line separated list of raster map names and optional weights. As sepa- rator between the map name and the weight the character "|" must be used.EXAMPLESUsingr.serieswith wildcards: r.series input="`g.list pattern='insitu_data.*' sep=,`" \ output=insitu_data.stddev method=stddev Note theg.listscript also supports regular expressions for selecting map names. Usingr.serieswith NULL raster maps (in order to consider a "complete" time series): r.mapcalc "dummy = null()" r.series in=map2001,map2002,dummy,dummy,map2005,map2006,dummy,map2008 \ out=res_slope,res_offset,res_coeff meth=slope,offset,detcoeff Example for multiple aggregates to be computed in one run (3 resulting aggregates from two input maps): r.series in=one,two out=result_avg,res_slope,result_count meth=sum,slope,count Example to use the file option of r.series: cat > input.txt << EOF map1 map2 map3 EOF r.series file=input.txt out=result_sum meth=sum Example to use the file option of r.series including weights. The weight 0.75 should be assigned to map2. As the other maps do not have weights we can leave it out: cat > input.txt << EOF map1 map2|0.75 map3 EOF r.series file=input.txt out=result_sum meth=sum Example for counting the number of days above a certain temperature us- ing daily average maps ('???' as DOY wildcard): # Approach for shell based systems r.series input=`g.list rast pattern="temp_2003_???_avg" sep=,` \ output=temp_2003_days_over_25deg range=25.0,100.0 method=count # Approach in two steps (e.g., for Windows systems) g.list rast pattern="temp_2003_???_avg" output=mapnames.txt r.series file=mapnames.txt \ output=temp_2003_days_over_25deg range=25.0,100.0 method=countSEE ALSOg.list,g.region,r.quantile,r.series.accumulate,r.series.interp,r.univarHints for large raster data processingAUTHORGlynn ClementsSOURCE CODEAvailable at: r.series source code (history) Main index | Raster index | Topics index | Keywords index | Graphical index | Full indexA(C) 2003-2020 GRASS Development Team, GRASS GIS 7.8.4 Reference Manual GRASS 7.8.4 r.series(1)

NAME | KEYWORDS | SYNOPSIS | DESCRIPTION | NOTES | EXAMPLES | SEE ALSO | AUTHOR | SOURCE CODE

Want to link to this manual page? Use this URL:

<https://www.freebsd.org/cgi/man.cgi?query=r.series&sektion=1&manpath=FreeBSD+13.0-RELEASE+and+Ports>