forked from insarlab/PyAPS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetaps.py
28 lines (22 loc) · 1016 Bytes
/
getaps.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
############################################################
# Program is part of PyAPS #
# Copyright 2012, by the California Institute of Technology#
# Contact: earthdef@gps.caltech.edu #
# Modified by A. Benoit and R. Jolivet 2019 #
# Ecole Normale Superieure, Paris #
# Contact: insar@geologie.ens.fr #
############################################################
'''Script to automatically download weather model data corresponding to our interferograms.'''
import PyAPS
import tsinsar as ts
import datetime as dt
dates,sat,bperp = ts.load_list('ifg.list')
days,usat,Jmat = ts.ConnectMatrix(dates,sat)
daylist = []
for k in days:
dobj = dt.date.fromordinal(int(k))
strobj = '%4d%02d%02d'%(dobj.year,dobj.month,dobj.day)
daylist.append(strobj)
PyAPS.ECMWFdload(daylist,'18','./Atmos/ECMWF/')
#PyAPS.NARRdload(daylist,'18','./Atmos/NARR/')
#PyAPS.ERAdload(daylist,'18','./Atmos/ERA')