modis_atteph.py is downloading the wrong ATT/EPH pair
modis_atteph.py is downloading the wrong ATT/EPH pair
Dear Staff,
After the restoration of work AQUA in orbit, I noticed a strange behavior of the module modis_atteph.py
5-min ATT/EPH data is already available in a few hours, but the module still tries to download it is not clear what.
For example:
./modis_atteph.py -v -r -d /var/rki/processing/aqua/modis/processing/MYD01.A2022116.1038.061.2022116104947.hdf
Aqua
Searching database: /opt/rki/OCSSW/var/ancillary_data.db
Determining pass start and end times...
Aqua
()
Input file: /var/rki/processing/aqua/modis/processing/MYD01.A2022116.1038.061.2022116104947.hdf
Sensor : aqua
Start time: 2022116103803
End time : 2022116104401
()
OBPG session started
Downloads disabled. The following missing file(s) will not be downloaded:
PM1EPHND.P2022115.1200.003
PM1ATTNR_NRT.A2022116.1045.061
PM1ATTNR_NRT.A2022116.1040.061
PM1ATTNR_NRT.A2022116.1035.061
All required attitude and ephemeris files successfully determined and downloaded.
att1=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1035.061
att2=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1040.061
att3=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1045.061
eph1=/opt/rki/OCSSW/var/anc/2022/115/PM1EPHND.P2022115.1200.003
()
- All optimal ancillary data files were determined. -
Tell me what's wrong?
Regards,
Dmitry
After the restoration of work AQUA in orbit, I noticed a strange behavior of the module modis_atteph.py
5-min ATT/EPH data is already available in a few hours, but the module still tries to download it is not clear what.
For example:
./modis_atteph.py -v -r -d /var/rki/processing/aqua/modis/processing/MYD01.A2022116.1038.061.2022116104947.hdf
Aqua
Searching database: /opt/rki/OCSSW/var/ancillary_data.db
Determining pass start and end times...
Aqua
()
Input file: /var/rki/processing/aqua/modis/processing/MYD01.A2022116.1038.061.2022116104947.hdf
Sensor : aqua
Start time: 2022116103803
End time : 2022116104401
()
OBPG session started
Downloads disabled. The following missing file(s) will not be downloaded:
PM1EPHND.P2022115.1200.003
PM1ATTNR_NRT.A2022116.1045.061
PM1ATTNR_NRT.A2022116.1040.061
PM1ATTNR_NRT.A2022116.1035.061
All required attitude and ephemeris files successfully determined and downloaded.
att1=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1035.061
att2=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1040.061
att3=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1045.061
eph1=/opt/rki/OCSSW/var/anc/2022/115/PM1EPHND.P2022115.1200.003
()
- All optimal ancillary data files were determined. -
Tell me what's wrong?
Regards,
Dmitry
Filters:
-
- Subject Matter Expert
- Posts: 711
- Joined: Tue Feb 09, 2021 5:42 pm America/New_York
- Been thanked: 9 times
Re: modis_atteph.py is downloading the wrong ATT/EPH pair
When you use the -d option (Disable download of ancillary files not found on hard disk), it is correct to get the message
"Downloads disabled. The following missing file(s) will not be downloaded:
PM1EPHND.P2022115.1200.003
PM1ATTNR_NRT.A2022116.1045.061
PM1ATTNR_NRT.A2022116.1040.061
PM1ATTNR_NRT.A2022116.1035.061.
- All optimal ancillary data files were determined. -"
If you check /opt/rki/OCSSW/var/anc/2022/116/ and /opt/rki/OCSSW/var/anc/2022/115/, you probably will find these 4 files were not downloaded
PM1EPHND.P2022115.1200.003
PM1ATTNR_NRT.A2022116.1045.061
PM1ATTNR_NRT.A2022116.1040.061
PM1ATTNR_NRT.A2022116.1035.061
However, I think there is a a bug in the code that the following messages were incorrectly printed out:
"All required attitude and ephemeris files successfully determined and downloaded.
att1=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1035.061
att2=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1040.061
att3=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1045.061
eph1=/opt/rki/OCSSW/var/anc/2022/115/PM1EPHND.P2022115.1200.003"
"Downloads disabled. The following missing file(s) will not be downloaded:
PM1EPHND.P2022115.1200.003
PM1ATTNR_NRT.A2022116.1045.061
PM1ATTNR_NRT.A2022116.1040.061
PM1ATTNR_NRT.A2022116.1035.061.
- All optimal ancillary data files were determined. -"
If you check /opt/rki/OCSSW/var/anc/2022/116/ and /opt/rki/OCSSW/var/anc/2022/115/, you probably will find these 4 files were not downloaded
PM1EPHND.P2022115.1200.003
PM1ATTNR_NRT.A2022116.1045.061
PM1ATTNR_NRT.A2022116.1040.061
PM1ATTNR_NRT.A2022116.1035.061
However, I think there is a a bug in the code that the following messages were incorrectly printed out:
"All required attitude and ephemeris files successfully determined and downloaded.
att1=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1035.061
att2=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1040.061
att3=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1045.061
eph1=/opt/rki/OCSSW/var/anc/2022/115/PM1EPHND.P2022115.1200.003"
Re: modis_atteph.py is downloading the wrong ATT/EPH pair
I'll clarify my question.
My operational processing script internally uses modis_atteph.py to get the ATT/EPH.
modis_atteph.py is called in a loop and runs until it gets exit status 0.
0 - all is well in the world
1 - predicted attitude selected
2 - predicted ephemeris selected
4 - no attitude found
8 - no ephemeris found
16 - invalid mission
At some point, the following data set becomes available to me:
att1=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1035.061
att2=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1040.061
att3=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1045.061
eph1=/opt/rki/OCSSW/var/anc/2022/115/PM1EPHND.P2022115.1200.003
In this case, the exit status of modis_atteph.py = 1.
With this status, the script cannot proceed with further processing and continues to run modis_atteph.py.
Interestingly, at the same time, I see that 5-min EPH data is already available:
eph1=/opt/rki/OCSSW/var/anc/2022/116/PM1EPHND_NRT.A2022116.1035.061
eph2=/opt/rki/OCSSW/var/anc/2022/116/PM1EPHND_NRT.A2022116.1040.061
eph3=/opt/rki/OCSSW/var/anc/2022/116/PM1EPHND_NRT.A2022116.1045.061
modis_atteph.py still continues to ignore the 5-min EPH data, giving the correct set like:
att1=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1035.061
att2=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1040.061
att3=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1045.061
eph1=/opt/rki/OCSSW/var/anc/2022/115/PM1EPHND.P2022115.1200.003
modis_atteph.py gets an exit status of 0 when the following dataset becomes available:
att1=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR.P2022116.1000.003
eph1=/opt/rki/OCSSW/var/anc/2022/115/PM1EPHND.P2022115.1200.003
But this data set can be expected for a long time, which is not good for me.
Q:How can I get a set of 5-min ATT and 5-min EPH data using modis_atteph.py and still get exit status 0?
Regards,
Dmitry
My operational processing script internally uses modis_atteph.py to get the ATT/EPH.
modis_atteph.py is called in a loop and runs until it gets exit status 0.
0 - all is well in the world
1 - predicted attitude selected
2 - predicted ephemeris selected
4 - no attitude found
8 - no ephemeris found
16 - invalid mission
At some point, the following data set becomes available to me:
att1=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1035.061
att2=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1040.061
att3=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1045.061
eph1=/opt/rki/OCSSW/var/anc/2022/115/PM1EPHND.P2022115.1200.003
In this case, the exit status of modis_atteph.py = 1.
With this status, the script cannot proceed with further processing and continues to run modis_atteph.py.
Interestingly, at the same time, I see that 5-min EPH data is already available:
eph1=/opt/rki/OCSSW/var/anc/2022/116/PM1EPHND_NRT.A2022116.1035.061
eph2=/opt/rki/OCSSW/var/anc/2022/116/PM1EPHND_NRT.A2022116.1040.061
eph3=/opt/rki/OCSSW/var/anc/2022/116/PM1EPHND_NRT.A2022116.1045.061
modis_atteph.py still continues to ignore the 5-min EPH data, giving the correct set like:
att1=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1035.061
att2=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1040.061
att3=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR_NRT.A2022116.1045.061
eph1=/opt/rki/OCSSW/var/anc/2022/115/PM1EPHND.P2022115.1200.003
modis_atteph.py gets an exit status of 0 when the following dataset becomes available:
att1=/opt/rki/OCSSW/var/anc/2022/116/PM1ATTNR.P2022116.1000.003
eph1=/opt/rki/OCSSW/var/anc/2022/115/PM1EPHND.P2022115.1200.003
But this data set can be expected for a long time, which is not good for me.
Q:How can I get a set of 5-min ATT and 5-min EPH data using modis_atteph.py and still get exit status 0?
Regards,
Dmitry
-
- Subject Matter Expert
- Posts: 711
- Joined: Tue Feb 09, 2021 5:42 pm America/New_York
- Been thanked: 9 times
Re: modis_atteph.py is downloading the wrong ATT/EPH pair
When the PM1ATTNR_NRT and PM1EPHND files are available, the api called by modis_attteph.py returns status 1, because the PM1ATTNR_NRT files are classified as non-optimal. https://oceandata.sci.gsfc.nasa.gov/api/atteph/A/2022118111000/2022118111500
{"files":[["ATT1","PM1ATTNR_NRT.A2022118.1105.061"],
["ATT2","PM1ATTNR_NRT.A2022118.1110.061"],
["ATT3","PM1ATTNR_NRT.A2022118.1115.061"],
["EPH1","PM1EPHND.P2022117.1200.003"]],"status":1}
You can decide if you want to edit the code so modis_atteph.py returns 0 when the PM1EPHND file is available.
/opt/rki/OCSSW/scripts/modis_atteph.py
/opt/rki/OCSSW/scripts/modules/anc_utils.py line 441
{"files":[["ATT1","PM1ATTNR_NRT.A2022118.1105.061"],
["ATT2","PM1ATTNR_NRT.A2022118.1110.061"],
["ATT3","PM1ATTNR_NRT.A2022118.1115.061"],
["EPH1","PM1EPHND.P2022117.1200.003"]],"status":1}
You can decide if you want to edit the code so modis_atteph.py returns 0 when the PM1EPHND file is available.
/opt/rki/OCSSW/scripts/modis_atteph.py
/opt/rki/OCSSW/scripts/modules/anc_utils.py line 441
Re: modis_atteph.py is downloading the wrong ATT/EPH pair
Ok,
Can I just wait until modis_atteph.py returns an exit status < 4?
If I understand correctly, an exit status < 4 indicates the presence of some kind of ATT/EPH data.
Regards,
Dmitry
Can I just wait until modis_atteph.py returns an exit status < 4?
If I understand correctly, an exit status < 4 indicates the presence of some kind of ATT/EPH data.
Regards,
Dmitry
-
- Subject Matter Expert
- Posts: 711
- Joined: Tue Feb 09, 2021 5:42 pm America/New_York
- Been thanked: 9 times
Re: modis_atteph.py is downloading the wrong ATT/EPH pair
Yes, an exit status < 4 indicates the presence of some kind of ATT/EPH data, sometimes NRT, less than optimal.
Re: modis_atteph.py is downloading the wrong ATT/EPH pair
Hello,
Many thanks for your advices.
Regards,
Dmitry
Many thanks for your advices.
Regards,
Dmitry
-
- Subject Matter Expert
- Posts: 711
- Joined: Tue Feb 09, 2021 5:42 pm America/New_York
- Been thanked: 9 times
Re: modis_atteph.py is downloading the wrong ATT/EPH pair
Dmitry,
I have to clarify that ocssw/scripts/modis_atteph.py (V2019.3) calls an old api that returns 1 when ATT files are non optimal.
The new ocssw/bin/modis_attpeh (V2022.0) calls a new api that returns 0 even when ATT/EPH files are non optimal.
Bing
I have to clarify that ocssw/scripts/modis_atteph.py (V2019.3) calls an old api that returns 1 when ATT files are non optimal.
The new ocssw/bin/modis_attpeh (V2022.0) calls a new api that returns 0 even when ATT/EPH files are non optimal.
Bing
Re: modis_atteph.py is downloading the wrong ATT/EPH pair
And if ATT/EPF data is not available, 0 is also returned.
It seems to me that this is wrong.
Then I will not understand in any way that I have data or not.
Regards,
Dmitry
It seems to me that this is wrong.
Then I will not understand in any way that I have data or not.
Regards,
Dmitry
-
- Subject Matter Expert
- Posts: 711
- Joined: Tue Feb 09, 2021 5:42 pm America/New_York
- Been thanked: 9 times
Re: modis_atteph.py is downloading the wrong ATT/EPH pair
Sorry for the inconvenience. We are working on the new API and the script that uses the new API so modis_atteph will return the status as follows:
0 - all is well in the world
1 - predicted attitude selected
2 - predicted ephemeris selected
4 - no attitude found
8 - no ephemeris found
Bing
0 - all is well in the world
1 - predicted attitude selected
2 - predicted ephemeris selected
4 - no attitude found
8 - no ephemeris found
Bing