NASA OceanColor API¶
-
class
oceancolor.
OceanColor
¶ -
file_search
(sensor='', sdate='', edate='', dtype='', add_url='1', results_as_file='1', search='', sub_id='', std_only='1', cksum='', output_format='json')¶ File search service retrieves publically available files within the NASA Ocean Data Processing System.
Parameters: - sensor (
string
) – mission name. valid options include: aquarius, seawifs, aqua, terra, meris, octs, czcs, hico, viirs - sdate (
string
) – start date for a search - edate (
string
) – end date for a search - dtype (
string
) – data type (i.e. level). valid options: L0, L1, L2, L3b (for binned data), L3m (for mapped data), MET (for ancillary data), misc (for sundry products) - add_url (
string
) – include full url in search result (boolean, 1=yes, 0=no) - results_as_file (
string
) – return results as a test file listing (boolean, 1=yes, 0=no, thus returns and HTML page) - search (
string
) – text string search - sub_id (
string
) – non-extracted subscription ID to search - std_only (
string
) – restrict results to standard products (i.e. ignore extracts, regional processings, etc.; boolean) - cksum (
string
) – return a checksum file for search results (boolean; sha1sums except for Aquarius soil moisture products which are md5sums; forces results_as_file; ignores addurl) - output_format (
string
) – valid options are: ‘json’, ‘txt’ and ‘html’
Returns: by default a json response based on the requested ‘output_format’. Options are ‘json, ‘txt’ and ‘html’.
- sensor (
-
get_file
(url='', path='')¶ It is possible to mimic FTP bulk data downloads using the HTTP-based data distribution server at https://oceandata.sci.gsfc.nasa.gov.
Parameters: - url (
string
) – a single file name which can be obtained by calling #file_search() an example would be https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/O1997001.L3b_DAY_CHL.nc - path (
string
) – Destination directory into which the granule needs to be downloaded.
Returns: a file object downloaded from the HTTP-based data distribution server at https://oceandata.sci.gsfc.nasa.gov.
- url (
-