Find Matchup

Returns satellite level-2 file names and download links for a time and point or region.

Note: This is a python script find_matchup which is included in the OCSSW installation (currently only available for use on the command line).

~/ocssw/bin$ ./find_matchup -h
usage: find_matchup [-h] --sat {modisa,modist,viirsn,viirsj1,goci,meris,czcs,octs,seawifs}
                    [--data_type {oc,iop,sst}] [--slat SLAT] [--elat ELAT] [--slon SLON] [--elon ELON]
                    [--stime STIME] [--max_time_diff MAX_TIME_DIFF] [--etime ETIME]
                    [--seabass_file SEABASS_FILE [SEABASS_FILE ...]] [--get_data GET_DATA] [--verbose]

      This program perform searches of the EarthData Search ( Common Metadata
      Repository (CMR) for satellite granule names given an OB.DAAC satellite/instrument and lat/lon/time point or range.

         1) a list of OB.DAAC L2 satellite file granule names that contain the input criteria, per the CMR's records.
         2) a list of public download links to fetch the matching satellite file granules, per the CMR's records.

        The argument-list is a set of --keyword value pairs.

      Example usage calls:
         find_matchup --sat=modist --slat=23.0 --slon=170.0 --stime=2015-11-16T09:00:00Z --max_time_diff=8
         find_matchup --sat=modist --stime=2015-11-15T09:00:00Z --etime=2015-11-17T09:00:00Z --slat=23.0 --elat=25.0 --slon=170.0 --elon=175.0
         find_matchup --sat=modist --max_time_diff=4 --seabass_file=[your SB file name].sb
         find_matchup --sat=modist --slat=23.0 --slon=170.0 --stime=2015-11-16T09:00:00Z --max_time_diff=8 --get_data=[Your path]

        * This script is designed to work with files that have been properly
          formatted according to SeaBASS guidelines (i.e. Files that passed FCHECK).
          Some error checking is performed, but improperly formatted input files
          could cause this script to error or behave unexpectedly. Files
          downloaded from the SeaBASS database should already be properly formatted,
          however, please email and/or the contact listed
          in the metadata header if you identify problems with specific files.

        * It is always HIGHLY recommended that you check for and read any metadata
          header comments and/or documentation accompanying data files. Information
          from those sources could impact your analysis.

        * Compatibility: This script was developed for Python 3.5.

        * Requires a valid .netrc file in the user home ($HOME), e.g.:
          machine login USERNAME password PASSWD

  -h, --help            show this help message and exit
  --sat {modisa,modist,viirsn,viirsj1,goci,meris,czcs,octs,seawifs}
                              String specifier for satellite platform/instrument

                              Valid options are:
                              modisa  = MODIS on AQUA
                              modist  = MODIS on TERRA
                              viirsn  = VIIRS on Suomi-NPP
                              viirsj1 = VIIRS on JPSS-1/NOAA-20
                              meris   = MERIS on ENVISAT
                              goci    = GOCI on COMS
                              czcs    = CZCS on Nimbus-7
                              seawifs = SeaWiFS on OrbView-2
                              octs    = OCTS on ADEOS-I

  --data_type {oc,iop,sst}
                              OPTIONAL: String specifier for satellite data type
                              Default behavior returns all product suites

                              Valid options are:
                              oc   = Returns OC (ocean color) product suite
                              iop  = Returns IOP (inherent optical properties) product suite
                              sst  = Returns SST product suite (including SST4 where applicable)

  --slat SLAT                 Starting latitude, south-most boundary
                              If used with --seabass_file, will override lats in the file
                              Valid values: (-90,90N)

  --elat ELAT                 Ending latitude, north-most boundary
                              If used with --seabass_file and --slat, will override lats in the file
                              Valid values: (-90,90N)

  --slon SLON                 Starting longitude, west-most boundary
                              If used with --seabass_file, will override lons in the file
                              Valid values: (-180,180E)

  --elon ELON                 Ending longitude, east-most boundary
                              If used with --seabass_file and --slon, will override lons in the file
                              Valid values: (-180,180E)

  --stime STIME               Time (point) of interest in UTC
                              Default behavior: returns matches within +/- MAX_TIME_DIFF (default +/-3 hours) about this given time
                              If used with ETIME, this creates a search time window, between STIME and ETIME.
                              Valid format: string of the form: yyyy-mm-ddThh:mm:ssZ
                              OPTIONALLY: Use with --max_time_diff or --etime

  --max_time_diff MAX_TIME_DIFF
                              Maximum time difference between satellite and in situ point
                              OPTIONAL: default value +/-3 hours
                              Valid values: decimal number of hours (0-36)
                              Use with --seabass_file OR --stime

  --etime ETIME               Maximum time (range) of interest in UTC
                              Valid format: string of the form: yyyy-mm-ddThh:mm:ssZ
                              Use with --stime

  --seabass_file SEABASS_FILE [SEABASS_FILE ...]
                              Valid SeaBASS file name or list of file names
                              File must contain latitude, longitude, and date-time information as fields.

  --get_data GET_DATA         Flag to download all identified satellite granules.
                              Requires the use of an HTTP request.
                              Set to the desired output directory.

  --verbose                   OPTIONAL: Displays HTTP requests for each Earthdata CMR query.