Skip to content

OpenDAP access with Authentication #1042

@kisabaev

Description

@kisabaev

I have been trying to access NC file which requires authentication using the URL option suggested here.

import netCDF4
username = "username" # use your own for testing
password = "password" # use your own for testing

nc_prec_url = "http://{}:{}@dap.ceda.ac.uk/badc/ukcp18/data/land-cpm/uk/2.2km/rcp85/12/pr/1hr/latest/pr_rcp85_land-cpm_uk_2.2km_12_1hr_20671101-20671130.nc".format(username, password)

ds = netCDF4.Dataset(nc_prec_url)

However, I'm getting:

OSError: [Errno -72] NetCDF: Malformed or inaccessible DAP DDS

If I'm doing something wrong, what is the correct way to access NC file which requires Authentication please? Many Thanks!

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