Query shared CMIP6 Dataset metadata and identify model/member/grid identities that satisfy requested variables or registered weather-method inputs. ESGF treats multiple variables as OR alternatives; required AND combinations are evaluated locally with data.table.

shift_cmip6_avail(
  variables = NULL,
  scenarios = c("ssp245", "ssp585"),
  include_historical = TRUE,
  source = NULL,
  member = NULL,
  grid = NULL,
  frequency = "day",
  table = NULL,
  activity = "ScenarioMIP",
  historical_activity = "CMIP",
  index_node = NULL,
  data_node = NULL,
  filters = list(),
  store = NULL,
  ui = NULL,
  methods = NULL,
  transform = NULL,
  common = FALSE,
  include_optional_historical = FALSE
)

Arguments

variables

CMIP6 variable IDs that must all be present. Supply these, methods, or transform.

scenarios

Future CMIP6 experiment IDs.

include_historical

For variable queries, require the same variables for the "historical" experiment. For method queries, historical inputs come from the method contract; leave this argument unspecified.

source

Optional CMIP6 source/model IDs. NULL discovers all models.

member

Optional CMIP6 variant labels. NULL discovers all members.

grid

Optional single CMIP6 grid label.

frequency

For variable queries, a scalar frequency or named vector assigning a frequency to each variable. Method queries infer frequencies from their contracts; leave this argument unspecified.

table

For variable queries, an optional scalar or named per-variable table selection. NULL discovers tables. Method queries discover tables at the frequencies declared by their contracts; leave this unspecified.

activity

Future CMIP6 activity ID.

historical_activity

Historical CMIP6 activity ID.

index_node

ESGF index-node name or URL. NULL uses DKRZ; "ORNL" and "LLNL" use the ORNL ESGF 1.5 Bridge endpoint.

data_node

Optional ESGF data-node filter.

filters

Additional named ESGF filters. Core availability arguments take precedence when names overlap.

store

Optional EsgStore or store path forwarded to shift_datasets().

ui

Optional shift UI configuration forwarded to shift_datasets().

methods

Unique weather-method keys, such as c("qdm", "sobie_curry"). Ambiguous keys require an explicit transform.

transform

One WeatherTransformSpec or a list of them, created by monthly_transform(), daily_transform(), or hourly_transform(). Use this to specify method options, such as the variables adjusted by morphing.

common

For method queries, a logical flag. FALSE (default) selects candidates separately for each method; TRUE requires eligibility for every selected method.

include_optional_historical

For method queries, include historical model inputs that the method declares optional. Mandatory inputs are always required regardless of this flag.

Value

A data.table, including when there are no matching identities. Variable queries return one row per model/member/grid identity, retaining the existing complete, coverage counts, missing, frequency_spec, and table columns. Method queries return one row per identity/method/scenario: catalog_eligible describes that scenario including required history; method_eligible requires a single input path across all requested scenarios; common_eligible requires all methods; selected applies common. missing explains rejections. List columns variables, frequency_spec, and table describe the chosen future input path. transform_key distinguishes method configurations. period_coverage, readability, and quality remain "not_checked".

Details

All selected methods share one logical Dataset query for the union of their required variables, frequencies, and experiments. The existing query layer handles pagination and response caching; one logical query may require multiple HTTP requests. No File catalog or NetCDF values are downloaded. Dataset availability does not establish requested-year coverage or scientific quality. Incomplete identities found in the shared catalog remain visible. Entirely absent identities cannot be inferred from an empty catalog. Future and historical model inputs must share a variable combination, matching the requirements of the execution resolver.

Examples

if (FALSE) { # \dontrun{
models <- shift_cmip6_avail(
    methods = c("qdm", "sobie_curry"),
    scenarios = c("ssp245", "ssp585")
)
models[selected == TRUE]

temperature <- shift_cmip6_avail(
    variables = "tas", scenarios = "ssp245", frequency = "day"
)
temperature[complete == TRUE]
} # }