I want to read myfile.grb using GribFile from the GRIB package.
using GRIB
GribFile("myfile.grb")
I am defining the path using joinpath, which makes the path adapted to both Windows and Linux. Under Linux (WSL more precisely), everything works fine. Under Windows, I get the following error message:
ERROR: LoadError: Error: Wrong message length
Stacktrace:
[1] errorcheck
@ C:\Users\username\.julia\packages\GRIB\6rlik\src\GRIB.jl:119 [inlined]
[2] GribFile(filename::String; mode::String)
@ GRIB C:\Users\username\.julia\packages\GRIB\6rlik\src\gribfile.jl:32
[3] GribFile(f::var"#9#10"{Vector{DateTime}}, filename::String; mode::String)
@ GRIB C:\Users\username\.julia\packages\GRIB\6rlik\src\gribfile.jl:50
[4] GribFile
@ C:\Users\username\.julia\packages\GRIB\6rlik\src\gribfile.jl:49 [inlined]
What's wrong? How can I solve that?
UPDATE: in
julia\packages\GRIB\6rlik\src\gribfile.jl:32
We have:
err = ccall((:codes_count_in_file, eccodes), Cint, (Ptr{codes_context}, Ptr{File}, Ref{Cint}),C_NULL, f, nref)
The problem most likely commes from eccodes which is not consistently maintained from Windows according to ECMWF who have made eccodes:
https://confluence.ecmwf.int/display/ECC/ecCodes+installation
"Please note: Windows is not a platform that is used for technical work at ECMWF. Therefore we will not be able to support this platform as well as we do for others, such as Linux. For operational use, we strongly advise you to use Linux. If you find problems, we invite the Windows user community to use our new set-up on GitHub to fork/contribute and issue pull request changes. Old Reliable Tech has set up automatic tests and builds for Windows on GitHub, which should ensure continued releases for this platform."
So I will need to get around that. Perhaps I should convert the grb file into something else, maybe txt I will think about that