def __init__(self, dt, dv, rhod, thd, qv, T, p, RH): self.mesh = Mesh.mesh_0d() self.full = None self.particulator = None self.dt = dt self.dv = dv self.env = {'rhod': rhod, 'thd': thd, 'qv': qv, 'T': T, 'p': p, 'RH': RH}
def __init__(self, dt=None, grid=None, size=None, dv=None, courant_field_data=None, halo=None): self.core = None self.dt = dt if grid is None: self.mesh = Mesh.mesh_0d(dv) else: if size is None: size = tuple(1 for _ in range(len(grid))) self.mesh = Mesh(grid, size) if halo is not None: self.halo = halo self.qv = np.empty((grid[0] + 2*halo, grid[1] + 2*halo)) self.thd = np.empty((grid[0] + 2*halo, grid[1] + 2*halo)) self.pred = {} self.step_counter = 0 self.courant_field_data = courant_field_data
def __init__(self, dt, mass_of_dry_air: float, p0: float, q0: float, T0: float, w: [float, callable], z0: float = 0): super().__init__(dt, Mesh.mesh_0d(), ['rhod', 'z', 't']) self.w = w if callable(w) else lambda _: w pd0 = p0 * (1 - (1 + const.eps / q0)**-1) rhod0 = pd0 / const.Rd / T0 self.params = (q0, phys.th_std(pd0, T0), rhod0, z0, 0) self.mesh.dv = mass_of_dry_air / rhod0 self.mass_of_dry_air = mass_of_dry_air
def __init__(self, dt, mass_of_dry_air: float, p0: float, q0: float, T0: float, w: [float, callable], z0: float = 0, g=const.g_std): super().__init__(dt, Mesh.mesh_0d(), ['rhod', 'z', 't']) self.p0 = p0 self.q0 = q0 self.T0 = T0 self.z0 = z0 self.mass_of_dry_air = mass_of_dry_air self.g = g self.w = w if callable(w) else lambda _: w self.formulae = None self.dql = None
def __init__(self, dt, dv): self.dt = dt self.mesh = Mesh.mesh_0d(dv) self.core = None
def __init__(self, dt, dv): self.dt = dt self.mesh = Mesh.mesh_0d(dv) self.particulator = None self._ambient_air = {}