An extreme value model for expressing grain size and bed thickness as functions of the spatial variation of grain frequency