Search code examples
data-sciencenetcdfnim-lang

Is there any way to work with NetCDF files in Nim?


I've discovered Nim some days ago and am really interested in it.
However, I need to know if I'd able to work with NetCDF files (or at least GRB files) to see if it is suitable for my every-day life.
I've searched the web for some library or code, but couldn't find any, so if anybody knows a way to do it, please let me know.


Solution

  • Possible options (as of September 2020) to work with netcdf files using nim:

    • since netcdf4 is based on hdf5, maybe nimhdf5 could be useful
    • using nimpy bridge to access python libraries that access netcdf, such as netcdf4-python (your local python environment will be a dependency)
    • wrap netcdf C api using tools like c2nim or nimterop