Пример #1
0
def pull(product, year, tile, doy=None, month=None, day=None, step=1):
    kwargs = {
        'tile': list(tile),
        'product': product,
        'log': f'{gwork}/{product}_{year}_{tidy(tile)}_log.txt',
        'db_file': [f'{gwork}/database.db', f'{gwork}/{product}_database.db'],
        'local_dir': f'{gwork}',
        'verbose': True
    }
    # get the data
    print(kwargs)
    modis = Modis(**kwargs)
    #modis.get_data(year,doy=doy,day=day,step=step,month=month)
    modis.stitch(year, doy=doy, day=day, step=step, month=month)
    return modis
Пример #2
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Example script to get all days of data for MCD64A1
for the tiles and year spewcified. 


To run this, simply type:

geog0111/get_lai.py

at the command prompt.
'''

from osgeo import gdal
try:
    from geog0111.modis import Modis
except:
    from modis import Modis
import matplotlib.pyplot as plt

kwargs = {
    'verbose': True,
    'tile': ['h17v03', 'h18v03', 'h17v04', 'h18v04'],
    'product': 'MCD64A1',
}
for year in [2017, 1018, 2019]:
    modis = Modis(**kwargs)
    modis.stitch(year, day=1, month="*")