CMR VIIRS Ocean Color L2 Download
-
- Posts: 14
- Joined: Fri Apr 29, 2022 12:07 pm America/New_York
CMR VIIRS Ocean Color L2 Download
We have a python script that searches for and downloads ocean color VIIRS granules from 2012 through 2018. Our script builds the following formatted search url:
https://cmr.earthdata.nasa.gov/search/granules.json?page_size=2000&provider=OB_DAAC&point=-66.8303,43.7478&instrument=VIIRS&platform=Suomi-NPP&short_name=VIIRSN_L2_oc&options[short_name][pattern]=true&temporal=2014-06-23T09:05:06Z,2014-06-23T21:05:06Z&sort_key=short_name
The script is only successful in finding 2018 granules. It searches for but does not find any VIIRS granules from 2012 - 2017. We can find the 2012 - 2017 granules manually on the earthdata website. We've noticed that on the earthdata website, the "title" in the metadata of the 2018 granules is formatted differently than the 2012 - 2017 granules. Should we be searching for the 2012 - 2017 granules in a different way? Is the title formatting the issue? Any insight is appreciated.
For reference, the following is a url that works and successfully finds a 2018 granule:
https://cmr.earthdata.nasa.gov/search/granules.json?page_size=2000&provider=OB_DAAC&point=-68.6081,43.6353&instrument=VIIRS&platform=Suomi-NPP&short_name=VIIRSN_L2_oc&options[short_name][pattern]=true&temporal=2018-09-17T08:48:34Z,2018-09-17T20:48:34Z&sort_key=short_name
https://cmr.earthdata.nasa.gov/search/granules.json?page_size=2000&provider=OB_DAAC&point=-66.8303,43.7478&instrument=VIIRS&platform=Suomi-NPP&short_name=VIIRSN_L2_oc&options[short_name][pattern]=true&temporal=2014-06-23T09:05:06Z,2014-06-23T21:05:06Z&sort_key=short_name
The script is only successful in finding 2018 granules. It searches for but does not find any VIIRS granules from 2012 - 2017. We can find the 2012 - 2017 granules manually on the earthdata website. We've noticed that on the earthdata website, the "title" in the metadata of the 2018 granules is formatted differently than the 2012 - 2017 granules. Should we be searching for the 2012 - 2017 granules in a different way? Is the title formatting the issue? Any insight is appreciated.
For reference, the following is a url that works and successfully finds a 2018 granule:
https://cmr.earthdata.nasa.gov/search/granules.json?page_size=2000&provider=OB_DAAC&point=-68.6081,43.6353&instrument=VIIRS&platform=Suomi-NPP&short_name=VIIRSN_L2_oc&options[short_name][pattern]=true&temporal=2018-09-17T08:48:34Z,2018-09-17T20:48:34Z&sort_key=short_name
Filters:
-
- Subject Matter Expert
- Posts: 450
- Joined: Fri Feb 05, 2021 9:17 am America/New_York
- Been thanked: 7 times
Re: CMR VIIRS Ocean Color L2 Download
I don't know why EarthData Search is not finding the granules. They are in their database.
Try removing all of the mission and instrument specifiers and simply using the CMR concept id with &echo_collection_id=C1441377506-OB_DAAC
https://cmr.earthdata.nasa.gov/search/granules.json?page_size=2000&point=-66.8303,43.7478&options%5Bshort_name%5D%5Bpattern%5D=true&temporal=2017-06-23T09:05:06Z,2017-06-23T21:05:06Z&sort_key=short_name&echo_collection_id=C1441377506-OB_DAAC
Tommy
Try removing all of the mission and instrument specifiers and simply using the CMR concept id with &echo_collection_id=C1441377506-OB_DAAC
https://cmr.earthdata.nasa.gov/search/granules.json?page_size=2000&point=-66.8303,43.7478&options%5Bshort_name%5D%5Bpattern%5D=true&temporal=2017-06-23T09:05:06Z,2017-06-23T21:05:06Z&sort_key=short_name&echo_collection_id=C1441377506-OB_DAAC
Tommy
-
- Posts: 14
- Joined: Fri Apr 29, 2022 12:07 pm America/New_York
Re: CMR VIIRS Ocean Color L2 Download
Thank you. Your suggestion worked. I removed the provider, instrument, and platform specifiers, and included collection id. The script successfully found and downloaded VIIRS granules from all years we searched for.
It is odd that when I had specified the provider, instrument, and platform, the script could only find VIIRS 2018 granules even though 2012 - 2018 are in the same collection. I wonder if there is an inconsistency in the metadata?
It is odd that when I had specified the provider, instrument, and platform, the script could only find VIIRS 2018 granules even though 2012 - 2018 are in the same collection. I wonder if there is an inconsistency in the metadata?
-
- Posts: 196
- Joined: Fri Apr 23, 2021 9:14 am America/New_York
- Has thanked: 25 times
- Been thanked: 7 times
Re: CMR VIIRS Ocean Color L2 Download
Dear user,
The metadata ShortName for the PLATFORM has changed over time. Your query specified
platform=Suomi-NPP, which was not how the metadata was defined earlier on. The platform was defined as "NPP".
A query for the platform which included _both_ of these values will return the results over the temporal range. Note, this is subject to any other metadata value changes of which I'm not aware; I simply checked the values of the query parameters included for the sample temporal ranges, there might be other examples of changes of course.
The query should include:
platform\[\]=Suomi-NPP&platform\[\]=NPP
Example:
curl -i "https://cmr.earthdata.nasa.gov/search/granules.json?page_size=2000&provider=OB_DAAC&point=-66.8303,43.7478&instrument=VIIRS&short_name=VIIRSN_L2_oc&options%5Bshort_name%5D%5Bpattern%5D=true&temporal=2014-06-23T09:05:06Z,2014-06-23T21:05:06Z&sort_key=short_name&platform\[\]=Suomi-NPP&platform\[\]=NPP"
You can see these values by specifying a response type of umm_json for the granules query, btw.
Alternatively, you can also simply use the known collection concept_id is simpler, as long as you know the id, but this is the reason the original query is not returning all of the expected results.
I hope this answer cleared your initial issue regarding the metadata.
Regards,
The metadata ShortName for the PLATFORM has changed over time. Your query specified
platform=Suomi-NPP, which was not how the metadata was defined earlier on. The platform was defined as "NPP".
A query for the platform which included _both_ of these values will return the results over the temporal range. Note, this is subject to any other metadata value changes of which I'm not aware; I simply checked the values of the query parameters included for the sample temporal ranges, there might be other examples of changes of course.
The query should include:
platform\[\]=Suomi-NPP&platform\[\]=NPP
Example:
curl -i "https://cmr.earthdata.nasa.gov/search/granules.json?page_size=2000&provider=OB_DAAC&point=-66.8303,43.7478&instrument=VIIRS&short_name=VIIRSN_L2_oc&options%5Bshort_name%5D%5Bpattern%5D=true&temporal=2014-06-23T09:05:06Z,2014-06-23T21:05:06Z&sort_key=short_name&platform\[\]=Suomi-NPP&platform\[\]=NPP"
You can see these values by specifying a response type of umm_json for the granules query, btw.
Alternatively, you can also simply use the known collection concept_id is simpler, as long as you know the id, but this is the reason the original query is not returning all of the expected results.
I hope this answer cleared your initial issue regarding the metadata.
Regards,
-
- Posts: 14
- Joined: Fri Apr 29, 2022 12:07 pm America/New_York
Re: CMR VIIRS Ocean Color L2 Download
Ah, ok, that makes a lot of sense. Thank you for the clarification!