ASFHyP3 / hyp3-autorift

A HyP3 plugin for feature tracking processing with AutoRIFT-ISCE
BSD 3-Clause "New" or "Revised" License
7 stars 2 forks source link

Speedup crop_netcdf_product #232

Closed AndrewPlayer3 closed 11 months ago

AndrewPlayer3 commented 12 months ago

Fixes Improve performance of crop

It seemed that the drop=True portion of the ds.where(..., drop=True) calls was the root of the slowdown. When I removed that argument, the function executed very quickly. I chose to remove that argument and replaced it with a string of dropna(..., how='all') calls. The crop function now executes in around 2 seconds for the product Joe sent me (before it was minutes). I checked to make sure that the outputted datasets where identical using xarray.Dataset.equals, and they were.

jhkennedy commented 11 months ago

autorift golden test is running: https://github.com/ASFHyP3/hyp3-testing/actions/runs/6254008848

I expect everything to look good, and we can merge this. I'll review the golden test run today, if it finishes by 2:30 PM AK, or review it tomorrow morning if not.