getSTRUC: Change structure of local Archive

Description Usage Arguments Value Author(s) See Also Examples

Description

This function retrieves and updates the folder structure on the MODIS data pool and creates a local file to use for further calls. This function is used for reducing the number of getURL calls and to enable as offline mode especially for getHDF.

Usage

1
getSTRUC(LocalArcPath,product,collection,startdate,enddate,wait=1)

Arguments

LocalArcPath

Character. Is needed because this funtion creates a hidden folder to store ftp directory information. If left empty standard path is used, see ?getHDF.

product

Character. MODIS grid product to be downloaded. For 'MODIS TERRA Vegetation Indices at 250 m ground resolution' use: MOD13Q1. For vegetation indices from TERRA and AQUA use MxD13Q1. See https://lpdaac.usgs.gov/lpdaac/products/modis_products_table for more Products.

collection

Character or integer. Refers to the MODIS product collection-version. Often '005', but see MODIS pages for more information.

startdate

Character. Subset start date of MODIS time series (format: "YYYY.MM.DD").

enddate

Character. Subset end date of MODIS time series (format: "YYYY.MM.DD").

wait

Numeric. Default 1. Inserts a break (in seconds) after every internal getURL() call. It reduces the chance of FTP connection error that often occurs after many requests. Requires the 'audio' package. (Hopefully a temporary solution!)

Value

NONE, a file in an hidden folder /MODIS_ARC/.auxiliaries/ftpdir.txt

Author(s)

Matteo Mattiuzzi

See Also

getHDF

Examples

1
2
3
4
5
6
7
8
## Not run: 
# update or get the internal structure for MOD13Q1 and MYD13Q1 collection "005"
getSTRUC(product="MxD13Q1",collection=5)

# update or get the internal structure for MOD09GQ within a limited period
getSTRUC(product="MxD13Q1",collection=5, startdate="2003.05.03",enddate="2008.07.23")

## End(Not run)

getMODIS documentation built on May 2, 2019, 4:51 p.m.