Welcome, Guest
Username: Password: Remember me

TOPIC: D50 and mean vs median

D50 and mean vs median 1 year 6 months ago #42537

  • Renault
  • Renault's Avatar
  • NOW ONLINE
  • Senior Boarder
  • Posts: 120
  • Thank you received: 33
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
The administrator has disabled public write access.

D50 and mean vs median 1 year 6 months ago #42539

  • mafknaapen
  • mafknaapen's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 157
  • Thank you received: 62
Hi André,
Your observation is correct in that the mean grain size is not a very relevant measure in sediment transport calculations, but it is useful in some other calculations.

However, calculating the median from the modelled fraction is not very meaningful, unless you have a large number of fractions. Just try plotting the median if you have only 2, 3 or even 5 sediment classes; I suspect that it may become valuable at about 10 classes, but I haven't tried yet. and does provide some form of quantification of the variations and changes of the bed composition.

For the actual sediment transport calculations, GAIA is solving these for each sediment class individually. Thus it is using the median grain size per sediment class. I don't think in these calculations, the mean size is used at all.

I am not aware of any TELEMAC code to calculate the median grain size. I agree it would be useful, so if you do code it up, I hope you can share it with the community.

The computations are quite straightforward: Calculate the 'pass rates' by summing the fractions from the smallest class to each class; find the class that lifts the 'pass rate' above 50% and linear interpolate between the 'pass rate' of class and the one below it.
Dr Michiel Knaapen
Senior Scientist
E This email address is being protected from spambots. You need JavaScript enabled to view it.
T +44 (0)1491 822399

HR Wallingford, Howbery Park, Wallingford, Oxfordshire OX10 8BA, United Kingdom
T +44 (0)1491 835381, F +44 (0)1491 832233
www.hrwallingford.com
The administrator has disabled public write access.

D50 and mean vs median 1 year 6 months ago #42540

  • Renault
  • Renault's Avatar
  • NOW ONLINE
  • Senior Boarder
  • Posts: 120
  • Thank you received: 33
Hi Michiel,

Thanks for this insightful response. You're right, the d50 is taken as the given size for each class; I keep forgetting that GAIA calculates for each class individually. In addition, the calculation I am trying to make is also done for each class. In this case, I might cheat a bit and approximate d65 using a constant factor on the geometric mean :)

If I ever do have to calculate an nth percentile using FORTRAN code, I will certainly share that with the forum (as mentioned, I usually do this in post-processing; ParaView among others is excellent for this). The calculation is indeed straightforward, I'm just inexperienced with FORTRAN, let alone the TELEMAC code base which sometimes does things its own way :)

Kind regards,
André Renault
The administrator has disabled public write access.
Moderators: Pablo, pavans

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.