Changeset a4531f1 in flex_extract.git


Ignore:
Timestamp:
Dec 7, 2018, 4:09:42 PM (5 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
e5884c9
Parents:
4d3b052
Message:

exchanged all if conditions for pure fc from 'maxstep > < 12/24' into purefc(==True)

Location:
source/python
Files:
3 edited

Legend:

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

    rc274d9a ra4531f1  
    132132
    133133        # Pure forecast mode
    134         if c.maxstep > len(c.type) and 'AN' not in c.type:
     134        if c.purefc:
    135135            c.type = [c.type[0]]
    136136            c.step = ['{:0>3}'.format(int(c.step[0]))]
     
    146146        self.dtime = c.dtime
    147147        i = 0
    148         if fluxes and c.maxstep <= 24:
     148        if fluxes and not c.purefc:
    149149            self.types[str(c.acctype)] = {'times': str(c.acctime),
    150150                                          'steps': '{}/to/{}/by/{}'.format(
     
    161161                    (ty.upper() != 'AN' and (int(c.step[i]) % int(c.dtime)) == 0 and
    162162                     (int(c.step[i]) % int(c.dtime) == 0)) ) and \
    163                     (int(c.time[i]) in btlist or c.maxstep > 24):
     163                    (int(c.time[i]) in btlist or c.purefc):
    164164
    165165                    if ty not in self.types.keys():
     
    800800            t_enddate = None
    801801
    802             if c.maxstep > 12:
     802            if c.purefc:
    803803                fnout = os.path.join(c.inputdir, 'flux' +
    804804                                     t_date.strftime('%Y%m%d.%H') +
     
    885885                            values = disaggregation.dapoly(deac_vals[parId])
    886886
    887                         if not (step == c.maxstep and c.maxstep > 12 \
     887                        if not (step == c.maxstep and c.purefc \
    888888                                or t_dt == t_enddate):
    889889                            # remove first time step in list to shift
     
    894894                        # if the third time step is read (per parId),
    895895                        # write out the first one as a boundary value
    896                         if c.maxstep > 12:
     896                        if c.purefc:
    897897                            values = deac_vals[parId][1]
    898898                        else:
     
    902902                        codes_set_values(gid, values)
    903903
    904                         if c.maxstep > 12:
     904                        if c.purefc:
    905905                            codes_set(gid, 'stepRange', max(0, step-2*int(c.dtime)))
    906906                        else:
     
    919919                            # squeeze out information of last two steps contained
    920920                            # in deac_vals[parId]
    921                             # if step+int(c.dtime) == c.maxstep and c.maxstep>12
     921                            # if step+int(c.dtime) == c.maxstep and c.purefc
    922922                            # or t_dt+timedelta(hours = int(c.dtime))
    923923                            # >= t_enddate:
    924924                            # Note that deac_vals[parId][0] has not been popped in this case
    925925
    926                             if step == c.maxstep and c.maxstep > 12 or \
     926                            if step == c.maxstep and c.purefc or \
    927927                               t_dt == t_enddate:
    928928
     
    11711171#============================================================================================
    11721172            # create name of final output file, e.g. EN13040500 (ENYYMMDDHH)
    1173             if c.maxstep > 12:
     1173            if c.purefc:
    11741174                suffix = cdate[2:8] + '.' + ctime + '.' + cstep
    11751175            else:
  • source/python/mods/get_mars_data.py

    r3f36e42 ra4531f1  
    259259            start = start - timedelta(days=1)
    260260
    261     if c.maxstep <= 24 and fluxes:
     261    if not purefc and fluxes:
    262262        start = start - timedelta(days=1)
    263263        end = end + timedelta(days=1)
  • source/python/submit.py

    rff2a11c ra4531f1  
    132132    if not c.basetime:
    133133    # --------- create on demand job script ------------------------------------
    134         if c.maxstep > 24:
     134        if c.purefc:
    135135            print('---- Pure forecast mode! ----')
    136136        else:
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG