module documentation

Generate model-like data for testing EVV, _mimic_ the output of various CIME tests.

Class MimicModelRun No class docstring; 0/9 instance variable, 4/5 methods documented
Function add_pert Add a random normal perturbation to a field of test data.
Function bcast Broadcast a 1-D array to an N-D array
Function gen_field Generate a semi-realistic atmosphere field.
Function gen_hybrid_pres Approximation of hybrid level coefficients.
Function main Interpred CL args, make some data.
Function norm Normalize data between [0, 1]
Function parse_args Undocumented
def add_pert(test_data: np.array, popvar: float = 0.0, popmean: float = 0.0, seed: int = None): (source)

Add a random normal perturbation to a field of test data.

Parameters
test_data:np.arrayData array to which the perturbation will be added
popvar:float, optionalPerturbation variance, by default 0.0
popmean:float, optionalPopulation mean, by default 0.0
seed:int, optionalIf seed is defined, use this to set numpy's random seed, by default None
Returns
np.arraytest_data - Array with perturbation added
def bcast(axis_data, data, axis=None): (source)

Broadcast a 1-D array to an N-D array

Parameters
axis_data:array_like1D array of data matching the size of one of data axes
data:array_likeND array of data onto which axis_data will be broadcast
axis:int, optionalAxis of data onto which axis_data will be broadcast, by default None, auto-detected by matching shapes
Returns
array_likeaxis_data - ND array of broadcasted axis_data
def gen_field(size: tuple, amplitude: tuple = None, length: tuple = None, popvar: float = 0.0, seed: int = None): (source)

Generate a semi-realistic atmosphere field.

Parameters
size:tupleShape for the data
amplitude:tupleAmplitude parameter for each axis of data, must be same length as size
length:tupleLength parameter for each axis of data, must be same length as size
popvar:float, optionalAdd a random normal perturbation on top of field, by default 0.0
seed:int, optionalIf seed is defined, use this to set numpy's random seed
Returns
array_liketest_data - numpy.array of sample data
def gen_hybrid_pres(size: tuple, p_min: float = 95000, p_max: float = 103500, seed: int = None): (source)

Approximation of hybrid level coefficients.

Notes

These are not _actual_ hybrid pressure-sigma level coefficents. DO NOT USE for that purpose, this is quick, and uncomplicated enough for the purposes of weighting used in the TSC (time step convergence) test

Parameters
size:tupleSize of the output as: (number of levels, number of columns)
p_min:float, optionalMinimum surface pressure, by default 95000
p_max:float, optionalMaximum surface pressure, by default 103500
seed:int, optionalSeed for RNG, by default None
def main(args): (source)

Interpred CL args, make some data.

def norm(data): (source)

Normalize data between [0, 1]

Parameters
data:array_likeData to be normalized
Returns
array_likedata_norm - data normalized between [0, 1]
def parse_args(args=None): (source)

Undocumented