mesmer.utils.convert.separate_hist_future

mesmer.utils.convert.separate_hist_future(var_c, time_c, cfg)

Separate historical and future time periods into separate keys in dictionary.

Parameters
  • var_c (dict) – variable dictionary with concatenated historical and future scenarios as keys

    • [“h-scen_f”] (xd array of variable (run, time, x), np.ndarray)

  • time_c (dict) – time dictionary with concatenated historical and future scenarios as keys

    • [“h-scen_f”] (1d array of years, np.ndarray)

  • cfg (module) – config file containing metadata

Returns

  • var_s (dict) – variable dictionary with separated historical and future scenarios as keys

    • [hist] / [scen_f] (xd array of variable (run, time, x), np.ndarray)

  • time_s (dict) – time dictionary with separated historical and future scenarios as keys

    • [“hist] / [scen_f] (1d array of years, np.ndarray)

Notes

  • Assumption
    • each scenario starts in the same year

    • at least 2-dim variable array is passed with 1st dim nr runs, 2nd dim nr ts