Project

General

Profile

Grand mean using wind speed and binned wind direction from R to CDO?

Added by cole fields over 1 year ago

Hi there,
I was hoping for some guidance on a workflow that I'm translating from existing R code into CDO operations. I'm new to CDO, so still learning the correct operators.

There is a part that I'm stuck on, basically here: https://github.com/obrienjm25/REI-WaveExp/blob/main/Code/4WindData.R#L150 where I'd like to calculate the grand mean (the mean of the monthly means of the daily maximum wind speeds).

This is described in the paper here: https://www.int-res.com/articles/meps/171/m171p109.pdf.

To calculate the first step (daily max), I was initially doing something like this: cdo daymax -chname,wind_spd,daily_max -selvar,wind_spd barkley/HRDPS_OPPwest_ps2.5
km_masked.nc barkley/dailyMax.nc, but that doesn't accound for wanting calculate the daily max for each binned wind direction (45.0 90.0 135.0 180.0 225.0 270.0 315.0 360.0) which is in a variable wind_dir_binned.

Any insight on how I might accomplish this using the CDO operators? The reason for moving outside of R is to test a different source for wind data and the files are too large for processing on my desktop in R and the available script.

Thanks!