Skip to content

hygeos/pytrunc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytrunc

image image image image

Scattering phase matrix truncation Python tool for radiative transfer applications.

Mustapha Moulana
HYGEOS website
Documentation


Installation

You can use oe of the following commands:

conda install -c conda-forge pytrunc
pip install pytrunc
# directly from github
pip install git+https://github.com/hygeos/pytrunc.git

Examples

Example using the Delta-m method:

Voir l'image
>>> ...
>>> from pytrunc.truncation import delta_m_phase_approx
>>> m_max = 20 # stream / term number
>>> # phase_exact -> P11 of a liquid cloud at 500nm and an effective radius of 8 mirometers
>>> # theta -> the phase angles in degrees
>>> ds = delta_m_phase_approx(phase_exact, theta, m_max) # return an xarray dataset
>>> ...

Example using the Geometric Truncation:

Voir l'image
>>> ...
>>> from pytrunc.truncation import gt_phase_approx
>>> from pytrunc.phase import calc_moments
>>> m_max = 20 # stream / term number
>>> # phase_exact -> P11 of a liquid cloud at 500nm and an effective radius of 8 mirometers
>>> # theta -> the phase angles in degrees
>>> chi = calc_moments(phase_exact, theta, m_max=m_max, normalize=True) # the phase moments
>>> f = chi[m_max] # The truncation factor
>>> ds = gt_phase_approx(phase_exact, theta, f) # return an xarray dataset
>>> ...

About

Scattering phase matrix truncation Python tool for radiative transfer applications.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages