Welcome to pamtra2 - Passive and Active Microwave TRANsfer¶
Why pamtra2?¶
The original PAMTRA (still available here https://github.com/igmk/pamtra) was written in Fortran with an optional Python wrapper. We decided to start developing pamtra2, because we want to
have easier to maintain code
make it easier to extend with the potential to add eventually additional forward operators (e.g. lidar)
make installation less painful
have the model core in pure Python
use Fortran, C, Cython or Numba for expensive parts
Included Libraries¶
Besides the core python package pamtra2 , additonal are libraries provided in /libs. They are installed as part of pamtra2 in pamtra2.libs, but can be also installed separately with the provided setup.py files:
meteo_si - Meteo SI is a collection of functions for atmospheric sciences following the SI-convention (unless stated otherwise)
pamgasabs - Estimate gaseous absorption
pyPamtraRadarSimulator - Simulate a radar Doppler spectrum
pyPamtraRadarMoments - Estimate the moments of the radar Doppler spectrum
refractiveIndex - general purpose refractive index of ice, water and Effective Medium Approximations
singleScattering - general purpose electromagnetic single-scattering module. Includes several scattering methods
- 1. Installation
- 2. Troubleshooting
- 3. Examples
- 4. API Reference
- 4.1.
pamtra2- 4.1.1. Subpackages
- 4.1.1.1.
pamtra2.hydrometeors- 4.1.1.1.1. Submodules
- 4.1.1.1.1.1.
pamtra2.hydrometeors.aspectRatio - 4.1.1.1.1.2.
pamtra2.hydrometeors.core- 4.1.1.1.1.2.1. Module Contents
- 4.1.1.1.1.2.1.1. Classes
- 4.1.1.1.1.2.1.2. Functions
- 4.1.1.1.1.2.1.2.1. DEFAULT_CALCULATION_ORDER
- 4.1.1.1.1.2.1.2.2. hydrometeor
- 4.1.1.1.1.2.1.2.2.1. name
- 4.1.1.1.1.2.1.2.2.2. index
- 4.1.1.1.1.2.1.2.2.3. kind
- 4.1.1.1.1.2.1.2.2.4. nBins
- 4.1.1.1.1.2.1.2.2.5. discreteProperties
- 4.1.1.1.1.2.1.2.2.6. calculationOrder
- 4.1.1.1.1.2.1.2.2.7. useFuncArgDefaults
- 4.1.1.1.1.2.1.2.2.8. description
- 4.1.1.1.1.2.1.2.2.9. getProfileAllBroadcasted
- 4.1.1.1.1.2.1.2.2.10. getProfileWithParentAllBroadcasted
- 4.1.1.1.1.2.1.2.2.11. _parentProfile
- 4.1.1.1.1.2.1.2.2.12. _arrayOrFunc
- 4.1.1.1.1.2.1.2.2.13. solve
- 4.1.1.1.1.2.1.2.2.14. _postProcessing
- 4.1.1.1.1.2.1.2.3. softEllipsoidFixedDensity
- 4.1.1.1.1.2.1.2.4. softEllipsoidMassSize
- 4.1.1.1.1.2.1.2.5. cloud
- 4.1.1.1.1.2.1.2.6. rain
- 4.1.1.1.1.2.1.2.7. ice
- 4.1.1.1.1.2.1.2.8. snow
- 4.1.1.1.1.2.1. Module Contents
- 4.1.1.1.1.3.
pamtra2.hydrometeors.crossSectionArea - 4.1.1.1.1.4.
pamtra2.hydrometeors.density - 4.1.1.1.1.5.
pamtra2.hydrometeors.fallVelocity - 4.1.1.1.1.6.
pamtra2.hydrometeors.mass- 4.1.1.1.1.6.1. Module Contents
- 4.1.1.1.1.6.1.1. Functions
- 4.1.1.1.1.6.1.2. Attributes
- 4.1.1.1.1.6.1.2.1. powerLawLiquidPrefactor
- 4.1.1.1.1.6.1.2.2. powerLawIcePrefactor
- 4.1.1.1.1.6.1.2.3. powerLawLiquidExponent
- 4.1.1.1.1.6.1.2.4. powerLawIceExponent
- 4.1.1.1.1.6.1.2.5. waterSphere
- 4.1.1.1.1.6.1.2.6. iceSphere
- 4.1.1.1.1.6.1.2.7. powerLaw
- 4.1.1.1.1.6.1.2.8. ellipsoid
- 4.1.1.1.1.6.1.2.9. oblateEllipsoid
- 4.1.1.1.1.6.1.2.10. prolateEllipsoid
- 4.1.1.1.1.6.1. Module Contents
- 4.1.1.1.1.7.
pamtra2.hydrometeors.numberConcentration- 4.1.1.1.1.7.1. Module Contents
- 4.1.1.1.1.7.1.1. Functions
- 4.1.1.1.1.7.1.2. Attributes
- 4.1.1.1.1.7.1.2.1. fromSizeDistribution
- 4.1.1.1.1.7.1.2.2. monoDisperse
- 4.1.1.1.1.7.1.2.3. monoDisperseWC
- 4.1.1.1.1.7.1.2.4. modifiedGamma
- 4.1.1.1.1.7.1.2.5. gamma
- 4.1.1.1.1.7.1.2.6. exponential
- 4.1.1.1.1.7.1.2.7. exponentialMarshallPalmer
- 4.1.1.1.1.7.1.2.8. exponentialField
- 4.1.1.1.1.7.1.2.9. exponentialFieldWC
- 4.1.1.1.1.7.1.2.10. exponentialFieldReff
- 4.1.1.1.1.7.1.2.11. exponentialN0WC
- 4.1.1.1.1.7.1.2.12. _exponentialField
- 4.1.1.1.1.7.1.2.13. _exponentialWC2Lambda
- 4.1.1.1.1.7.1.2.14. _exponentialNtot2Lambda
- 4.1.1.1.1.7.1.2.15. _exponentialReff2Lambda
- 4.1.1.1.1.7.1. Module Contents
- 4.1.1.1.1.8.
pamtra2.hydrometeors.relativePermittivity- 4.1.1.1.1.8.1. Module Contents
- 4.1.1.1.1.8.1.1. Functions
- 4.1.1.1.1.8.1.2. Attributes
- 4.1.1.1.1.8.1.2.1. water_turner_kneifel_cadeddu
- 4.1.1.1.1.8.1.2.2. water_ellison
- 4.1.1.1.1.8.1.2.3. ice_warren_brandt_2008
- 4.1.1.1.1.8.1.2.4. ice_matzler_2006
- 4.1.1.1.1.8.1.2.5. ice_iwabuchi_yang_2011
- 4.1.1.1.1.8.1.2.6. __doc__
- 4.1.1.1.1.8.1.2.7. __doc__
- 4.1.1.1.1.8.1.2.8. _mixing_wrapper
- 4.1.1.1.1.8.1.2.9. mixing_sihvola
- 4.1.1.1.1.8.1.2.10. mixing_bruggeman
- 4.1.1.1.1.8.1.2.11. mixing_maxwell_garnett
- 4.1.1.1.1.8.1.2.12. __doc__
- 4.1.1.1.1.8.1.2.13. __doc__
- 4.1.1.1.1.8.1.2.14. __doc__
- 4.1.1.1.1.8.1. Module Contents
- 4.1.1.1.1.9.
pamtra2.hydrometeors.scattering - 4.1.1.1.1.10.
pamtra2.hydrometeors.size - 4.1.1.1.1.11.
pamtra2.hydrometeors.sizeDistribution
- 4.1.1.1.1.1.
- 4.1.1.1.2. Package Contents
- 4.1.1.1.2.1. Classes
- 4.1.1.1.2.2. Functions
- 4.1.1.1.2.2.1. DEFAULT_CALCULATION_ORDER
- 4.1.1.1.2.2.2. hydrometeor
- 4.1.1.1.2.2.2.1. name
- 4.1.1.1.2.2.2.2. index
- 4.1.1.1.2.2.2.3. kind
- 4.1.1.1.2.2.2.4. nBins
- 4.1.1.1.2.2.2.5. discreteProperties
- 4.1.1.1.2.2.2.6. calculationOrder
- 4.1.1.1.2.2.2.7. useFuncArgDefaults
- 4.1.1.1.2.2.2.8. description
- 4.1.1.1.2.2.2.9. getProfileAllBroadcasted
- 4.1.1.1.2.2.2.10. getProfileWithParentAllBroadcasted
- 4.1.1.1.2.2.2.11. _parentProfile
- 4.1.1.1.2.2.2.12. _arrayOrFunc
- 4.1.1.1.2.2.2.13. solve
- 4.1.1.1.2.2.2.14. _postProcessing
- 4.1.1.1.2.2.3. softEllipsoidFixedDensity
- 4.1.1.1.2.2.4. softEllipsoidMassSize
- 4.1.1.1.2.2.5. cloud
- 4.1.1.1.2.2.6. rain
- 4.1.1.1.2.2.7. ice
- 4.1.1.1.2.2.8. snow
- 4.1.1.1.1. Submodules
- 4.1.1.2.
pamtra2.importer - 4.1.1.3.
pamtra2.instruments- 4.1.1.3.1. Submodules
- 4.1.1.3.1.1.
pamtra2.instruments.core - 4.1.1.3.1.2.
pamtra2.instruments.radar- 4.1.1.3.1.2.1. Module Contents
- 4.1.1.3.1.2.1.1. Classes
- 4.1.1.3.1.2.1.2. Functions
- 4.1.1.3.1.2.1.2.1. simpleRadar
- 4.1.1.3.1.2.1.2.2. dopplerRadarPamtra
- 4.1.1.3.1.2.1.2.2.1. frequencies
- 4.1.1.3.1.2.1.2.2.2. settings
- 4.1.1.3.1.2.1.2.2.3. parent
- 4.1.1.3.1.2.1.2.2.4. profile
- 4.1.1.3.1.2.1.2.2.5. hydrometeorProfiles
- 4.1.1.3.1.2.1.2.2.6. results
- 4.1.1.3.1.2.1.2.2.7. solve
- 4.1.1.3.1.2.1.2.2.8. _calcRadarSpectrum
- 4.1.1.3.1.2.1.2.2.9. _simulateRadar
- 4.1.1.3.1.2.1.2.2.10. _calcMoments
- 4.1.1.3.1.2.1.2.3. _calc_radarMoments_wrapper
- 4.1.1.3.1.2.1. Module Contents
- 4.1.1.3.1.1.
- 4.1.1.3.2. Package Contents
- 4.1.1.3.1. Submodules
- 4.1.1.4.
pamtra2.libs
- 4.1.1.1.
- 4.1.2. Submodules
- 4.1.2.1.
pamtra2.atmosphere- 4.1.2.1.1. Module Contents
- 4.1.2.1.1.1. Classes
- 4.1.2.1.1.2. Functions
- 4.1.2.1.1.3. Attributes
- 4.1.2.1.1.3.1. __version__
- 4.1.2.1.1.3.2. default
- 4.1.2.1.1.3.2.1. getProfileAllBroadcasted
- 4.1.2.1.1.3.2.2. chunk
- 4.1.2.1.1.3.2.3. addMissingVariables
- 4.1.2.1.1.3.2.4. addHeightBinDepth
- 4.1.2.1.1.3.2.5. addAbsoluteHumidity
- 4.1.2.1.1.3.2.6. addSpecificHumidity
- 4.1.2.1.1.3.2.7. addWaterVaporPressure
- 4.1.2.1.1.3.2.8. addDryAirDensity
- 4.1.2.1.1.3.2.9. addAirDensity
- 4.1.2.1.1.3.2.10. addDynamicViscosity
- 4.1.2.1.1.3.2.11. addKinematicViscosity
- 4.1.2.1.1.3.2.12. nHydrometeors
- 4.1.2.1.1.3.2.13. nInstruments
- 4.1.2.1.1.3.2.14. nLayer
- 4.1.2.1.1.3.3. _dynamic_viscosity_air
- 4.1.2.1.1. Module Contents
- 4.1.2.2.
pamtra2.configuration- 4.1.2.2.1. Module Contents
- 4.1.2.3.
pamtra2.constants - 4.1.2.4.
pamtra2.core- 4.1.2.4.1. Module Contents
- 4.1.2.4.1.1. Classes
- 4.1.2.4.1.2. Functions
- 4.1.2.4.1.3. Attributes
- 4.1.2.4.1.3.1. __version__
- 4.1.2.4.1.3.2. customProfile
- 4.1.2.4.1.3.3. pamtra2
- 4.1.2.4.1.3.3.1. getProfileAllBroadcasted
- 4.1.2.4.1.3.3.2. getIntegratedScatteringCrossSections
- 4.1.2.4.1.3.3.3. addMissingVariables
- 4.1.2.4.1.3.3.4. addHeightBinDepth
- 4.1.2.4.1.3.3.5. addAbsoluteHumidity
- 4.1.2.4.1.3.3.6. addSpecificHumidity
- 4.1.2.4.1.3.3.7. addWaterVaporPressure
- 4.1.2.4.1.3.3.8. addDryAirDensity
- 4.1.2.4.1.3.3.9. addAirDensity
- 4.1.2.4.1.3.3.10. addDynamicViscosity
- 4.1.2.4.1.3.3.11. addKinematicViscosity
- 4.1.2.4.1.3.3.12. nHydrometeors
- 4.1.2.4.1.3.3.13. nInstruments
- 4.1.2.4.1.3.3.14. nLayer
- 4.1.2.4.1.3.3.15. addHydrometeor
- 4.1.2.4.1.3.3.16. addInstrument
- 4.1.2.4.1.3.4. _dynamic_viscosity_air
- 4.1.2.4.1. Module Contents
- 4.1.2.5.
pamtra2.decorators - 4.1.2.6.
pamtra2.dimensions - 4.1.2.7.
pamtra2.helpers- 4.1.2.7.1. Module Contents
- 4.1.2.7.1.1. Classes
- 4.1.2.7.1.2. Functions
- 4.1.2.7.1.2.1. rayleigh
- 4.1.2.7.1.2.2. provideArgKwargNames
- 4.1.2.7.1.2.3. concatDicts
- 4.1.2.7.1.2.4. swapListItems
- 4.1.2.7.1.2.5. AttrDict
- 4.1.2.7.1.2.6. dimensionToVariables
- 4.1.2.7.1.2.7. getInputCoreDims
- 4.1.2.7.1.2.8. mergeFlattResults
- 4.1.2.7.1.2.9. apply_ufunc_extended
- 4.1.2.7.1.2.10. xrGradient
- 4.1.2.7.1.2.11. xrFastUnstack
- 4.1.2.7.1. Module Contents
- 4.1.2.8.
pamtra2.units
- 4.1.2.1.
- 4.1.3. Package Contents
- 4.1.3.1. Classes
- 4.1.3.2. Attributes
- 4.1.3.2.1. __version__
- 4.1.3.2.2. pamtra2
- 4.1.3.2.2.1. getProfileAllBroadcasted
- 4.1.3.2.2.2. getIntegratedScatteringCrossSections
- 4.1.3.2.2.3. addMissingVariables
- 4.1.3.2.2.4. addHeightBinDepth
- 4.1.3.2.2.5. addAbsoluteHumidity
- 4.1.3.2.2.6. addSpecificHumidity
- 4.1.3.2.2.7. addWaterVaporPressure
- 4.1.3.2.2.8. addDryAirDensity
- 4.1.3.2.2.9. addAirDensity
- 4.1.3.2.2.10. addDynamicViscosity
- 4.1.3.2.2.11. addKinematicViscosity
- 4.1.3.2.2.12. nHydrometeors
- 4.1.3.2.2.13. nInstruments
- 4.1.3.2.2.14. nLayer
- 4.1.3.2.2.15. addHydrometeor
- 4.1.3.2.2.16. addInstrument
- 4.1.1. Subpackages
- 4.2.
test_helpers - 4.3.
test_radar- 4.3.1. Module Contents
- 4.3.1.1. Functions
- 4.3.1.1.1. create_simple_cloud_creator
- 4.3.1.1.2. test_rayleigh_mie
- 4.3.1.1.3. test_rayleigh_tmatrix
- 4.3.1.1.4. test_mie_tmatrix
- 4.3.1.1.5. test_mie_ssrg
- 4.3.1.1.6. test_rayleigh_scale_N
- 4.3.1.1.7. test_rayleigh_scale_N_dask
- 4.3.1.1.8. test_rayleigh_scale_size
- 4.3.1.1.9. test_simple_spectra
- 4.3.1.1.10. test_dask
- 4.3.1.1.11. test_refractiveIndex_liquid
- 4.3.1.1.12. test_refractiveIndex_ice
- 4.3.1.1.13. test_refractiveIndex_mixing
- 4.3.1.1.14. test_scale_noise
- 4.3.1.1.15. test_scale_edr
- 4.3.1.1. Functions
- 4.3.1. Module Contents
- 4.4.
test_units - 4.5.
test_hydrometeors- 4.5.1. Module Contents
- 4.5.1.1. Classes
- 4.5.1.1.1. TestAspectRatio
- 4.5.1.1.2. TestCore
- 4.5.1.1.3. TestCrossSectionArea
- 4.5.1.1.4. TestDensity
- 4.5.1.1.5. TestMass
- 4.5.1.1.6. TestSizeBounds
- 4.5.1.1.7. TestNumberConcentration
- 4.5.1.1.7.1. test_monodisperse
- 4.5.1.1.7.2. test_monoDisperseWC
- 4.5.1.1.7.3. test_exponential
- 4.5.1.1.7.4. test_gamma
- 4.5.1.1.7.5. test_modGamma
- 4.5.1.1.7.6. testMarshallPalmer
- 4.5.1.1.7.7. testField
- 4.5.1.1.7.8. testExponentialFieldWC
- 4.5.1.1.7.9. testExponentialN0WC
- 4.5.1.1.7.10. testExponentialFieldReff
- 4.5.1.1.8. TestScattering
- 4.5.1.1.9. TestFallVelocity
- 4.5.1.1. Classes
- 4.5.1. Module Contents
- 4.6.
test_instruments - 4.7.
meteo_si- 4.7.1. Submodules
- 4.7.1.1.
meteo_si.constants - 4.7.1.2.
meteo_si.density - 4.7.1.3.
meteo_si.due - 4.7.1.4.
meteo_si.humidity - 4.7.1.5.
meteo_si.meteo_si - 4.7.1.6.
meteo_si.temperature - 4.7.1.7.
meteo_si.version- 4.7.1.7.1. Module Contents
- 4.7.1.7.1.1. _version_major
- 4.7.1.7.1.2. _version_minor
- 4.7.1.7.1.3. _version_micro
- 4.7.1.7.1.4. _version_extra
- 4.7.1.7.1.5. _ver
- 4.7.1.7.1.6. __version__
- 4.7.1.7.1.7. CLASSIFIERS
- 4.7.1.7.1.8. description
- 4.7.1.7.1.9. NAME
- 4.7.1.7.1.10. MAINTAINER
- 4.7.1.7.1.11. MAINTAINER_EMAIL
- 4.7.1.7.1.12. DESCRIPTION
- 4.7.1.7.1.13. URL
- 4.7.1.7.1.14. DOWNLOAD_URL
- 4.7.1.7.1.15. LICENSE
- 4.7.1.7.1.16. AUTHOR
- 4.7.1.7.1.17. AUTHOR_EMAIL
- 4.7.1.7.1.18. PLATFORMS
- 4.7.1.7.1.19. MAJOR
- 4.7.1.7.1.20. MINOR
- 4.7.1.7.1.21. MICRO
- 4.7.1.7.1.22. VERSION
- 4.7.1.7.1.23. PACKAGE_DATA
- 4.7.1.7.1.24. REQUIRES
- 4.7.1.7.1. Module Contents
- 4.7.1.8.
meteo_si.wind
- 4.7.1.1.
- 4.7.2. Package Contents
- 4.7.1. Submodules
- 4.8.
pamgasabs - 4.9.
pyPamtraRadarMoments - 4.10.
pyPamtraRadarSimulator - 4.11.
refractiveIndex- 4.11.1. Submodules
- 4.11.1.1.
refractiveIndex.core - 4.11.1.2.
refractiveIndex.ice- 4.11.1.2.1. Module Contents
- 4.11.1.2.1.1. Functions
- 4.11.1.2.1.2. Attributes
- 4.11.1.2.1.2.1. module_path
- 4.11.1.2.1.2.2. warren_ice_table
- 4.11.1.2.1.2.3. warren_ice_table
- 4.11.1.2.1.2.4. warren_ice_table
- 4.11.1.2.1.2.5. warren_ice_eps
- 4.11.1.2.1.2.6. warren_ice_interpolated
- 4.11.1.2.1.2.7. iwabuchi_ice_table
- 4.11.1.2.1.2.8. name
- 4.11.1.2.1.2.9. iwabuchi_ice_interp_real
- 4.11.1.2.1.2.10. iwabuchi_ice_interp_imag
- 4.11.1.2.1.2.11. iwabuchi_yang_2011
- 4.11.1.2.1.2.12. warren_brandt_2008
- 4.11.1.2.1.2.13. matzler_2006
- 4.11.1.2.1.2.14. eps
- 4.11.1.2.1.2.15. n
- 4.11.1.2.1. Module Contents
- 4.11.1.3.
refractiveIndex.mixing - 4.11.1.4.
refractiveIndex.snow - 4.11.1.5.
refractiveIndex.utilities - 4.11.1.6.
refractiveIndex.water
- 4.11.1.1.
- 4.11.2. Package Contents
- 4.11.1. Submodules
- 4.12.
singleScattering- 4.12.1. Submodules
- 4.12.1.1.
singleScattering.core - 4.12.1.2.
singleScattering.mie - 4.12.1.3.
singleScattering.rayleigh - 4.12.1.4.
singleScattering.scatterer - 4.12.1.5.
singleScattering.scattering_utilities- 4.12.1.5.1. Module Contents
- 4.12.1.5.1.1. Classes
- 4.12.1.5.1.2. Functions
- 4.12.1.5.1.2.1. amplitude_matrix
- 4.12.1.5.1.2.2. scattering_matrix
- 4.12.1.5.1.2.3. amplitude2mueller
- 4.12.1.5.1.2.4. size_parameter
- 4.12.1.5.1.2.5. spheroid
- 4.12.1.5.1.2.6. scattering_angle
- 4.12.1.5.1.2.7. module_angle
- 4.12.1.5.1.2.8. polar2cartesian
- 4.12.1.5.1.2.9. cartesian2polar
- 4.12.1.5.1.2.10. rotation2
- 4.12.1.5.1.2.11. transformation_matrices
- 4.12.1.5.1. Module Contents
- 4.12.1.6.
singleScattering.ssrg- 4.12.1.6.1. Module Contents
- 4.12.1.6.1.1. Classes
- 4.12.1.6.1.2. Functions
- 4.12.1.6.1.3. Attributes
- 4.12.1.6.1.3.1. ssrg_lib
- 4.12.1.6.1.3.2. HW14
- 4.12.1.6.1.3.3. L15_0
- 4.12.1.6.1.3.4. Oea14
- 4.12.1.6.1.3.5. module_path
- 4.12.1.6.1.3.6. leinonen_table
- 4.12.1.6.1.3.7. leinonen_coeff
- 4.12.1.6.1.3.8. ssrg_lib_idx
- 4.12.1.6.1.3.9. SsrgScatt
- 4.12.1.6.1.3.10. phase_function
- 4.12.1.6.1.3.11. shape_factor
- 4.12.1.6.1.3.12. first
- 4.12.1.6.1.3.13. summation
- 4.12.1.6.1.3.14. compute_effective_size
- 4.12.1.6.1.3.15. leinonen_coeff
- 4.12.1.6.1.3.16. c
- 4.12.1.6.1.3.17. diameters
- 4.12.1.6.1.3.18. brandes
- 4.12.1.6.1.3.19. smalles
- 4.12.1.6.1.3.20. backscattering
- 4.12.1.6.1. Module Contents
- 4.12.1.7.
singleScattering.tmatrix- 4.12.1.7.1. Module Contents
- 4.12.1.7.1.1. Classes
- 4.12.1.7.1.2. Attributes
- 4.12.1.7.1. Module Contents
- 4.12.1.1.
- 4.12.2. Package Contents
- 4.12.1. Submodules
- 4.1.