netcdf_nif - a simple Erlang NIF wrapper for the NetCDF C library
https://hex.pm/packages/netcdf_nif
Requirements
You need NetCDF (v4) and Erlang. The attached default.nix file
contains a Nix definition to make your dev
experience simpler.
Build
$ rebar3 compileShell
$ rebar3 shellInside the shell you can run test code with:
c(test).
test:run().
This will create a hello.nc file. You can inspect it with
$ ncdump hello.ncElixir
There is also possibility to build an Elixir NIF. Just run
$ mix compile
and the priv/netcdf_nif_ex.so file will be generated. The module's
name is Elixir.NetcdfNif.
You can run the sample inside Elixir repl (iex -S mix) as follows:
c "test.exs"
NetcdfNif.Test.run()