Invalid ID during netcdf writing

2 visualizaciones (últimos 30 días)
Frederikke Hansen
Frederikke Hansen el 30 de Abr. de 2021
I am new to netcdf files, and trying to write a file containing geophysical data. I have 600x2158 datapoints, but each column has a set of coordinates, so my final matrix should be 600x2158x2158. This is large, so I wrote it as an ndSparse matrix. My error arises before I even try to write the ndSparse matrix of my data into the netcdf file. When I try to write the vector of y-coordinates (2158 positions) into the netcdf file, I get the following error:
Error using netcdflib
The NetCDF library encountered an error during execution of
'putVarDouble' function - 'Not a valid ID (NC_EBADID)'.
Error in netcdf.putVar (line 88)
netcdflib(funcstr,ncid,varid,varargin{:});
The same happens if I try to write the 600-position z-vector, or the 2158-position x-vector.
If I try to write the ndSparse data matrix, I just get an error saying the format isn't recognised, so I need to find a solution for that too!
Thanks in advance!

Respuestas (0)

Productos


Versión

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by