smrt.microstructure_model package
Provides several microstructure models.
Because these representations are different, the parameters to describe actual snow micro-structure depend on the model. For instance, the Sticky Hard Spheres medium is implemented in smrt.microstructure_model.sticky_hard_spheres and its parameters are: the radius (required) and the stickiness (optional, default value is non-sticky, even though it is recommended to use a stickiness of ~0.1-0.3 in practice).
Because IBA and SymSCE are important electromagnetic theories provided by SMRT, the first/main role of microstructure models is to provide the Fourier transform of the autocorrelation functions. Hence most microstructure models are named after the autocorrelation function. For instance, the smrt.microstructure_model.exponential autocorrelation function is that used in MEMLS. Its only parameter is the corr_length.
To use microstructure models, it is only required to read the documentation of each model to determine the required and optional parameters. Selecting the microstructure model is usually done with make_snowpack which only requires the name of the module (the filename with .py). The import of the module is automatic. For instance:
from smrt import make_snowpack
sp = make_snowpack([1, 1000], "exponential", density=[200, 300], corr_length=[0.2e-3, 0.5e-3])
This snippet creates a snowpack with the exponential autocorrelation function for all (2) layers. Import of the smrt.microstructure_model.exponential is automatic and creation of instance of the class smrt.microstructure_model.exponential.Exponential is done by the model smrt.core.model.Model.run method.
The “unified” formulations are to be used with the universal parameterization set proposed in “The microwave snow grain size: a new concept to predict Satellite observations over snow-covered regions”, AGU Advances, 3, 4, e2021AV000630, doi:10.1029/2021AV000630.
smrt.microstructure_model.exponential module
Implements the exponential autocorrelation function model of the microstructure. This microstructure model is used by MEMLS when IBA is selected.
- param frac_volume:
Fractional volume.
- type frac_volume:
float
- param corr_length:
Correlation length.
- type corr_length:
float
- class Exponential(params)
Bases:
Autocorrelation- basic_check()
check consistency between the parameters
- compute_ssa()
compute the ssa for the exponential model according to Debye 1957. See also Maetzler 2002 Eq. 11
- autocorrelation_function(r)
compute the real space autocorrelation function
- ft_autocorrelation_function(k)
compute the fourier transform of the autocorrelation function analytically
smrt.microstructure_model.sticky_hard_spheres module
Implements the monodisperse sticky hard sphere model of the microstructure.
- param frac_volume:
Fractional volume.
- type frac_volume:
float
- param radius:
Sphere radius.
- type radius:
float
- param stickiness:
Stickiness parameter. Default is 1000.
- type stickiness:
float, optional
Notes
The stickiness is optional but it is recommended to use value around 0.2 as a first guess. Be aware that low values of stickiness are invalid, the limit depends on the fractional volume (see for instance Loewe and Picard, 2015). See the tau_min method.
Currently the implementation is specific to ice / snow. It cannot be used for other materials.
smrt.microstructure_model.teubner_strey module
Implements the Teubner Strey model of the microstructure.
- param frac_volume:
Fractional volume.
- type frac_volume:
float
- param corr_length:
Correlation length.
- type corr_length:
float
- param repeat_distance:
Repeat distance.
- type repeat_distance:
float
smrt.microstructure_model.unified_scaled_exponential module
Implements the scaled exponential autocorrelation function model of the microstructure. This microstructure uses unified parameters as defined by G. Picard, H. Löwe, F. Domine, L. Arnaud, F. Larue, V. Favier, E. Le Meur, E. Lefebvre, J. Savarino, A. Royer, The snow microstructural control on microwave scattering, AGU Advances.
- param frac_volume:
Fractional volume.
- type frac_volume:
float
- param porod_length:
Porod length.
- type porod_length:
float
- param polydispersity:
Polydispersity.
- type polydispersity:
float
smrt.microstructure_model.unified_sticky_hard_spheres module
Implements the monodisperse sticky hard sphere model of the microstructure. This microstructure uses unified parameters as defined by G. Picard, H. Löwe, F. Domine, L. Arnaud, F. Larue, V. Favier, E. Le Meur, E. Lefebvre, J. Savarino, A. Royer, The snow microstructural control on microwave scattering, AGU Advances.
- param frac_volume:
Fractional volume.
- type frac_volume:
float
- param porod_length:
Porod length.
- type porod_length:
float
- param polydispersity:
Polydispersity.
- type polydispersity:
float
smrt.microstructure_model.unified_teubner_strey module
Implements the extended Teubner Strey model as described by Ruland 2010. This microstructure uses unified parameters as defined by G. Picard, H. Löwe, F. Domine, L. Arnaud, F. Larue, V. Favier, E. Le Meur, E. Lefebvre, J. Savarino, A. Royer, The snow microstructural control on microwave scattering, AGU Advances.
- param frac_volume:
Fractional volume.
- type frac_volume:
float
- param porod_length:
Porod length.
- type porod_length:
float
- param polydispersity:
Polydispersity.
- type polydispersity:
float
- class UnifiedTeubnerStrey(params)
Bases:
UnifiedAutocorrelation- basic_check()
check consistency between the parameters
- compute_ssa()
Compute the ssa for a sphere
- autocorrelation_function(r)
compute the real space autocorrelation function for the Teubner Strey model
- ft_autocorrelation_function(k)
Compute the 3D Fourier transform of the isotropic correlation function for Teubner Strey for given magnitude k of the 3D wave vector (float).
smrt.microstructure_model.gaussian_random_field module
Implements the Gaussian Random field model of the microstructure.
- param frac_volume:
Fractional volume.
- type frac_volume:
float
- param corr_length:
Correlation length.
- type corr_length:
float
- param repeat_distance:
Repeat distance.
- type repeat_distance:
float
smrt.microstructure_model.homogeneous module
Implements the homogeneous microstructure. This microstructure model is to be used with non-scattering emmodel.
- param None:
- class Homogeneous(params)
Bases:
Autocorrelation- basic_check()
check consistency between the parameters
- compute_ssa()
compute the ssa of an homogeneous medium
- autocorrelation_function(r)
compute the real space autocorrelation function
- ft_autocorrelation_function(k)
compute the fourier transform of the autocorrelation function analytically
smrt.microstructure_model.independent_sphere module
Implements the independent sphere model of the microstructure.
- param frac_volume:
Fractional volume.
- type frac_volume:
float
- param radius:
Sphere radius.
- type radius:
float
- class IndependentSphere(params)
Bases:
Autocorrelation- basic_check()
check consistency between the parameters
- compute_ssa()
Compute the ssa for a sphere
- autocorrelation_function(r)
compute the real space autocorrelation function for an independent sphere
- ft_autocorrelation_function(k)
Compute the 3D Fourier transform of the isotropic correlation function for an independent sphere for given magnitude k of the 3D wave vector (float).
smrt.microstructure_model.sampled_autocorrelation module
Implements the sampled autocorrelation function model. Use when no analytical form of the autocorrelation function exists but the values of the autocorrelation function (acf) are known at a series of lag.
- param frac_volume:
Fractional volume.
- type frac_volume:
float
- param lag:
Lag values.
- type lag:
array-like
- param acf:
Autocorrelation function values at the given lags.
- type acf:
array-like
- class SampledAutocorrelation(params)
Bases:
Autocorrelation- basic_check()
check consistency between the parameters
- compute_ssa()
compute the ssa according to Debye 1957. See also Maetzler 2002 Eq. 11
- autocorrelation_function(r)
compute the real space autocorrelation function by interpolation of requested values from known values
smrt.microstructure_model.autocorrelation module
Contains the base classes for the microstructure classes. It is not used directly.
- class AutocorrelationBase(params)
Bases:
objectLow level base class for the Autocorrelation base class to handle optional and required arguments. It should not be used directly.
- class Autocorrelation(params)
Bases:
AutocorrelationBaseBase class for autocorrelation function classes. It should not be used directly but sub-classed. It provides generic handling of the numerical fft and invfft when required by the user or when necessary due to the lack of implementation of the real or ft autocorrelation functions. See the source of
Exponentialto see how to use this class.- ft_autocorrelation_function_fft(k)
compute the fourier transform of the autocorrelation function via fft Args: k: array of wave vector magnitude values, ordered, and non-negative
- autocorrelation_function_invfft(r)
Compute the autocorrelation function from an analytically known FT via fft Args: r: array of lag vector magnitude values, ordered, non-negative
- inverted_medium()
return the same autocorrelation for the inverted medium. In general, it is only necessary to invert the fractional volume if the autocorrelation function is numerically symmetric as it should be. This needs to be reimplemented in the sub classes if this is not sufficient.