Changeset d43706b in flex_extract.git
 Timestamp:
 Nov 24, 2018, 4:03:00 PM (10 months ago)
 Branches:
 dev
 Children:
 1244a7b
 Parents:
 2f5ca80
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

source/python/classes/EcFlexpart.py
r2e62398 rd43706b 424 424 for key in index_keys: 425 425 key_vals = codes_index_get(iid, key) 426 print(key_vals) 427 # have to sort the steps for disaggregation, 426 # have to sort the key values for correct disaggregation, 428 427 # therefore convert to int first 429 if key == 'step': 430 key_vals = [int(k) for k in key_vals] 431 key_vals.sort() 432 key_vals = [str(k) for k in key_vals] 428 key_vals = [int(k) for k in key_vals] 429 key_vals.sort() 430 key_vals = [str(k) for k in key_vals] 433 431 index_vals.append(key_vals) 434 432 # index_vals looks for example like: … … 762 760 # ( date ,time, step) 763 761 764 print(' current product: ', prod)762 print('CURRENT PRODUCT: ', prod) 765 763 766 764 for i in range(len(index_keys)): … … 860 858 861 859 if c.maxstep > 12: 862 codes_set(gid, 'step ', max(0, step2*int(c.dtime)))860 codes_set(gid, 'stepRange', max(0, step2*int(c.dtime))) 863 861 else: 864 codes_set(gid, 'step ', 0)862 codes_set(gid, 'stepRange', 0) 865 863 codes_set(gid, 'time', t_m2dt.hour*100) 866 864 codes_set(gid, 'date', int(t_m2dt.strftime('%Y%m%d'))) … … 887 885 values = svdp[3] 888 886 codes_set_values(gid, values) 889 codes_set(gid, 'step ', 0)887 codes_set(gid, 'stepRange', 0) 890 888 truedatetime = t_m2dt + timedelta(hours= 891 889 2*int(c.dtime)) … … 902 900 values = disaggregation.dapoly(list(reversed(svdp))) 903 901 904 codes_set(gid, 'step ', 0)902 codes_set(gid, 'stepRange', 0) 905 903 truedatetime = t_m2dt + timedelta(hours=int(c.dtime)) 906 904 codes_set(gid, 'time', truedatetime.hour * 100)
Note: See TracChangeset
for help on using the changeset viewer.