Time filtering problem #803
-
GLDAS Noah Land Surface Model L4 3 hourly 0.25 x 0.25 degree V2.1 (GLDAS_NOAH025_3H) at GES DISC This product is every 3 hours. I only want the product at 0:00 every day, not the products at other times of the day. However, I also need the 5-year time product from 2018 to 2023. Can earthaccess do this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
We currently don't support periodic selection of granules. To the best of my knowledge CMR doesn't support this either (https://cmr.earthdata.nasa.gov/search/site/docs/search/api.html#temporal-range-searches). I'd suggest selecting all of the granules in the date range you're interested in in and then filtering to include only the >>> import earthaccess
>>> from dateutil import parser
>>> import datetime as dt
>>> results = earthaccess.search_data(short_name="GLDAS_NOAH025_3H", temporal=("2020-01-01", "2020-01-07"))
>>> len(results)
56
>>> len([r for r in results if parser.parse(r['umm']['TemporalExtent']['RangeDateTime']['BeginningDateTime']).time() == dt.time(0,0,0)])
7 If this solves your problem, please select "mark as answer" :) |
Beta Was this translation helpful? Give feedback.
-
Generally no, but this collection is model output at exactly 3-hour intervals and has the hour in the name. So you can use a cheat. You can set the
Note the short form of the temporal parameter requires earthaccess version 0.10 or higher. |
Beta Was this translation helpful? Give feedback.
Generally no, but this collection is model output at exactly 3-hour intervals and has the hour in the name. So you can use a cheat. You can set the
granule_name
filter to*.0000.*
.Note the short form of the temporal parameter requires earthaccess version 0.10 or higher.