New PR merged, WRF, TsVector operations, and doctest suite upgrade

5 views
Skip to first unread message

sigbjorn.helset

unread,
May 21, 2017, 7:29:46 PM5/21/17
to shyft
Hi,

Just to notify all about recent progress and functionality added:

WRF netcdf geo-ts-repositories added:

This allow users to easily integrate WRF formatted netcdf files into Shyft,
Thanks to UIO, Felix and Francesc Alted for the work and contribution


Ref. to test-suite in python for specific usage (it works like standard Shyft repositories, implementing the interface).



TsVector supports math operators, with scalars and time-series

This PR adds mathematical operations on the existing TsVector class.

Practical use has proven that this feature will increase speed, and allow building on abstraction(expressions, vector of expressions), and avoid deflating into numpy-arrays to early.

E.g.:

a= TsVector()
b= TsVector()
:  # add some time-series to a and b here
c = TimeSeries(...)  # ts  vs. vector is also supported
ta = TimeAxis(...) # some time-axis

d = (a*b + c)*3.5  # a x b is vector x vector,  + c is vector + ts, ()*3.5 is vector x scalar

p = d.percentiles(ta,stat_spec)   # as usual vector supports percentiles
d_avg = d.average(ta)  # applies average to all ts in d-vector
d_sft  = d.time_shift(deltahours(24))   #  time-shift all time-series in d by 24h
d_acc = d.accumulate(ta)  #  generate the accumulate function for each ts in vector d
d_int  = d.integral(ta)  # integral of ts, over intervals given by ta

d_slice = d.slice(IntVector([1,2,10,11,12]))  # support for slicing, picking specified indexes->TsVector
Reply all
Reply to author
Forward
0 new messages