L1B Sentinel 5-P

Hello!

I used Harp basically because I wanted to have images of an area of interest (like Berlin), for the L2 Products. Hence, Harp helped me to create a grid there. However, I found myself checking what names does Harp has for the main variable of interest of each of the L2 products (like nitrogendioxide_tropospheric_column of L2__NO2___ product is called tropospheric_NO2_column_number_density in Harp).

Now I want to create also the grids for the respective L1B products. The problem is that I can’t find the names that Harp has for each of the 12 channels that this data contains and I want to preserve. Is it possible to this with Harp or I should think about creating the grids with another tool like Satpy (https://satpy.readthedocs.io/en/latest/)?

Thank you so much!
Pedro Herruzo

You can do this, since HARP supports reading the L1B products directly. See the L1B items in the documentation for details.

However, be aware that L1B data provides radiances that have a spectral dimension. I doubt that you are looking for an averaged spectrum.

Thanks! I am not averaging, I will preserve the spectrum. I just want to have grids of L2 and L1B data aligned in space, so I might try to predict the products from the raw data.

However, when I try to use Harp to create grids of L1B data, I find the following problem. If I try to use a similar operation used with L2 products, Harp produces no data at all (tested with file L1B_RA_BD1/S5P_OFFL_L1B_RA_BD1_20190101T082329_20190101T100459_06313_01_010000_20190101T115548.zip):

derive(datetime_stop {time});        latitude >= 54.506 [degree_north] ; latitude <= 56.942 [degree_north] ;        longitude >= 36.357 [degree_east] ; longitude <= 38.854 [degree_east];        bin_spatial(45, 55.506, 0.01, 51, 37.357, 0.01);        derive(latitude {latitude}); derive(longitude {longitude});        keep(wavelength, photon_radiance, index, latitude_bounds, longitude_bounds, latitude, longitude, sensor_altitude, sensor_azimuth_angle, sensor_zenith_angle, solar_azimuth_angle, solar_zenith_angle) 

By try and error, I saw that an operation that works is the following:

latitude >= 54.506 [degree_north] ; latitude <= 56.942 [degree_north] ;        longitude >= 36.357 [degree_east] ; longitude <= 38.854 [degree_east];        keep(wavelength, photon_radiance, index, latitude_bounds, longitude_bounds, latitude, longitude, sensor_altitude, sensor_azimuth_angle, sensor_zenith_angle, solar_azimuth_angle, solar_zenith_angle)

However, this way doesn’t create the grid I want since I am not using bin_spatial . Can you help me to see what I am doing wrong, please?

Thank you so much for your time!

First, when you are using bin_spatial you are averaging. When you regrid data you will be performing a weighted average of your input data. If you want to combine the data from L2 and L1 without averaging you should just use the native satellite grid (i.e. look at the data pixel by pixel) and not perform a bin_spatial.

Note that it is perfectly possible to perform a bin_spatial on the L1B data:

latitude >= 54.506 [degree_north] ; latitude <= 56.942 [degree_north] ;        longitude >= 36.357 [degree_east] ; longitude <= 38.854 [degree_east];        bin_spatial(45, 55.506, 0.01, 51, 37.357, 0.01);        derive(latitude {latitude}); derive(longitude {longitude});        keep(wavelength, photon_radiance, latitude_bounds, longitude_bounds, latitude, longitude, sensor_altitude, sensor_azimuth_angle, sensor_zenith_angle, solar_azimuth_angle, solar_zenith_angle)

However, I am not sure how much sense that would make (since the radiances that you are averaging are not using the same wavelength grid).

Thank you for your answer. First of all, I think there is plenty of things I don’t understand and I apologize for this.

Let me first say that my objective is to have raster objects for L2 data (which I believe I already have) and raster objects for L1B data. This means that when looking at position (x,y) either of L2 raster or L1B raster I want to look to the same spatial coverage on Earth. That is why I am filtering first an area and then binning with each cell coverage of 0.01x0.01 square degrees.

I understand that bin_spatial averages over spatial locations (latitudes and longitudes) and I expect not to average over the spectral dimension. I hope this does make sense, otherwise, I would like to see where my current understanding is wrong, please. I use bin_spatial since L2 products have a different spatial resolution so in this way all products have the same spatial shape. Furthermore, each file in the same product can have different sizes for latitude/longitude:

source product = 'S5P_OFFL_L2__NO2____20190101T100459_20190101T114629_06314_01_010202_20190107T120049.zip'

int scan_subindex {time=1460250}
double datetime_start {time=1460250} [seconds since 2010-01-01]
float datetime_length [s]
int orbit_index
long validity {time=1460250}
float latitude {time=1460250} [degree_north]
float longitude {time=1460250} [degree_east]

 source product = 'S5P_OFFL_L2__NO2____20190102T080428_20190102T094558_06327_01_010202_20190108T095255.zip'

int scan_subindex {time=1460700}
double datetime_start {time=1460700} [seconds since 2010-01-01]
float datetime_length [s]
int orbit_index
long validity {time=1460700}
float latitude {time=1460700} [degree_north]
float longitude {time=1460700} [degree_east]

So this is also a reason for filtering an area and using bin_spatial , otherwise, I wouldn’t know how to compare a certain location for different days using plain NumPy objects for the data. And the same thing happens with L1B data. Maybe there is something else I don’t understand here, sorry for that.

In summary, I want to have a raster L1B tensor with shape (time=1 latitude=44, longitude=50, spectral) that I can compare it with a raster L2 tensor with shape (time=1 latitude=44, longitude=50). Does this make sense or am I mixing up something?

Yes, that works! I see that you removed the index attribute for the query. How can I preserve the date with L1B data? With L2 data I used derive(datetime_stop {time}); but this doesn’ work here…

Thank you so much!

Have a look at the mapping documentation for this product in the HARP documentation. You will see that there is only a single datetime variable. So just keep() that variable.

Thanks, @svniemeijer! I assume that my explanation above makes sense, otherwise, let me know where I am confused, please.

Thank you so much for your time :slight_smile: