clim_locs_prep: Extract climate values for point locations

Description Usage Arguments Details Examples

Description

Extract monthly climate values for point locations by RCP, climate model and climate variable.

Usage

1
2
3
clim_locs_prep(inputs, in_dir = snapdef()$ar5dir,
  out_dir = snapdef()$ar5dir_locs_prep, verbose = TRUE,
  overwrite = FALSE)

Arguments

inputs

data frame of inputs (one row). See details.

in_dir

input directory, e.g., snapdef()$ar5dir.

out_dir

output directory, e.g., snapdef()$ar5dir_locs_prep

verbose

logical, verbose progress.

overwrite

logical, overwrite existing files.

Details

inputs generally comes from clim_inputs_table. clim_locs_prep processes data sets referred to by one row of this data frame at a time. This function generates intermediary temp files used susbsequently by clim_locs and can be deleted afterward if not needed for other uses where it is convenient to have extracted point location climate data segmented into files by RCP, model and variable as opposed to by point location.

Examples

1
2
3
4
5
6
7
8
## Not run: 
library(dplyr)
library(parallel)
inputs <- clim_inputs_table() %>%
  filter(!(model == "ts40" & var %in% c("tasmin", "tasmax")))
mclapply(split(inputs, 1:nrow(inputs)), clim_locs_prep, mc.cores = 32)

## End(Not run)

leonawicz/snapprep documentation built on May 14, 2019, 8:54 a.m.