pyPDAF.PDAF.sample_ens

pyPDAF.PDAF.sample_ens()

Generate an ensemble from singular values and their vectors (EOF modes) of an ensemble anomaly matrix.

The singular values and vectors are derived from the ensemble anomalies. This ensemble anomaly can be obtained from a time anomaly of a model trajectory using pyPDAF.PDAF.eofcovar().

Parameters:
  • dim (int) – Size of the state vector

  • dim_ens (int) – Ensemble size

  • modes (ndarray[tuple[dim, dim_ens-1, ...], np.float64]) – array of EOF modes/matrix of singular vectors.

  • svals (ndarray[tuple[dim_ens-1, ...], np.float64]) – singular values.

  • state (ndarray[tuple[dim, ...], np.float64]) – PE-local model mean state.

  • verbose (int) – Verbosity flag

  • flag (int) – Status flag

Returns:

  • modes (ndarray[tuple[dim, dim_ens-1, …], np.float64]) – array of EOF modes/matrix of singular vectors

    The 1st-th dimension dim is size of state vector

  • state (ndarray[tuple[dim, …], np.float64]) – PE-local model mean state

    The array dimension dim is size of state vector

  • ens (ndarray[tuple[dim, dim_ens, …], np.float64]) – State ensemble

    The 1st-th dimension dim is size of state vector The 2nd-th dimension dim_ens is size of ensemble

  • flag (int) – Status flag