View source: R/model-downscale.R
compute_country_shares | R Documentation |
Compute country-with-model-region shares for models, downscaling proxies, nation-level socioeconomic realizations,
and years. Takes in list of model data from prepare_preprocessed_data
, each model's country-to-region
mapping from load_country_region_mappings
, and country-level downscaling proxy data from
generate_ds_proxy_data
. Returns a list with all combinations of model, downscaling proxy, country-level
socioeconomic realization, and year.
compute_country_shares(
model_data_list,
country_region_map_list,
ds_proxy_data = generate_ds_proxy_data(),
save_output = TRUE,
create_dir = TRUE,
output_dir = DS_OUTPUT_DIR,
...
)
model_data_list |
list of model output data that has been cleaned, pre-processed, and prepared (i.e., corrected) |
country_region_map_list |
list of model-specific dataframes with country-to-region mapping |
ds_proxy_data |
list of downscaling proxy dataframes |
save_output |
logical indicating whether to save the output of this function |
create_dir |
logical indicating whether to create a new directory for the output (if one with the expected name doesn't already exist) |
output_dir |
directory in which to save the output |
Returns a list of models, each element of which is a list of downscaling proxy dataframes, each of which
indicates country-within-model-region shares, to be used by downscale_flow_variables
in order to
downscale region-level model output to the country level. Returned data are filtered to the years reported by each
model, and include all possible nation-level socioeconomic realizations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.