Page 1 of 1

SeaDAS unable to determine timestamp

Posted: Wed May 17, 2023 6:14 am America/New_York
by eorb
Hello

Has something changed between SeaDAS V2021.2 and V2023.2 ?
I'm now getting "Unable to determine time stamp for input file",
for example with file P1540064AAAAAAAAAAAAAA23136162834001.PDS
(the SeaDAS version is the only thing that I think I've changed!)

Re: SeaDAS unable to determine timestamp

Posted: Wed May 17, 2023 11:06 am America/New_York
by OB SeaDAS - xuanyang02
A lot of things have changed between V2021.2 and V2023.2.

Where did you get the file P1540064AAAAAAAAAAAAAA23136162834001.PDS?

Were you trying to do modis_L1A on the file and get the error "Unable to determine time stamp for input file"?

Re: SeaDAS unable to determine timestamp

Posted: Wed May 17, 2023 1:50 pm America/New_York
by eorb
It's a direct broadcast file and sorry for not clarifying that I was trying to convert it to L1A.

Re: SeaDAS unable to determine timestamp

Posted: Mon May 22, 2023 10:36 am America/New_York
by OB SeaDAS - xuanyang02
If you could upload your file in the cloud, such as google drive, we might be able to replicate the error and resolve the issue.

Re: SeaDAS unable to determine timestamp

Posted: Tue May 23, 2023 1:56 pm America/New_York
by eorb
When I look at the code in get_l0_timestamp() I don't see any regex for filenames of that format.

However the function _get_type_using_l0_cnst() does have a regex for such filenames, so I suspect it's an oversight in the timestamp function?

Re: SeaDAS unable to determine timestamp

Posted: Tue May 23, 2023 6:16 pm America/New_York
by OB SeaDAS - xuanyang02
It's hard to tell without debugging modis_L1A on the actual file

Re: SeaDAS unable to determine timestamp

Posted: Wed May 24, 2023 5:16 am America/New_York
by eorb
I could send you a file, but you could also just rename one of yours with the filename above.

When I modify get_l0_timestamp() in the file get_output_name_utils.py

matched_name = re.match(r"P...0064..............(\d\d\d\d\d)(\d\d\d\d\d\d)001\.PDS", input_basename)
time_stamp = '20'+matched_name.group(1)+matched_name.group(2)

then it seems to work (although group(1) contains year and julian day, not year,month,day).

The old version of SeaDAS would create:
-rw-r--r-- 1 opr local 990765493 May 24 10:10 A2023136102616.L1A_LAC

With the above modification, the new version creates:
-rw-r--r-- 1 opr local 990765505 May 24 10:08 AQUA_MODIS.20230516T131641.L1A.hdf