smrt-model / smrt

Snow Microwave Radiative Transfert model to compute thermal emission and backscatter from snowpack
Other
51 stars 20 forks source link

how to use non-default wet snow permittivity formula with IBA #17

Open carlomarin opened 2 years ago

carlomarin commented 2 years ago

In make_snowpack (and make_snow_layer) it is possible to define non standard permittivity formula for ice/wetice and air. How a non-default formula for wetsnow can be used in IBA e.g., the formulation used in MEMLS or Ulaby2014?

thanks, carlo

ghislainp commented 2 years ago

All of these are possible in SMRT, but it is important to understand the electromagnetic problem first, to understand how to do it in SMRT and why it may be simple or complex.

What is very important to remember is that SMRT is (currently and mostly) for two-phase porous media. The medium is made of two materials. This is perfect for dry snow, material1=air, material2=ice. Using the current theories in SMRT with 3 phases (air, ice, water) requires some tricks and it is very important to understand the potential caveats. There are three different cases to consider, in fact there are two cases and the second is split in two subcases. Let's call them 1, 2a and 2b.

Case 1:

you want to model wet snow as air and wetice. Wetice is a conceptual material where ice and water are mixed first, and this mixture is used as material2 in SMRT. By default SMRT use Bohren 83 to calculate the permittivity of a mixture of ice and water (wetice.py) for material2. This is why SMRT can handle wet snow by default. However, if you don't like Bohren 83, you can change how ice and water are mixed with your own function: make_snowpack(thickness, microstructure, ...., ice_permittivity_model=my_ice_permittivity_model) where 'my_ice_permittivity_model' is a python function defined in your code. This function will be be called internally by SMRT instead of the function wetice_permittivity_bohren83 (wetice.py). Have a look at this latter function to understand how to declare your own my_ice_permittivity_model (you should never put your own function in the file wetice.py, it should be in your code, outside SMRT to keep the compatibility, and you can distribute our function separately from SMRT if you want to give others access or contact us to integrate it in SMRT if you think it is of general interest). Note that if you want each layer of the snowpack to have a difference my_ice_permittivity_model, just provide a list of functions instead of just one function (this works for any argument in make_snowpack).

Case 2a and 2b:

A more complex case is when you want to change the mixing formula that compute the effective permittivity in the EM Model (e.g. in IBA or in DMRT). This mixing formula is used to mix material1 and material2 in order to compute the refraction and the absorption in the medium, and is not to be confused with the first step of mixing ice and water to make material2. In principle, the theories (IBA, DMRT and others) are established for a specific mixing formula, and this formula is an integral part of the theory. Changing it breaks the theory (somehow). For instance IBA uses the PvS mixing formula and using IBA without PvS is not really IBA anymore.

However, there are some reasons why changing it anyway, especially when a precise empirical or semi-empirical three-phase mixing formula is available. This is the case of the "MEMLS" permittivity formula and there are many others from Halliakanen, Ulaby, Colbeck etc... (see snow_mixing_formula.py in SMRT).

There are two-sub cases:

To sum up:

In practice:

Case 1 and 2a: sp = make_snowpack(thickness, microstructure, ...., ice_permittivity_model=my_wetice_mixture_permittivity_model) ← this function mixes 2 materials. m = make_model("iba", “dort”)

Case 2b: sp = make_snowpack(thickness, microstructure, ....) m = make_model(derived_IBA(my_wetsnow_permittivity), “dort”) ← this function mixes 3 materials or more.

carlomarin commented 2 years ago

Thanks Ghislain for publishing this very detailed answer! This is a piece of information that has a great value for the entire community!