Closed tremou closed 2 months ago
I don't know about the Belgian site but the access code for CDDIS is from somewhere back in the Stone Age. To access CDDIS you have to now
a) sign up and create an account for yourself at https://urs.earthdata.nasa.gov/ b) in your home directory create a file named .netrc which contains machine urs.earthdata.nasa.gov login xxxxxx password yyyyyy where xxxxxx and yyyyyy are the login name and password you created in step a
c) you will then need some Python 3 code similar to what is shown on the cddis page https://cddis.nasa.gov/Data_and_Derived_Products/CDDIS_Archive_Access.html
My variant using 'requests' is shown below based on the 'Download Single File' example shown in the left column of the above web page.
if sys.argv[1].find('cddis')> -1:
url = sys.argv[1]
filename = sys.argv[2]
r = requests.get(url)
with open(filename, 'wb') as fd:
for chunk in r.iter_content(chunk_size=1000):
fd.write(chunk)
fd.close()
# is this a data file or stupid cddis html file returned when there's not actual data
try:
text= open(filename, 'r').readlines()
if text[0].find('html') >= 0: # its a garbage html file and not a data file
os.remove(filename)
sys.exit(-3)
except:
file_stats = os.stat(filename)
print('CDDIS returned a binary file with Byte size', file_stats.st_size )
sys.exit(0)
And that's it - best of luck!
@twillis449 thanks so much for this. I will give it a try and I will post updates.
@twillis449 , that worked, great. I can close the issue. By the way , do you happen to know why CODG does not exist after 2022? I can see the CODG files here http://ftp.aiub.unibe.ch/CODE/ till 2022 but nothing after this
Oh I just realized that they are still there. Just the file name has changed after the GPS week 2238 (November 26, 2022)--> transition to long filename. Thanks again, Lilia
HI Lilia, We are working on supporting the new filename format. In the mean time, if you have downloaded the latest master, you should still be able to use UQRG from the http://chapman.upc.es server for more recent dates
Thank you, @maaijke !
Hi,
I am trying to run the getTec.py and I get a connection timed out. I attach the error below. This attempt is with the
server="ftp://gnss.oma.be/gnss/products/IONEX/",prefix="ROBR"
. I also tried theserver="ftp://cddis.gsfc.nasa.gov/gnss/products/ionex/",prefix="CODG"
but I did not get better luck. Do you have any suggestions ?