Project

General

Profile

inconsistence 2 ways to compute wind spped

Added by Noelia Otero over 8 years ago

Hi,

I was calculating wind speed by using the sentence : cdo sqrt -add -sqr u.nc v.nc wind.nc, and I realised that the wind.nc contains some missing values, which is weird since both u.nc and v.nc do not have NA...
Then, I tried to compare the wind file by using:
cdo merge u.nc v.nc components.nc
cdo 'expr,ws=sqrt(u10*u10+v10*v10)' components.nc wind2.nc

And it is different to the first one, and in this case there is no missing values.

I am quite confused about both ways to get the wind speed, why that difference (in some cases significant)? I thought that both expression would do exactly the same ..am I missing something?

Thanks in advance,

cheers,

Noelia


Replies (2)

RE: inconsistence 2 ways to compute wind spped - Added by Jaison-Thomas Ambadan over 8 years ago

the sentence : cdo sqrt -add -sqr u.nc v.nc wind.nc,

I think you miss the sqr on v (-sqr v) in the expression - it should be cdo sqrt -add -sqr u.nc -sqr v.nc wind.nc

I realised that the wind.nc contains some missing values,

since you didn't square the v - subsequent add operation may have resulted negative numbers, and the square-root of that is complex - NaN for CDO

In principle both 'expr' and the command sequence should give the same result.

RE: inconsistence 2 ways to compute wind spped - Added by Noelia Otero over 8 years ago

Hi!

Thanks a lot, that explains the NA... what a mistake! I was spending too much time ...thanks again!!!

cheers,

    (1-2/2)