Child pages
  • Accessing netCDF data via OPeNDAP on password protected servers

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

 

By adding two simple files in your home directory, you can access netCDF files with e.g. Python and Matlab via OPeNDAP without the need to put your credentials in the script.

...

Note: the domain is the part of the url right behind http(s):// until the next / (see also the examples in the links mentioned below).

Warning

It's obvious that you should be conscious of the fact that the .netrc file contains your password in plain text. Don't do this on a public or shared PC.

Code Block
title.dodsrc
HTTP.COOKIEJAR=<your-home-directory>/.cookies
HTTP.NETRC=<your-home-directory>/.netrc

...