extract_smap: Extracts contents of SMAP data

View source: R/extract_smap.R

extract_smapR Documentation

Extracts contents of SMAP data

Description

Extracts datasets from SMAP data files.

Usage

extract_smap(data, name)

Arguments

data

A data frame produced by download_smap() that specifies input files from which to extract data.

name

The path in the HDF5 file pointing to data to extract.

Details

The arguments group and dataset must refer specifically the group and name within group for the input file, such as can be obtained with list_smap(). This function will extract that particular dataset, returning a Raster object.

Value

Returns a SpatRaster object.

Examples

## Not run: 
files <- find_smap(id = "SPL4SMGP", dates = "2015-03-31", version = 4)
downloads <- download_smap(files[1, ])
sm_raster <- extract_smap(downloads, name = '/Geophysical_Data/sm_surface')

## End(Not run)

earthlab/smapr documentation built on March 14, 2023, 12:26 a.m.