geoclaw
geoclaw copied to clipboard
Better error checking if fgmax grids change on restart
On a restart, the routine geoclaw/src/2d/shallow/restrt.f
reads in fgmax arrays from the previous run so that max values can continue to be updated. It is assumed that the restart has exactly the same set of fgmax grids as the original run, but this isn't checked. I just spent too long debugging a case where I tried to specify a different set of fgmax grids in the restart than the original run. It was hard to find because the new run had the same number and size of arrays but in different locations, so it didn't die in restart.f
but in an obscure way later when calculating indexes into a patch.
Maybe we should also checkpoint FG_num_fgrids
, the number of fgmax grids, and then when reading in also check that fg%x
and fg%y
agree with what was set in the new run.