module documentation
Generate model-like data for testing EVV, _mimic_ the output of various CIME tests.
Class |
|
No class docstring; 0/9 instance variable, 4/5 methods documented |
Function | add |
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 |
Generate a semi-realistic atmosphere field. |
Function | gen |
Approximation of hybrid level coefficients. |
Function | main |
Interpred CL args, make some data. |
Function | norm |
Normalize data between [0, 1] |
Function | parse |
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 | |
testnp.array | Data array to which the perturbation will be added |
popvar:float , optional | Perturbation variance, by default 0.0 |
popmean:float , optional | Population mean, by default 0.0 |
seed:int , optional | If seed is defined, use this to set numpy's random seed, by default None |
Returns | |
np.array | test_data - Array with perturbation added |
Broadcast a 1-D array to an N-D array
Parameters | |
axisarray_like | 1D array of data matching the size of one of data axes |
data:array_like | ND array of data onto which axis_data will be broadcast |
axis:int , optional | Axis of data onto which axis_data will be broadcast, by
default None, auto-detected by matching shapes |
Returns | |
array_like | axis_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:tuple | Shape for the data |
amplitude:tuple | Amplitude parameter for each axis of data, must be same length as size |
length:tuple | Length parameter for each axis of data, must be same length as size |
popvar:float , optional | Add a random normal perturbation on top of field, by default 0.0 |
seed:int , optional | If seed is defined, use this to set numpy's random seed |
Returns | |
array_like | test_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:tuple | Size of the output as: (number of levels, number of columns) |
pfloat , optional | Minimum surface pressure, by default 95000 |
pfloat , optional | Maximum surface pressure, by default 103500 |
seed:int , optional | Seed for RNG, by default None |