Measuring diversity of environmental systems