modis_atteph.py usage
modis_atteph.py usage
Hello,
I am trying to understand how modis_atteph.py works. I have an example below. When I enter a date/time close to the current time, it gives such an error. Is there a URL or a manual that explain the algorithm or at the very least the exit codes? Especially when the increase in latency causes problem with the processing.
spike.seadas[1042]% date -u ; date -u +%j
Sat Jul 2 01:44:13 UTC 2022
183
spike.seadas[1043]% /usr/local/seadas/7.5/scripts/modis_atteph.py -f -m terra -s 2022182160500 -e 2022182161000; echo $?
att1=/home/seadas/MODIS/ancillary/2022/182/AM1ATTN0.A2022182.1600.002
eph1=/home/seadas/MODIS/ancillary/2022/182/AM1EPHN0.A2022182.1600.002
0
spike.seadas[1044]% /usr/local/seadas/7.5/scripts/modis_atteph.py -f -m terra -s 2022183000000 -e 2022183050000; echo $?
Traceback (most recent call last):
File "/usr/local/seadas/7.5/scripts/modis_atteph.py", line 125, in <module>
m.findweb()
File "/usr/local/seadas/7.5/scripts/modules/anc_utils.py", line 439, in findweb
self.files[str(f[0]).lower()] = str(f[1])
IndexError: string index out of range
1
I am trying to understand how modis_atteph.py works. I have an example below. When I enter a date/time close to the current time, it gives such an error. Is there a URL or a manual that explain the algorithm or at the very least the exit codes? Especially when the increase in latency causes problem with the processing.
spike.seadas[1042]% date -u ; date -u +%j
Sat Jul 2 01:44:13 UTC 2022
183
spike.seadas[1043]% /usr/local/seadas/7.5/scripts/modis_atteph.py -f -m terra -s 2022182160500 -e 2022182161000; echo $?
att1=/home/seadas/MODIS/ancillary/2022/182/AM1ATTN0.A2022182.1600.002
eph1=/home/seadas/MODIS/ancillary/2022/182/AM1EPHN0.A2022182.1600.002
0
spike.seadas[1044]% /usr/local/seadas/7.5/scripts/modis_atteph.py -f -m terra -s 2022183000000 -e 2022183050000; echo $?
Traceback (most recent call last):
File "/usr/local/seadas/7.5/scripts/modis_atteph.py", line 125, in <module>
m.findweb()
File "/usr/local/seadas/7.5/scripts/modules/anc_utils.py", line 439, in findweb
self.files[str(f[0]).lower()] = str(f[1])
IndexError: string index out of range
1
Filters:
Re: modis_atteph.py usage
Sorry about the initial submission. I noticed I set the stop time 5 hours after the start time instead of 5 minutes. I assume it cause a problem if the period is too long. I have another question.
I tried modis_atteph.py as follow:
/usr/local/seadas/7.5/scripts/modis_atteph.py --mission=terra --start=2022183160135 --stop=2022183161735
It returned
att1=/home/seadas/MODIS/ancillary/2022/183/AM1ATTN0.A2022183.1400.002
eph1=/home/seadas/MODIS/ancillary/2022/183/AM1EPHN0.A2022183.1400.002
The att & eph files cover only 14:00 to 16:00 hours which is outside the stop/start given. Does this mean I would have to verify the range covered by the returned att/eph to make sure it includes the entire given period? Am I missing something?
I tried modis_atteph.py as follow:
/usr/local/seadas/7.5/scripts/modis_atteph.py --mission=terra --start=2022183160135 --stop=2022183161735
It returned
att1=/home/seadas/MODIS/ancillary/2022/183/AM1ATTN0.A2022183.1400.002
eph1=/home/seadas/MODIS/ancillary/2022/183/AM1EPHN0.A2022183.1400.002
The att & eph files cover only 14:00 to 16:00 hours which is outside the stop/start given. Does this mean I would have to verify the range covered by the returned att/eph to make sure it includes the entire given period? Am I missing something?
-
- Subject Matter Expert
- Posts: 711
- Joined: Tue Feb 09, 2021 5:42 pm America/New_York
- Been thanked: 9 times
Re: modis_atteph.py usage
Right, the stop time can't be more than 2 hours later than the start time.
For SeaDAS 7.5, modis_atteph used to return
0 - all is well in the world
1 - predicted attitude selected
2 - predicted ephemeris selected
4 - no attitude found
8 - no ephemeris found
We recently changed the api which modis_atteph called to retrieve ancillary data, and the return status was changed to
0 all is well
1 att/eph files are not optimal
2 att/eph files missing
Unfortunately, SeaDAS 7.5 users have to live with it.
We are working to resume the return status for modis_attpeh for future tags of ocssw.
I ran modis_attepeh (ocssw_v2021.2) as the following, which should behave similar as modis_attph.py in SeaDAS 7.5
$ modis_atteph --mission=terra --start=2022183160135 --stop=2022183161735
Running debug binaries...
/Users/*/ocssw-V2021.2/bin
ancillary_data.db
att1=/Users/*/ocssw-V2021.2/var/anc/2022/183/AM1ATTN0.A2022183.1400.002
att2=/Users/*/ocssw-V2021.2/var/anc/2022/183/AM1ATTN0.A2022183.1600.002
eph1=/Users/*/ocssw-V2021.2/var/anc/2022/183/AM1EPHN0.A2022183.1400.002
eph2=/Users/*/ocssw-V2021.2/var/anc/2022/183/AM1EPHN0.A2022183.1600.002
The reason you did't get
AM1ATTN0.A2022183.1600.002
AM1EPHN0.A2022183.1600.002
is that they were not available at the moment.
Bing
For SeaDAS 7.5, modis_atteph used to return
0 - all is well in the world
1 - predicted attitude selected
2 - predicted ephemeris selected
4 - no attitude found
8 - no ephemeris found
We recently changed the api which modis_atteph called to retrieve ancillary data, and the return status was changed to
0 all is well
1 att/eph files are not optimal
2 att/eph files missing
Unfortunately, SeaDAS 7.5 users have to live with it.
We are working to resume the return status for modis_attpeh for future tags of ocssw.
I ran modis_attepeh (ocssw_v2021.2) as the following, which should behave similar as modis_attph.py in SeaDAS 7.5
$ modis_atteph --mission=terra --start=2022183160135 --stop=2022183161735
Running debug binaries...
/Users/*/ocssw-V2021.2/bin
ancillary_data.db
att1=/Users/*/ocssw-V2021.2/var/anc/2022/183/AM1ATTN0.A2022183.1400.002
att2=/Users/*/ocssw-V2021.2/var/anc/2022/183/AM1ATTN0.A2022183.1600.002
eph1=/Users/*/ocssw-V2021.2/var/anc/2022/183/AM1EPHN0.A2022183.1400.002
eph2=/Users/*/ocssw-V2021.2/var/anc/2022/183/AM1EPHN0.A2022183.1600.002
The reason you did't get
AM1ATTN0.A2022183.1600.002
AM1EPHN0.A2022183.1600.002
is that they were not available at the moment.
Bing