예제 #1
0
def get_encoding_seviri(scene):
    """Get netcdf encoding for all datasets."""
    # Bands
    chunks = (1, 512, 3712)
    encoding = get_encoding(scene,
                            bandnames=BANDNAMES,
                            pps_tagnames=PPS_TAGNAMES,
                            chunks=chunks)

    # Time
    acq_units = scene.attrs['start_time'].strftime(
        'milliseconds since %Y-%m-%d %H:%M')
    encoding['acq_time'] = {
        'units': acq_units,
        'calendar': 'standard',
        '_FillValue': -9999.0
    }
    encoding['time'] = {
        'units': 'days since 2004-01-01 00:00',
        'calendar': 'standard',
        '_FillValue': None,
        'chunksizes': [1]
    }

    return encoding
예제 #2
0
def get_encoding_viirs(scene):
    """Get netcdf encoding for all datasets."""
    return get_encoding(scene,
                        BANDNAMES,
                        PPS_TAGNAMES,
                        chunks=None)