From fcfad49e3c490aa13d2922cf8dfe9f8702c3ce2a Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 25 Feb 2021 14:00:20 +0200 Subject: [PATCH] Fix the size of the array to be pushed to netcdf --- c_tools/mock/generateMock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_tools/mock/generateMock.cpp b/c_tools/mock/generateMock.cpp index 4c59f88..e36f507 100644 --- a/c_tools/mock/generateMock.cpp +++ b/c_tools/mock/generateMock.cpp @@ -455,7 +455,7 @@ void saveBox(SimuData *&boxed, const std::string& outbox, generateMock_info& arg v.putVar({0}, {size_t(boxed->NumPart)}, particle_id); v2.putVar({0}, {size_t(boxed->NumPart)}, expansion_fac); - v3.putVar({0}, {size_t(boxed->NumPart)}, snapshot_split); + v3.putVar({0}, {size_t(num_snapshots)}, snapshot_split); if (uniqueID != 0) { NcVar v4 = f.addVar("unique_ids_lsb", ncInt, NumPart_dim);