torchMWRT.profile#
Classes
|
Atmospheric profile container for torchMWRT radiative transfer. |
- class torchMWRT.profile.AtmProfile(*, temperature, height, pressure, rh=None, q=None, e=None, lwc=None, iwc=None, emissivity=None)[source]#
Bases:
objectAtmospheric profile container for torchMWRT radiative transfer.
- Parameters:
temperature (torch.Tensor or numpy.ndarray or xarray.DataArray) – Atmospheric temperature profile in K.
height (torch.Tensor or numpy.ndarray or xarray.DataArray) – Geometric height profile in m above mean sea level.
pressure (torch.Tensor or numpy.ndarray or xarray.DataArray) – Atmospheric pressure profile in hPa.
rh (torch.Tensor or numpy.ndarray or xarray.DataArray, optional) – Relative humidity as fraction (0-1).
q (torch.Tensor or numpy.ndarray or xarray.DataArray, optional) – Specific humidity in kg/kg.
e (torch.Tensor or numpy.ndarray or xarray.DataArray, optional) – Vapor pressure in hPa.
lwc (torch.Tensor or numpy.ndarray or xarray.DataArray, optional) – Liquid water content in g/m^3.
iwc (torch.Tensor or numpy.ndarray or xarray.DataArray, optional) – Ice water content in g/m^3.
emissivity (torch.Tensor or numpy.ndarray or xarray.DataArray, optional) – Surface emissivity, scalar or frequency-dependent array.
- Raises:
ValueError – If humidity inputs are not provided exactly once.
SystemExit – If height is not strictly monotonic.
Notes
Expected units:
heightin m above mean sea level,pressurein hPa,temperaturein K, and cloud water contents in g/m^3.Exactly one humidity input must be provided: relative humidity
rh, specific humidityq, or vapor pressuree.All profile inputs are converted to torch tensors on a common dtype/device.
If vertical levels are descending, the profile is flipped so internal computations use ascending height.
Provenance: profile-orientation handling and antenna-relative height normalization are adapted from the profile setup logic in
pyrtlib.tb_spectrum.TbCloudRTE.