spidru / JGribX

Java GRIB-1/GRIB-2 decoder
MIT License
34 stars 14 forks source link

Cant Read this type grib1 files #18

Closed binu8051 closed 2 years ago

binu8051 commented 2 years ago

Hi i cant read this grib file. Can you please check it https://github.com/spidru/JGribX/files/8329778/global-wind-wave.zip

Here is the grib record output.

GRIB record:
    IS section:
        Grib Edition 1
        length: 209505 bytes
    PDS header:
        center: 0
        subcenter: 0
        table: 255
        grid_id: 255
        time: 22.3.2022  0:0 (dd.mm.yyyy hh:mm) 
        Type: missing
        Description: missing parameter
        Unit: 
        table version: 255
        Level description:
            parameter id: 1
            name: ground or water surface
            description: ground or water surface
            units: 
            short descr: SFC
            increasing up?: true
            single layer?: true
            value1: NaN
            value2: NaN
        dec.scale: 0
        GDS exists
        BMS exists
    GDS section:
        LatLon Grid  (366x367)
        lon: 61.2 to 97.7  (dx 0.1)
        lat: -7.7 to 28.9  (dy 0.1)
    BMS section:
        bitmap length: 134322
    BDS section:
        min/max value: -1.6407833 1.4991093
        ref. value: -1.6407833
        is a constant: false
        bin. scale: -14
        num bits: 16
spidru commented 2 years ago

Hi @binu8051, apologies for the delay in my reply, I've been on vacation.

It seems like the parameters in this GRIB file are currently not supported by JGribX. You can see a list of currently supported parameters here: https://github.com/spidru/JGribX/blob/master/doc/SUPPORTED_PARAMETERS.md

I'll look into it in more detail this week.

binu8051 commented 2 years ago

Thanks, please look into it.

spidru commented 2 years ago

Hi @binu8051,

It seems like the file you've provided contains a value of 255 (i.e. missing) for the parameter table version in each record. Currently, JGribX handles this by considering the parameter within that record as missing. However, if I fall back to the default parameter table instead, it seems to pick up parameters that make sense. Could you try out the below JAR file?

https://output.circle-artifacts.com/output/job/b2f60f41-07b0-4f5f-9995-caa5f000e3c6/artifacts/0/build/libs/JGribX.jar

binu8051 commented 2 years ago

Hi, i have added the project file with my project to use as i told here https://github.com/spidru/JGribX/issues/17#issuecomment-1066053875

Can you provide the changed project code so i can test it. Thanks for your time.

spidru commented 2 years ago

Hi @binu8051,

I'm afraid I did not quite understand your question. Could you please elaborate?