![]() |
NetCDF
4.5.0
|
In order to access an OPeNDAP data source through the netCDF API, the file name normally used is replaced with a URL with a specific format.
The URL is composed of three parts.
It is possible to see what the translation does to a particular DAP data source in either of two ways. First, one can examine the DDS source through a web browser and then examine the translation using the ncdump -h command to see the netCDF Classic translation. The ncdump output will actually be the union of the DDS with the DAS, so to see the complete translation, it is necessary to view both.
For example, if a web browser is given the following, the first URL will return the DDS for the specified dataset, and the second URL will return the DAS for the specified dataset.
Then by using the following ncdump command, it is possible to see the equivalent netCDF Classic translation.
The DDS output from the web server should look like this.
The DAS output from the web server should look like this.
The output from ncdump should look like this.
Note that the fields of type String and type URL have suddenly acquired a dimension. This is because strings are translated to arrays of char, which requires adding an extra dimension. The size of the dimension is determined in a variety of ways and can be specified. It defaults to 64 and when read, the underlying string is either padded or truncated to that length.
Also note that the Facility attributes do not appear in the translation because they are neither global nor associated with a variable in the DDS.
Alternately, one can get the text of the DDS as a global attribute by using the client parameters mechanism . In this case, the parameter “show=dds” can be used, and the data retrieved using the following command
The ncdump -h command will then show both the translation and the original DDS. In the above example, the DDS would appear as the global attribute “_DDS” as follows.