Skip to content

ncdump DAP4 response fails to handle the attribute name that contains special characters #3115

@kyang2014

Description

@kyang2014

When using "ncdump -h" to access the following file via DAP4 with dmrpp:
http://test.opendap.org/opendap/GESDISC/S5P_NRTI_L2__O3_TCL_20250320T235705_20250324T222325_38546_03_020701_20250325T000000.nc

It issues the following error(Note: the dmrpp after .nc):

./ncdump -h dap4://test.opendap.org/opendap/GESDISC/S5P_NRTI_L2__O3_TCL_20250320T235705_20250324T222325_38546_03_020701_20250325T000000.nc.dmrpp
(d4meta.c:410) ./ncdump: dap4://test.opendap.org/opendap/GESDISC/S5P_NRTI_L2__O3_TCL_20250320T235705_20250324T222325_38546_03_020701_20250325T000000.nc.dmrpp: NetCDF: Name contains illegal characters

However, the ncdump can access the netCDF-4 file in the local file system.
Further investigation shows that this attribute name":gmd:title" causes the issue.

Note: netCDF-C DAP4 doesn't like the ":"before gmd:title.

After I rename this attribute name from ":gmd:title" to "_gmd:title", I can use netCDF-C DAP4 to dump the header of this file.
See this:

 ./ncdump -h dap4://test.opendap.org/opendap/GESDISC/S5P_NRTI_L2__O3_TCL_20250320T235705_20250324T222325_38546_03_020701_20250325T000000.nc.mod_attr.dmrpp

I am using netCDF-4.9.0 and also the latest check-out from github(4.10.0-development).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions