Changeset e446e85 in flex_extract.git


Ignore:
Timestamp:
Mar 1, 2019, 10:37:18 PM (8 weeks ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
dev
Children:
8778c5a
Parents:
e811e1a
Message:

added functionality to eliminate unnecessary data/times

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/python/classes/EcFlexpart.py

    r45b99e6 re446e85  
    13771377        '''
    13781378
     1379        # generate start and end timestamp of the retrieval period
     1380        start_period = datetime.strptime(c.start_date + c.time[0], '%Y%m%d%H')
     1381        start_period = start_period + timedelta(hours=int(c.step[0]))
     1382        end_period = datetime.strptime(c.end_date + c.time[-1], '%Y%m%d%H')
     1383        end_period = end_period + timedelta(hours=int(c.step[-1]))
     1384
    13791385        if c.wrf:
    13801386            table128 = init128(_config.PATH_GRIBTABLE)
     
    14421448            timestamp += timedelta(hours=int(cstep))
    14431449            cdate_hour = datetime.strftime(timestamp, '%Y%m%d%H')
     1450
     1451            # eliminate all temporary times
     1452            # which are outside the retrieval period
     1453            if timestamp < start_period or \
     1454               timestamp > end_period:
     1455                continue
    14441456
    14451457            # if the timestamp is out of basetime start/end date period,
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG