# # C.Schlundt: November, 2014 # import fnmatch import argparse import tarfile from dateutil.rrule import rrule, DAILY from global_config import * from housekeeping import move_files, delete_file from housekeeping import create_dir, delete_dir from pycmsaf.avhrr_gac.database import AvhrrGacDatabase from pycmsaf.argparser import str2date from pycmsaf.logger import setup_root_logger logger = setup_root_logger(name='root') # -- parser arguments parser = argparse.ArgumentParser( description=u'''{0:s} creates tar files per day and per satellite. Global paths and settings are defined in "global_config.py". The subroutines are defined in "housekeeping.py". '''.format(os.path.basename(__file__))) parser.add_argument('-sat', '--satellite', help='String, e.g. NOAA14', required=True) parser.add_argument('-sd', '--start_date', type=str2date, help='Date String, e.g. 20000101', required=True) parser.add_argument('-ed', '--end_date', type=str2date,
import argparse import os import sys import datetime import time import numpy from pycmsaf.logger import setup_root_logger from housekeeping import get_file_list_via_pattern from housekeeping import split_filename from housekeeping import date_from_year_doy from housekeeping import verify_aux_files logger = setup_root_logger(name='sissi') def find_nearest_date(args_pick): """ Find the nearest auxiliary data for current processing month. :param args_pick: command line arguments :return: String (full qualified file) """ # logger.info("Find Auxiliary File for: {0}".format(args_pick)) # reference date ref_date = datetime.datetime(args_pick.year, args_pick.month, args_pick.day, args_pick.hour, args_pick.minute, args_pick.seconds)
#!/usr/bin/env python # -*- coding: utf-8 -*- # import os import argparse from pycmsaf.avhrr_gac.database import AvhrrGacDatabase from pycmsaf.logger import setup_root_logger logdir = os.path.join(os.getcwd(),'log') logger = setup_root_logger(name='root', logdir=logdir, append=True, logfile=True) def get_new_cols(): """ These columns will be added to already existing database providing information about overlapping scanlines and midnight orbit scanline. """ return [#"start_scanline_begcut", "end_scanline_begcut", "start_scanline_endcut", "end_scanline_endcut", "midnight_scanline"] if __name__ == '__main__': add_cols = get_new_cols() # -- arguments parser = argparse.ArgumentParser(
# # C.Schlundt: November, 2014 # import sys import fnmatch import argparse import subprocess import tarfile from pycmsaf.avhrr_gac.database import AvhrrGacDatabase from global_config import * from housekeeping import delete_file from pycmsaf.logger import setup_root_logger logger = setup_root_logger(name='root') # -- parser arguments parser = argparse.ArgumentParser( description='''{0} looks for ready {1:s}<sat>_<yyyymmdd>{2} files to be uploaded into ECFS. However, only if all days of the month were processed successfully, a monthly {3}<sat>_<yyyymm>{4} is written into ECFS containing all daily zipped files. Global paths and settings are defined in "global_config.py". The subroutines are defined in "housekeeping.py". '''.format(os.path.basename( __file__), tar_file_prefix, tar_file_suffix, tar_file_prefix, tar_file_suffix2)) parser.add_argument( '-i',
# # -*- coding: utf-8 -*- # # C. Schlundt, November 2014 # import os import sys import argparse import time import datetime from pycmsaf.logger import setup_root_logger from housekeeping import get_id logger = setup_root_logger(name='sissi') # set ERA-Interim and grid resolution latIncr = 0.72 # ERA-Interim latitude resolution in degrees lonIncr = 0.72 # ERA-Interim longitude resolution in degrees # preprocessing grid is the same as ERA, but in reciprocal notation dellat = round(1./latIncr,7) dellon = round(1./lonIncr,7) def getsat(args_sat): """ Writes config file for dearchiving satellite data. @param args_sat: command line arguments """ global platform try: