Skip to content

EUMETSAT Download Example

Binder


This notebook outlines how the satip module can be used to download data from EUMETSAT


Imports

We will begin by importing the relevant libraries, you can install the latest version of satip using pip install satip

from satip import eumetsat as ems

import os
import dotenv


User Input

data_dir = '../data/raw'
env_vars_fp = '../.env'
metadata_db_fp = '../data/EUMETSAT_metadata.db'


Authorising API Access

First we'll load the the environment variables and assign the user key and secret

dotenv.load_dotenv(env_vars_fp)

user_key = os.environ.get('user_key')
user_secret = os.environ.get('user_secret')


Downloading the Data

We have to initialise the DownloadManager, then we can pass date ranges over which all data will be downloaded

start_date = '2020-10-01 00:00'
end_date = '2020-10-01 00:30'

dm = ems.DownloadManager(user_key, user_secret, data_dir, metadata_db_fp)

dm.download_datasets(start_date, end_date)
100% 6/6 [00:00<00:00, 0.00s/it]


Metadata for each of the files is saved to a database

df_metadata = dm.get_df_metadata()

df_metadata.head()
id start_date end_date result_time platform_short_name platform_orbit_type instrument_name sensor_op_mode center_srs_name center_position file_name file_size missing_pct downloaded
0 1 2020-10-01 00:00:07.767000 2020-10-01 00:04:14.060000 2020-10-01 00:04:14.060000 MSG3 GEO SEVIRI RSS EPSG:4326 0 9.5 MSG3-SEVI-MSG15-0100-NA-20201001000414.060000000Z-NA 99819 0 2020-10-13 00:24:02.786606
1 2 2020-10-01 00:05:07.523000 2020-10-01 00:09:13.818000 2020-10-01 00:09:13.818000 MSG3 GEO SEVIRI RSS EPSG:4326 0 9.5 MSG3-SEVI-MSG15-0100-NA-20201001000913.818000000Z-NA 99819 0 2020-10-13 00:24:09.229091
2 3 2020-10-01 00:10:07.281000 2020-10-01 00:14:13.576000 2020-10-01 00:14:13.576000 MSG3 GEO SEVIRI RSS EPSG:4326 0 9.5 MSG3-SEVI-MSG15-0100-NA-20201001001413.576000000Z-NA 99819 0 2020-10-13 00:24:15.793064
3 4 2020-10-01 00:15:07.040000 2020-10-01 00:19:13.336000 2020-10-01 00:19:13.336000 MSG3 GEO SEVIRI RSS EPSG:4326 0 9.5 MSG3-SEVI-MSG15-0100-NA-20201001001913.336000000Z-NA 99819 0 2020-10-13 00:24:22.183809
4 5 2020-10-01 00:20:08.602000 2020-10-01 00:24:14.899000 2020-10-01 00:24:14.899000 MSG3 GEO SEVIRI RSS EPSG:4326 0 9.5 MSG3-SEVI-MSG15-0100-NA-20201001002414.899000000Z-NA 99819 0 2020-10-13 00:24:28.338515