예제 #1
0
PRODUCT_MCR01_500M = "modis_crefl01_500m"
PRODUCT_MCR02_500M = "modis_crefl02_500m"
PRODUCT_MCR03_500M = "modis_crefl03_500m"
PRODUCT_MCR04_500M = "modis_crefl04_500m"
PRODUCT_MCR05_500M = "modis_crefl05_500m"
PRODUCT_MCR06_500M = "modis_crefl06_500m"
PRODUCT_MCR07_500M = "modis_crefl07_500m"

# High resolution (250m band resolution)
PRODUCT_MCR01_250M = "modis_crefl01_250m"
PRODUCT_MCR02_250M = "modis_crefl02_250m"
PRODUCT_MCR03_250M = "modis_crefl03_250m"
PRODUCT_MCR04_250M = "modis_crefl04_250m"

PRODUCTS = ProductDict()
GEO_PAIRS = GeoPairDict()

PAIR_INAV = viirs_module.PAIR_INAV
PAIR_MNAV = viirs_module.PAIR_MNAV
PAIR_1000M = modis_module.PAIR_1000M
PAIR_500M = modis_module.PAIR_500M
PAIR_250M = modis_module.PAIR_250M

GEO_PAIRS[PAIR_INAV] = viirs_module.GEO_PAIRS[PAIR_INAV]
GEO_PAIRS[PAIR_MNAV] = viirs_module.GEO_PAIRS[PAIR_MNAV]
GEO_PAIRS[PAIR_1000M] = modis_module.GEO_PAIRS[PAIR_1000M]
GEO_PAIRS[PAIR_500M] = modis_module.GEO_PAIRS[PAIR_500M]
GEO_PAIRS[PAIR_250M] = modis_module.GEO_PAIRS[PAIR_250M]

# VIIRS CREFL
PRODUCTS[viirs_module.PRODUCT_I_LON] = viirs_module.PRODUCTS[
예제 #2
0

PRODUCT_RAIN_RATE = "mirs_rain_rate"
PRODUCT_BT_90 = "mirs_btemp_90"
PRODUCT_LATITUDE = "mirs_latitude"
PRODUCT_LONGITUDE = "mirs_longitude"

PAIR_MIRS_NAV = "mirs_nav"

PRODUCTS = ProductDict()
PRODUCTS.add_product(PRODUCT_LATITUDE, PAIR_MIRS_NAV, "latitude", FT_IMG, LAT_VAR, description="Latitude", units="degrees")
PRODUCTS.add_product(PRODUCT_LONGITUDE, PAIR_MIRS_NAV, "longitude", FT_IMG, LON_VAR, description="Longitude", units="degrees")
PRODUCTS.add_product(PRODUCT_RAIN_RATE, PAIR_MIRS_NAV, "rain_rate", FT_IMG, RR_VAR, description="Rain Rate", units="mm/hr")
PRODUCTS.add_product(PRODUCT_BT_90, PAIR_MIRS_NAV, "brightness_temperature", FT_IMG, BT_90_VAR, description="Channel Brightness Temperature at 88.2GHz", units="K")

GEO_PAIRS = GeoPairDict()
GEO_PAIRS.add_pair(PAIR_MIRS_NAV, PRODUCT_LONGITUDE, PRODUCT_LATITUDE, 0)

### I/O Operations ###

FILE_STRUCTURE = {
    RR_VAR: ("RR", ("scale", "scale_factor"), None, None),
    BT_90_VAR: ("BT", ("scale", "scale_factor"), None, 88.2),
    FREQ_VAR: ("Freq", None, None, None),
    LAT_VAR: ("Latitude", None, None, None),
    LON_VAR: ("Longitude", None, None, None),
    }


class NetCDFFileReader(object):
    def __init__(self, filepath):
예제 #3
0
# Geolocation "Products"
# These products aren't really products at the moment and should only be used as navigation for the above products
PRODUCT_AERO_LAT = "aero_latitude"
PRODUCT_AERO_LON = "aero_longitude"
PRODUCT_COT_LAT = "cloud_latitude"
PRODUCT_COT_LON = "cloud_longitude"

AOD_PRODUCTS = [
    PRODUCT_AOD_555,
]
COT_PRODUCTS = [
    PRODUCT_AVG_COT,
]

PRODUCTS = ProductDict()
GEO_PAIRS = GeoPairDict()

PAIR_AERO_NAV = "aeronav"
PAIR_COT_NAV = "cotnav"
# Cool, there's no way to get rows per scan from the file
GEO_PAIRS.add_pair(PAIR_AERO_NAV, PRODUCT_AERO_LON, PRODUCT_AERO_LAT, 2)
GEO_PAIRS.add_pair(PAIR_COT_NAV, PRODUCT_COT_LON, PRODUCT_COT_LAT, 2)

# TODO: Add description and units
PRODUCTS.add_product(PRODUCT_AERO_LON, PAIR_AERO_NAV, "longitude",
                     (guidebook.FILE_TYPE_GAERO, guidebook.FILE_TYPE_GAERO),
                     guidebook.K_LONGITUDE)
PRODUCTS.add_product(PRODUCT_AERO_LAT, PAIR_AERO_NAV, "latitude",
                     (guidebook.FILE_TYPE_GAERO, guidebook.FILE_TYPE_GAERO),
                     guidebook.K_LATITUDE)
PRODUCTS.add_product(PRODUCT_COT_LON, PAIR_COT_NAV, "longitude",
예제 #4
0
# Geolocation "Products"
# These products aren't really products at the moment and should only be used as navigation for the above products
PRODUCT_AERO_LAT = "aero_latitude"
PRODUCT_AERO_LON = "aero_longitude"
PRODUCT_COT_LAT = "cloud_latitude"
PRODUCT_COT_LON = "cloud_longitude"

AOD_PRODUCTS = [
    PRODUCT_AOD_555,
]
COT_PRODUCTS = [
    PRODUCT_AVG_COT,
]

PRODUCTS = ProductDict()
GEO_PAIRS = GeoPairDict()

PAIR_AERO_NAV = "aeronav"
PAIR_COT_NAV = "cotnav"
# Cool, there's no way to get rows per scan from the file
GEO_PAIRS.add_pair(PAIR_AERO_NAV, PRODUCT_AERO_LON, PRODUCT_AERO_LAT, 2)
GEO_PAIRS.add_pair(PAIR_COT_NAV, PRODUCT_COT_LON, PRODUCT_COT_LAT, 2)

# TODO: Add description and units
PRODUCTS.add_product(PRODUCT_AERO_LON, PAIR_AERO_NAV, "longitude", (
    guidebook.FILE_TYPE_GAERO, guidebook.FILE_TYPE_GAERO), guidebook.K_LONGITUDE)
PRODUCTS.add_product(PRODUCT_AERO_LAT, PAIR_AERO_NAV, "latitude", (
    guidebook.FILE_TYPE_GAERO, guidebook.FILE_TYPE_GAERO), guidebook.K_LATITUDE)
PRODUCTS.add_product(PRODUCT_COT_LON, PAIR_COT_NAV, "longitude", (guidebook.FILE_TYPE_GCLDO, guidebook.FILE_TYPE_GCLDO), guidebook.K_LONGITUDE)
PRODUCTS.add_product(PRODUCT_COT_LAT, PAIR_COT_NAV, "latitude", (guidebook.FILE_TYPE_GCLDO, guidebook.FILE_TYPE_GCLDO), guidebook.K_LATITUDE)
예제 #5
0
PRODUCT_BAND3B_BT = "band3b_bt"
PRODUCT_BAND4_BT = "band4_bt"
PRODUCT_BAND5_BT = "band5_bt"
PAIR_1KM = "1km_nav"

PRODUCTS = ProductDict()
PRODUCTS.add_product(PRODUCT_LONGITUDE, PAIR_1KM, "longitude", readers.FT_AAPP, readers.K_LONGITUDE, description="Longitude", units="degrees")
PRODUCTS.add_product(PRODUCT_LATITUDE, PAIR_1KM, "latitude", readers.FT_AAPP, readers.K_LATITUDE, description="Latitude", units="degrees")
PRODUCTS.add_product(PRODUCT_BAND1_VIS, PAIR_1KM, "reflectance", readers.FT_AAPP, readers.K_BAND1, description="AVHRR Band 1 visible", units="percent", dependencies=(None,))
PRODUCTS.add_product(PRODUCT_BAND2_VIS, PAIR_1KM, "reflectance", readers.FT_AAPP, readers.K_BAND2, description="AVHRR Band 2 visible", units="percent", dependencies=(None,))
PRODUCTS.add_product(PRODUCT_BAND3A_VIS, PAIR_1KM, "reflectance", readers.FT_AAPP, readers.K_BAND3a, description="AVHRR Band 3A visible", units="percent", dependencies=(None,))
PRODUCTS.add_product(PRODUCT_BAND3B_BT, PAIR_1KM, "brightness_temperature", readers.FT_AAPP, readers.K_BAND3b, description="AVHRR Band 3B brightness temperature", units="Kelvin", dependencies=(None,))
PRODUCTS.add_product(PRODUCT_BAND4_BT, PAIR_1KM, "brightness_temperature", readers.FT_AAPP, readers.K_BAND4, description="AVHRR Band 4 brightness temperature", units="Kelvin")
PRODUCTS.add_product(PRODUCT_BAND5_BT, PAIR_1KM, "brightness_temperature", readers.FT_AAPP, readers.K_BAND5, description="AVHRR Band 5 brightness temperature", units="Kelvin")

GEO_PAIRS = GeoPairDict()
GEO_PAIRS.add_pair(PAIR_1KM, PRODUCT_LONGITUDE, PRODUCT_LATITUDE, 0)


class Frontend(roles.FrontendRole):
    """Polar2Grid Frontend object for handling AVHRR files.
    """
    FILE_EXTENSIONS = [".l1b"]

    def __init__(self, day_fraction=0.10, sza_threshold=100, **kwargs):
        super(Frontend, self).__init__(**kwargs)
        LOG.debug("Day fraction set to %f", day_fraction)
        self.day_fraction = day_fraction
        LOG.debug("SZA threshold set to %f", sza_threshold)
        self.sza_threshold = sza_threshold
        self._day_percentage = {}
예제 #6
0
PRODUCT_SURFPRES = "SurfPres"
PRODUCT_TSURF = "TSurf"
PRODUCT_TOT_WATER = "totH2O"
PRODUCT_TOT_OZONE = "totO3"
# Handle products with multiple levels later on when creating the product definitions
PRODUCT_DEWPOINT = "Dewpnt"
PRODUCT_WATER_MMR = "H2OMMR"
PRODUCT_OZONE_VMR = "O3VMR"
PRODUCT_RELHUM = "RelHum"
PRODUCT_TAIR = "TAir"
# geo products
# This assumes that we will never process more than one instrument at a time
PRODUCT_LON = "Longitude"
PRODUCT_LAT = "Latitude"

GEO_PAIRS = GeoPairDict()
BASE_PAIR = "drrtv_nav"
GEO_PAIRS.add_pair(BASE_PAIR, PRODUCT_LON, PRODUCT_LAT)

PRODUCTS = ProductDict()
FT_DRRTV = "file_type_drrtv"
# file keys are not specified here, they are determined above in another table (from previous version of this frontend)
PRODUCTS.add_product(PRODUCT_CAPE, BASE_PAIR, "CAPE", FT_DRRTV, "CAPE")
PRODUCTS.add_product(PRODUCT_CO2_AMOUNT, BASE_PAIR, "co2_amount", FT_DRRTV,
                     "CO2_Amount")
PRODUCTS.add_product(PRODUCT_COT, BASE_PAIR, "cloud_optical_thickness",
                     FT_DRRTV, "COT")
PRODUCTS.add_product(PRODUCT_CTP, BASE_PAIR, "cloud_top_pressure", FT_DRRTV,
                     "CTP")
PRODUCTS.add_product(PRODUCT_CTT, BASE_PAIR, "cloud_top_temperature", FT_DRRTV,
                     "CTT")
예제 #7
0
PRODUCT_SURFPRES = "SurfPres"
PRODUCT_TSURF = "TSurf"
PRODUCT_TOT_WATER = "totH2O"
PRODUCT_TOT_OZONE = "totO3"
# Handle products with multiple levels later on when creating the product definitions
PRODUCT_DEWPOINT = "Dewpnt"
PRODUCT_WATER_MMR = "H2OMMR"
PRODUCT_OZONE_VMR = "O3VMR"
PRODUCT_RELHUM = "RelHum"
PRODUCT_TAIR = "TAir"
# geo products
# This assumes that we will never process more than one instrument at a time
PRODUCT_LON = "Longitude"
PRODUCT_LAT = "Latitude"

GEO_PAIRS = GeoPairDict()
BASE_PAIR = "drrtv_nav"
GEO_PAIRS.add_pair(BASE_PAIR, PRODUCT_LON, PRODUCT_LAT)

PRODUCTS = ProductDict()
FT_DRRTV = "file_type_drrtv"
# file keys are not specified here, they are determined above in another table (from previous version of this frontend)
PRODUCTS.add_product(PRODUCT_CAPE, BASE_PAIR, "CAPE", FT_DRRTV, "CAPE")
PRODUCTS.add_product(PRODUCT_CO2_AMOUNT, BASE_PAIR, "co2_amount", FT_DRRTV, "CO2_Amount")
PRODUCTS.add_product(PRODUCT_COT, BASE_PAIR, "cloud_optical_thickness", FT_DRRTV, "COT")
PRODUCTS.add_product(PRODUCT_CTP, BASE_PAIR, "cloud_top_pressure", FT_DRRTV, "CTP")
PRODUCTS.add_product(PRODUCT_CTT, BASE_PAIR, "cloud_top_temperature", FT_DRRTV, "CTT")
PRODUCTS.add_product(PRODUCT_CLOUD_EMISSIVITY, BASE_PAIR, "cloud_emissivity", FT_DRRTV, "CldEmis")
PRODUCTS.add_product(PRODUCT_CMASK, BASE_PAIR, "category", FT_DRRTV, "Cmask")
PRODUCTS.add_product(PRODUCT_LI, BASE_PAIR, "lifted_index", FT_DRRTV, "Lifted_Index")
PRODUCTS.add_product(PRODUCT_SURFPRES, BASE_PAIR, "surface_pressure", FT_DRRTV, "SurfPres")