From 05238cd1fe43ce0c767ab19a5557d54ff9ff08a0 Mon Sep 17 00:00:00 2001 From: Ben Davies Date: Fri, 6 Sep 2024 14:23:20 +1000 Subject: [PATCH] Add conversion docstring. --- umpost/um2netcdf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/umpost/um2netcdf.py b/umpost/um2netcdf.py index f1a4e76..9515fc1 100644 --- a/umpost/um2netcdf.py +++ b/umpost/um2netcdf.py @@ -738,6 +738,13 @@ def fix_level_coord(cube, z_rho, z_theta, tol=1e-6): def convert_32_bit(cube): + """ + Convert 64 bit int/float data to 32 bit (in place). + + Parameters + ---------- + cube : iris.cube object to modify. + """ if cube.data.dtype == 'float64': cube.data = cube.data.astype(np.float32) elif cube.data.dtype == 'int64':