list_smos {smosr}R Documentation

List BEC-SMOS data files stored on a local computer

Description

This function returns a list of the BEC-SMOS data files previously stored on a local computer.

Usage

list_smos(
  freq = NULL,
  orbit = NULL,
  dates = NULL,
  dir = NULL,
  recursive = FALSE
)

Arguments

freq

an integer specifying temporal frequency of the data. Possible values are: 1 - for daily data, or 3 - for 3-day moving averages, and NULL - for cases when data frequency is irrelevant. Default value is NULL.

orbit

a character (or character string) specifying SMOS orbit corresponding to the data. Possible values are: ‘a’, ‘asc’, and ‘ascending’ - for an ascending pass, or ‘d’, ‘des’, or ‘descending’ - for a descending pass, and NULL - for cases when orbit is irrelevant. Default value is NULL.

dates

an object of class Date or a character string formatted as ‘yyyy-mm-dd’ (e.g. ‘2010-06-01’) which specifies the date(s) to search through. To look for a specific date, it can be a Date object or a character vector of length 1. To iterate over various dates or a time interval, a multiple-element object of class Date or a vector should be passed (e.g. as produced by seq.Date).

dir

a character string specifying a path to a local directory in which to search the data for. Default value is NULL meaning that the dataset is looked up in a temporary directory of the current R session.

recursive

a logical vector indicating whether the listing should recurse into directories. Default is FALSE.

Details

This function iterates over all files in a temporary directory of the current R session (default option) or another local folder as indicated by dir argument and returns a list of the BEC-SMOS data files with the frequency, orbit, and dates specified by the user. If no arguments are provided, all BEC-SMOS soil moisture data files found in the selected folder will be listed. A recursive option is also available.

Value

a character vector containing full links to the data files on the local computer.

References

Pablos M, Gonzalez-Haro C, Portal G, Piles M, Vall-llossera M, Portabella M (2022). SMOS L4 Surface Soil Moisture downscaled maps at 1 km EASE-2 (reprocessed mode) (V.6.0) [Dataset].

Examples

## Not run: 
# to list BEC-SMOS data files with the specified frequency and SMOS orbit
# stored in a temporary directory of the current R session
smos_files <- list_smos(freq = 3, orbit = "des")

## End(Not run)


[Package smosr version 1.0.1 Index]