PySDM_examples.Arabas_et_al_2015.settings

 1from typing import Iterable
 2
 3from PySDM_examples.Morrison_and_Grabowski_2007.strato_cumulus import StratoCumulus
 4
 5from PySDM import Formulae
 6from PySDM.physics import si
 7
 8
 9class Settings(StratoCumulus):
10    def __dir__(self) -> Iterable[str]:
11        return (
12            "dt",
13            "grid",
14            "size",
15            "n_spin_up",
16            "versions",
17            "steps_per_output_interval",
18            "formulae",
19            "initial_dry_potential_temperature_profile",
20            "initial_vapour_mixing_ratio_profile",
21            "rhod_w_max",
22        )
23
24    def __init__(
25        self,
26        formulae=None,
27        rhod_w_max: float = 0.6 * si.metres / si.seconds * (si.kilogram / si.metre**3),
28    ):
29        super().__init__(formulae or Formulae(), rhod_w_max=rhod_w_max)
30
31        self.grid = (25, 25)
32        self.size = (1500 * si.metres, 1500 * si.metres)
33
34        # output steps
35        self.simulation_time = 90 * si.minute
36        self.dt = 5 * si.second
37        self.spin_up_time = 1 * si.hour
10class Settings(StratoCumulus):
11    def __dir__(self) -> Iterable[str]:
12        return (
13            "dt",
14            "grid",
15            "size",
16            "n_spin_up",
17            "versions",
18            "steps_per_output_interval",
19            "formulae",
20            "initial_dry_potential_temperature_profile",
21            "initial_vapour_mixing_ratio_profile",
22            "rhod_w_max",
23        )
24
25    def __init__(
26        self,
27        formulae=None,
28        rhod_w_max: float = 0.6 * si.metres / si.seconds * (si.kilogram / si.metre**3),
29    ):
30        super().__init__(formulae or Formulae(), rhod_w_max=rhod_w_max)
31
32        self.grid = (25, 25)
33        self.size = (1500 * si.metres, 1500 * si.metres)
34
35        # output steps
36        self.simulation_time = 90 * si.minute
37        self.dt = 5 * si.second
38        self.spin_up_time = 1 * si.hour
Settings(formulae=None, rhod_w_max: float = 0.6)
25    def __init__(
26        self,
27        formulae=None,
28        rhod_w_max: float = 0.6 * si.metres / si.seconds * (si.kilogram / si.metre**3),
29    ):
30        super().__init__(formulae or Formulae(), rhod_w_max=rhod_w_max)
31
32        self.grid = (25, 25)
33        self.size = (1500 * si.metres, 1500 * si.metres)
34
35        # output steps
36        self.simulation_time = 90 * si.minute
37        self.dt = 5 * si.second
38        self.spin_up_time = 1 * si.hour
grid
size
simulation_time
dt
spin_up_time