# Module for reading TEMPO L2 data

import h5py
import numpy as np

class read_nc4_TEMPO_NO2():
    def __init__(self, infile):
        #print(infile)
        f = h5py.File(infile,'r')
        self.lat = f['/geolocation/latitude'][:]
        self.lon = f['/geolocation/longitude'][:]
        self.loncnr = f['/geolocation/longitude_bounds'][:]
        self.latcnr = f['/geolocation/latitude_bounds'][:]
        self.trop_no2 = f['/product/vertical_column_troposphere'][:]
        self.qflag = f['/product/main_data_quality_flag'][:]
        self.crf = f['/support_data/amf_cloud_fraction'][:]
        f.close()
