ACCESS-Cloud-Based-InSAR / DockerizedTopsApp

Apache License 2.0
21 stars 2 forks source link

[Bug] Why are SET correction layers for different IFGs with a shared date have different values? #153

Closed cmarshak closed 11 months ago

cmarshak commented 1 year ago

Here are two products:

S1-GUNW-A-R-004-tops-20230807_20230714-230735-00079W_00039N-PP-86c4-v3_0_0.nc
S1-GUNW-A-R-004-tops-20230714_20230608-230734-00079W_00039N-PP-93a4-v3_0_0.nc

They can be downloaded at the ASF

import asf_search as asf

opts = asf.ASFSearchOptions(host='cmr.uat.earthdata.nasa.gov', 
                            platform=asf.SENTINEL1,
                            processingLevel=asf.constants.GUNW_STD,
                            )

results = asf.granule_search(['S1-GUNW-A-R-004-tops-20230807_20230714-230735-00079W_00039N-PP-86c4-v3_0_0',
                              'S1-GUNW-A-R-004-tops-20230714_20230608-230734-00079W_00039N-PP-93a4-v3_0_0'],
                             opts=opts)

[r.download('.') for r in results]

We can read the data via gdal as:

g1= '/science/grids/corrections/external/tides/solidEarth/reference/solidEarthTide'
gunw_path_1 = 'S1-GUNW-A-R-004-tops-20230714_20230608-230734-00079W_00039N-PP-93a4-v3_0_0.nc'
with rasterio.open(f'netcdf:{gunw_path_1}:{g}') as ds:
    p_1 = ds.profile
    X_1 = ds.read(1)

and similarly with the other product.

There is an error between reference of one product and secondary of the other of less than .01 radians.

It's not expected given they should have the exact same inputs.

cmarshak commented 1 year ago

@bbuzz31 identified this issue.

In the plugin's code, this is the result of using the azimuth and incidence angle for the GUNW product which are generated using the reference orbit of the respective products.

See here: https://github.com/ACCESS-Cloud-Based-InSAR/DockerizedTopsApp/blob/baed31ab85791e9d54600b0d08ebd799ac6238ff/isce2_topsapp/solid_earth_tides.py#L199-L204

Indeed, upon inspection, the azimuth angle and incidence angle are different (in the above code sample, swap out g with g0 = 'science/grids/imagingGeometry/azimuthAngle' for example).

I am going to leave this ticket open until we agree upon the proper way to perform this given we call the solid earth correction here: https://github.com/ACCESS-Cloud-Based-InSAR/DockerizedTopsApp/blob/baed31ab85791e9d54600b0d08ebd799ac6238ff/isce2_topsapp/__main__.py#L232-L233

I believe that we will want both of these to be "reference orbits". Please review, @sssangha.

bbuzz31 commented 1 year ago

For RAiDER:

Differences are sub millimeter: Figure_1

When I force RAiDER to use the orbit file for 20230714 for each GUNW, the delays on 20230714 are identical as expected.