Castronova / EMIT

Environmental Model Integration Project (EMIT)
GNU General Public License v2.0
0 stars 2 forks source link

Optimize Temporal Mapping #189

Open Castronova opened 9 years ago

Castronova commented 9 years ago

Temporal data mapping happens element-wise for every timestamp in a simulation. This becomes prohibitively slow when working with large (gridded) datasets. Since the entire dataset (multidimensional) shares a single date-time array, mapping should only be done of the source and target date-time arrays are not equal. Even then, not all data needs to be mapped...maybe numpy index-based copying of data?

Castronova commented 9 years ago

Take a look at numpy.choose(index_list, array)

http://docs.scipy.org/doc/numpy/reference/generated/numpy.choose.html