applyGapfill: Gapfilling for Earth Observation datasets

View source: R/applyGapfill.R

applyGapfillR Documentation

Gapfilling for Earth Observation datasets

Description

Making use of parallel computing this function allows for the application of Gapfill to a set of satellite images. It is mandatory that these images have been configured for processing according to the workflow of this package previously.

Usage

applyGapfill(
  inputDir,
  outputDir,
  progressDir,
  lat,
  lon,
  days,
  years,
  numCores = 6,
  scale = 1e-04,
  clipRange = c(-1, 1),
  addArgToReport = TRUE
)

Arguments

inputDir

character. Full path name of directory containing files configured to be processed with Gapfill. See Note.

outputDir

character. Full path name of directory where output will be saved. See Note.

progressDir

character. Full path name of directory where a file reporting on the status of the process will be saved. See Note.

lat

character vector. See get_LAT.

lon

character vector. See get_LON.

days

numeric vector indicating what days are being considered. See get_4Darray.

years

integer vector indicating what years are being considered. See get_4Darray.

numCores

numeric. How many cores should be employed in parallel computing?

scale

numeric. See Gapfill. Default is 1e-4. See Note.

clipRange

numeric vector of length 2. See Gapfill. Default is c(-1,1). See Note.

addArgToReport

logical. Should a copy of the input arguments be passed onto the progress report file? Default is TRUE.

Details

Should the users have not yet created it, this function allows to create the directory/folders structure employed by this package workflow. When users opt for creating such a directory structure, additional arguments are required at the console. When users acknowledge the existence of such directory structure or when they decide to create such structure independently, this function returns the message "Try again later passing the required parameters".

Value

Should the user decide to employ this function, at the output directory (outputDir) there will be .RData files containing the output of parallel-based calls to Gapfill. There will be as many .RData files as files are in any of the sub-directories indicated by inputDir.

Note

Within the workflow of this package, inputDir, outputDir and progressDir must be equal to the sub-directories /splits, /output, and /progressReports, created by create_dirs, respectively. Many satellite products come with a scale factor of 1e4, using scale=1e-4 maps pixel values to the interval (-1,1) which is the default for argument clipRange.

See Also

create_dirs, foreach, Gapfill, makeCluster, registerDoParallel


igapfill documentation built on June 8, 2025, 10:41 a.m.