From 36f87f53a848f699a0b2019bd1dc29753d8886f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20DALL=27ASTA?= <f.dallasta1999@gmail.com>
Date: Sun, 14 May 2023 13:17:59 +0200
Subject: [PATCH] convert single to double precision hdf5 data

---
 webgeodyn/inout/pygeodyn_hdf5.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webgeodyn/inout/pygeodyn_hdf5.py b/webgeodyn/inout/pygeodyn_hdf5.py
index b591452..b05792d 100644
--- a/webgeodyn/inout/pygeodyn_hdf5.py
+++ b/webgeodyn/inout/pygeodyn_hdf5.py
@@ -33,9 +33,10 @@ def load(dataDirectory, dataModel, keepRealisations, state_type='analysed'):
     with h5py.File(hdf_filename) as hdf_file:
         computed_data = hdf_file[state_type]
 
-        times = np.array(computed_data['times'])[firstpoint:]
+        times = np.array(computed_data['times'], dtype="float64")[firstpoint:]
 
         for measureName, measureData in computed_data.items():
+            measureData = np.float64(measureData) # Convert to float64
             if measureName not in measures_to_load:
                 continue
             else:
-- 
GitLab