Hello.
I am doing my final master’s thesis, here are the problems I am encountering.
- After downloading the sentienel-5P satellite, with this code:
api = SentinelAPI(‘XXXXX’, ‘XXXXX’, ‘https://s5phub.copernicus.eu/dhus’)
map = geojson_to_wkt(read_geojson(‘spainspain.geojson’))
products = api.query(map,
date=(date(2020, 1, 2), date(2020,8, 8)),
producttype=‘L2__NO2___’,
platformname=‘Sentinel-5’)
api.download_all(products)
I manage to download the products with their metadata, I would like to be able to work with them from python i.e. select latitude,longitude, time and nitrogendioxide_tropospheric_column and convert it to dataframe to work.
I am trying this:
data3 = ‘C:/Escritorio/S5P_NRTI_L2__NO2____20210118T140732_20210118T141232_16928_01_010400_20210118T150113.nc’
fh0 = Dataset(data3, mode=‘r’)
lat=(fh0.groups[‘PRODUCT’].variables[‘latitude’])
log=(fh0.groups[‘PRODUCT’].variables[‘latitude’])
time=(fh0.groups[‘PRODUCT’].variables[‘time’])
no2=(fh0.groups[‘PRODUCT’].variables[‘nitrogendioxide_tropospheric_column_precision’])
lat = lat.to_dataframe()
error:
AttributeError: NetCDF: Attribute not found.
In short what I am looking for is to work with sentienel data in dataframe.
Thank you very much.