From 63294ab99e476c6594cb432e84eedb4b664016f4 Mon Sep 17 00:00:00 2001 From: Nick Bearson Date: Fri, 16 Dec 2022 11:38:08 -0600 Subject: [PATCH] pass the nadir_lon value rather than a one length array to xarray. this fixes an issue where we were seeing a dim_0 dimension added to the nominal_satellite_subpoint_lon variable in the netcdf file output. --- glmtools/io/imagery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glmtools/io/imagery.py b/glmtools/io/imagery.py index 6f2c4bd..14888d1 100644 --- a/glmtools/io/imagery.py +++ b/glmtools/io/imagery.py @@ -108,7 +108,7 @@ def get_goes_imager_subpoint_vars(nadir_lon): sublat = xr.DataArray(0.0, name='nominal_satellite_subpoint_lat', attrs=sublat_meta) sublat.encoding = sublat_enc - sublon = xr.DataArray(nadir_lon, name='nominal_satellite_subpoint_lon', + sublon = xr.DataArray(nadir_lon[0], name='nominal_satellite_subpoint_lon', attrs=sublon_meta) sublon.encoding = sublon_enc return sublon, sublat