cambecc / grib2json

converts GRIB2 files to JSON
MIT License
357 stars 154 forks source link

Order of data values #35

Open tomaszpolska opened 5 years ago

tomaszpolska commented 5 years ago

Supposing there is a data set (small sub-region) as shown below:

{
  "header": {
    "numberPoints": 25,
    "nx": 5,
    "ny": 5,
    "lo1": 20.0,
    "la1": 52.0,
    "lo2": 21.0,
    "la2": 53.0,
    "dx": 0.25,
    "dy": 0.25
  },
  "data": [
    1,    2,    3,    4,    5,    60,    70,    80,    90,    100,    
45,    46,    47,    48,    49,    50,    70,    70,    70,    
70,    70,    70,    70,    70,    70  ]
}

Am I getting right the order of values presented on the attached figure? That is from West to East and from North to South?

grib2json-grid
noalternative commented 5 years ago

Yes, that is correct.

tomaszpolska commented 5 years ago

@noalternative I'm afraid this is wrong. Y values should be from 52.00 to 53.00, I mean Y (lat) should be in ascending order the same way X (lon) is ascending.

noalternative commented 5 years ago

O I am sorry, I didn't notice that. I got confused because you said from north to south and the arrow was also pointing that way. I thought you meant smallest value in the north and biggest in the south.

Sorry I put you on the wrong path

noalternative commented 5 years ago

I use panoplywin to open grib files, and there you can see the values in a table with degrees on the sides