Brian Blaylock
January 13, 2021

Download GOES Data: Nearest Time#

For all options, refer to the GOES-2-go Reference Guide: goes2go.data.goes_nearesttime

[1]:
from goes2go.data import goes_nearesttime

from datetime import datetime, timedelta
import pandas as pd

Specify the time you want to go data nearest to. May be a datetime or pandas-style datetime object, or a string that pandas can decode.


Example 1:#

Download an ABI file from GOES-East nearest the time 10:00 UTC December 12, 2020. Return the data opened with xarray.

[2]:
g = goes_nearesttime(datetime(2020, 12, 25, 10),
                     satellite='goes16',
                     product='ABI',
                     return_as='xarray')
 _______________________________
 | Satellite: noaa-goes16      |
 |   Product: ABI-L2-MCMIPC    |
 |    Domain: C                |
πŸ“¦ Finished downloading [1] files to [/p/home/blaylock/data/noaa-goes16/ABI-L2-MCMIPC].
πŸ“š Finished reading [1] files into xarray.Dataset.
[3]:
g
[3]:
<xarray.Dataset>
Dimensions:                                 (band: 1, number_of_image_bounds: 2, number_of_time_bounds: 2, x: 2500, y: 1500)
Coordinates:
    t                                       datetime64[ns] 2020-12-25T10:02:3...
  * y                                       (y) float32 0.1282 ... 0.04427
  * x                                       (x) float32 -0.1013 ... 0.03861
    y_image                                 float32 0.08624
    x_image                                 float32 -0.03136
    band_wavelength_C01                     (band) float32 0.47
    band_wavelength_C02                     (band) float32 0.64
    band_wavelength_C03                     (band) float32 0.87
    band_wavelength_C04                     (band) float32 1.38
    band_wavelength_C05                     (band) float32 1.61
    band_wavelength_C06                     (band) float32 2.25
    band_wavelength_C07                     (band) float32 3.89
    band_wavelength_C08                     (band) float32 6.17
    band_wavelength_C09                     (band) float32 6.93
    band_wavelength_C10                     (band) float32 7.34
    band_wavelength_C11                     (band) float32 8.44
    band_wavelength_C12                     (band) float32 9.61
    band_wavelength_C13                     (band) float32 10.33
    band_wavelength_C14                     (band) float32 11.19
    band_wavelength_C15                     (band) float32 12.27
    band_wavelength_C16                     (band) float32 13.27
    band_id_C01                             (band) int8 1
    band_id_C02                             (band) int8 2
    band_id_C03                             (band) int8 3
    band_id_C04                             (band) int8 4
    band_id_C05                             (band) int8 5
    band_id_C06                             (band) int8 6
    band_id_C07                             (band) int8 7
    band_id_C08                             (band) int8 8
    band_id_C09                             (band) int8 9
    band_id_C10                             (band) int8 10
    band_id_C11                             (band) int8 11
    band_id_C12                             (band) int8 12
    band_id_C13                             (band) int8 13
    band_id_C14                             (band) int8 14
    band_id_C15                             (band) int8 15
    band_id_C16                             (band) int8 16
    dataset_name                            <U74 'OR_ABI-L2-MCMIPC-M6_G16_s20...
    date_created                            <U22 '2020-12-25T10:04:10.7Z'
    time_coverage_start                     <U22 '2020-12-25T10:01:17.9Z'
    time_coverage_end                       <U22 '2020-12-25T10:03:55.8Z'
Dimensions without coordinates: band, number_of_image_bounds, number_of_time_bounds
Data variables:
    CMI_C01                                 (y, x) float32 ...
    DQF_C01                                 (y, x) float32 ...
    CMI_C02                                 (y, x) float32 ...
    DQF_C02                                 (y, x) float32 ...
    CMI_C03                                 (y, x) float32 ...
    DQF_C03                                 (y, x) float32 ...
    CMI_C04                                 (y, x) float32 ...
    DQF_C04                                 (y, x) float32 ...
    CMI_C05                                 (y, x) float32 ...
    DQF_C05                                 (y, x) float32 ...
    CMI_C06                                 (y, x) float32 ...
    DQF_C06                                 (y, x) float32 ...
    CMI_C07                                 (y, x) float32 ...
    DQF_C07                                 (y, x) float32 ...
    CMI_C08                                 (y, x) float32 ...
    DQF_C08                                 (y, x) float32 ...
    CMI_C09                                 (y, x) float32 ...
    DQF_C09                                 (y, x) float32 ...
    CMI_C10                                 (y, x) float32 ...
    DQF_C10                                 (y, x) float32 ...
    CMI_C11                                 (y, x) float32 ...
    DQF_C11                                 (y, x) float32 ...
    CMI_C12                                 (y, x) float32 ...
    DQF_C12                                 (y, x) float32 ...
    CMI_C13                                 (y, x) float32 ...
    DQF_C13                                 (y, x) float32 ...
    CMI_C14                                 (y, x) float32 ...
    DQF_C14                                 (y, x) float32 ...
    CMI_C15                                 (y, x) float32 ...
    DQF_C15                                 (y, x) float32 ...
    CMI_C16                                 (y, x) float32 ...
    DQF_C16                                 (y, x) float32 ...
    time_bounds                             (number_of_time_bounds) datetime64[ns] ...
    goes_imager_projection                  int32 -2147483647
    y_image_bounds                          (number_of_image_bounds) float32 ...
    x_image_bounds                          (number_of_image_bounds) float32 ...
    nominal_satellite_subpoint_lat          float64 0.0
    nominal_satellite_subpoint_lon          float64 -75.2
    nominal_satellite_height                float64 3.579e+04
    geospatial_lat_lon_extent               float32 9.969e+36
    outlier_pixel_count_C01                 float64 0.0
    min_reflectance_factor_C01              float64 0.0
    max_reflectance_factor_C01              float64 0.0013
    mean_reflectance_factor_C01             float64 7.66e-05
    std_dev_reflectance_factor_C01          float64 1.62e-05
    outlier_pixel_count_C02                 float64 0.0
    min_reflectance_factor_C02              float64 0.0
    max_reflectance_factor_C02              float64 0.01686
    mean_reflectance_factor_C02             float64 0.0004737
    std_dev_reflectance_factor_C02          float64 0.0006462
    outlier_pixel_count_C03                 float64 0.0
    min_reflectance_factor_C03              float64 0.0
    max_reflectance_factor_C03              float64 0.009648
    mean_reflectance_factor_C03             float64 0.0001223
    std_dev_reflectance_factor_C03          float64 0.0002471
    outlier_pixel_count_C04                 float64 0.0
    min_reflectance_factor_C04              float64 0.0
    max_reflectance_factor_C04              float64 0.01254
    mean_reflectance_factor_C04             float64 0.0001181
    std_dev_reflectance_factor_C04          float64 0.000219
    outlier_pixel_count_C05                 float64 0.0
    min_reflectance_factor_C05              float64 0.0
    max_reflectance_factor_C05              float64 0.04088
    mean_reflectance_factor_C05             float64 0.0001563
    std_dev_reflectance_factor_C05          float64 0.0003238
    outlier_pixel_count_C06                 float64 0.0
    min_reflectance_factor_C06              float64 0.0
    max_reflectance_factor_C06              float64 0.03812
    mean_reflectance_factor_C06             float64 8.81e-05
    std_dev_reflectance_factor_C06          float64 0.0001417
    outlier_pixel_count_C07                 float64 0.0
    min_brightness_temperature_C07          float64 104.6
    max_brightness_temperature_C07          float64 299.3
    mean_brightness_temperature_C07         float64 270.1
    std_dev_brightness_temperature_C07      float64 21.6
    outlier_pixel_count_C08                 float64 0.0
    min_brightness_temperature_C08          float64 201.9
    max_brightness_temperature_C08          float64 253.3
    mean_brightness_temperature_C08         float64 236.7
    std_dev_brightness_temperature_C08      float64 10.11
    outlier_pixel_count_C09                 float64 0.0
    min_brightness_temperature_C09          float64 201.5
    max_brightness_temperature_C09          float64 262.4
    mean_brightness_temperature_C09         float64 244.8
    std_dev_brightness_temperature_C09      float64 12.32
    outlier_pixel_count_C10                 float64 0.0
    min_brightness_temperature_C10          float64 201.5
    max_brightness_temperature_C10          float64 269.3
    mean_brightness_temperature_C10         float64 251.4
    std_dev_brightness_temperature_C10      float64 14.25
    outlier_pixel_count_C11                 float64 0.0
    min_brightness_temperature_C11          float64 200.6
    max_brightness_temperature_C11          float64 295.0
    mean_brightness_temperature_C11         float64 266.7
    std_dev_brightness_temperature_C11      float64 21.59
    outlier_pixel_count_C12                 float64 0.0
    min_brightness_temperature_C12          float64 208.2
    max_brightness_temperature_C12          float64 275.0
    mean_brightness_temperature_C12         float64 248.8
    std_dev_brightness_temperature_C12      float64 17.01
    outlier_pixel_count_C13                 float64 0.0
    min_brightness_temperature_C13          float64 201.3
    max_brightness_temperature_C13          float64 298.0
    mean_brightness_temperature_C13         float64 268.1
    std_dev_brightness_temperature_C13      float64 22.46
    outlier_pixel_count_C14                 float64 0.0
    min_brightness_temperature_C14          float64 201.0
    max_brightness_temperature_C14          float64 298.2
    mean_brightness_temperature_C14         float64 267.5
    std_dev_brightness_temperature_C14      float64 22.79
    outlier_pixel_count_C15                 float64 0.0
    min_brightness_temperature_C15          float64 200.5
    max_brightness_temperature_C15          float64 295.6
    mean_brightness_temperature_C15         float64 266.1
    std_dev_brightness_temperature_C15      float64 22.22
    outlier_pixel_count_C16                 float64 0.0
    min_brightness_temperature_C16          float64 201.3
    max_brightness_temperature_C16          float64 278.9
    mean_brightness_temperature_C16         float64 256.4
    std_dev_brightness_temperature_C16      float64 17.86
    percent_uncorrectable_GRB_errors        float64 0.0
    percent_uncorrectable_L0_errors         float64 0.0
    dynamic_algorithm_input_data_container  int32 -2147483647
    algorithm_product_version_container     int32 -2147483647
Attributes:
    naming_authority:          gov.nesdis.noaa
    Conventions:               CF-1.7
    Metadata_Conventions:      Unidata Dataset Discovery v1.0
    standard_name_vocabulary:  CF Standard Name Table (v35, 20 July 2016)
    institution:               DOC/NOAA/NESDIS > U.S. Department of Commerce,...
    project:                   GOES
    production_site:           NSOF
    production_environment:    OE
    spatial_resolution:        2km at nadir
    orbital_slot:              GOES-East
    platform_ID:               G16
    instrument_type:           GOES R Series Advanced Baseline Imager
    scene_id:                  CONUS
    instrument_ID:             FM1
    iso_series_metadata_id:    8c9e8150-3692-11e3-aa6e-0800200c9a66
    keywords_vocabulary:       NASA Global Change Master Directory (GCMD) Ear...
    title:                     ABI L2 Cloud and Moisture Imagery
    summary:                   Multiple reflectance and emissive channel Clou...
    license:                   Unclassified data.  Access is restricted to ap...
    keywords:                  ATMOSPHERE > ATMOSPHERIC RADIATION > REFLECTAN...
    cdm_data_type:             Image
    processing_level:          National Aeronautics and Space Administration ...
    timeline_id:               ABI Mode 6
    production_data_source:    Realtime
    id:                        5200b893-323e-4b7f-9485-812d93c1f864

Example 2:#

Download a GLM file from GOES-West nearest the time 12:00 UTC January 1, 2021. Return the data as a list of files.

[4]:
g = goes_nearesttime('2021-01-01 12:00',
                     satellite='goes17',
                     product='GLM',
                     return_as='filelist')
 _______________________________
 | Satellite: noaa-goes17      |
 |   Product: GLM-L2-LCFA      |
πŸ“¦ Finished downloading [1] files to [/p/home/blaylock/data/noaa-goes17/GLM-L2-LCFA].
[5]:
g
[5]:
file start end creation
0 noaa-goes17/GLM-L2-LCFA/2021/001/12/OR_GLM-L2-... 2021-01-01 12:00:00 2021-01-01 12:00:20.400 2021-01-01 12:00:20.600
[6]:
g.attrs
[6]:
{'satellite': 'noaa-goes17',
 'product': 'GLM-L2-LCFA',
 'start': Timestamp('2021-01-01 11:00:00'),
 'end': Timestamp('2021-01-01 13:00:00'),
 'filePath': PosixPath('/p/home/blaylock/data')}

Show the files on my home drive…#

[7]:
%%bash
tree ~/data
/p/home/blaylock/data
β”œβ”€β”€ noaa-goes16
β”‚Β Β  └── ABI-L2-MCMIPC
β”‚Β Β      └── 2020
β”‚Β Β          └── 360
β”‚Β Β              └── 10
β”‚Β Β                  └── OR_ABI-L2-MCMIPC-M6_G16_s20203601001179_e20203601003558_c20203601004107.nc
└── noaa-goes17
    └── GLM-L2-LCFA
        └── 2021
            └── 001
                └── 12
                    └── OR_GLM-L2-LCFA_G17_s20210011200000_e20210011200204_c20210011200206.nc

10 directories, 2 files
[ ]: