Accessing OPTAA via TDA DataURL fails but HTTP download OK

Trying to read data from THREDDS for the OPTAA instrument at the URL below, I can use the HTTP link to download the full file and read it OK, but trying to access the OPENDAP DataURL inside MATLAB or at the UNIX command line (e.g. ncdump or ncks) I get errors:

This catalog:

This fails:

Error using netcdflib
The NetCDF library encountered an error during execution of ‘open’
function - ‘Not a valid data type or _FillValue type mismatch

ncdump -h (the same DataURL) NetCDF: Not a valid data type or _FillValue type mismatch

I don’t see these data in ERDDAP.

Appending a “#fillmismatch” to the end of the URL may solve the issue.

See line 103:

The ooi-data-explorations repo also contains some MATLAB code for OPTAA data built on top of custom package.

Hopefully this solves your issue.

I dusted off MATLAB and tried to run your code. I am using MATLAB 2022A.
I did not receive a failure associated with netcdflib. I also tested the URL you supplied in Python 3.10 and did not have problems with accessing the data with and without a #fillmismatch. I think this means that there isn’t anything wrong with how the file is structured.

Here is a forum post about #fillmismatch as a potential solution.

Maybe the issue surrounds the version of MATLAB you are using and its netcdf dependencies?

That immediately solved the issue! … both for reading inside MATLAB and in a UNIX shell (ncdump, ncks etc.) so it’s clearly not just a MATLAB thing.

Thanks, John.