Random generation of observations (random
/ param
)¶
Description¶
Generates random observations at random location/time/frequency/duration/etc.
Random observations are generated using a uniform distribution between specified
arguments obs_min
and obs_max
.
Observation “stations” are randomly located in the reference domain.
By default, “stations” are simply given an ID from 0 to nstations
.
It is possible to specify a list of names using station_names
.
This is particularly useful when computing simulations with a Lagrangian model
which identifies observations with their station name and date.
Yaml arguments¶
The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:
Mandatory arguments¶
nstations: (mandatory)
Number of stations to generate
accepted type: int
Optional arguments¶
frequency: (optional): 1H
Frequency of generated observations
accepted type: str
date_shift: (optional): 0H
Shift from default frequency
accepted type: str
duration: (optional): 1H
Duration of generated observations
accepted type: str
zmax: (optional): 100
Stations are randomly located between 0 m a.g.l. and zmax m a.g.l
accepted type: float
obs_min: (optional): 0
Lower range of the observations for uniform distribution
accepted type: float
obs_max: (optional): 1
Upper range of the observations for uniform distribution
accepted type: float
random_subperiod_shift: (optional): False
Randomly shift observations within their frequency. For instance, if the frequency is hourly, and
random_subperiod_shift
is True, hourly observations will be generated, but with a random shift of 0-60 minutes for each observations.accepted type: bool
seed: (optional): False
Use a fixed seed to generate observations
accepted type: bool
seed_id: (optional): 0
The seed to be used to generate observations. The associated command is np.random.seed
accepted type: int
station_names: (optional)
List of station names to be used. Should be at least larger than nstations
accepted type: list
Requirements¶
The current plugin requires the present plugins to run properly:
Requirement name |
Requirement type |
Explicit definition |
Any valid |
Default name |
Default version |
---|---|---|---|---|---|
domain |
False |
True |
None |
None |
Yaml template¶
Please find below a template for a Yaml configuration:
1measurements:
2 plugin:
3 name: random
4 version: param
5 type: measurements
6
7 # Mandatory arguments
8 nstations: XXXXX # int
9
10 # Optional arguments
11 frequency: XXXXX # str
12 date_shift: XXXXX # str
13 duration: XXXXX # str
14 zmax: XXXXX # float
15 obs_min: XXXXX # float
16 obs_max: XXXXX # float
17 random_subperiod_shift: XXXXX # bool
18 seed: XXXXX # bool
19 seed_id: XXXXX # int
20 station_names: XXXXX # list