Project

General

Profile

cdo collgrid loses horizontal coordinate variables

Added by Fredrik Jansson about 2 years ago

Hi, I'm using cdo collgrid to merge netCDF files from an LES model, which creates it's output in horizontal tiles. I'm using cdo 2.0.3 on Arch Linux. The data comes from DALES, https://github.com/dalesteam/dales .

I have two problems:
1) in the merged file, the horizontal coordinate variables (xt, xm, yt, ym) are missing.
2) if I don't specify the number of tiles in X, all tiles get merged in a single row

The grid is cartesian, and if I understand the documentation right cdo should handle this without having to specify NX. One possible complication is that the model uses a staggered grid, so different variables use different coordinate variables. xt,yt are cell centers while xm, ym are on cell borders.

Here is an example with 2 x 2 tiles, files attached.

cdo collgrid crossxy.0002.*.nc merged-crossxy.nc
# all tiles are merged horizontally, xt,yt,xm,ym missing

# explicitly specify 2 tiles in X direction
cdo collgrid,2 crossxy.0002.x000y000.001.nc crossxy.0002.x001y000.001.nc  crossxy.0002.x000y001.001.nc  crossxy.0002.x001y001.001.nc merged-crossxy2.nc
# xt,yt,xm,ym missing

Replies (2)

RE: cdo collgrid loses horizontal coordinate variables - Added by Uwe Schulzweida about 2 years ago

Dear Fredrik,

The Operator collgrid supports only geographic coordinates. In the new CDO version 2.0.4 also coordinates of projections are supported. So it should work without any problems with this release.

Cheers,
Uwe

RE: cdo collgrid loses horizontal coordinate variables - Added by Fredrik Jansson about 2 years ago

Dear Uwe,

Thank you! I tried with version 2.0.4 and it works perfectly with the DALES files: coordinate variables are preserved and I no longer have to specify the tiles in the right order. This is very helpful!

Best,
Fredrik

    (1-2/2)