This function generates a spatially-aggregated indicator from a netCDF file.
Converts .nc files to data frame.
The function passes data through EDABUtilities::make_2d_summary_ts, which provides summary statistics of 2d gridded data as time series by area.
Parameters passed to EDABUtilities::make_2d_summary_ts are specified in the ... argument and listed below:
data.in = Either a character vector of full input file names for a list of spatRasters
file.time = What time scale the input files are on ('daily','monthly','annual')? Assumes all monthly or annual files are on a daily timestep
output.files = vector of full output file names corresponding to each input file
shp.file = Shape file you wish to crop each input file to
var.name = Variable name you wish to extract.
area.names = Names of shape file areas you want to summarize.
statistic = Which statistic to calculate = 'mean'
agg.time = Time scale to calculate over (days, doy, months, season, or years)
tz = Time zone to convert. No correction if NA
touches = If TRUE, all cells touched by lines or polygons will be masked, not just those on the line render path, or whose center point is within the polygon
write.out = If TRUE, will write a netCDF file with output.files. If FALSE will return a list of spatRasters
Arguments
- indicator_name
name of the indicator (character)
- units
units associated with the indicator (character)
- ...
passed to
EDABUtilities::make_2d_summary_ts