orgTime: Handles the in/output date used in the filerting

Description Usage Arguments Value Author(s) Examples

Description

With this function you define the period to be filtered (begin:end), the output temporal resolution (nDays), and it selected from 'files' the required data.

Usage

1
  orgTime(files,nDays="asIn",begin=NULL,end=NULL,pillow=75,pos1=10,pos2=16,format="%Y%j")

Arguments

files

MODIS filenames, eg output of runGdal or runMrt.

nDays

Integer. Time interval for the output layers. Default is "asIn" that includes the exact input dates within the period selected using begin and end. Can also be nDays="1 month" or "1 week" see: https://www.stat.berkeley.edu/classes/s133/dates.html example of seq(from,to,by) at the bottom.

begin

Default is from earliest input dataset. Here you can supply the begin date of the output

end

Default to the end of the input dataset. Here you can specify the end date of the output (note, the exact end-date depends on start and nDays argument.

pillow

Number of days added on the beginning and on the end of a time serie.

pos1

Start position of date in the filename. You have to count, sorry!

pos2

End position of date in the filename. You have to count, sorry!

format

How is the date formatted in the file, default expects: 'YYYYDDD' ("%Y%j"). Read ?as.Date for for more information.

Value

List

Author(s)

Matteo Mattiuzzi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# note, this function can be applied to any files that have a date information in the _filename_!
files <- c("MOD13A2.A2010353.1_km_16_days_composite_day_of_the_year.tif",
 "MOD13A2.A2011001.1_km_16_days_composite_day_of_the_year.tif",
 "MYD13A2.A2010361.1_km_16_days_composite_day_of_the_year.tif",
 "MYD13A2.A2011009.1_km_16_days_composite_day_of_the_year.tif")

orgTime(files)
orgTime(files,nDays=2,begin="2010350",end="2011015")

## End(Not run)

aubreyd/modis4rwrfhydro documentation built on May 10, 2019, 2:13 p.m.