Description Usage Arguments Value Directory structure Note on file structure
View source: R/various_defaults_func.R
set.defaults
creates a list object that stores the default
input parameters for the package quantproj
, to be
used as an input for most other functions. It also creates the
directories set as defaults (and their subdirectories used in
various bits of code in this package) if they do not yet exist.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | set.defaults(aux.dir = paste0(getwd(), "/aux/"),
base.data.dir = paste0(getwd(), "/base_data/"),
mod.data.dir = paste0(getwd(), "/model_data/"), fn.suffix = character(),
filevar = "tas", mod.name = "LENS", base.name = "ERA-INTERIM",
lat.clip = numeric(), lon.clip = numeric(), base.year.range = c(1979,
2010), mod.year.range = c(1979, 2099), proj.year.range = c(2011, 2099),
q_norm = c(0.1, 0.5, 0.9), norm.x.df = c(14, 6, 3),
base.norm.x.df = c(10, 1, 0), get.volc = F, q_bulk = c(0.1, 0.18, 0.25,
0.35, 0.42, 0.5, 0.58, 0.65, 0.75, 0.82, 0.9), bulk.x.df = c(14, 6, 3),
q_tail = c(0.01, 0.1, 0.25, 0.5, 0.75), tail.x.df = c(3, 1, 0),
index.type = "resampling_rep", resampling.timescale = "year",
bootstrapping = F, nboots = 50, block.size = 40, varnames = list(lon =
c("lon", "longitude", "Longitude", "longitude_1"), lat = c("lat", "latitude",
"Latititude", "latitude_1"), time = c("time"), run = c("run"), loc =
c("global_loc", "loc", "location", "lonlat")), search.str = character())
|
aux.dir |
directory for auxiliary files - saved basis functions, etc. |
base.data.dir |
the directory with raw data to be projected |
mod.data.dir |
the directory with raw model ensemble data used to project |
fn.suffix |
optional add-on to all output filenames |
filevar |
variable shorthand (CMIP5 syntax, def: |
mod.name |
name of model ensemble (def: |
base.name |
name of data product to be projected (def: |
lat.clip, lon.clip |
if desired, a |
base.year.range |
desired time frame of the "base" time period to project (def: |
mod.year.range |
desired time frame of the time frame to be processed (quantiles calculated) for the model ensmeble; make sure this range includes |
proj.year.range |
desired time frame to project to (def: |
q_norm |
normalizing quantiles (must be a |
norm.x.df, bulk.x.df, tail.x.df |
degrees of freedom for normalizing, bulk, and tail quantile regressions, in a |
get.volc |
include a volcanic predictor in the normalization (def: |
q_bulk |
bulk quantiles (must be a |
q_tail |
tail quantiles (must be a |
nboots |
number of bootstrap runs (def: |
block.size |
bootstrap block size (def: |
varnames |
a list with each element giving the possible names for the
variable with the same name as the list element. For example, the list
element |
search.str |
a search string used to look for the source NetCDF files
(def: " |
freq |
data frequency shorthand (CMIP5 syntax, def: |
a list object containing all of the parameters listed above, to be used as an input in thd other functions in this package.
Generally, this package uses three main directories (though
aux.dir
may be the same as either of the data directories,
the user is discouraged from setting the two data directories equal
or using pre-existing directories, for file dependency reasons):
aux_dir
a directory containing two sub-directories,
bases
for saved spline basis functions (the
predictors in the quantile regression), and run_logs
for logging progress on the bigger scripts
base.data.dir
the directory in which to place the raw data to
be projected. Contains a sub-directory, output
, for the resultant
projections.
mod.data.dir
the directory in which to place the model data
whose distributional changes are used to project the data in
base.data.dir
. Contains a sub-directory, params
, in which the
quantile fit parameters are stored.
This package assumes all files follow CMIP5 standard file naming
conventions; in other words, it assumes that variable, data frequency, model
name, and file year range are all encoded in the filenames themselves (see
the
CMIP5
syntax guide for more information). The filename format is:
[variable]_[frequency]_[model]_[experiment]_[run/ensemble
member]_[timeframe](_[suffix])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.