From 16aba920dbed1e8fec5450738a93434bf187b619 Mon Sep 17 00:00:00 2001 From: Knut-Frode Dagestad Date: Fri, 15 Mar 2024 12:26:36 +0100 Subject: [PATCH] Changing unit from days to Days for biodegradation rate, otherwise Xarray tries to parse as datetime64, with error --- opendrift/models/openoil/openoil.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opendrift/models/openoil/openoil.py b/opendrift/models/openoil/openoil.py index 0caccbdee..9785f9603 100644 --- a/opendrift/models/openoil/openoil.py +++ b/opendrift/models/openoil/openoil.py @@ -171,11 +171,11 @@ class Oil(Lagrangian3DArray): 'seed': False, 'default': 0 }), - ('biodegradation_half_time_droplet', - {'dtype': np.float32, 'units': 'days', 'seed': False, 'default': 1, + ('biodegradation_half_time_droplet', # Note: if unit is "days", Xarray tries to decode as datetime with error + {'dtype': np.float32, 'units': 'Days', 'seed': False, 'default': 1, 'description': 'Biodegradation half time in days for submerged oil droplets'}), ('biodegradation_half_time_slick', - {'dtype': np.float32, 'units': 'days', 'seed': False, 'default': 3, + {'dtype': np.float32, 'units': 'Days', 'seed': False, 'default': 3, 'description': 'Biodegradation half time in days for surface oil slick'}), ('fraction_evaporated', { 'dtype': np.float32,