shift_*() functions provide a stage-oriented workflow facade over EsgQuery, EsgStore, Downloader, and EpwMorpher. Each step returns a small S7 stage object that can be printed, inspected, saved, and passed to the next step without manually passing manifest IDs.

shift_request(
  provider = "esgf",
  project = NULL,
  source = NULL,
  experiment = NULL,
  variant = NULL,
  variables = NULL,
  frequency = NULL,
  time = NULL,
  filters = list(),
  options = list(),
  ...
)

shift_site(
  id = NULL,
  lon = NULL,
  lat = NULL,
  label = NULL,
  epw = NULL,
  metadata = list()
)

shift_reference_plan(plan_id, periods)

shift_reference_historical(
  periods,
  experiment = "historical",
  activity = "CMIP",
  match = c("source_id", "variant_label", "frequency", "table_id"),
  filters = list(),
  options = list(),
  collect = list(),
  extract = list(fallback = "auto")
)

shift_collect(
  x,
  store = NULL,
  fields = "*",
  all = TRUE,
  limit = FALSE,
  label = NULL,
  ...
)

shift_download(
  x,
  downloader = NULL,
  run = TRUE,
  background = FALSE,
  resume = TRUE,
  overwrite = FALSE,
  session_label = NULL,
  ...
)

shift_extract(
  x,
  site = NULL,
  periods = NULL,
  variables = NULL,
  time = NULL,
  filters = list(),
  method = "nearest",
  fallback = c("auto", "error"),
  overwrite = FALSE,
  resume = TRUE
)

shift_morph(
  x,
  baseline = NULL,
  recipe = epw_morph_recipe("belcher"),
  reference = NULL,
  reference_plan_id = NULL,
  reference_periods = NULL,
  strict = TRUE,
  by = c("source_id", "experiment_id", "variant_label", "period"),
  overwrite = FALSE,
  resume = TRUE
)

shift_epw(x, dir = NULL, separate = TRUE, overwrite = FALSE, resume = TRUE)

shift_check(x, strict = FALSE, ...)

shift_refresh(x)

shift_ids(x)

shift_datasets(x, all = TRUE, limit = FALSE)

shift_files(x)

shift_data(x, n = 100L, variables = NULL, case_id = NULL, columns = NULL)

shift_diagnostics(x, severity = NULL)

shift_store(x, create = FALSE)

shift_target(x)

shift_coverage(x)

shift_outputs(x)

shift_artifacts(x)

shift_status(x)

Arguments

provider

Climate data provider. The first implementation supports "esgf".

project

Optional provider project, for example "CMIP6".

source, experiment, variant, frequency

Provider-neutral request aliases. In shift_reference_historical(), experiment is the historical reference experiment filter.

variables

Provider-neutral request alias in shift_request(), optional extraction variables in shift_extract(), or optional variables to read in shift_data().

time

Optional request or extraction time filter. Numeric years such as 2060L are expanded to the full UTC year; otherwise supply one or two date-time values accepted by the provider/store.

filters

Provider-specific query filters in shift_request(), or extraction filters in shift_extract().

options

Provider-specific request options. For ESGF, index_node and time_filter_method are recognized.

...

Additional provider-specific filters or workflow options.

id

Optional site identifier. If id is an EPW file path or eplusr::Epw object and epw is NULL, it is treated as epw.

lon, lat

Optional site longitude and latitude. Missing values are read from epw$location() when epw is supplied.

label

Optional label recorded with collected File records.

epw

Optional baseline EPW path or eplusr::Epw object.

metadata

Optional site metadata.

plan_id

Store extraction plan IDs for manually selected reference climate data.

periods

A period table, usually from epw_morph_periods().

activity

Historical reference activity filter used by shift_reference_historical().

match

File metadata fields copied from the future climate stage when resolving an automatic historical reference.

collect, extract

Named option lists passed to the automatic historical collect and extract steps. collect may contain fields, all, limit, and label; extract may contain variables, time, filters, method, and fallback.

x

A shift stage object.

store

An EsgStore, store path, or NULL.

fields

File fields collected from Dataset records. The default requests all fields and lets the result/store layers preserve and validate provider response metadata.

all, limit

Collection controls passed to EsgQuery / EsgResultDataset.

downloader

Optional Downloader instance.

run

Whether to run queued downloads immediately. Downloading full NetCDF files is optional for the normal workflow because shift_extract() can use OPeNDAP first and only download as a fallback when requested.

background

Whether to run downloads in a background job.

resume

Whether to reuse complete existing downloads, extraction outputs, morphing results, or EPW outputs.

overwrite

Whether to overwrite existing downloads, extraction outputs, morphing results, or EPW outputs.

session_label

Optional download session label.

site

A shift_site() object.

method

Grid extraction method.

fallback

Extraction fallback policy.

baseline

Optional baseline EPW path, eplusr::Epw object, or shift_site() object containing epw.

recipe

Morphing recipe, usually from epw_morph_recipe().

reference

Optional reference ShiftClimate stage for change-factor morphing.

reference_plan_id, reference_periods

Optional store plan IDs and period table for reference climate data.

strict

If TRUE, abort when diagnostics contain errors.

by

Grouping columns used to create morphing cases.

dir

Store-relative output directory for generated EPW files. If NULL, shift_epw() uses "outputs/future-epw".

separate

Whether to create separate output directories per morphing case.

n

Maximum number of data rows to read. Use Inf to read all rows.

case_id

Optional morphing case IDs to read from morphed or EPW output stages.

columns

Optional data columns to keep.

severity

Optional diagnostic severities to keep.

create

Whether to create a store when x is a path.

Value

A shift stage object.