From a5e0a80a9e63921b0c6d5353403886f4098510f2 Mon Sep 17 00:00:00 2001 From: shaunwbell Date: Tue, 10 Dec 2024 15:10:46 -0800 Subject: [PATCH] Update ARGOS_service_data_converter.py --- ARGOS_service_data_converter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ARGOS_service_data_converter.py b/ARGOS_service_data_converter.py index ec261c3..d1a338f 100755 --- a/ARGOS_service_data_converter.py +++ b/ARGOS_service_data_converter.py @@ -479,6 +479,11 @@ def pandas2netcdf(df=None, ofile="data.nc",isxa=True): pass else: pass + + #xarray casting issue? + for var in xdf.variables: + if xdf[var].dtype == 'float64': + xdf[var] = xdf[var].astype('float32') #global attributes xdf.attrs["CREATION_DATE"] = datetime.now(timezone.utc).strftime("%B %d, %Y %H:%M UTC")