示例#1
0
    logging.info('*****************************************************************************')
    logging.info('***********beginning script populate_prism.py*****************')
    logging.info('*****************************************************************************')

    #populate_temp()

    # get precip data using out db method 
    # (keep files on disk, should have done this with tmin / tmax long ago but didn't know at the time)
    populate_precip()
    # clean_prism_precip_early_and_provisional()

    t1 = time.time()
    logging.info('*****************************************************************************')
    logging.info('***********populate_prism.py finished in %s seconds***********', t1 - t0)
    logging.info('*****************************************************************************')


if __name__ == "__main__":
    logging.basicConfig(filename=log_path + 'populate_prism.log',
                        level=logging.INFO,
                        format='%(asctime)s %(message)s',
                        datefmt='%m/%d/%Y %I:%M:%S %p')
    error_log = get_error_log()

    try:
        main()
    except (SystemExit, KeyboardInterrupt):
        raise
    except:
        error_log.error('populate_prism.py failed to finish: ', exc_info=True)
        populate_six(beginning_of_this_year, today, plants, phenophases,
                     climate_data_provider, region, time_rez)

    t1 = time.time()
    logging.info(
        '*****************************************************************************'
    )
    logging.info(
        '***********gridded_models_nightly_update_ak.py finished in %s seconds***********',
        t1 - t0)
    logging.info(
        '*****************************************************************************'
    )


if __name__ == "__main__":
    logging.basicConfig(filename=log_path +
                        'gridded_models_nightly_update_ak.log',
                        level=logging.INFO,
                        format='%(asctime)s %(message)s',
                        datefmt='%m/%d/%Y %I:%M:%S %p')
    error_log = get_error_log()

    try:
        main()
    except (SystemExit, KeyboardInterrupt):
        raise
    except:
        error_log.error('gridded_models_nightly_update.py failed to finish: ',
                        exc_info=True)