igmk / pamtra

Passive and Active Microwave TRAnsfer model
GNU General Public License v3.0
19 stars 16 forks source link

shape parameter smaller than -1 in modified gamma distribution #22

Open markuskarrer opened 4 years ago

markuskarrer commented 4 years ago

Some paper report negative values for the shape parameter ("mu"; down to -2) in the normalized gamma distribution (e.g. Tiira et al., 2016). I am trying to use pamtra with a wide range of shape parameters (including these negative values with the assumptions in the Seifert-Beheng scheme. The Seifert-Beheng scheme assumes a modified gamma distribution. As I understand this requires the shape parameter to be greater than -1. This fact causes errors in make_dist_params.f90 if the shape parameter is below (or even close to -1). Is there a workaround for lower values of the shape parameters or would we need to implement another distribution type?

DaveOri commented 4 years ago

I have the feeling that this is due to the fact we are assuming infinite distributions in PAMTRA. For infinite distributions the moment formulations is like M_k = N0 gammafunc(x)/(gammalambda**x) where x = (mu + k + 1)/gamma

The complete gammafunc is indefinite for x==0 or x==any negative integer value. This condition is met for k==0 already with mu==-1

I have the feeling that this is the problem we are facing and if this is the case I do not have a rapid solution for it. The workaround would be to drop from the complete distributions for these cases, cut the distribution at Dmin and Dmax and calculate the moments numerically. This would also introduce a different behaviour of pamtra for specific values which is something I would discourage.

In any case, the gammafunc is the solution of our problem if, and only if, x>0, thus, we cannot use the formula if mu<=-1 when dealing with N0, if mu<=-3 when dealing with r_eff and mu<=-4 if mixing_ratio only is provided.