Skip to content

SRAL Level 1 products are reported erroneously as naming convention violations #5

Open
@sustr4

Description

@sustr4

Describe the bug
Sentinel 3 SRAL Level 1 products are erroneously reported as violating the Sentinel 3 naming convention. This affects all SRAL Level 1 products, i.e., products with titles starting with S3?_SR_1_.

To reproduce
Steps to reproduce the behavior:

curl -JOn "https://apihub.copernicus.eu/apihub/odata/v1/Products('f29adb61-3929-4cfd-b205-626dfbd3e418')/\$value"
unzip S3A_SR_1_SRA_A__20220802T194015_20220802T203045_20220804T083726_3029_088_170______PS1_O_ST_004.zip
stac sentinel3 create-item S3A_SR_1_SRA_A__20220802T194015_20220802T203045_20220804T083726_3029_088_170______PS1_O_ST_004.SEN3 ./

Said procedure fails, full dump is shown bellow.

Expected behavior
One of two things should happen:

  1. Processing should fail gracefully, reporting product type as recognized but unsupported, or, even better
  2. SRAL Level 1 products should be properly recognized and supported.

Screenshots and shell session dumps

$ ~/.local/bin/stac sentinel3 create-item S3A_SR_1_SRA_A__20220802T194015_20220802T203045_20220804T083726_3029_088_170______PS1_O_ST_004.SEN3 ./
Traceback (most recent call last):
  File "/home/debian/.local/bin/stac", line 8, in <module>
    sys.exit(run_cli())
  File "/home/debian/.local/lib/python3.9/site-packages/stactools/cli/cli.py", line 40, in run_cli
    cli(prog_name='stac')
  File "/home/debian/.local/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/debian/.local/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/debian/.local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/debian/.local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/debian/.local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/debian/.local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/debian/.local/lib/python3.9/site-packages/stactools/sentinel3/commands.py", line 33, in create_item_command
    item = create_item(src)
  File "/home/debian/.local/lib/python3.9/site-packages/stactools/sentinel3/stac.py", line 48, in create_item
    fill_eo_properties(eo, metalinks.product_metadata_href)
  File "/home/debian/.local/lib/python3.9/site-packages/stactools/sentinel3/properties.py", line 73, in fill_eo_properties
    raise ValueError("Unexpected value found at "
ValueError: Unexpected value found at S3A_SR_1_SRA_A__20220802T194015_20220802T203045_20220804T083726_3029_088_170______PS1_O_ST_004.SEN3: this was expected to follow the sentinel 3 naming convention, including ending in .SEN3

Additional context
I am considering opening a separate feature request for this product type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions