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 : int, mandatory
Number of stations to generate
Optional arguments#
- frequency : str, optional, default “1h”
Frequency of generated observations
- date_shift : str, optional, default “0h”
Shift from default frequency
- duration : str, optional, default “1h”
Duration of generated observations
- zmax : float, optional, default 100
Stations are randomly located between 0 m a.g.l. and zmax m a.g.l
- obs_min : float, optional, default 0
Lower range of the observations for uniform distribution
- obs_max : float, optional, default 1
Upper range of the observations for uniform distribution
- random_subperiod_shift : bool, optional, default 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.- seed : bool, optional, default False
Use a fixed seed to generate observations
- seed_id : int, optional, default 0
The seed to be used to generate observations. The associated command is np.random.seed
- station_names : list, optional
List of station names to be used. Should be at least larger than nstations
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