error accessing HYCOM data via OpenDAP

346 views
Skip to first unread message

Li, P Peggy (398F)

unread,
Jun 23, 2013, 10:33:51 PM6/23/13
to fo...@hycom.org, Li, P Peggy (398F)
Hi, I have been getting the HYCOM data from your OpenDAP server using Matlab.  Recently (for about 10 days),  I got an error when I tried to access your dataset, did you change the file format and the variable types recently?  The one I am accessing is teh GLBa0.08/expt_90.9 at http://tds.hycom.org/thredds/dodsC/GLBa0.08expt_90.9.  The commands I used in Matlab are as follows:

>> ncid = netcdf.open (opendap_url);
>> vid=netcdf.inqVarID(ncid,'MT');

>> data=netcdf.getVar(ncid,vid)
Error using netcdflib
The NetCDF library encountered an error during execution of 'getVarDouble' function - 'Malformed or inaccessible DAP DATADDS
(NC_EDATADDS)'. If the data source was an  OPeNDAP URL, see the OPeNDAP Troubleshooting section in the Users Guide.

Error in netcdf.getVar (line 137)
    data = netcdflib(funcstr,ncid,varid,varargin{:});
 
MT is set as 64bit REAL.  I tried to access other variables of 32bit REAL, I am able to get the data without problem.  Do you know what could be the problem?  Is it related how your OpenDAP server is configured?

Thank you very much for your help.

Peggy Li
Jet Propulsion Laboratory

Michael McDonald

unread,
Jun 25, 2013, 1:04:26 PM6/25/13
to Li, P Peggy (398F), fo...@hycom.org
Peggy,
We have updated our THREDDS catalogs so that there is more subsetting
at the variable and time levels,

see here,
http://tds.hycom.org/thredds/GLBa0.08/expt_90.9.html

Trying to load the entire GLBa0.08/expt_90.9 model/experiment into
Matlab does not work for a lot of users. The reason for this is there
are currently over 900 days of data in this experiment, and each
experiment contains several variable groupings spread across 5
individual files (e.g., _2d.nc, _salt.nc, _temp.nc, _uvel.nc,
_vvel.nc). So when you OPeNDAP request then entire expt_90.9
experiment you are in essence touching/opening 4500 NetCDF files at
once, which can take time or be interrupted for numerous reasons
(catalog updates, new data files appending to the experiment, hundreds
of other users doing the exact same thing, etc.).

So, to help thwart the above issues, it is recommended that you use an
OPeNDAP URL that is "tailored" as close to what you actually want to
query in Matlab. This way the server will only be returning back "what
you need".

We have even setup a "latest" catalog for querying the 10-latest days
in the GLBa0.08/expt_90.9 experiment here (it is updated more
frequently to contain the latest and greatest files),

http://tds.hycom.org/thredds/GLBa0.08/latest.html

btw, alternatively you should check out http://latest.hycom.org/ as a
failover access method (we don't to aggregations on this
latest.hycom.org yet. all access methods use individual files).

Since this "latest.html" catalog has very few files to query, the
response times will be much quicker (assuming you need access to the
latest 10 days of data).

/mike
> --
> --
> You received this message because you are a member of HYCOM.org
> To ask a question, send an email to fo...@hycom.org
>
>
>
Reply all
Reply to author
Forward
0 new messages