Changeset 0f89116 in flex_extract.git for Source/Python/Mods/get_mars_data.py


Ignore:
Timestamp:
Dec 19, 2019, 8:07:12 PM (4 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
a73c0f6
Parents:
0d99607
Message:

diverse changes due to PEP8 style guide and eliminating grib2flexpart; removed unused parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Source/Python/Mods/get_mars_data.py

    r44174de r0f89116  
    7070sys.path.append(os.path.dirname(os.path.abspath(
    7171    inspect.getfile(inspect.currentframe()))) + '/../')
     72# pylint: disable=wrong-import-position
    7273import _config
    73 from Mods.tools import (setup_controldata, my_error, normal_exit, get_cmdline_args,
    74                    read_ecenv, make_dir)
     74from Mods.tools import (setup_controldata, my_error, normal_exit, make_dir)
    7575from Classes.EcFlexpart import EcFlexpart
    7676from Classes.UioFiles import UioFiles
    7777from Classes.MarsRetrieval import MarsRetrieval
    78 
     78# pylint: enable=wrong-import-position
     79# pylint: disable=invalid-name
    7980try:
    8081    ec_api = True
     
    8889except ImportError:
    8990    cds_api = False
     91# pylint: enable=invalid-name
    9092# ------------------------------------------------------------------------------
    9193# FUNCTION
     
    223225
    224226def check_dates_for_nonflux_fc_times(types, times):
    225     '''
    226     '''
    227     for ty, ti in zip(types,times):
     227    '''Checks if the time 18UTC corresponds to forecast field.
     228
     229    Parameters
     230    ----------
     231    types : list of str
     232        List of field types.
     233
     234    times : list of str or str
     235        The time in hours of the field.
     236
     237    Return
     238    ------
     239    True or False
     240
     241    '''
     242    for ty, ti in zip(types, times):
    228243        if ty.upper() == 'FC' and int(ti) == 18:
    229244            return True
     
    245260
    246261    Since for basetime the extraction contains the 12 hours upfront,
    247     if basetime is 0, the starting date has to be the day before and
     262    if basetime is 0, the starting date has to be the day before
    248263
    249264    Parameters
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG