you can get the vectorized version in one line using a comprehension: calcWindAtHeight(v_wind_gnd, Z::AbstractArray) = [calcWindAtHeight(v_wind_gnd,z) for z in Z]
i did a quick test and it seems to be about the same speed/slightly faster than your version. you could also use map and a lambda function: calcWindAtHeight(v_wind_gnd, Z::AbstractArray) = map((z)->calcWindAtHeight(v_wind_gnd,z),Z) this seems to be significantly slower though, so i'd recommend the comprehension. PS: if you do want to do speed tests, you can use the @time macro, just put it in front of your function call
