gravity current implementation