seagrid.download.obpg_filedata#

Legacy OB.DAAC file-name helpers, kept for the 2.x series.

Use seagrid.download.obpg instead. generate_filename() now delegates to seagrid.download.obpg.filename(), which fixes the 8-day period format and the kd_490, sst, poc, flh, bbp, adg and zeu product names of the current OB.DAAC naming scheme.

Module Attributes

file_prefix

File-name prefix of each sensor (see seagrid.download.obpg.SENSOR_PREFIX).

Functions

generate_filename([data_var, timetype, dtm, ...])

Return a current-format OB.DAAC L3 mapped file name.

latlon_vecs([res])

Return latitude (descending) and longitude vectors of an OB.DAAC L3 grid.

remote_host()

Return the OB.DAAC server URL.

seagrid.download.obpg_filedata.file_prefix: dict[str, str] = {'MODIS': 'AQUA_MODIS', 'MODISA': 'AQUA_MODIS', 'MODIST': 'TERRA_MODIS', 'NOAA20': 'JPSS1_VIIRS', 'NOAA21': 'JPSS2_VIIRS', 'OLCI': 'S3A_OLCI_ERRNT', 'OLCIB': 'S3B_OLCI_ERRNT', 'SeaWiFS': 'SEASTAR_SEAWIFS_GAC', 'VIIRS': 'SNPP_VIIRS'}#

File-name prefix of each sensor (see seagrid.download.obpg.SENSOR_PREFIX).

seagrid.download.obpg_filedata.generate_filename(data_var='chlor_a', timetype='DAY', dtm='2010-05-05', sensor='MODIS', res='4km')[source]#

Return a current-format OB.DAAC L3 mapped file name.

Parameters:
  • data_var (str, optional) – Variable name, e.g. "chlor_a".

  • timetype (str, optional) – "DAY", "8D", "mo" (any seagrid.timetypes alias).

  • dtm (str or datetime-like, optional) – Date in the period.

  • sensor (str, optional) – Sensor name, e.g. "MODIS" or "SeaWiFS".

  • res (str, optional) – Resolution, e.g. "4km".

Returns:

str

Return type:

str

seagrid.download.obpg_filedata.latlon_vecs(res='4km')[source]#

Return latitude (descending) and longitude vectors of an OB.DAAC L3 grid.

Parameters:

res ({"1deg", "18km", "9km", "4km", "2km", "1km"}, optional) – Resolution.

Returns:

latvec, lonvec (numpy.ndarray) – Cell centres; latitude runs north to south, as in the files.

Return type:

tuple[ndarray[tuple[Any, …], dtype[float64]], ndarray[tuple[Any, …], dtype[float64]]]

seagrid.download.obpg_filedata.remote_host()[source]#

Return the OB.DAAC server URL.

Return type:

str