コード例 #1
0
        CONFIG['JAXAFTP_MP'], 'pub', 'himawari', pLe, product, version,
        mTime.strftime('%Y%m'), mTime.strftime('%d'), mTime.strftime('%H'),
        getH8ProdFile(mTime, product, version=version, pLe=pLe))

    if os.path.exists(ARPFile):
        vis = Visualizer(ARPFile,
                         latRange=CONFIG['LAT_RANGE'],
                         lonRange=CONFIG['LON_RANGE'])

        vis.load_data(variable, mTime)

        try:
            vis.colorplot_with_band(1,
                                    HSD_Dir,
                                    imgFile,
                                    axLatRange=CONFIG['LAT_RANGE'],
                                    axLonRange=CONFIG['LON_RANGE'],
                                    vmin=0,
                                    vmax=1,
                                    pixels=1000)
            logger.info('Export to {0}'.format(imgFile))

            updatedImgs.append([mTime, imgFile])
        except ValueError as e:
            logger.warn(e)
    else:
        logger.warn('ARP file does not exist.\n{0}'.format(ARPFile))

# push to baiduyun
bp = ByPy()
# You need to authorize the app manually at first time.
logger.info('Start to sync items to Baidu Yun!')