Hi,
This is a problem I am seeing with polymer v4.14 while processing large numbers of S3A/B OLCI L1 Full resolution. Do let me know if this has been adressed in the latest version.
Variables latitude and/or longitude have single pixels or lines of pixels where the coordinates don't change monotonically. This leads to errors in Nearest Neighboor interpolation that is done for regridding outside polymer.
I have checked the SEN3 file in SNAP and I don't see latitude or longitude variables varying smoothly at the problematic locations.
A test image and location:
S3A_OL_1_EFR____20181224T044219_20181224T044519_20181225T093129_0180_039_247_2520_LN1_O_NT_002.SEN3
After loadint the polymer netcdf file with python's xarray:
polymer = xr.open_dataset(input_fname)
lon_2d = polymer['longitude'].values
lat_2d = polymer['latitude'].values
print('lon',lon_2d[1147, 988:994])
print('lat',lat_2d[1147, 988:994])
lon [90.634263 90.634263 88.812747 88.812747 90.653342 90.653342]
lat [28.117857 28.117857 28.38913 28.38913 28.114886 28.114886]
Thanks for your help
Incorrect latitude and longitude values while processing S3_OL_1_EFR
- fsteinmetz
- Site Admin
- Posts: 314
- Joined: Fri Sep 07, 2018 1:34 pm
- company / institution: Hygeos
- Location: Lille, France
- Contact:
Re: Incorrect latitude and longitude values while processing S3_OL_1_EFR
Hi Tiago and sorry for my late reply.
Thanks for providing a test image and location, I can reproduce the issue of lat/lon unicity on this file.
The lat/lon in Polymer are directly copied from the level1 datasets, located in the "geo_coordinates.nc" file (no tie points are involved).
I initially suspected that the culprit was the float64 to float32 conversion, but actually it is not the case.
When I read directly these datasets from geo_coordinates.nc in float64, this issue is present :
So the problem seems to be in the OLCI FR level1. Do you have an idea how frequently does it occur ?
Cheers,
François
Thanks for providing a test image and location, I can reproduce the issue of lat/lon unicity on this file.
The lat/lon in Polymer are directly copied from the level1 datasets, located in the "geo_coordinates.nc" file (no tie points are involved).
I initially suspected that the culprit was the float64 to float32 conversion, but actually it is not the case.
When I read directly these datasets from geo_coordinates.nc in float64, this issue is present :
Code: Select all
file_geo_coord = 'S3A_OL_1_EFR____20181224T044219_20181224T044519_20181225T093129_0180_039_247_2520_LN1_O_NT_002.SEN3/geo_coordinates.nc'
ds = xr.open_dataset(file_geo_coord)
print(ds.latitude[1147, 990].values)
28.126732999999998
print(ds.latitude[1147, 991].values)
28.126732999999998
print(ds.longitude[1147, 990].values)
76.57394599999999
print(ds.longitude[1147, 991].values)
76.57394599999999
Cheers,
François