Error using matlab.int​ernal.imag​esci.netcd​flib

3 views (last 30 days)
Error using matlab.internal.imagesci.netcdflib
The length of the START argument for climatology_bounds must be 2 instead of 3.
Error in netcdf.getVar (line 182)
data = matlab.internal.imagesci.netcdflib(funcstr,ncid,varid,varargin{:});

Answers (1)

Walter Roberson
Walter Roberson on 21 Jun 2023

You asked to read a variable from a netcdf file, and you passed a list of starting offsets for the reading. However, you passed a vector of three starting offsets for a 2d variable.

This might have been a simple typo on your part, but it potentially indicates a significant misunderstanding of what that particular variable is. And it is also possible that you have good reasons to expect a 3d variable there but this particular file might have only 2d. (For example if the various files broke the data up by decade then you could end up with the last one only having a single year stored)

Tags

Community Treasure Hunt

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

Start Hunting!