Skip to content
Snippets Groups Projects
Commit 66ece74b authored by pascal.mouquet_ird.fr's avatar pascal.mouquet_ird.fr
Browse files

example scripts update 2

parent 485472a5
No related branches found
No related tags found
No related merge requests found
pre1_pre2_starttime_pre3_pre4_tile_pre5_endtime_maxclouds_site_nom pre1_pre2_starttime_pre3_pre4_tile_pre5_endtime_maxclouds_site_nom
#~ S2A_MSIL1C_20161023T070232_N0204_R120_T39LUG_20161023T070234 # add below your identifier list
#~ S2A_MSIL1C_20160611T072212_N0202_R063_T38KLB_20160611T072355
#~ S2A_MSIL1C_20160621T072212_N0204_R063_T38KME_20160621T072212
#~ S2A_MSIL1C_20160608T071222_N0202_R020_T38KLV_20160608T071512
#~ S2A_MSIL1C_20160608T071222_N0202_R020_T38KMD_20160608T071219
#~ S2A_MSIL1C_20160621T072212_N0204_R063_T38KLF_20160621T072212
#~ S2A_MSIL1C_20160628T071222_N0204_R020_T38JMT_20160628T071217
#~ S2A_MSIL1C_20160611T072212_N0202_R063_T38KMC_20160611T072355
#~ S2A_MSIL1C_20160608T071222_N0202_R020_T38KLU_20160608T071512
#~ S2A_MSIL1C_20160628T071222_N0204_R020_T38JLT_20160628T071217
#~ S2A_MSIL1C_20161108T072212_N0204_R063_T38KLA_20161108T072535
#~ S2A_MSIL1C_20160516T070242_N0202_R120_T39LTG_20160516T070240
#~ S2A_MSIL1C_20160516T070242_N0202_R120_T39LTF_20160516T070240
#~ S2A_MSIL1C_20160516T070242_N0202_R120_T38LRK_20160516T070240
#~ S2A_MSIL1C_20160708T071222_N0204_R020_T38LRK_20160708T071218
#~ S2A_MSIL1C_20160715T070242_N0204_R120_T38LRL_20160715T070238
#~ S2A_MSIL1C_20160715T070242_N0204_R120_T39LTF_20160715T070238
#~ S2A_MSIL1C_20160830T072212_N0204_R063_T38KMG_20160830T072348
#~ S2A_MSIL1C_20160817T071222_N0204_R020_T38LNH_20160817T071218
#~ S2A_MSIL1C_20160817T071222_N0204_R020_T38LPJ_20160817T071218
#~ S2A_MSIL1C_20160817T071222_N0204_R020_T38LQJ_20160817T071218
#~ S2A_MSIL1C_20160827T071222_N0204_R020_T38LQH_20160827T071227
#~ S2A_MSIL1C_20160827T071222_N0204_R020_T38LPH_20160827T071401
#~ S2A_MSIL1C_20160827T071222_N0204_R020_T38LPH_20160827T071227
#~ S2A_MSIL1C_20160830T072212_N0204_R063_T38LMH_20160830T072348
#~ S2A_MSIL1C_20160906T071212_N0204_R020_T38LRJ_20160906T071214
#~ S2A_MSIL1C_20160926T071212_N0204_R020_T38KMC_20160926T071210
#~ S2A_MSIL1C_20160926T071212_N0204_R020_T38KLC_20160926T071210
#~ S2A_MSIL1C_20161108T072212_N0204_R063_T38KLA_20161108T072535
S2A_MSIL1C_20160830T072212_N0204_R063_T38KLE_20160830T072348
S2A_MSIL1C_20160909T072212_N0204_R063_T38KLF_20160909T072258
S2A_MSIL1C_20161029T072212_N0204_R063_T38KME_20161029T072230
S2A_MSIL1C_20161003T070232_N0204_R120_T39LUC_20161003T070230
S2A_MSIL1C_20161003T070232_N0204_R120_T39LVC_20161003T0702304
S2A_MSIL1C_20161003T070232_N0204_R120_T39LUC_20161003T070230 S2A_MSIL1C_20161003T070232_N0204_R120_T39LUC_20161003T070230
#~ S2A_MSIL1C_20161108T072212_N0204_R063_T38KLA_20161108T072535
# -*- coding:utf-8 -*- # -*- coding:utf-8 -*-
"""
Télécharge les nouvelles tuiles identifiées ds le fichier tiles_file.csv """
Le delta_t permet d'alléger les requètes au serveur en n'interrogeant que les n derniers jours Download L1C product by identifier provided by a csv file
Ce but de ce script est d'être lancé très régulièrement (cron)
peps and scihub hub limits can be adjusted (line 31)
- usually PEPS is faster for recent data (limit max 8)
- scihub is better for a few months old products (limit max 2)
""" """
import logging import logging
import pandas as pd import pandas as pd
from sen2chain import DataRequest, DownloadAndProcess, Tile from sen2chain import DataRequest, DownloadAndProcess, Tile
import datetime import datetime
import os, shutil import os
import time import time
import glob
import math
import telegram
logger = logging.getLogger("Telechargement L1C") logger = logging.getLogger("L1C Downloading")
logging.basicConfig(level=logging.INFO) logging.basicConfig(level=logging.INFO)
#cwd = os.getcwd()
fwd = os.path.dirname(os.path.realpath(__file__)) fwd = os.path.dirname(os.path.realpath(__file__))
# liste de tuiles à traiter # Tile process list
tiles_file = fwd + "/97_01_download_tiles_identifier.csv" tiles_file = fwd + "/download_tiles_by_identifier.csv"
# default nombre de jours à requeter à partir de today
delta_t = 15
# recuperation de la liste des tuiles a telecharger
tiles_list = pd.read_csv(tiles_file, sep = '_', na_values="", comment='#') tiles_list = pd.read_csv(tiles_file, sep = '_', na_values="", comment='#')
for index, row in tiles_list.iterrows(): for index, row in tiles_list.iterrows():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment