Changeset 0f89116 in flex_extract.git for Source/Python/Mods/get_mars_data.py
- Timestamp:
- Dec 19, 2019, 8:07:12 PM (4 years ago)
- Branches:
- master, ctbto, dev
- Children:
- a73c0f6
- Parents:
- 0d99607
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Source/Python/Mods/get_mars_data.py
r44174de r0f89116 70 70 sys.path.append(os.path.dirname(os.path.abspath( 71 71 inspect.getfile(inspect.currentframe()))) + '/../') 72 # pylint: disable=wrong-import-position 72 73 import _config 73 from Mods.tools import (setup_controldata, my_error, normal_exit, get_cmdline_args, 74 read_ecenv, make_dir) 74 from Mods.tools import (setup_controldata, my_error, normal_exit, make_dir) 75 75 from Classes.EcFlexpart import EcFlexpart 76 76 from Classes.UioFiles import UioFiles 77 77 from Classes.MarsRetrieval import MarsRetrieval 78 78 # pylint: enable=wrong-import-position 79 # pylint: disable=invalid-name 79 80 try: 80 81 ec_api = True … … 88 89 except ImportError: 89 90 cds_api = False 91 # pylint: enable=invalid-name 90 92 # ------------------------------------------------------------------------------ 91 93 # FUNCTION … … 223 225 224 226 def 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): 228 243 if ty.upper() == 'FC' and int(ti) == 18: 229 244 return True … … 245 260 246 261 Since for basetime the extraction contains the 12 hours upfront, 247 if basetime is 0, the starting date has to be the day before and262 if basetime is 0, the starting date has to be the day before 248 263 249 264 Parameters
Note: See TracChangeset
for help on using the changeset viewer.