Project

General

Profile

Problem subtracting zonal mean from a field containing missing values

Added by Chris Fletcher over 11 years ago

I am trying to compute zonal anomalies (deviations from the zonal mean) with 4-d (time, lev, lat, lon) data that includes missing values over topography at lower vertical levels (see tmp.nc attached).

When I use this command on the full global field I get an error:
cdo sub tmp.nc -enlarge,tmp.nc -zonmean tmp.nc tmp2.nc

cdo sub: Started child process "enlarge,tmp.nc -zonmean tmp.nc (pipe1.1)".
cdo(2) enlarge: Started child process "zonmean tmp.nc (pipe2.1)".
cdo(2) enlarge (Abort): Missing values unsupported for this operator!

However, when I select a subset of latitudes that does not contain Antarctica the operation works correctly:
cdo sellonlatbox,0,360,-50,90 tmp.nc tmp2.nc
cdo sub tmp2.nc -enlarge,tmp2.nc -zonmean tmp2.nc tmp3.nc

cdo sub: Started child process "enlarge,tmp2.nc -zonmean tmp2.nc (pipe1.1)".
cdo(2) enlarge: Started child process "zonmean tmp2.nc (pipe2.1)".
cdo(2) enlarge: Enlarge zonal
cdo(3) zonmean: Processed 171360 values from 1 variable over 1 timestep. ( 0.00s )
cdo(2) enlarge: Processed 1190 values from 1 variable over 1 timestep. ( 0.00s )
cdo sub: Processed 342720 values from 2 variables over 2 timesteps. ( 0.00s )

So, the problem appears to be with latitude circles that are missing at all longitudes (i.e. there is no valid data to enlarge to). But is there a way to force enlarge to just return a missing value in this case to prevent the command failing? Or perhaps there is another solution so that I can compute zonal anomalies using the full global field?

BTW: I receive the same error with multiple CDO versions on different hardware (1.5.3 -- 1.5.8).

Thanks in advance
Chris

tmp.nc (863 KB) tmp.nc

Replies (1)

RE: Problem subtracting zonal mean from a field containing missing values - Added by Uwe Schulzweida over 11 years ago

Hi Chris,

We have no workaround for this problem. Missing value support for the CDO operator enlarge will be added in the next CDO release. A prerelease version (cdo-current.tar.gz) is available in https://code.zmaw.de/projects/cdo/files.

Best wishes,
Uwe

    (1-1/1)