Code now interfaces with PISM, seems to run OK