Commit 4007be2
committed
Abort when post_process is given a different grid than the restart files
post_process checks that the restart files exist but never that they hold the
grid the case file asks for. Give it a case whose resolution no longer matches
the run and it reads past the end of every file, post-processes the overrun,
and exits 0 with NaN-filled output. Nothing reports a problem until someone
plots it, or until a diagnostic built on that output starts returning NaN and
gets blamed instead.
That is what happened here: a 349 M cell run (m = 1644) post-processed with a
case file that had since moved to m = 2056, so 681 M cells were read from files
holding 349 M.
x_cb.dat holds exactly m_glb + 2 cell boundaries, so its size states which grid
wrote the restart. The check costs one inquire on a file already being opened,
fires before any bulk read, and names both grids:
Restart grid mismatch: this case has m = 2056 but
.../restart_data/x_cb.dat was written with m = 1644. Post-processing must use
the same grid as the run that wrote the restart files, or it reads past the
end of every file and writes NaN.
Claude-Session: https://claude.ai/code/session_01HMJ7cycfo7kTFSFq5yhHLG1 parent b5715d4 commit 4007be2
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
279 | 281 | | |
280 | 282 | | |
281 | 283 | | |
| |||
290 | 292 | | |
291 | 293 | | |
292 | 294 | | |
293 | | - | |
| 295 | + | |
294 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
295 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
296 | 310 | | |
297 | 311 | | |
298 | 312 | | |
| |||
0 commit comments