Hi again. Several processes (MODIS_geo.py, for example) have the ability to retrieve the necessary ancillary files on the fly by accessing the OBPG servers. I'm running a script that goes through a lot of data files, and every once in an while, the ephemeris retrieval fails - see terminal output below - but no log files or any other indicators of failure are generated (other than the terminal output which I'm usually not sitting around watching). These failures seem to be network related and the only way I've found to discover if there has been a problem is to go back and check to see if the proper ephemeris files are in their target directories (e.g. $SEADAS/run/var/modis/atteph/YYYY/DDD/). The directories are created by MODIS_geo even if the retrieval has failed, so I have to delete the directories with the bad or missing ephemeris files and then run MODIS_geo again for those days. I guess I have three (the third is a little facetious) questions:
1. Is there any way to capture an error code or something from the MODIS_geo process (and other similar ones) that could be used in my shell script to delete the just-created directory and try the retrieval again?
2. Is there any way to add a retry parameter or extend the time-out cutoff in the process that contacts the server to get past the network problems that seem to cause the failures?
3. Is this a reason not to ignore the ancillary files that are provided with data orders (as I have done because I figured it was easier to let the processes load the files they needed into the proper places rather than download them with the requested_files and then sort them into where they belong??)
Thanks, Barry
Working on A2008077181000.L1A_LAC.x.hdf.bz2
Unzipping A2008077181000.L1A_LAC.x.hdf.bz2
A2008077181000.L1A_LAC.x.hdf.bz2 unzipped to A2008077181000.L1A_LAC.x.hdf
We failed to reach a server.
URL attempted:
http://oceandata.sci.gsfc.nasa.gov/cgi/getfile/PM1EPHND.P2008077.1200.003Reason: timed out
Traceback (most recent call last):
File "/Volumes/1TBSATDATA/sw/seadas6.3/run/scripts/modis_GEO.py", line 118, in <module>
m.atteph()
File "/Volumes/1TBSATDATA/sw/seadas6.3/run/scripts/modules/modis_GEO_utils.py", line 193, in atteph
get.locate()
File "/Volumes/1TBSATDATA/sw/seadas6.3/run/scripts/modules/anc_utils.py", line 445, in locate
if re.search('^\d{.*}$', status):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/re.py", line 142, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or buffer
Done
Working on A2008078185500.L1A_LAC.x.hdf.bz2
Unzipping A2008078185500.L1A_LAC.x.hdf.bz2
A2008078185500.L1A_LAC.x.hdf.bz2 unzipped to A2008078185500.L1A_LAC.x.hdf
Traceback (most recent call last):
File "/Volumes/1TBSATDATA/sw/seadas6.3/run/scripts/modis_GEO.py", line 118, in <module>
m.atteph()
File "/Volumes/1TBSATDATA/sw/seadas6.3/run/scripts/modules/modis_GEO_utils.py", line 193, in atteph
get.locate()
File "/Volumes/1TBSATDATA/sw/seadas6.3/run/scripts/modules/anc_utils.py", line 444, in locate
uncompress=True)
File "/Users/seadas/seadas6.3/run/scripts/modules/ProcUtils.py", line 45, in httpdl
shutil.copyfileobj(response, file)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/shutil.py", line 27, in copyfileobj
buf = fsrc.read(length)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 351, in read
data = self._sock.recv(left)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 537, in read
s = self.fp.read(amt)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 351, in read
data = self._sock.recv(left)
socket.timeout: timed out
Done