Project

General

Profile

Error (cgribexGetGrid) : numberOfPoints (4549003) and gridSize (246768) differ!

Added by Alberto Torres over 12 years ago

Hi

I'm getting this error every time I try to perform any operation on my grib files:

Error (cgribexGetGrid) : numberOfPoints (4549003) and gridSize (246768) differ!

The message is quite straightforward, but the thing is I've used this files before with another software and the contents are ok, so my question is if there is any way to ignore this error or how can I solve it.

Thanks in advance


Replies (5)

RE: Error (cgribexGetGrid) : numberOfPoints (4549003) and gridSize (246768) differ! - Added by Uwe Schulzweida over 12 years ago

Hi Alberto,

could you please attach an example file?

Cheers, Uwe

RE: Error (cgribexGetGrid) : numberOfPoints (4549003) and gridSize (246768) differ! - Added by Alberto Torres over 12 years ago

I attach an example file: 20111022060000_sfc_an00

The gridSizes matches the expected value (the grid is supposed to be 582x424 = 246768) but I have no idea where the value of numberOfPoints is taken from.

Thanks in advance,
Alberto

RE: Error (cgribexGetGrid) : numberOfPoints (4549003) and gridSize (246768) differ! - Added by Uwe Schulzweida over 12 years ago

Hi Alberto,

thanks for the example file. This file contains data on a rotated lonlat grid. Some of the GRIB records are "second order" packed. Second order packing of grid point data is not supported by our GRIB library "CGRIBEX". I will try to improve the error handling for this problem. If I have time I will extent our GRIB library to decode this kind of GRIB records.
A workaround for this problem is to disable GRIB1 encoding/decoding with CGRIBEX. Then you can use the GRIB_API (ECWMF) to encode/decode GRIB1 records with CDO:

./configure --disable-cgribex --with-grib_api=XXX  .....
This is an experimental feature but it work without problems on your GRIB file.

Best regards,
Uwe

RE: Error (cgribexGetGrid) : numberOfPoints (4549003) and gridSize (246768) differ! - Added by Alberto Torres over 12 years ago

Hi,

Thanks, that worked like a charm. If I were to remap that grid to a regular one (not rotated), the operation

cdo remapbil,r582x424 20111022060000_sfc_an00 grib_out

would be correct? I'm not sure what I should put as the number of x-points and y-points for the new grid.

Thnaks in advance

RE: Error (cgribexGetGrid) : numberOfPoints (4549003) and gridSize (246768) differ! - Added by Alberto Torres over 12 years ago

Alberto Torres wrote:

Hi,

Thanks, that worked like a charm. If I were to remap that grid to a regular one (not rotated), the operation

cdo remapbil,r582x424 20111022060000_sfc_an00 grib_out

would be correct? I'm not sure what I should put as the number of x-points and y-points for the new grid.

Thnaks in advance

Nevermind, I've just realized that I can describe my own grid in a text file, es explained in the documentation:

[[https://code.zmaw.de/embedded/cdo/1.5.2/cdo.html#x1-130001.3.2]]

    (1-5/5)