Project

General

Profile

opendap files accessed by http but not by https

Added by emanuele lombardi almost 10 years ago

Good morning from Italy.

I found a small problem in cdo 1.6.4rc4
At beginning cdo could not access any opendap file, but I overcome this adding "-DHAVE_LIBNC_DAP" to CFLAGS in configure.

./configure --with-jasper --with-proj --with-netcdf --with-hdf5 --with-szlib --with-udunits2 -with-grib_api --with-magics=/usr/local --with-libxml2 CC=icc LIBS
=-lstdc++ CFLAGS=-fPIC -DHAVE_LIBNC_DAP

Now my cdo accesses opendap files but only when using http protocol, not https.
It's a pity because I need my THREDDS server to use SSL port 8290.

In the following example (you cat test it by yourself) we see that:
1) cdo succesfully accesses an opendap file by http
2) cdo fails accessing the same opendap file by https
3) ncdump succesfully accesses the same opendap file using https

======================== CDO on HTTP === OK

cdo showdate 'http://www.medcordex.eu:8080/thredds/dodsC/test1/test1.nc'
2010-01-15 2010-02-15 2010-03-15 2010-04-15 2010-05-15 2010-06-15 2010-07-15 2010-08-15 2010-09-15 2010-10-15 2010-11-15 2010-12-15
cdo showdate: Processed 1 variable over 12 timesteps ( 0.01s )

======================== CDO on HTTPS === KO

cdo showdate 'https://www.medcordex.eu:8290/thredds/dodsC/test1/test1.nc'

cdo showdate: Open failed on >https://www.medcordex.eu:8290/thredds/dodsC/test1/test1.nc<
No such file or directory

======================== NCDUMP on HTTPS === OK

ncdump -h 'https://www.medcordex.eu:8290/thredds/dodsC/test1/test1.nc'
netcdf test1 {
dimensions:
time = UNLIMITED ; // (12 currently)
lat = 65 ;
lon = 144 ;
variables:
double lon(lon) ;
lon:standard_name = "longitude" ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;
lon:axis = "X" ;
double lat(lat) ;
lat:standard_name = "latitude" ;
lat:long_name = "latitude" ;
lat:units = "degrees_nort" ;
lat:axis = "Y" ;
double time(time) ;
time:standard_name = "time" ;
time:units = "hours since 1900-01-01 00:00:00" ;
time:calendar = "standard" ;
float zlma(time, lat, lon) ;
zlma:long_name = "PBL Height" ;
zlma:units = "m" ;
zlma:_FillValue = -1.e+09f ;

// global attributes:
:CDI = "Climate Data Interface version 1.5.3 (http://code.zmaw.de/projects/cdi)" ;
:Conventions = "CF-1.4" ;
:history = "Fri Dec 14 10:14:20 2012: cdo splitname appo.nc \n",
"Fri Dec 14 10:14:18 2012: cdo chname,ta,tas,tamin,tasmin,tamax,tasmax,ua,uas,va,vas,tg,ts,qa,huss,rt,pr,et,evspsbl,rnfs,mrro,snow,snd,sh,hfss,lwn,rlns,swn,rsns,lwd,
ppo.nc\n",
"Mon Dec 10 12:00:38 2012: cdo remap,/protheus/RCM/Output/R30_ERAIM_r1i1p5/regcma/POST/MED44/MED44_reg_grid.txt,/protheus/RCM/Output/R30_ERAIM_r1i1p5/regcma/POST/MED
cma/POST/MED44/OUT/SRF_2010.AVG_sg_MED44i.NC\n",
"Mon Dec 10 12:00:37 2012: cdo setgrid,/protheus/RCM/Output/R30_ERAIM_r1i1p5/regcma/POST/MED44/RegCM_grid.txt, /protheus/RCM/Output/R30_ERAIM_r1i1p5/regcma/POST/SRF_
:domxmin = -12.62909f ;
:domxmax = 42.95537f ;
:domymin = 21.29965f ;
:domymax = 61.4488f ;
:domzmin = 1050.f ;
:domzmax = 1050.f ;
:contact = "alessandro.dellaquila@enea.it" ;
:experiment_id = "evaluation" ;
:experiment = "evaluation run with reanalysis forcing" ;
:driving_experiment = "ERA-INTERIM, evaluation, r1i1p1" ;
:driving_model_id = "ERAINT" ;
:driving_model_ensemble_member = "r1i1p1" ;
:driving_experiment_name = "evaluation" ;
:frequency = "month" ;
:institute_id = "ENEA" ;
:institute = "ENEA, Italy" ;
:model_id = "ENEA-REGCM" ;
:project_id = "CORDEX" ;
:CORDEX_domain = "MED44i" ;
:RCM_version_id = "v31" ;
:references = "http://utmea.enea.it/research/PROTHEUS" ;
:product = "output" ;
:creation_date = "2012-12-14" ;
:CDO = "Climate Data Operators version 1.5.3 (http://code.zmaw.de/projects/cdo)" ;
:DODS_EXTRA.Unlimited_Dimension = "time" ;
}


Replies (2)

RE: opendap files accessed by http but not by https - Added by Uwe Schulzweida almost 10 years ago

Hi Emanuele,

I have added the OPeNDAP https support to the next CDO release. A prerelease with this update is available in https://code.zmaw.de/projects/cdo/files.

CDO uses 'nc-config --has-dap' to check whether OPeNDAP is enabled in the netCDF library. Which version of nc-config is used depends on the --with-netcdf flag. Default is the version found from the PATH variable.

Cheers, Uwe

RE: opendap files accessed by http but not by https - Added by emanuele lombardi almost 10 years ago

It works perfectely with 1.6.4rc6 , I also tested providing password in the URL.
Thanks a lot!

Ciao,
Emanuele

    (1-2/2)