gen_hw_set(out, dataFolder, dataDirectories = list(historical = c(1980, 2004), rcp85 = c(2006, 2099)), citycsv, coordinateFilenames, tasFilenames, timeFilenames, IDheatwavesFunction = "IDHeatwavesCPPwrapper", thresholdBoundaries = c(1990, 1999), projectionBoundaries = c(2070, 2079), referenceBoundaries = c(2070, 2079), models_to_run = "all", probThreshold = 0.98, numDays = 2, printWarning = TRUE, threshold_ensemble = "r1i1p1", lat_lon_colnames = c("lat", "lon"), above_threshold = TRUE, absolute_thresholds = c(299.82, 302.6, 305.37, 308.15), seasonal_months = c(5:9))
futureheatwaves
vignette for guidance on setting up this
directory.list("historical" = c(1990, 1999), "rcp85" = c(2060, 2079))
for a dataFolder
with historical experiment data for 1990 to 1999
and RCP8.5 projections for 2060 to 2079).city
, lat
, and lon
. See the
futureheatwaves
vignette for guidance on setting up this
file.dataFolder
directory.
See the package vignette for an example of the required structure for this
file.dataFolder
directory. See the
package vignette for an example of the required structure for this file.dataFolder
directory. See
the package vignette for an example of the required structure for this
file.futureheatwaves
.dataDirectories
argument in gen_hw_set
.
The default value is 1990 to 1999.dataDirectories
argument
in gen_hw_set
. The default value is 2070 to 2079.futureheatwaves
. The required format for this vector
is c(start year, end year), with the restriction that bounds must be
contained within the time boundaries of one of the two experiment
subdirectories specified by the dataDirectories
argument in
gen_hw_set
. The default value is 2070 to 2079. If the
time bounds used differ from those used for projections, these reference
variables will be pulled from the ensemble member for each climate
model specified by threshold_ensemble
.dataFolder
directory, or the names of the models to run, using the names of each
model's subdirectory within the data directory (e.g.,
c("bcc1", "ccsm")
).numDays = 2
would define a
heat wave as two or more days above the threshold temperature).out
. This warning prints out
by default; the user must opt out of this warning by specifying FALSE
for this argument, for example if running this function within a loop."r1i1p1"
). This
threshold is used for relative extreme event definitions. See the
futureheatwaves
vignette for more on extreme event definitions.
If any climate model lacks that ensemble member for the specified
dates for calculating the threshold, it will be excluded from the
processing.citycsv
dataframe for latitude (first vector element) and
longitude (second vector element)TRUE
, the default, e.g.,
for finding heat waves or extreme air pollution events) or below a
threshold (FALSE
, e.g., for finding cold waves or droughts).seasonal_months
is set to 6:8
,
daily temperatures from June through August each day during the reference
years would be used to calculate this mean seasonal value. The default
is 5:9
(May--September).futureheatwaves
vignette. This function also returns a
dataframe listing the name of each climate model processed, as well as the
number of historical and future projection ensemble members for each
model. This output can be used as a check that the function processed
through the directory of input files specified using the dataFolder
argument.
## Not run:
# projection_dir_location <- system.file("extdata/cmip5",
# package = "futureheatwaves")
# city_file_location <- system.file("extdata/cities.csv",
# package = "futureheatwaves")
# gen_hw_set(out = "example_results",
# dataFolder = projection_dir_location ,
# dataDirectories = list("historical" = c(1990, 1999),
# "rcp85" = c(2060, 2079)),
# citycsv = city_file_location,
# coordinateFilenames = "latitude_longitude_NorthAmerica_12mo.csv",
# tasFilenames = "tas_NorthAmerica_12mo.csv",
# timeFilenames = "time_NorthAmerica_12mo.csv")
# ## End(Not run)
Run the code above in your browser using DataLab