Using the Advanced File Search facility, I've been able to generate the below wget command to download all Modis L1A data for 10th December 2024, but I only want those files flagged with "Day". Is there a flag I can add to the --post-data parameters to apply this filter?
wget -q --post-data="results_as_file=1&sensor_id=7&dtid=1040&sdate=2024-12-10 00:00:00&edate=2024-12-10 23:59:59&subType=1" -O - https://oceandata.sci.gsfc.nasa.gov/api/file_search
Many thanks
Jane
Day/Night filter with wget
-
- User Services
- Posts: 28
- Joined: Mon Dec 16, 2024 8:43 am America/New_York
Re: Day/Night filter with wget
Jane,
Unfortunately, no, the file_search API does not support selection of data base on the day/night flag.
However, the CMR API *does* provide this information. Here is an example query:
...and one with the optional "day_night_flag" set to "day":
Complete details on the CMR API can be found at: https://cmr.earthdata.nasa.gov/search/site/docs/search/api.html
Hope this helps,
Sean
Unfortunately, no, the file_search API does not support selection of data base on the day/night flag.
However, the CMR API *does* provide this information. Here is an example query:
Code: Select all
curl "https://cmr.earthdata.nasa.gov/search/granules.csv?page_size=10&sort_key=short_name&short_name=MODISA_L1&provider=OB_DAAC"
Granule UR,Producer Granule ID,Start Time,End Time,Online Access URLs,Browse URLs,Cloud Cover,Day/Night,Size
1_MODISA_L1_A2020273022000.L1A_LAC,A2020273022000.L1A_LAC,2020-09-29T02:20:01.000Z,2020-09-29T02:25:00.000Z,https://oceandata.sci.gsfc.nasa.gov/cmr/getfile/A2020273022000.L1A_LAC,,,DAY,
1_MODISA_L1_A2020264122500.L1A_LAC,A2020264122500.L1A_LAC,2020-09-20T12:25:01.000Z,2020-09-20T12:29:59.000Z,https://oceandata.sci.gsfc.nasa.gov/cmr/getfile/A2020264122500.L1A_LAC,,,BOTH,
1_MODISA_L1_A2020271141000.L1A_LAC,A2020271141000.L1A_LAC,2020-09-27T14:10:01.000Z,2020-09-27T14:15:00.000Z,https://oceandata.sci.gsfc.nasa.gov/cmr/getfile/A2020271141000.L1A_LAC,,,BOTH,
1_MODISA_L1_A2020271144000.L1A_LAC,A2020271144000.L1A_LAC,2020-09-27T14:40:00.000Z,2020-09-27T14:44:59.000Z,https://oceandata.sci.gsfc.nasa.gov/cmr/getfile/A2020271144000.L1A_LAC,,,NIGHT,
Code: Select all
url "https://cmr.earthdata.nasa.gov/search/granules.csv?page_size=10&sort_key=short_name&short_name=MODISA_L1&provider=OB_DAAC&day_night_flag=day"
Granule UR,Producer Granule ID,Start Time,End Time,Online Access URLs,Browse URLs,Cloud Cover,Day/Night,Size
1_MODISA_L1_A2020273022000.L1A_LAC,A2020273022000.L1A_LAC,2020-09-29T02:20:01.000Z,2020-09-29T02:25:00.000Z,https://oceandata.sci.gsfc.nasa.gov/cmr/getfile/A2020273022000.L1A_LAC,,,DAY,
1_MODISA_L1_A2020271151000.L1A_LAC,A2020271151000.L1A_LAC,2020-09-27T15:10:01.000Z,2020-09-27T15:14:59.000Z,https://oceandata.sci.gsfc.nasa.gov/cmr/getfile/A2020271151000.L1A_LAC,,,DAY,
1_MODISA_L1_A2020271152000.L1A_LAC,A2020271152000.L1A_LAC,2020-09-27T15:20:01.000Z,2020-09-27T15:24:59.000Z,https://oceandata.sci.gsfc.nasa.gov/cmr/getfile/A2020271152000.L1A_LAC,,,DAY,
1_MODISA_L1_A2020271151500.L1A_LAC,A2020271151500.L1A_LAC,2020-09-27T15:15:01.000Z,2020-09-27T15:19:59.000Z,https://oceandata.sci.gsfc.nasa.gov/cmr/getfile/A2020271151500.L1A_LAC,,,DAY,
1_MODISA_L1_A2020271152500.L1A_LAC,A2020271152500.L1A_LAC,2020-09-27T15:25:01.000Z,2020-09-27T15:29:59.000Z,https://oceandata.sci.gsfc.nasa.gov/cmr/getfile/A2020271152500.L1A_LAC,,,DAY,
Hope this helps,
Sean