I had a job go bad, so I thought that the file I downloaded was corrupt. I tried again and it failed.
The name used in the curl call was the one given to me in my subscription area in 2018.
For some reason it was switched from bz2 to xz? Is this common?
So I did this with the given name ending in bz2:
curl -b ./.usr_cookies -c ./.usr_cookies -L -n --retry 5 --retry-delay 2 --max-time 0 --output ./MOD00.A2018161.1450_1.PDS.bz2 https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/MOD00.A2018161.1450_1.PDS.bz2 % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 275M 100 275M 0 0 3816k 0 0:01:13 0:01:13 --:--:-- 3970k
[bmurch@optics0 test]$ ll
total 281984
-rw-rw-r-- 1 bmurch usfuser 288711220 Jun 4 11:57 MOD00.A2018161.1450_1.PDS.bz2
[bmurch@optics0 test]$ file MOD00.A2018161.1450_1.PDS.bz2
MOD00.A2018161.1450_1.PDS.bz2: xz compressed data
[bmurch@optics0 test]$ mv MOD00.A2018161.1450_1.PDS.bz2 MOD00.A2018161.1450_1.PDS.xz
[bmurch@optics0 test]$ file MOD00.A2018161.1450_1.PDS.xz
MOD00.A2018161.1450_1.PDS.xz: xz compressed data
[bmurch@optics0 test]$ which xz
/usr/bin/xz
[bmurch@optics0 test]$ xz -d MOD00.A2018161.1450_1.PDS.xz
[bmurch@optics0 test]$ ll
total 667008
-rw-rw-r-- 1 bmurch usfuser 395212632 Jun 4 12:00 MOD00.A2018161.1450_1.PDS
[bmurch@optics0 test]$ file MOD00.A2018161.1450_1.PDS
MOD00.A2018161.1450_1.PDS: data
Files not compressed by naming convention
-
oo_processing
- Posts: 342
- Joined: Wed Apr 06, 2005 12:11 pm America/New_York
- Endorsed: 3 times
-
OB.DAAC-EDL - SeanBailey
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Endorsed: 9 times
Files not compressed by naming convention
Brock,
It's safe to assume...until it's not...
You set the bz2 extension on your output file. While you search for the file with the .bz2 extension, getfile strips off .bz2, .gz, and .zip extensions when it looks up the file... so you could have asked for
https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/MOD00.A2018161.1450_1.PDS and gotten the same thing.
There are 2058 MOD00 files in the archive with .xz compression. We recovered some data we lost (due to a RAID doing what RAIDs aren't supposed to do) from LAADS (which uses .xz) .
You probably should use -JO in your cURL options, then the files would be named correctly on download.
Sean
It's safe to assume...until it's not...
You set the bz2 extension on your output file. While you search for the file with the .bz2 extension, getfile strips off .bz2, .gz, and .zip extensions when it looks up the file... so you could have asked for
https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/MOD00.A2018161.1450_1.PDS and gotten the same thing.
There are 2058 MOD00 files in the archive with .xz compression. We recovered some data we lost (due to a RAID doing what RAIDs aren't supposed to do) from LAADS (which uses .xz) .
You probably should use -JO in your cURL options, then the files would be named correctly on download.
Sean