foxes.input.states.create.random_abl_states¶
Functions¶
|
Create random abl states. |
|
Writes random abl states to file |
Module Contents¶
-
foxes.input.states.create.random_abl_states.create_random_abl_states(n_states: int, cols_minmax: dict[str, tuple[float, float]], var2col: dict[str, str] | None =
None, mol_abs_range: tuple[float, float] | None =(50.0, 5000.0), normalize: bool =True) pandas.DataFrame[source]¶ Create random abl states.
- Parameters:¶
- n_states
The number of states
- cols_minmax
For each variable, the minimum and maximum values.
- var2col
Mapping from variables to column names
- mol_abs_range
Min and max of allowed MOL values, set to nan if exceeded (i.e., neutral stratification)
- normalize
Normalize weights to 1
- Returns:¶
- data
The created states data
-
foxes.input.states.create.random_abl_states.write_random_abl_states(file_path: str, n_states: int, cols_minmax: dict[str, tuple[float, float]], var2col: dict[str, str] | None =
None, mol_abs_range: tuple[float, float] | None =(50.0, 5000.0), normalize: bool =True, verbosity: int =1, digits: int | str | dict[str, int | None] | None ='auto', **kwargs: Any) None[source]¶ Writes random abl states to file
- Parameters:¶
- file_path
Path to the file
- n_states
The number of states
- cols_minmax
For each variable, the minimum and maximum values.
- var2col
Mapping from variables to column names
- mol_abs_range
Min and max of allowed MOL values, set to nan if exceeded (i.e., neutral stratification)
- normalize
Normalize weights to 1
- verbosity
The verbosity level, 0 = silent
- digits
The number of digits to be written
- kwargs
Parameters for pandas.DataFrame.to_csv