FEMME, a flexible environment for mathematically modelling the environment