GDL to accesshttps://oco2.gesdisc.eosdis.nasa.gov/opendap/OCO2_L1B_Science.11.2/contents.html

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
tsanah
Posts: 3
Joined: Wed Aug 27, 2025 3:38 pm America/New_York
Answers: 0

GDL to accesshttps://oco2.gesdisc.eosdis.nasa.gov/opendap/OCO2_L1B_Science.11.2/contents.html

by tsanah » Wed Aug 27, 2025 3:44 pm America/New_York

I am trying to access https://oco2.gesdisc.eosdis.nasa.gov/opendap/OCO2_L1B_Science.11.2/contents.html from gdl (an open source of idl), and I have ~/.netrc with my username and password. I can use wget to download data without problem, but when I am in gdl session, I got access denied. Is there anyway I can access the data ?

I am able to download the data but for some reason, gdl does not support hdf5 data with 64bit. This might be a go around way to use the data.

Any help is highly appreciated

Filters:

tsanah
Posts: 3
Joined: Wed Aug 27, 2025 3:38 pm America/New_York
Answers: 0

Re: GDL to accesshttps://oco2.gesdisc.eosdis.nasa.gov/opendap/OCO2_L1B_Science.11.2/contents.html

by tsanah » Fri Aug 29, 2025 12:30 pm America/New_York

Hi many thanks for your help, here is my code and error (access denied). I do have $HOME/.netcr (with username and password, and i can wget data without any problem
GDL> fid = NCDF_OPEN('http://oco2.gesdisc.eosdis.nasa.gov/opendap/OCO2_L1B_Science.11.2/2025/230/oco2_L1bScGL_59193a_250818_B11213_250818141150.h5')
GDL> vid = NCDF_VARID(fid, 'SoundingGeometry_sounding_qual_flag')
% NCDF_VARID: Variable not found "SoundingGeometry_sounding_qual_flag"
GDL> vid = NCDF_VARID(fid, 'SoundingGeometry_sounding_relative_velocity')
GDL> NCDF_VARGET, fid, vid, SoundingGeometry_sounding_relative_velocity
syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR
context: HTTP^ Basic: Access denied.
% NCDF_VARGET: NetCDF: Access failure (NC_ERROR=-77)
% Execution halted at: $MAIN$

GES DISC - emilyz
User Services
User Services
Posts: 13
Joined: Tue Dec 17, 2024 7:46 am America/New_York
Answers: 0

Re: GDL to accesshttps://oco2.gesdisc.eosdis.nasa.gov/opendap/OCO2_L1B_Science.11.2/contents.html

by GES DISC - emilyz » Fri Aug 29, 2025 3:23 pm America/New_York

First we want to make sure that your .dodsrc file is properly generated and stored; that file is what a few older OPeNDAP tools use for referencing authentication files. Please follow the dodsrc steps in this how-to: https://disc.gsfc.nasa.gov/information/howto?keywords=prerequisite&title=How%20to%20Generate%20Earthdata%20Prerequisite%20Files.

tsanah
Posts: 3
Joined: Wed Aug 27, 2025 3:38 pm America/New_York
Answers: 0

Re: GDL to accesshttps://oco2.gesdisc.eosdis.nasa.gov/opendap/OCO2_L1B_Science.11.2/contents.html

by tsanah » Fri Aug 29, 2025 5:44 pm America/New_York

Thanks for the link, but I don't understand how to write .dodsrc and put .netrc path in it

after google search, here what I put at the end of $HOME/.dodsrc

HTTP.NETRC=/home/$USER/.netrc

but i still got access denied

GES DISC - emilyz
User Services
User Services
Posts: 13
Joined: Tue Dec 17, 2024 7:46 am America/New_York
Answers: 0

Re: GDL to accesshttps://oco2.gesdisc.eosdis.nasa.gov/opendap/OCO2_L1B_Science.11.2/contents.html

by GES DISC - emilyz » Tue Sep 02, 2025 11:34 am America/New_York

Be sure to add your absolute path in the file, rather than $USER.
There is also a Python script in that how-to which will do all of that
automatically.

Post Reply