Subsetting MODIS-AQUA download by lat/lon with wget?
Subsetting MODIS-AQUA download by lat/lon with wget?
Hello all,
In the past, I have done a manual extraction(subset) of MODIS-AQUA data using the online Level3 browser with manual inputs.
I would now like to do the same type of download, except in an automated fashion with wget via Windows.
Is there a way to build a wget command to do a download of MODIS-AQUA data, where the download is limited to a specific lat and lon range?
Thank you,
Anthony
In the past, I have done a manual extraction(subset) of MODIS-AQUA data using the online Level3 browser with manual inputs.
I would now like to do the same type of download, except in an automated fashion with wget via Windows.
Is there a way to build a wget command to do a download of MODIS-AQUA data, where the download is limited to a specific lat and lon range?
Thank you,
Anthony
Filters:
-
- Posts: 14
- Joined: Tue Jan 25, 2022 11:32 am America/New_York
Re: Subsetting MODIS-AQUA download by lat/lon with wget?
Hi Anthony,
If you are attempting to download MODIS data from the NSIDC, I suggest you browse this programmatic data access guide: https://nsidc.org/data/user-resources/help-center/programmatic-data-access-guide.
Of particular interest may be the NSIDC DAAC's data access and service API.
Kind Regards,
Gail
If you are attempting to download MODIS data from the NSIDC, I suggest you browse this programmatic data access guide: https://nsidc.org/data/user-resources/help-center/programmatic-data-access-guide.
Of particular interest may be the NSIDC DAAC's data access and service API.
Kind Regards,
Gail
Re: Subsetting MODIS-AQUA download by lat/lon with wget?
Hi Gail,
I am trying to download ocean IOP MODIS-AQUA, and other sensor data, from the earth.data.nasa.gov/oceancolor.gsfc.nasa.gov site.
This is a typical wget command I am using at the Windows command prompt:
wget --user=anthcook --ask-password --auth-no-challenge=on https://oceandata.sci.gsfc.nasa.gov/ob/getfile/AQUA_MODIS.20220101.L3m.DAY.IOP.a_531.4km.nc
I did look at the programming guide in the link you provided at NSIDC. In particular, I saw the "bounding-box" term, such as in the given example at NSIDC:
https://n5eil02u.ecs.nsidc.org/egi/request?short_name=NSIDC-0481&version=1&time=2017-01-01T00:00:00,2018-12-31T00:00:00&bounding_box=-52.5,68.5,-47.5,69.5
When I try to append the string "&bounding_box=-52.5,68.5,-47.5,69.5" to the URL in my wget command above, wget executes the download of the full globe dataset, and then wget tries to execute "bounding_box=-52.5,68.5,-47.5,69.5", which it reports as an unknown wget command. So it behaves as if wget is separately trying to execute the bounding_box command independently from the download.
Many thanks, and still searching for a solution,
Anthony
I am trying to download ocean IOP MODIS-AQUA, and other sensor data, from the earth.data.nasa.gov/oceancolor.gsfc.nasa.gov site.
This is a typical wget command I am using at the Windows command prompt:
wget --user=anthcook --ask-password --auth-no-challenge=on https://oceandata.sci.gsfc.nasa.gov/ob/getfile/AQUA_MODIS.20220101.L3m.DAY.IOP.a_531.4km.nc
I did look at the programming guide in the link you provided at NSIDC. In particular, I saw the "bounding-box" term, such as in the given example at NSIDC:
https://n5eil02u.ecs.nsidc.org/egi/request?short_name=NSIDC-0481&version=1&time=2017-01-01T00:00:00,2018-12-31T00:00:00&bounding_box=-52.5,68.5,-47.5,69.5
When I try to append the string "&bounding_box=-52.5,68.5,-47.5,69.5" to the URL in my wget command above, wget executes the download of the full globe dataset, and then wget tries to execute "bounding_box=-52.5,68.5,-47.5,69.5", which it reports as an unknown wget command. So it behaves as if wget is separately trying to execute the bounding_box command independently from the download.
Many thanks, and still searching for a solution,
Anthony
-
- Posts: 396
- Joined: Mon Jun 22, 2020 5:24 pm America/New_York
- Has thanked: 8 times
- Been thanked: 8 times
Re: Subsetting MODIS-AQUA download by lat/lon with wget?
Currently, the options that can be used with wget or curl are here: https://oceandata.sci.gsfc.nasa.gov/api/file_search_help/
Re: Subsetting MODIS-AQUA download by lat/lon with wget?
Hi amscott,
Thank you for the link.
The line below, found on the page in your link, provides an indication that Level1 data can be specified with lat/lon limits:
https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/T2003122090500.L1A_LAC.R0000032134_21N_17N_160W_152W.hdf
Is there a similar provision or ability for limiting lat/lon limits for downloading Level3 data with wget?
Thank you,
Anthony
Thank you for the link.
The line below, found on the page in your link, provides an indication that Level1 data can be specified with lat/lon limits:
https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/T2003122090500.L1A_LAC.R0000032134_21N_17N_160W_152W.hdf
Is there a similar provision or ability for limiting lat/lon limits for downloading Level3 data with wget?
Thank you,
Anthony
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Re: Subsetting MODIS-AQUA download by lat/lon with wget?
Anthony,
That example is to an existing extracted L1A file (one used by our SeaBASS team for doing validation analyses). We do not support extracting on the fly, but do offer extraction via data orders for L1, L2 and L3 data. Using the L3 browser, you can request spatially extracted data to be staged for you.
https://oceancolor.gsfc.nasa.gov/l3/
Regards,
Sean
That example is to an existing extracted L1A file (one used by our SeaBASS team for doing validation analyses). We do not support extracting on the fly, but do offer extraction via data orders for L1, L2 and L3 data. Using the L3 browser, you can request spatially extracted data to be staged for you.
https://oceancolor.gsfc.nasa.gov/l3/
Regards,
Sean
Re: Subsetting MODIS-AQUA download by lat/lon with wget?
Hi Sean,
I did not mention it earlier, but all of my original downloads of subsetting and extracting L3 data were via the L3 browser page.
Looking for a more automated method of downloading led me to using wget commands.
A future upgrade of allowing subsetting/extracting L3 data via wget commands would be enthusiastically welcomed, although I realize that might not be feasible and/or could involve a huge amount of work from the EarthData staff.
Thank you,
Anthony
I did not mention it earlier, but all of my original downloads of subsetting and extracting L3 data were via the L3 browser page.
Looking for a more automated method of downloading led me to using wget commands.
A future upgrade of allowing subsetting/extracting L3 data via wget commands would be enthusiastically welcomed, although I realize that might not be feasible and/or could involve a huge amount of work from the EarthData staff.
Thank you,
Anthony
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Re: Subsetting MODIS-AQUA download by lat/lon with wget?
Anthony,
We also support extracted subscriptions, but currently only or L1 and L2. It is our plan to extend that support to L3.
Another plan in the works is to have the file search API support spatial searches (currently it only does temporal) and allow it to submit extraction requests. ...that might satisfy your need, although it would be a bit asynchronous.
Extracting on the fly would only be possible with L3, and would definitely require some pretty significant development work. We'll put it on the wish list.
Sean
We also support extracted subscriptions, but currently only or L1 and L2. It is our plan to extend that support to L3.
Another plan in the works is to have the file search API support spatial searches (currently it only does temporal) and allow it to submit extraction requests. ...that might satisfy your need, although it would be a bit asynchronous.
Extracting on the fly would only be possible with L3, and would definitely require some pretty significant development work. We'll put it on the wish list.
Sean
-
- Posts: 396
- Joined: Mon Jun 22, 2020 5:24 pm America/New_York
- Has thanked: 8 times
- Been thanked: 8 times
Re: Subsetting MODIS-AQUA download by lat/lon with wget?
@anthcook this takes awhile but you can query earthdata search using this format:
wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --auth-no-challenge=on https://cmr.earthdata.nasa.gov/search?fi=MODIS&fdc=Ocean+Biology+Distributed+Active+Archive+Center&fl=3+-+Gridded+Observations&fpc0=Earth+Observation+Satellites&fps0=Aqua&fpb0=Space-based+Platforms&lat=10.96875&long=8.4375&zoom=0
To get this URL, I used the filters on the left of the Earthdata Search Tool to select all the values (images attached) and then copied the URL and stuck it into the wget command.
wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --auth-no-challenge=on https://cmr.earthdata.nasa.gov/search?fi=MODIS&fdc=Ocean+Biology+Distributed+Active+Archive+Center&fl=3+-+Gridded+Observations&fpc0=Earth+Observation+Satellites&fps0=Aqua&fpb0=Space-based+Platforms&lat=10.96875&long=8.4375&zoom=0
To get this URL, I used the filters on the left of the Earthdata Search Tool to select all the values (images attached) and then copied the URL and stuck it into the wget command.
- Attachments
-
- Screen Shot 2023-02-10 at 5.00.24 PM.png (204.92 KiB) Not viewed yet
-
- Screen Shot 2023-02-10 at 5.00.13 PM.png (45.59 KiB) Not viewed yet
Re: Subsetting MODIS-AQUA download by lat/lon with wget?
Thank you amscott,
I received errors when I tried to execute your command in wget (see attachment). How did you not receive these errors?
Anthony
I received errors when I tried to execute your command in wget (see attachment). How did you not receive these errors?
Anthony
- Attachments
-
- amscott_example.PNG (40.66 KiB) Not viewed yet