Page 2 of 2

Re: TEMPO Proxy NO2 in QGIS

Posted: Tue Jun 18, 2024 1:51 pm America/New_York
by ASDC - ghayescrepps
This python snippet can be used to flatten a TEMPO file, if you would like to try it:

Code: Select all

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.

Re: TEMPO Proxy NO2 in QGIS

Posted: Wed Jun 19, 2024 2:36 pm America/New_York
by davidglenn
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.