questions about ancillary_data.db produced by get.findweb() in modis_GEO_utils.py

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
sunyue2017
Posts: 5
Joined: Wed Apr 06, 2022 8:52 am America/New_York
Answers: 0

questions about ancillary_data.db produced by get.findweb() in modis_GEO_utils.py

by sunyue2017 » Mon Jun 19, 2023 10:23 am America/New_York

Dear support,
I'm working on processing modisa data using downloaded anc data as external input.

firstly, ./ancillary_data.db is produced using:
getanc -s=2022-12-16T05:20:00 -e=2022-12-16T05:25:00 --ancdb=./ancillary_data.db
modis_atteph -s=2022-12-16T05:20:00 -e=2022-12-16T05:25:00 --refreshDB -m=aqua --ancdb=./ancillary_data.db

then the produced ancillary_data.db was used as input of modis_L1A_extract.py:

modis_L1A_extract.py /scratch/Sat_process/MODISA/CHS/2022/working/A2022347062000/A2022347062000.L1A_LAC -g /scratch/Sat_process/MODISA/CHS/2022/working/A2022347062000/A2022347062000.GEO -o /scratch/Sat_process/MODISA/CHS/2022/working/A2022347062000/A2022347062000.L1A_subset_LAC --extract_geo /scratch/Sat_process/MODISA/CHS/2022/working/A2022347062000/A2022347062000.GEO_subset_LAC -s 2.0 -w 105.0 -n 41.0 -e 130.0 --ancdb ./ancillary_data.db

However, an error appeared in modis_GEO_utils.py line 239-243

if self.filename and get.finddb():
get.setup()
else:
get.setup()
get.findweb()

It seems that get.finddb() cannot return valid results and only the produced ancillary_data.db from get.findweb() can run successfully.

So I'm very confused is the ancillary_data.db generated from getanc and modis_atteph different from that from get.findweb() ??
I've checked the source code and didn't solve this problem, hope to get your suggestion, thank you in advance!

Filters:

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 713
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1
Been thanked: 9 times

Re: questions about ancillary_data.db produced by get.findweb() in modis_GEO_utils.py

by OB SeaDAS - xuanyang02 » Thu Jun 22, 2023 4:15 pm America/New_York

get.finddb() calls
status = ancdatabase.check_file(filekey,starttime=self.start)

ancdatabase.check_file queries the database with

'select satid from satfiles where filename = "A2022347062000.L1A_subset_LAC"'.

Unfortunately, when you did getanc and modis_atteph with -s and -e option, you stored an entry with the starttime rather than the filename "A2022347062000.L1A_subset_LAC" in ancillary_data.db. Therefore, check_file returned none, and finddb() returned 0.

BTW, you getanc and modis_atteph seems not to match the start time of A2022347062000.L1A_LAC. Should it be --

getanc -s=2022-12-13T06:20:00 -e=2022-12-13T06:25:00 --ancdb=./ancillary_data.db
modis_atteph -s=2022-12-13T06:20:00 -e=2022-12-13T06:25:00 --refreshDB -m=aqua --ancdb=./ancillary_data.db?

sunyue2017
Posts: 5
Joined: Wed Apr 06, 2022 8:52 am America/New_York
Answers: 0

Re: questions about ancillary_data.db produced by get.findweb() in modis_GEO_utils.py

by sunyue2017 » Sat Jun 24, 2023 9:40 pm America/New_York

Dear support,

Many thanks for your reply!

I've modified the inconsistency and solved the problem by changing the input of modis_atteph with

modis_atteph A2022347062000.L1A_subset_LAC -s=2022-12-16T05:20:00 -e=2022-12-16T05:25:00 --refreshDB -m=aqua --ancdb=./ancillary_data.db

Best.

Post Reply