Page 1 of 1

CMR VIIRS Ocean Color L2 Download

Posted: Fri Jul 01, 2022 11:16 am America/New_York
by bigelowtek
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

Re: CMR VIIRS Ocean Color L2 Download

Posted: Tue Jul 05, 2022 12:19 pm America/New_York
by OB ODPS - towens
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

Re: CMR VIIRS Ocean Color L2 Download

Posted: Wed Jul 06, 2022 10:03 am America/New_York
by bigelowtek
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?

Re: CMR VIIRS Ocean Color L2 Download

Posted: Wed Jul 06, 2022 10:44 am America/New_York
by ASDC - ingridgs
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,

Re: CMR VIIRS Ocean Color L2 Download

Posted: Wed Jul 06, 2022 11:30 am America/New_York
by bigelowtek
Ah, ok, that makes a lot of sense. Thank you for the clarification!