Project

General

Profile

Selecting Variables at Specific Pressure Levels: Select vs. Selvar

Added by Justin Hicks over 3 years ago

Hi all,

I've been trying to select specific variables from GFS forecast output, along with particular pressure levels.

I started off with this:

cdo -selvar,t -sellevel,85000 gfs_3_20171031_0000_000.grb2 Subset_gfs_3_20171031_0000_000.grb2

This seems to work, but I also tried this: cdo -select,name=t -sellevel,85000 gfs_3_20171031_0000_000.grb2 Subset_gfs_3_20171031_0000_000.grb

This works as well. I expected to get the same values when I plotted both versions of the subsetted file, but it looks like the 850-hPa temperatures are slightly different between both files, e.g., 279.218 (K) vs. 279.268 (K) for the first and second methods, respectively, for Portland Oregon. The differences aren't significant, but the errors propagate if I calculate any sort of derived variable.

Why do these two subsetting methods produce slightly different results?


Replies (2)

RE: Selecting Variables at Specific Pressure Levels: Select vs. Selvar - Added by Uwe Schulzweida over 3 years ago

Hi Justin,

These two commands should produce the same results. If not, we need the data file to find the error.
If only one select command is used, the result may be slightly different:

cdo -select,name=t,level=85000 gfs_3_20171031_0000_000.grb2 result
With only one select or sel* command the original GRIB record is preserved. If select or sel* is combined with other commands the GRIB record must be decoded and encoded again. This can lead to small differences.

Cheers,
Uwe

RE: Selecting Variables at Specific Pressure Levels: Select vs. Selvar - Added by Justin Hicks over 3 years ago

My mistake, both commands actually led to the same output. I realized the error arises due to the (default) low precision used (10-bit).

Starting both commands with "cdo -b 64" gives me the result I expected and is equal to the values given in the raw file.

Thanks!

    (1-2/2)