pyrtid.utils.random_field.gen_random_ensemble#

pyrtid.utils.random_field.gen_random_ensemble(model: CovModel, n_ensemble: int, var: float, len_scale: Union[float, List[float], ndarray[Any, dtype[float64]]], mean: float, nx: int, ny: int = 1, nz: int = 1, seed: int = 20170519, normalizer: Optional[Normalizer] = None, model_kwargs: Optional[Dict[str, Any]] = None) ndarray[Any, dtype[float64]][source]#

Generate a (ne, nx, ny, nz) ensemble of 3D random fields.

model: CovModel

Covariance Model class object related to the field.

n_ensembleint

Number of members in the ensemble.

varfloat

Variance of the model (the nugget is not included in “this” variance).

len_scaleUnion[float, List[float], NDArrayFloat]

Length scale of the model. If a single value is given, the same length-scale will be used for every direction. If multiple values (for main and transversal directions) are given, anis will be recalculated accordingly. If only two values are given in 3D, the latter one will be used for both transversal directions.

mean: float

Mean of the field.

nxint

x size of the members.

nyint, optional

y size of the members (if members are 2D). The default is 1

(if members are 1D).
nzint, optional

z size of the members (if members are 3D). The default is 1

(if members are 1D).
seedint, optional

Specifying a seed, we make sure to create reproducible results. The default is 20170519.

normalizer: Optional[Normalized]

Normalizer to be applied to the field. The default is None.

model_kwargs: Dict[str, Any]

additional parameters for the model.

ensnp.ndarray

Ensemble members. Dimensions are (ne, nx, ny, nz)