def setup(self) -> None: self.altitude_grid = np.linspace(100, 0, num=21) self.exp_pressure = 1000 * np.exp(-self.altitude_grid / 10) const_pressure = np.linspace(1000, 1000, num=21) const_temper = np.linspace(200, 200, num=21) self.same_boundaries = self.altitude_grid self.mass = 7.3 * 10**-26 self.g = 3.71 self.constant_hydro = Hydrostatic(self.altitude_grid, const_pressure, const_temper, self.same_boundaries, self.mass, self.g) self.same_hydro = Hydrostatic(self.altitude_grid, self.exp_pressure, const_temper, self.same_boundaries, self.mass, self.g)
def setup(self) -> None: altitude_grid = np.broadcast_to(np.linspace(100, 0, num=20), (5, 20)).T exp_pressure = 1000 * np.exp(-altitude_grid / 10) self.lin_temper = np.broadcast_to(np.linspace(100, 250, num=20), (5, 20)).T self.same_boundaries = altitude_grid mass = 7.3 * 10**-26 g = 3.71 self.same_hydro = Hydrostatic(altitude_grid, exp_pressure, self.lin_temper, self.same_boundaries, mass, g) self.different_boundaries = np.broadcast_to( np.linspace(100, 0, num=15), (5, 15)).T self.different_hydro = Hydrostatic(altitude_grid, exp_pressure, self.lin_temper, self.different_boundaries, mass, g)
np.load(os.path.join('/home/kyle/repos/pyuvs-rt/data/marsatm.npy'))) # Force P_surface to be 6.1 mbar eos_file[:, 1] *= 610 / eos_file[-1, 1] # Construct the EoS profiles # Use T profile from Kass et al 2019 eos_file[:, 2] = np.flip( np.array([ 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 228, 226, 224, 222, 220, 214, 208, 202, 196, 190, 186, 182, 178, 174, 170, 166, 164, 158, 154, 150, 150, 150, 150, 150, 150, 150 ])) mass = 7.3 * 10**-26 gravity = 3.7 hydro = Hydrostatic(eos_file[:, 0], eos_file[:, 1], eos_file[:, 2], z_boundaries, mass, gravity) ########################### # Aerosol things ########################### # Rayleigh scattering rco2 = RayleighCO2(wavelengths, hydro.column_density) rayleigh_info = (rco2.optical_depth, rco2.single_scattering_albedo, rco2.phase_function) # Dust vertical profile z_midpoint = ((z_boundaries[:-1] + z_boundaries[1:]) / 2) q0 = 1 H = 10 nu = 0.01
atmfile = np.load('/home/kyle/repos/pyRT_DISORT/tests/aux/marsatm.npy') #altitude_grid = np.flip(atmfile[:, 0]) #pressure_profile = np.flip(atmfile[:, 1]) #temperature_profile = np.flip(atmfile[:, 2]) altitude_grid = np.linspace(100, 0, num=51) pressure_profile = 500 * np.exp(-altitude_grid / 10) temperature_profile = np.linspace(150, 250, num=51) mass = 7.3 * 10**-26 gravity = 3.7 z_grid = np.linspace(100, 0, num=15) from pyRT_DISORT.eos import Hydrostatic hydro = Hydrostatic(altitude_grid, pressure_profile, temperature_profile, z_grid, mass, gravity) altitude = hydro.altitude pressure = hydro.pressure TEMPER = hydro.temperature number_density = hydro.number_density column_density = hydro.column_density n_layers = hydro.n_layers H_LYR = hydro.scale_height # rayleigh module from pyRT_DISORT.rayleigh import RayleighCO2 rco2 = RayleighCO2(pixel_wavelengths, hydro.column_density) rayleigh_od = rco2.optical_depth
def hydro_matching_altitudes(self, altitude_grid, exp_pressure, constant_temperature, mass, gravity): yield Hydrostatic(altitude_grid, exp_pressure, constant_temperature, altitude_grid, mass, gravity)