temporal_sync_raster: Temporally Sync Rasters

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Aligns ("syncs") a Raster to a reference Raster.

Usage

1
2
3
  temporal_sync_raster(unsynced, reference,
    synctype = "by.month", unsynced_dates, reference_dates,
    verbose = FALSE)

Arguments

unsynced

A raster object or a string pointing to a raster on disk to be temporally synced to a reference file.

reference

A raster object with reference zvalue dates specific to the month and year.

synctype

Type of temporal sync; options are "by.month" or "by.year.month".

unsynced_dates

Required if getZ(unsynced) does not provide dates for unsynced raster.

reference_dates

Required if getZ(reference) does not provide reference dates for reference raster.

verbose

verbose=TRUE will print process information.

Details

Matches the temporal resolution and extent of the unsynced raster object to the reference raster object. Files with 12 layers (1/month) are expanded to multiple years using "by.month". Files with unique entries per month per year are reduced to the temporal range of the reference object using "by.year.month".

Value

Returns a RasterLayer, RasterBrick or RasterStack object.

Author(s)

Jonathan A. Greenberg

See Also

spatial_sync_raster

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
require(climstats)

load(system.file("extdata/pptTahoe.RData",package="climstats"))
getZ(pptTahoe)

#Download and standardize 2 large monthly wind vector files
wnd=get_climate_data("NARR-monthlymean-wnd",
		date_range=c("1992-01-01","1993-12-31"),
		standardize=TRUE,enable_download=TRUE,verbose=TRUE)
getZ(wnd)

wnd_synced=temporal_sync_raster(wnd,pptTahoe,synctype="by.year.month",
	verbose=TRUE)
getZ(wnd_synced)

## End(Not run)

climstats documentation built on May 2, 2019, 6:15 p.m.