Welcome to the Earthdata Forum! Here, the scientific user community and subject matter experts from NASA Distributed Active Archive Centers (DAACs), and other contributors, discuss research needs, data, and data applications.
import xarray as xr
input_name="Path/To/NetCDF/File"
output_name=input_name + ".flattened.nc4"
ds0 = xr.open_dataset(input_name)
# List of groups in the file (TEMPO L2 specific)
for gn in ['geolocation','product','qa_statistics','support_data']:
try:
ds = xr.open_dataset(input_name, group=gn)
ds0.update(ds)
except:
continue
ds0.to_netcdf(output_name)
We will also share on the Forum if we find additional solutions to using the TEMPO data in QGIS.
by davidglenn » Wed Jun 19, 2024 2:36 pm America/New_York
thank you so much. It worked. I had to upgrade 'pip' and install 'xarray', 'h5netcdf' and 'netcdf4'. So I'll proceed from here. Again thanks for looking into this problem.