Changeset 0e576fc in flex_extract.git for source/python/classes/EcFlexpart.py
- Timestamp:
- Oct 8, 2018, 3:44:58 PM (6 years ago)
- Branches:
- master, ctbto, dev
- Children:
- 0aaeb04
- Parents:
- ae88f7d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/python/classes/EcFlexpart.py
r5bad6ec r0e576fc 135 135 136 136 if c.maxstep > len(c.type): # Pure forecast mode 137 c.type = [c.type[ 1]]137 c.type = [c.type[0]] 138 138 c.step = ['{:0>3}'.format(int(c.step[0]))] 139 139 c.time = [c.time[0]] … … 155 155 # the initialisation times of the flux fields 156 156 # and therefore are zero all the time) 157 self.types[c.type[1]] = {'times': '00/12', 'steps': 158 '{}/to/12/by/{}'.format(c.dtime, c.dtime)} 157 self.types[str(c.acctype)] = {'times': str(c.acctime), 158 'steps': '{}/to/{}/by/{}'.format( 159 c.dtime, c.accmaxstep, c.dtime)} 159 160 else: 160 161 for ty, st, ti in zip(c.type, c.step, c.time): … … 165 166 btlist = [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0] 166 167 167 if i % int(c.dtime) == 0 and (i in btlist or c.maxstep > 24): 168 if ((ty.upper() == 'AN' and 169 int(c.time[i]) % int(c.dtime) ==0) or 170 (ty.upper() != 'AN' and 171 int(c.step[i]) % int(c.dtime) == 0 and 172 int(c.step[i]) % int(c.dtime) == 0) ) and \ 173 (int(c.time[i]) in btlist or c.maxstep > 24): 168 174 169 175 if ty not in self.types.keys(): … … 191 197 # for gaussian grid retrieval 192 198 self.glevelist = '1/to/' + c.level 193 194 if hasattr(c, 'gaussian') and c.gaussian: 195 self.gaussian = c.gaussian 196 else: 197 self.gaussian = '' 199 self.gaussian = c.gaussian 198 200 199 201 if 'N' in c.grid: # Gaussian output grid … … 239 241 self.params['OG__SL'][0] += '/' + '/'.join(c.addpar) 240 242 241 self.params['OG_OROLSM__SL'] = ["160/27/28/173", \ 242 'SFC', '1', self.grid] 243 if c.marsclass.upper() == 'EA' or c.marsclass.upper() == 'EP': 244 self.params['OG_OROLSM__SL'] = ["160/27/28/244", 245 'SFC', '1', self.grid] 246 else: 247 self.params['OG_OROLSM__SL'] = ["160/27/28/173", \ 248 'SFC', '1', self.grid] 243 249 244 250 self.params['OG__ML'] = ['T/Q', 'ML', self.levelist, self.grid] … … 543 549 if pk == 'OG_OROLSM__SL' and not oro: 544 550 oro = True 545 retr_param_dict['stream'] = 'OPER' 551 # in CERA20C (class EP) there is no stream "OPER"! 552 if self.marsclass.upper() != 'EP': 553 retr_param_dict['stream'] = 'OPER' 546 554 retr_param_dict['type'] = 'AN' 547 555 retr_param_dict['time'] = '00' … … 834 842 values = (np.reshape(values, (nj, ni))).flatten() / fak 835 843 vdp.append(values[:]) # save the accumulated values 836 if step <= int(c.dtime): 844 if c.marsclass.upper() == 'EA' or \ 845 step <= int(c.dtime): 837 846 svdp.append(values[:] / int(c.dtime)) 838 847 else: # deaccumulate values
Note: See TracChangeset
for help on using the changeset viewer.