Hi all,
I'm a bit confused by the treatment of the d50 parameter in GAIA. By definition, this parameter should be the median of a given grain size distribution (GSD), e.g. 50% of particles are finer and 50% are coarser. However, it seems that in the relevant subroutine (MEAN_GRAIN_SIZE_GAIA), it is instead the geometric mean (sum of each class diameter * its relative fraction). In the case of my GSD with 10 classes of gravel, the median is 7 mm whereas the average is 17 mm, which is a substantial difference when it comes to equations that depend on d50.
To be fair, the user documentation does say that it is the mean grain diameter that is printed out (GAIA user manual, section 6.1). However, many calculations elsewhere in the system depend on the median value, and this is stated in the documentation. In fact, I was confronted with this apparent issue when researching how to calculate a different percentile, in my cas d65 but could also be d16 or d84. Normally, I would calculate these values using post-processing software, but I want to implement a user function that uses these values during the simulation.
I guess my question is, is this a bug or a feature? It seems to me, at least at first glance, that the mean is not always an appropriate substitute for the median.
On a related note, are there existing functions within GAIA or the larger openTELEMAC system that do calculate the median or another percentile (linear interpolation would be fine)? I could try to figure out how to code it, but it would certainly simplify my life if such a function already existed!
Many thanks,
André Renault