R/cmip6-availability.R
shift_cmip6_avail.RdQuery 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
)CMIP6 variable IDs that must all be present. Supply these,
methods, or transform.
Future CMIP6 experiment IDs.
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.
Optional CMIP6 source/model IDs. NULL discovers all models.
Optional CMIP6 variant labels. NULL discovers all members.
Optional single CMIP6 grid label.
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.
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.
Future CMIP6 activity ID.
Historical CMIP6 activity ID.
ESGF index-node name or URL. NULL uses DKRZ;
"ORNL" and "LLNL" use the ORNL ESGF 1.5 Bridge endpoint.
Optional ESGF data-node filter.
Additional named ESGF filters. Core availability arguments take precedence when names overlap.
Optional EsgStore or store path forwarded to shift_datasets().
Optional shift UI configuration forwarded to shift_datasets().
Unique weather-method keys, such as c("qdm", "sobie_curry").
Ambiguous keys require an explicit 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.
For method queries, a logical flag. FALSE (default)
selects candidates separately for each method; TRUE requires eligibility
for every selected method.
For method queries, include historical model inputs that the method declares optional. Mandatory inputs are always required regardless of this flag.
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".
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.