mesmer.datatree.pool_scen_ens

Contents

mesmer.datatree.pool_scen_ens#

mesmer.datatree.pool_scen_ens(dt, *, member_dim='member', time_dim='time', scenario_dim='scenario', sample_dim='sample')#

prepare data for statistical functions

Pool datatree along a new dimension, named sample_dim. Each node needs a time- and member-dimension. The scenario dimension will be filled with the names of each node.

Parameters:
  • dt (xr.DataTree) – DataTree to pool

  • member_dim (str | None, default: “member”) – Name of the member dimension already present on each dataset.

  • time_dim (str, default: “time”) – Name of the time dimension already present in each dataset.

  • scenario_dim (str, default: “scenario”) – Name of the scenario dimension that will used in the stacked dataset.

  • sample_dim (str, default: “sample”) – Name of the stacked dimension.

Returns:

pooled (xr.Dataset) – Dataset pooled along the sample dimension, done by stacking the scenario nodes, time, and member dimension.