We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When creating a file with an unlimited dimension, data is not written properly.
package main import "github.com/fhs/go-netcdf/netcdf" func main() { dataset, _ := netcdf.CreateFile("test.nc", netcdf.NETCDF4 | netcdf.WRITE) dims := make([]netcdf.Dim, 1) dims[0], _ = dataset.AddDim("time", uint64(4)) ncvar, _ := dataset.AddVar("var", netcdf.FLOAT, dims) dataset.EndDef() ncvar.WriteFloat32s([]float32{0.1, 0.2, 0.3, 0.4}) dataset.Close() }
Output of ncdump test.nc:
ncdump test.nc
netcdf test { dimensions: time = UNLIMITED ; // (0 currently) variables: float var(time) ; data: }
However if the time dimension is defined as having a size of uint64(4) instead:
netcdf test { dimensions: time = 4 ; variables: float var(time) ; data: var = 0.1, 0.2, 0.3, 0.4 ; }
Unlimited dimensions are a very useful part of the netCDF specification and it would be great if they were supported.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When creating a file with an unlimited dimension, data is not written properly.
Output of
ncdump test.nc
:However if the time dimension is defined as having a size of uint64(4) instead:
Unlimited dimensions are a very useful part of the netCDF specification and it would be great if they were supported.
The text was updated successfully, but these errors were encountered: