Exemplo n.º 1
0
    def _create_coord_list(self):
        """Read file coordinates into a CIS object"""
        from cis.data_io.Coord import Coord, CoordList
        from reame.utils import ncdf_read

        try:
            lon_data, lon_metadata = ncdf_read(self.filenames, "longitude")
            lat_data, lat_metadata = ncdf_read(self.filenames, "latitude")
        except IndexError:
            lon_data, lon_metadata = ncdf_read(self.filenames, "lon")
            lat_data, lat_metadata = ncdf_read(self.filenames, "lat")

        lat = Coord(lat_data, lat_metadata, "Y")
        lat.update_shape()
        lat.update_range()
        lon = Coord(lon_data, lon_metadata, "X")
        lon.update_shape()
        lat.update_range()

        time_data, time_metadata = ncdf_read(self.filenames, "time")
        # Ensure the standard name is set
        time_metadata.standard_name = "time"
        time = Coord(time_data, time_metadata, "T")
        time.convert_TAI_time_to_std_time(ATSR_REFERENCE_TIME)
        time.update_shape()
        time.update_range()

        return CoordList([lat, lon, time])
Exemplo n.º 2
0
    def AOD550(self):
        from reame.utils import aod_without_prior, ncdf_read

        aod_data, aod_metadata = ncdf_read(self.filenames, "AOD550")
        unc_data, _ = ncdf_read(self.filenames, "AOD550_uncertainty")
        typ_data, _ = ncdf_read(self.filenames, "aerosol_type")
        new_aod = aod_without_prior(aod_data, unc_data, typ_data, [-1.0] * 10)
        return new_aod, aod_metadata
Exemplo n.º 3
0
    def AOD870(self):
        from reame.utils import aod_without_prior, ncdf_read

        aod_data, aod_metadata = ncdf_read(self.filenames, "AOD870")
        unc_data, _ = ncdf_read(self.filenames, "AOD870_uncertainty")
        typ_data, _ = ncdf_read(self.filenames, "aerosol_type")
        new_aod = aod_without_prior(aod_data, unc_data, typ_data, [
            -0.951, -0.705, -0.711, -0.715, -0.717, -0.869, -0.960, -0.865,
            -0.706, -0.407
        ])
        return new_aod, aod_metadata
Exemplo n.º 4
0
 def _get_qcmask(self):
     from reame.utils import ncdf_read
     qcdata, _ = ncdf_read(self.filenames, "quality_flag")
     return (qcdata != 1).filled(True)
Exemplo n.º 5
0
 def AOD1600_uncertainty(self):
     from reame.utils import ncdf_read
     return ncdf_read(self.filenames, "AOD1600_uncertainty")
Exemplo n.º 6
0
 def AOD1600(self):
     from reame.utils import ncdf_read
     return ncdf_read(self.filenames, "AOD1600")