Ocean Color Forum - Not logged in
Forum Ocean Color Home Help Search Login
Previous Next Up Topic Products and Algorithms / Satellite Data Access / download problem (1713 hits)
By shan.zeng Date 2012-06-21 20:31
Actually, I want to download level 2 MODIS aqua ocean data with option below. However, it didn't work... who knows what is the problem?

for file in $(curl -d "sensor=modis&sdate=2007-12-01&edate=2008-12-31&dtype=L2&addurl=1&results_as_file=1&search=*OC*" http://oceandata.sci.gsfc.nasa.gov/cgi/file_search.cgi |grep getfile);
do
  curl -L -O $file;
done
By WhiteG Date 2012-06-22 12:04
"it didn't work" doesn't give us much to go on, see http://www.chiark.greenend.org.uk/~sgtatham/bugs.html.  I find it helpful to get the list of files first, then run a command to fetch them, e.g.


curl -d "..." http://oceandata.sci.gsfc.nasa.gov/cgi/file_search.cgi > filesearch.out

Then examine filesearch.out for error messages, etc, and run:

for file in $(grep getfile <filesearch.out) ; do
  curl -L -O $file;
done;

This way, if the transfer gets interrupted you can edit filesearch.out to omit the fiels that were successfully downloaded.
Previous Next Up Topic Products and Algorithms / Satellite Data Access / download problem (1713 hits)



Responsible NASA Official: Gene C. Feldman
Curator: OceanColor Webmaster
Authorized by: Gene C. Feldman
Updated: 27 November 2007
Privacy Policy and Important Notices NASA logo