Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tropomi l2 reader needs to handle more filenames #1077

Closed
TAlonglong opened this issue Feb 20, 2020 · 2 comments · Fixed by #1078
Closed

Tropomi l2 reader needs to handle more filenames #1077

TAlonglong opened this issue Feb 20, 2020 · 2 comments · Fixed by #1078

Comments

@TAlonglong
Copy link
Collaborator

TAlonglong commented Feb 20, 2020

As the tropomi l2 reader is now it handles:
{platform_shortname:3s}_{data_type:4s}_{level:3s}_{product:3s}____{start_time:%Y%m%dT%H%M%S}_{end_time:%Y%m%dT%H%M%S}_{orbit:5d}_{collection:2d}_{processor_version:6d}_{creation_time:%Y%m%dT%H%M%S}.nc

eg S5P_OFFL_L2__NO2____20180709T170334_20180709T184504_03821_01_010002_20180715T184729.nc

But there are other products than NO2, eg AER_AI
S5P_NRTI_L2__AER_AI_20200220T163359_20200220T163859_12205_01_010302_20200220T170635.nc

The documentation I have found
http://www.tropomi.eu/sites/default/files/files/S5P-KNMI-L2-0026-MA-Product_user_manual_for_the_Sentinel_5_precursor_Aerosol_Index_product-1.0.0-20180613_signed.pdf

See table 1 and chapter 4.1

all available products are listed.

So I suggest to somehow alter the {product:3s} to be more general to handle all types of products.

I think the SEVIRI HRIT have something like this, so for Tropomi this will be.
{platform_shortname:3s}_{data_type:4s}_{level:3s}_{product:_<6s}_{start_time:%Y%m%dT%H%M%S}_{end_time:%Y%m%dT%H%M%S}_{orbit:5d}_{collection:2d}_{processor_version:6d}_{creation_time:%Y%m%dT%H%M%S}.nc

@djhoese
Copy link
Member

djhoese commented Feb 20, 2020

Gross. I've never seen a filenaming scheme like that. I think if the 3 is removed from the product parameter and the ____ (for underscores) are replaced with _ (one underscore) then it should work. @TAlonglong Do you think you could make a pull request for this and test it out?

CC @tommyjasmin

@tommyjasmin
Copy link
Contributor

tommyjasmin commented Feb 21, 2020

Dave - this is not as gross as appears and it's great @TAlonglong noticed this. The reason for the underscore padding simply to ensure a consistent filename length is maintained in the context of atmospheric chemistry product names with varying lengths,
e.g. :

  • CO for Carbon Monoxide (two char)
  • SO2 for Sulfur Dioxide (three char)
  • HCHO for Formaldehyde (four char)
  • AER_LH for Aerosol Layer Height (uses all six character slots)

I'm surprised this was still in the code, I thought we'd fixed this and I see we did correct this in the McIDAS-V codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants