mesmer.create_emulations.create_emus_lv#
- mesmer.create_emulations.create_emus_lv(params_lv, preds_lv, cfg, save_emus=True, submethod='')#
Create local variablity emulations.
- Parameters:
params_lv (dict) – dictionary with the trained local variability parameters
[“targ”] (variable which is emulated, str)
[“esm”] (Earth System Model, str)
[“method”] (applied method, str)
[“preds”] (predictors, list of strs)
[“scenarios”] (scenarios which are used for training, list of strs)
[xx] (additional keys depend on employed method)
preds_lv (dict) – nested dictionary of predictors for local variability with keys
[pred][scen] (1d/ 2d arrays (time)/(run, time) of predictor for specific scenario)
cfg (module) – config file containing metadata
save_emus (bool, optional) – determines if emulation is saved or not, default = True
submethod (str, optional) – determines if only submethod should be used, default = “” indicating using the full method
- Returns:
emus_lv (dict) – local variability emulations dictionary with keys
[scen] (3d array (emu, time, gp) of local variability emulation time series)
Notes
- Assumptions:
if stochastic realizations are drawn, preds_lv must contain concatenated hist + future scenarios or only future scenarios
if no preds_lv needed, pass time as predictor instead such that can get info about how many scenarios / ts per scenario should be drawn for stochastic part
submethod specific assumptions are listed in the submethod description
- Long-term TODO:
improve consistency with actual esms by sharing same realizations in historical time period and diff one for each scen in future
improve this function in terms of generalization properties + design (+ consistency with rest of code)
improve function to also work if only part of predictors are used for OLS and others for other methods