From e23de11b5bcbfca29d75f6363544a2231660af13 Mon Sep 17 00:00:00 2001
From: Marco Morandini <marco.morandini@polimi.it>
Date: Thu, 26 Sep 2024 11:58:06 +0200
Subject: [PATCH 1/2] bump netcdf c version

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9162a7ef8..e61a3d68c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -418,7 +418,7 @@ variables:
     description: "Repository of the NetCDF library (https://www.unidata.ucar.edu/software/netcdf) to be cloned"
 
   NETCDF_C_BRANCH:
-    value: "v4.9.0"
+    value: "v4.9.2"
     description: "Branch of the NetCDF library (https://www.unidata.ucar.edu/software/netcdf) to be pulled"
 
   NETCDF_CXX4_REPOSITORY:
-- 
GitLab


From cea6e118f5d282a26c613d72ef557dc43422b223 Mon Sep 17 00:00:00 2001
From: Marco Morandini <marco.morandini@polimi.it>
Date: Thu, 26 Sep 2024 16:24:22 +0200
Subject: [PATCH 2/2] numpy 2.0

---
 libraries/libmbc/mbc_py_global.i | 54 ++++++++++++++++----------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/libraries/libmbc/mbc_py_global.i b/libraries/libmbc/mbc_py_global.i
index 2ae36acb1..c3987dbff 100644
--- a/libraries/libmbc/mbc_py_global.i
+++ b/libraries/libmbc/mbc_py_global.i
@@ -37,7 +37,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_r_k_label_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_UINT,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_UINT,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -57,7 +57,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_r_x_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -77,7 +77,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_r_theta_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -97,7 +97,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_r_r_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -117,7 +117,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_r_euler_123_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -137,7 +137,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_r_xp_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -157,7 +157,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_r_omega_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -177,7 +177,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_r_xpp_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -197,7 +197,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_r_omegap_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -217,7 +217,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_r_d_label_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_UINT,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_UINT,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -237,7 +237,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_r_f_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -257,7 +257,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_r_m_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -277,7 +277,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] =  mbc_n_k_labels_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_UINT,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_UINT,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -297,7 +297,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_n_x_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -317,7 +317,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_n_theta_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -337,7 +337,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_n_r_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -357,7 +357,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_n_euler_123_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -377,7 +377,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_n_xp_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -397,7 +397,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_n_omega_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -417,7 +417,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_n_xpp_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -437,7 +437,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_n_omegap_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -457,7 +457,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] =  mbc_n_d_labels_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_UINT,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_UINT,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -477,7 +477,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_n_f_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -498,7 +498,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_n_m_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -518,7 +518,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_m_q_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -538,7 +538,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_m_qp_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
@@ -558,7 +558,7 @@
                 PyArrayObject *tmp;
                 npy_intp dims[1];
                 dims[0] = mbc_m_p_size;
-                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,PyArray_DOUBLE,(char *)$1);
+                tmp = (PyArrayObject *)PyArray_SimpleNewFromData(1,dims,NPY_DOUBLE,(char *)$1);
                 $result = (PyObject *)tmp;
         }
 }
-- 
GitLab