Skip to content

Problem to load netCDF files (having >2 dimensions) with Matlab ncread via OPENDAP

I have issues to load a variable from a netCDF file via OPENDAP with the Matlab function ncread. ncread is built in function in my here used Matlab version 2019a.

The issue is the following: When I try the load a variable with more than 2 dimensions, I only get back zeros. As an example, I post here the link to a data set from the World Ocean Atlas 2013, available on our GEOMAR THREDDS Server.

The Matlab command, which only outputs zeros, is:

However, when I try to load just a reduced cut-out data set, where only the first index of the 3rd dimension is read ("102" --> "1"), it works. So the adapted Matlab command from above, which provides a proper output, is:

Does anyone have an idea, why this is the case?