yuvipanda / pangeo-forge-cmr

pangeo-forge integration with CMR
Apache License 2.0
3 stars 3 forks source link

Ensure `urls` are sorted sequentially #3

Open cisaacstern opened 1 year ago

cisaacstern commented 1 year ago

Pangeo Forge's pattern_from_file_sequence assumes that the file list it is passed is sorted sequentially in the concat dim.

Let's make sure that is the case here:

https://github.com/yuvipanda/pangeo-forge-cmr/blob/43b77b69547959516c9a3528eedde60c0f9f464d/pangeo_forge_cmr/__init__.py#L55-L57

Which will mean adding some sorting logic to get_cmr_granule_links. According to @briannapagan, cmr supports this, e.g.

curl "https://cmr.earthdata.nasa.gov/search/granules/sort_key\[\]=-start_date"
curl "https://cmr.earthdata.nasa.gov/search/granules/sort_key\[\]=%2Bstart_date"