The Dense Media Radiative Transfer - Multi Layers model
(DMRTML or DMRT-ML).
Numerical simulation of the microwave emission of the snowpack using a model based on the DMRT theory.
- Version 1.6: added several examples from the paper in GMD. Correction of bug in dmrtml.py with soil handling.
- Version 1.5: null snow depth works correctly now. Solve a problem with tau in main.f90
- Version 1.4: solve a minor problem in dmrtml.f90
- Version 1.3: solve a problem with LWC. The test file dmrtml-medium-amsre.dat is now correct.
- Version 1.2: solve a problem with units in dmrtml.f90
- Version 1.1: solve a problem with Tbatmo in disort.f90
- Version 1.0: first public release!
What is DMRT-ML ?
DMRT-ML is a physical model used to compute the thermal microwave emission of a given snowpack for passive microwave remote sensing applications. The model is based on the Dense Media Radiative Transfer Theory (Tsang, 1992 and Tsang and Kong 2001) and accurately solves the radiative transfer equation using the Discrete Ordinate Method (DISORT, Jin, 1994).
The snowpack is modeled as a stack of horizontal layers of snow and an optional underlying interface representing the soil or the ice. The atmospheric downwelling contribution can be taken into account.
DMRT-ML is designed to work for most snow-covered surfaces, and can model dry or wet snowpacks over soil (e.g. Alpine or Arctic seasonal snow), over ice (e.g. on ice-sheet or lake) and soon over sea-ice.
DMRT-ML has been developed at LGGE (now IGE) and is freely distributed under an open source license. Contributions from the remote sensing and snow community would be appreciated to further evaluate, enhance and document DMRT-ML.
The model is written in Fortran 90 and (optionally) interfaced to Python (version 2.5 and higher). It is thus fast and easy to use. The code is known to compile and run on Linux and Windows and should run smoothly on other systems.
Detailed description and analysis of several simulations are given in the reference paper
Main and contributing authors :
Ghislain Picard1, Ludovic Brucker1*, Alexandre Roy2, Florent Dupont1,21Insitut des Geosciences de l'Environnement (IGE)
54 rue Molière - Domaine Universitaire - BP 96
38402 St Martin d'Hères Cedex, FRANCE
2Centre d'applications et de recherches en télédétection (CARTEL)
Université de Sherbrooke
2500 Bd Université
Sherbrooke, Qc J1K 2R1 CANADA * now at: NASA GSFC, Cryospheric Sciences Lab., code 615 Greenbelt, MD 20771 U.S.A.
Obtaining the code:
The source code and the technical documentation is available from github.
The software i spublished under the GNU General Public License version 3 (http://www.opensource.org/licenses/gpl-3.0.html). In particular, if you modify the code, it must remain open source with the same GPL-3.0 license and it can not be linked with most non-GPL licenses. Also note that this software comes with no warranty.
Installation and compilation:
DMRT-ML can be easily installed and used from python, but manual compilation of the pure-fortran binary is also possible.
On github, the
src/ directory contains the Fortran code, and the
doc directory contains the code documentation in html format. To read the documentation, point your favourite internet browser to the file: doc/html/index.html.
Note that the technical documentation was automatically generated using Doxygen from the comments included in DMRT-ML source code. If you would like to contribute to the documentation, please directly modify the code or alternatively send the necessary changes to firstname.lastname@example.org.
Setup in short:
The core of the model is written in standard Fortran 90 and needs to be compiled with a Fortran compiler (gfortran or Intel Fortran are known to work). For fast calculations, the matrix diagonalizations and inversions in the DISORT method use the efficient LAPACK library or one of its optimized flavors (Intel MKL, ...). One of these libraries must be properly installed before attempting the compilation. If you intend to use the Python bindings, you also must install Python and Scipy. Installing Matplotlib is recommended for plotting and using the test scripts provided in the source.
The compilation settings are in the
Makefile-ARCH files where ARCH is the name of a compiler. Choose the most suitable for your environment (Makefile-gfortran should be the most portable) and rename or copy it to
Makefile. Open this file with a text editor and change the settings accordingly with your installation paths. Type make in a command window to compile the code. If successful, the dmrtml executable is produced in the main directory. For testing, run this executable with dmrtml -i medium.dat -s amsre and check the output is identical to the file dmrtml-medium-amsre.out. This executable is a demonstration code with limited functionality. You should adapt and extend the main.f90 file to perform our own calculations.
It is much easier and elegant to use Python to drive DMRT-ML than to modify the Fortran driver (main.f90). Python is easy to learn and is great for science! To build the Python bindings, type make pydmrt. In case of error, adjust the f2py parameters in the Makefile file (using f2py may be tedious but be brave). Several Python scripts are provided to test the sensitivity of DMRT-ML to various parameters (test_diagram.py, test_atmo.py, ...). They are run by double clicking the icon or from the command line without argument. Modify one of these scripts for your particular usage.
Angular diagram of emission obtained with test_diagram.py
This section complements the technical documentation generated with Doxygen. Detailed information is also available in the reference DMRT-ML paper. DMRT-ML is composed of several pieces of code:
dmrtml.f90, the subroutine
dmrtmlis the main entry for running DMRT-ML using a pure-Fortran driver. Most users only need to call this subroutine from their main program. However, reading the technical documentation of the other modules and subroutines is necessary. In particular, pay attention to how stream angles are calculated (see disort.f90), the different DMRT theory flavors available in mod_dmrtparameters, and how to specify soil parameters (mod_soil). Examining the code of dmrtml is useful too. All units are in the International System.
dmrtparameters.f90several subroutines compute the extinction coefficient and single scattering albedo according to the DMRT theory. In fact, different versions of the DMRT theory have been published over time and they can significantly differ from each other. None is the best for all the cases. In dmrtparameter.f90, only DMRT versions with the QCA-CP approximation (better energy conservation) and for small particles are implemented (e.g. QCA or Mie are not available). The most basic version implemented in the subroutine
dmrtparametersconsiders monodisperse small spheres with optional stickiness. Stickiness should remain moderate (say tau>0.3) because only the "short range" option is implemented. The
dmrtparameters_grodyapproachsubroutine (the defautl and recommended one) is similar to the previous one but adds a correction for large particles. It is based on the empirical approach proposed by Grody (2008) with some improvements by ourselves (see the main DMRT paper when published). It avoids scattering coefficient to blow up when large particles are present in the snowpack, but it does not pretend to be exact or accurate. A proper calculation with large particles would require a QCA-Mie calculation which is computationally intensive (See http://www.ee.washington.edu/research/laceo/emwave/ for Mie QCA). The last subroutine (
dmrtparameters_dist) works with polydisperse sphere collections. The size of the grains in one layer is assumed to follow a Rayleigh distribution. Only this distribution is implemented because its short upper tail avoid an excessive number of large particles that would blow up the DMRT calculation. Other more realistic distributions for snow (e.g. log normal) could be implemented using Grody's correction but it remains to be done and tested.
disortmlsubroutine that solves the radiative transfer equation in the case of a multi-layered medium with multiple streams. Our implementation follows closely the formalism proposed in Jin, 1994. The azimuthal dependence of the radiative transfer equation is analytically integrated. The benefit is a faster numerical calculation and the disadvantage is two-fold: 1) the medium and the observing configuration must be isotropic and 2) a particular form of the phase matrix has to be chosen. The first point imposes a passive observing configuration, since active configurations (e.g. radar) are inherently anisotropic (see Picard et al. 2004 an example of DISORT implementation for active configuration). Regarding the phase matrix, our code uses the Rayleigh phase matrix accordingly to the DMRT theory for small particles and short range (moderate stickiness). The subroutine
disortmlcomputes the brightness temperature emanating from the snowpack by solving the boundary solution problems. At the upper interface (air/snow), the atmospheric contribution, supposed isotropic (which is incorrect in reality and could be changed in the future), is taken into account (input argument
tbatmodown). The bottom interface is chosen by the user (input argument
soilp), and the reflection coefficients are calculated in the soil.f90 file. For ice-sheets with a nearly semi-infinite snowpack (like in Antarctica and Greenland at frequency above 6 GHz), the bottom interface can be none-reflective (use soil model id=0). The interfaces between other layers ensure stream continuity. This has an important consequence for the user: the number n of streams (i.e. zenith angles) given in input is only used for the most refractive layer (the densest snow). The stream angles in the other layers are deduced from the stream angles in the most refractive snow layer by using the refraction law. Since travelling from a large refractive index (dense snow) to a weak one (light snow) may result in total reflection at large angles, it is possible that some streams in the dense layers are not connected in lighter layers. The stream angles emerging from the surface are calculated exactly the same way as within the snowpack. Their number can be significantly lower than the number n given as input. Increase n if unsatisfied by the number of emerging streams.
soil.f90contains the subroutine to compute the reflection coefficients of the bottom surface if present. This subroutine is not directly called by the user, but one of its parameters,
soilp, and is important to describe the bottom interface. It is indeed required as input of the main
dmrtmlsubroutine in dmrtml.f90. The bottom interface is called soil but can be any kind of matter as long as a model is implemented. The user selects the type of matter and model by setting the identification number (id) in the
soilpparameters. The other parameters of
soilpare model and matter-dependent. These informations can be found in the documentation of soil.f90. At the time of this writing several models of soil along with a few models of ice are implemented. For soil, if unsure, use the model id=102 (Wegmuller & Matzler, 1999) and set sigma to a reasonable value of 0.5cm. For semi-infinite snowpack, using model ID=0 is recommended.
- dmrtml.py is the Python module that provides a convenient interface to DMRT-ML core. The entry point is the dmrtml subroutine equivalent to the Fortran's one but with many optional arguments. The subroutine returns an object of class DMRTMLResult. This object contains the raw results (as the Fortran's subroutine) but provides additional convenient methods to interpolate the brightness temperatures at any angle. The soil parameters are set by using a generic class SoilParams or more conveniently by using specialized classes (e.g: FlatSoilParams, QNHRoughSoilParams). Examples provided in the test_*.py files are really helpful and illustrate the simplicity of Python versus Fortran. Note that internally dmrtml.py uses a Python module called
dmrtml_for. It is generated by f2py and is strictly equivalent to the subroutines in drtmml.f90; however, we recommend the use of the more convenient dmrtml.py module.
- examples/ is the directory were several examples show how to use python to drive DMRT-ML. The scripts to produce the figures 3 to 9 in DMRT-ML paper are available. They are good starting point for your scripts.
A paper describing DMRT-ML in detail is in preparation. Please ask for the status for citation.
- G. Picard, L. Brucker, A. Roy, F. Dupont, M. Fily, and A. Royer, Simulation of the microwave emission of multi-layered snowpacks using the dense media radiative transfer theory: the DMRT-ML model, Geoscientific Model Development, 6, 1061-1078, 2013, doi:10.5194/gmd-6-1061-2013
Other papers using DMRT-ML:
- G. Picard, A. Royer, L. Arnaud, M. Fily. Influence of meter-scale wind-formed features on the variability of the microwave brightness temperature around Dome C in Antarctica, The Cryosphere Discussion, doi:10.5194/tcd-7-3675-2013
- A. Roy, G. Picard, A. Royer, B. Montpetit, F. Dupont, A. Langlois, C. Derksen and N. Champollion, Brightness temperature simulations of the Canadian seasonal snowpack driven by measurements of the snow specific surface area, IEEE Transactions on Geoscience and Remote Sensing, online in 2013, abstract
- G. Picard, F. Domine, G. Krinner, L. Arnaud & E. Lefebvre, Inhibition of the positive snow-albedo feedback by precipitation in interior Antarctica, Nature Climate Change, 2, 795-798 2012, doi:10.1038/nclimate1590
- Brucker, L., Picard, G., Arnaud, L., Barnola, JM, Schneebeli, M., Brunjail, H., Lefebvre, E., Fily, M. Modeling time series of microwave brightness temperature at Dome C, Antarctica, using vertically resolved snow temperature and microstructure measurements, Journal of Glaciology, 57(201),171-182, 2011 TOC
- Brucker, L., Picard, G. and Fily, M. Snow grain size profiles deduced from microwave snow emissivities in Antarctica. Journal of Glaciology, 56(197), 514-526, 2010 TOC
Validity and recommendations:
As a model primarily designed for research, DMRT-ML code has very little control of the validity of the input parameters and very limited error reporting. In addition, the version of the DMRT theory implemented here has several limitations that are not well understood. It seems it diverges in some cases (e.g. large particle size, high density, etc). In any case, the model is provided without warranty as explained in the license.
A few tips, known limitations and bugs:
- Regarding the grain size: The DMRT theory implemented in the code assumes small particles with respect to the wavelength (say lambda/10 is a conservative upper limit). Since snow grains are often close or larger than the wavelength at 37 GHz and higher frequencies, an automatic limitation of the grain size is implemented based on Grody 2008. Despite this precaution, we have noticed that large particles result in very low emissivity with respect to what can be observed on Earth (personal communication F. Karbou, CEN). It is highly recommended to use this limitation with caution.
- Regarding the density: The DMRT theory was compared to a more exact numerical theory (Liang et al. 2006, Tsang et al. 2008) for a range of density. It was found a divergence for fractional volume higher than 0.3. In many cases on Earth, the snow is denser than that. Based on our experience, it is better to limit the density to ~350kg/m3 than to use the real value!
Frequently Asked Questions (FAQ):
- How is grain size defined for DMRT-ML ?
DMRT-ML like the underlying DMRT theory considers spherical particles only. The size given as input of DMRT-ML subroutines is always the radius of the spheres. How this applies to natural snow is a complex topic under discussion in the snow/microwave community.
- Do you have any question ? or response ?
Contribution and acknowledgement
We would like to acknowledge Samuel Morin, Chawn Hallow, Nicolas Champollion, Michel Fily, Alain Royer for useful discussions and corrections.
Model development was supported by the French Programme National de Télédétection Spatiale. Logistical support from the French Polar Institute was essential for the collection of validation data in Antarctica.
- Grody, N. Relationship between snow parameters and microwave satellite measurements: Theory compared with Advanced Microwave Sounding Unit observations from 23 to 150 GHz. J. Geophys. Res. 113, 22108-+ (2008).
- Jin, Y. Q. Electromagnetic scattering modelling for quantitative remote sensing. (World Scientific: 1994). G. Picard, T. Le Toan, S. Quegan, Y. Caraglio, and T. Castel. Radiative Transfer modeling of cross-polarised backscatter from a pine forest using the discrete ordinate and eigenvalue method, IEEE-Transaction on Geoscience and Remote Sensing, Vol 42, No 8, pp.1720-1730, 2004.
- Liang, D., K. Tse, Y. Tan, L. Tsang and K.H. Ding. 2006. Scattering and emission in snow based on QCA/DMRT and numerical Maxwell model of 3Dimensional simulations (NMM3D). In Proceedings of the IEEE 9th Specialist Meeting on Microwave Radiometry and Remote Sensing of the Environment (MicroRad 2006), 28 February-3 March 2006, San Juan, Puerto Rico. Piscataway, NJ, Institute of Electrical and Electronics Engineers, 197-202.
- Picard, G., Le Toan, T., Quegan, S., Caraglio, Y. & Castel, T. Radiative transfer modeling of cross-polarized backscatter from a pine forest using the discrete ordinate and eigenvalue method. IEEE Trans. Geosci. Remote Sensing 42, 1720-1730 (2004).
- Tsang, L., Ding, K. H. & Wen, B. Dense Media Radiative Transfer Theory for Dense Discrete Random Media with Particles of Multiple Sizes and Permitivities. Progress In Electromagnetics Research 6, 181-230 (1992).
- Tsang, L. & Kong, J. A. Scattering of Electromagnetic Waves, vol. 3, Advanced Topics. (Wiley Intersci. and Hoboken, N. J.: 2001).
- Tsang, L., D. Liang, X. Xu & P. Xu. 2008. Microwave emission from snowpacks: modeling the effects of volume scattering, surface scattering and layering. In Proceedings of 10th Specialist Meeting on Microwave Radiometry and Remote Sensing of the Environment (MicroRad 2008), 11-14 March 2008, Firenze, Italy. Piscataway, NJ, Institute of Electrical and Electronics Engineers, 1-4.
- Wegmuller, U. & Matzler, C. Rough bare soil reflectivity model. Geoscience and Remote Sensing, IEEE Transactions on 37, 1391-1395 (1999).
- Wang, R. W., O'Neill, P. E., Jackson, T. J., & Engman, E. T. Multifrequency measurements of the effects of soil moisture, soil texture and surface roughness. IEEE Transactions on Geoscience and Remote Sensing, GE-21(1), 44–51. (1983)