igmk / pamtra

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

Setting hydro_adaptive_grid to .false. can cause sum(ndens) to be 0. #16

Open mariomech opened 4 years ago

mariomech commented 4 years ago

If hydro_adaptive_grid is set to False and d_1 as the lowest boundary of the particle size distribution is too big, a very low amount (1e-10) can cause the total number to be 0. This is not allowed and results in an error. It might be that this happens only for exponential distributions. There the exponent can become zero for all diameters.

The default value of hydro_adaptive_grid is True. The idea was originally to find the optimum diameter grid in terms of mass conservation and efficiency. Unfortunately, this implies that d_min and d_max from the descriptor file are ignored.

I would suggest setting hydro_adaptive_grid to False.This is more want we want I guess.

For the error that can occur I would extend the documentation for the descriptor file and d_1 to mention this issue (or even in the error message).