Project

General

Profile

Bug #34921

Requested time not covered in CTM file

Added by Xin Zhang 4 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
02/07/2022
Due date:
% Done:

100%


Description

The TM5_profile.py doesn't work for the last swath of one day.

Example

python TM5_profile.py \
-c ./201908/S5P_OPER_AUX_CTMANA_20190810T000000_20190811T000000_20190822T124539.nc
-s no2 -V level2
-i ./201908/S5P_PAL__L2__NO2____20190810T230306_20190811T004435_09457_01_020301_20211110T023139.nc

Error:

Requested time not covered in CTM file

Details

t:

2019-08-10 23:53:52

f_times:

[real_datetime(2019, 8, 10, 0, 0) real_datetime(2019, 8, 10, 0, 30)
 real_datetime(2019, 8, 10, 1, 0) real_datetime(2019, 8, 10, 1, 30)
 real_datetime(2019, 8, 10, 2, 0) real_datetime(2019, 8, 10, 2, 30)
 real_datetime(2019, 8, 10, 3, 0) real_datetime(2019, 8, 10, 3, 30)
 real_datetime(2019, 8, 10, 4, 0) real_datetime(2019, 8, 10, 4, 30)
 real_datetime(2019, 8, 10, 5, 0) real_datetime(2019, 8, 10, 5, 30)
 real_datetime(2019, 8, 10, 6, 0) real_datetime(2019, 8, 10, 6, 30)
 real_datetime(2019, 8, 10, 7, 0) real_datetime(2019, 8, 10, 7, 30)
 real_datetime(2019, 8, 10, 8, 0) real_datetime(2019, 8, 10, 8, 30)
 real_datetime(2019, 8, 10, 9, 0) real_datetime(2019, 8, 10, 9, 30)
 real_datetime(2019, 8, 10, 10, 0) real_datetime(2019, 8, 10, 10, 30)
 real_datetime(2019, 8, 10, 11, 0) real_datetime(2019, 8, 10, 11, 30)
 real_datetime(2019, 8, 10, 12, 0) real_datetime(2019, 8, 10, 12, 30)
 real_datetime(2019, 8, 10, 13, 0) real_datetime(2019, 8, 10, 13, 30)
 real_datetime(2019, 8, 10, 14, 0) real_datetime(2019, 8, 10, 14, 30)
 real_datetime(2019, 8, 10, 15, 0) real_datetime(2019, 8, 10, 15, 30)
 real_datetime(2019, 8, 10, 16, 0) real_datetime(2019, 8, 10, 16, 30)
 real_datetime(2019, 8, 10, 17, 0) real_datetime(2019, 8, 10, 17, 30)
 real_datetime(2019, 8, 10, 18, 0) real_datetime(2019, 8, 10, 18, 30)
 real_datetime(2019, 8, 10, 19, 0) real_datetime(2019, 8, 10, 19, 30)
 real_datetime(2019, 8, 10, 20, 0) real_datetime(2019, 8, 10, 20, 30)
 real_datetime(2019, 8, 10, 21, 0) real_datetime(2019, 8, 10, 21, 30)
 real_datetime(2019, 8, 10, 22, 0) real_datetime(2019, 8, 10, 22, 30)
 real_datetime(2019, 8, 10, 23, 0) real_datetime(2019, 8, 10, 23, 30)]

Solution?

What's the correct way to use the extraction script for a special case which crosses two dates?

TM5_profile.py View (24.5 KB) Maarten Sneep, 02/23/2022 04:13 PM

History

#1 Updated by Maarten Sneep 3 months ago

The time that will be extracted is the half hour that is closest to the middle of the file. In this case that is 2019-08-10T23:53:51. This means that you will need the CTMANA for the next day.

Of course, you are closing in on edge-cases here, so changes to the code may well be required.

#2 Updated by Maarten Sneep 3 months ago

I've updated the script, and attached it for convenience.

A grace-period of 15 minutes is now added to the begin and end of the file. This means that up to 23:45 you can use the file of that day, from 23:45 to 24:00 you will need to use the CTM file for the next day.

I also silenced the deprecation warnings (these do not happen in our code).

#3 Updated by Xin Zhang 2 months ago

  • Assignee set to Maarten Sneep

#4 Updated by Maarten Sneep 2 months ago

  • % Done changed from 0 to 100

Also available in: Atom PDF