Project

General

Profile

How to average time series of Wind speeds (with positive and negative values) across multiple years.

Added by Edgar Ubaldo Pena Sanchez over 4 years ago

Hi,

I am having problems to obtain a single "average year": my objective is to "average" hourly wind speeds of 40 years.

My data consists of 38 (from U50_1980.nc to U50_2018.nc) NETCF4 files (one per year) of "U" (or horizontal direction) wind speeds and 40 files more with "V" (or vertical direction).

The problem is that when the direction is opposite towards the U and V convention (west and south direction) the value of the corresponding wind speed becomes negative.

For the purpose of my analysis, the value works the same independently of the positive or negative sign.

I have tried to use the CDO ensmean command but it simply performs the arithmetic average and therefore rests the negative values from the positive in order to get the average value at each time step.

I was wondering if there is special commands I can use for this purpose in order to avoid translate the .nc files into numpy arrays in python. Something like this.

“Take the absolute values of the wind speed at each time step of the “U” (or V) .nc files and return the average of them across the 40 years”

If I can include the elimination of the extra day in the leap years, it will be awesome.

Thank you and sorry for the long explanation. I am kind of new in this field :D


Replies (1)

RE: How to average time series of Wind speeds (with positive and negative values) across multiple years. - Added by Ralf Mueller over 4 years ago

Hi Edgar!

There is the abs operators. Just put it before, i.e. right of the yearmean operator

hth
ralf

    (1-1/1)