From e58e6982b7b122d3451eb3b7314498fecc5bfd13 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 4 Oct 2024 01:26:47 +0200 Subject: [PATCH] update grid var to post subsampling --- pdebench/models/fno/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdebench/models/fno/utils.py b/pdebench/models/fno/utils.py index 6ad16af..03f45eb 100644 --- a/pdebench/models/fno/utils.py +++ b/pdebench/models/fno/utils.py @@ -351,7 +351,7 @@ def __init__(self, filename, gridx, gridy = np.array(f['0023']['grid']['x'], dtype=np.float32), np.array(f['0023']['grid']['y'], dtype=np.float32) mgridX, mgridY = np.meshgrid(gridx, gridy, indexing='ij') _grid = torch.stack((torch.from_numpy(mgridX), torch.from_numpy(mgridY)), axis=-1) - grid = _grid[::reduced_resolution, ::reduced_resolution, ...] + _grid = _grid[::reduced_resolution, ::reduced_resolution, ...] _tsteps_t = torch.from_numpy(np.array(f['0023']['grid']['t'], dtype=np.float32)) tsteps_t = _tsteps_t[::reduced_resolution_t] self.data = _data