View source: R/download_smos.R
download_smos | R Documentation |
This function automates downloading of BEC-SMOS soil moisture data to a local computer via a secure FTP (SFTP) server.
download_smos(data, dir = NULL)
data |
a character vector as produced by |
dir |
a character string specifying a path to a local directory in which
to save the data. Default value is |
This function downloads the original BEC-SMOS soil moisture data in NetCDF format ("as is") via a secure FTP (SFTP) server. The data files are stored on the local computer in a temporary directory of the current R session (default option) if no otherwise specified by the user.
Note that the registration as a user on the Barcelona Expert Center (BEC)
webpage is required to access the server. See
set_credentials()
for details.
downloaded files in the specified directory
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].
## Not run:
# to download files found with find_smos() into a temporary directory of the current R session
start_date <- as.Date("2022-01-01")
end_date <- as.Date("2022-12-31")
date_range <- seq(start_date, end_date, by = 30)
smos_data <- find_smos(freq = 3, orbit = "des", dates = date_range)
download_smos(smos_data)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.