fimex:faq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
fimex:faq [2016-08-26 12:20:36]
heikok [Why takes linking with ''g++ -g'' ages?]
fimex:faq [2022-05-31 09:29:32] (current)
Line 172: Line 172:
 ==== Authentication ==== ==== Authentication ====
  
-Authentication to opendap servers need to be configured by setup files. Generallyauthentication is described in http://docs.opendap.org/index.php/DAP_Clients_-_Authentication+In theoryit should be possible to specify username and password 
 +  - in ''$HOME/.dodsrc'' and ''$HOME/.netrc'' (see below for an example) 
 +  - as part of the URL for example ''https://XXXX:YYYY@thredds.met.no/thredds/dodsC/....nc''
  
-=== Example === +Example ''$HOME/.netrc''
- +<code> 
-Authentication to the NASA data available to earthdata users https://urs.earthdata.nasa.gov , i.e. GPM datasets http://gpm1.gesdisc.eosdis.nasa.gov/opendap/GPM_L3/GPM_3IMERGHHE.03/2016/236/+machine thredds.met.no
- +
-  * Register a user, get a password and enable the needed application on the earthdata web-pages. Follow the instructions on their pages. +
-  * Make sure you can access the desired data from your browser, e.g. by selecting a small opendap-ASCII dataset. +
-  * Put the username/password in a file named ''.netrc'', e.g. +
-    * ''vi $HOME/.netrc'' <code>machine urs.earthdata.nasa.gov+
     login XXXX     login XXXX
-    password YYYY</code> (Change XXXX with your username and YYYY with your password) +    password YYYY 
-    * make sure the file is only readable by you <code>chmod 600 $HOME/.netrc</code> +</code>
-  * allow fimex/ncdump/opendap-clients to use this .netrc and to store cookies +
-    * ''vi $HOME/.dodsrc'' <code>HTTP.COOKIEJAR=/home/heikok/.cookies +
-HTTP.NETRC=/home/heikok/.netrc</code> (Change /home/heikok with your home directory.) +
-  * test with an inventory of a opendap file <code>ncdump -h http://gpm1.gesdisc.eosdis.nasa.gov/opendap/GPM_L3/GPM_3IMERGHHE.03/2016/236/3B-HHR-E.MS.MRG.3IMERG.20160823-S000000-E002959.0000.V03E.HDF5</code> As you can see here, the data-server is gpm1.gesdisc... while the authentication server is urs.earthdata - this is very confusing but the way it is often implemented. If you don't know the authentication-servers address, you might need to ask the data-provider. +
-  * test with fimex <code>fimex --input.file=http://gpm1.gesdisc.eosdis.nasa.gov/opendap/GPM_L3/GPM_3IMERGHHE.03/2016/236/3B-HHR-E.MS.MRG.3IMERG.20160823-S000000-E002959.0000.V03E.HDF5 --input.type=netcdf --input.printNcML</code> +
- +
  
 +Example ''$HOME/.dodsrc'' (replace ''YOURHOME'' with the value og ''$HOME''):
 +<code>
 +HTTP.NETRC=YOURHOME/.netrc
 +</code>
  
 +Unfortunately, this does not always seem to work as expected.
 +Known status of OpenDAP authentication support (applies to ''fimex'' and ''ncdump''):
 +  * Specifying the password in the URL does not seem to work when the password contains a ''/'', at least for Ubuntu 18.04.
 +  * For Ubuntu 16.04 (xenial, EOL), both URL and netrc seem to work.
 +  * For Ubuntu 18.04 (bionic), username and password cannot be read from netrc, but can be specified in the URL.
 +  * For Ubuntu 20.04 (focal), username and password can only be read from netrc, but cannot be specified in the URL.
  
  • fimex/faq.1472214036.txt.gz
  • Last modified: 2022-05-31 09:23:15
  • (external edit)