combine.locs: Re-merge quantile map projections

Description Usage Arguments Output Files Beware

View source: R/merge_locs.R

Description

Concatenate the individual projection files calculated through separate calls to build.projections into a single file, removing duplicates along the way.

Usage

1
2
combine.locs(defaults, comments = character(), output.type = "linear",
  lat_vec = numeric(), lon_vec = numeric())

Arguments

defaults

the output from various_defaults

comments

if desired, a 'comments' global attribute will be added to the NetCDF file, with the string input to this option as the body

output.type

how the time series is exported into the netcdf file; either "linear" (default), as an [idx x time] array, or "grid," as a [lon x lat x time] array

lat_vec, lon_vec

if output.type=="grid", this allows the specification of the output grid (useful if the projected data doesn't have values for the whole global/etc. grid, or if you just want a subset)

Output Files

The file is saved as both an .RData file and a NetCDF file. The final output in the NetCDF file is a [loc x time] array (variable name [defaults$filevar]), with variables lat and lon being [loc x 1] vectors giving the location. The file also includes a variable base_idx giving, for each projected day, the linear index in the original base data that was used as the base day for the projection.

Beware

Files are searched for in the directory code[base.data.dir]/output, with [base.data.dir] set by defaults. As a result, this code depends on the desired temporary files being the only files in that directory with the filename pattern searched for (from the file.list variable in the code).


ks905383/quantproj documentation built on Nov. 1, 2020, 9:12 p.m.