satpy icon indicating copy to clipboard operation
satpy copied to clipboard

Rename VII readers and update VII readers for new test data

Open djhoese opened this issue 4 months ago • 4 comments

It has been pointed out that the VII L1b reader no longer works for the publicly available test data, but also doesn't work for the newest EUMETSAT internal test data. The reader needs updates to work for the future versions of the data files.

Additionally, the "VII" name is discontinued and "METimage" should be used instead. This would mean the new reader names should be "metimage_l1b_nc" and "metimage_l2_nc" and the old names deprecated (see these dictionaries).

I'm assigning this to Andrea, but understand that other EUMETSAT employees may be doing the work.

Completing this work will also close my related Polar2Grid issue: https://github.com/ssec/polar2grid/issues/767

djhoese avatar Aug 19 '25 14:08 djhoese

I also marked this as "pre-launch" even though technically things are launched, but they aren't operational.

djhoese avatar Aug 19 '25 14:08 djhoese

Ping @ludwigVonKoopa @cesclc

ameraner avatar Aug 19 '25 15:08 ameraner

In satpy/readers/vii_base_nc.py:216 The start/end_time format need to be modified to fit latest L1B global attribute (%Y-%m-%dT%H:%M:%S.%f) as such:

@property
def start_time(self):
    """Get observation start time."""
    try:
        start_time = dt.datetime.strptime(self["/attr/sensing_start_time_utc"], "%Y-%m-%dT%H:%M:%S.%f")
    except ValueError:
        try:
            start_time = dt.datetime.strptime(self["/attr/sensing_start_time_utc"], "%Y%m%d%H%M%S.%f")
        except ValueError:
            start_time = dt.datetime.strptime(self["/attr/sensing_start_time_utc"], "%Y-%m-%d %H:%M:%S.%f")
    return start_time

@property
def end_time(self):
    """Get observation end time."""
    try:
        end_time = dt.datetime.strptime(self["/attr/sensing_end_time_utc"], "%Y-%m-%dT%H:%M:%S.%f")
    except ValueError:
        try:
            end_time = dt.datetime.strptime(self["/attr/sensing_end_time_utc"], "%Y%m%d%H%M%S.%f")
        except ValueError:
            end_time = dt.datetime.strptime(self["/attr/sensing_end_time_utc"], "%Y-%m-%d %H:%M:%S.%f")
    return end_time

cesclc avatar Aug 20 '25 08:08 cesclc

@cesclc PRs are very welcome ;)

ameraner avatar Aug 20 '25 15:08 ameraner