Last change
on this file since 199 was
164,
checked in by jbrlod, 9 years ago
|
add nemed exp
|
-
Property svn:executable set to
*
|
File size:
983 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | #specify dates here : |
---|
4 | #begin_date="20130827" |
---|
5 | #end_date="20130922" |
---|
6 | begin_date="20090814" |
---|
7 | end_date="20090916" |
---|
8 | |
---|
9 | #specifiy where the data will be downloaded |
---|
10 | TARGET_DIR='/usr/home/jbrlod/these/postdoc/collaborations/leila/data/AVISO' |
---|
11 | |
---|
12 | #specifiy the AVISO directory on the FTP repository |
---|
13 | DIRECTORY="regional-mediterranean/delayed-time/grids/madt/all-sat-merged/uv" |
---|
14 | |
---|
15 | #connection ids |
---|
16 | HOST='ftp.aviso.altimetry.fr' |
---|
17 | USER='laub_kodalazian' |
---|
18 | PASSWD="opzdf54" |
---|
19 | PORT=21 |
---|
20 | |
---|
21 | |
---|
22 | #The following don't have to be modifiy |
---|
23 | |
---|
24 | current_date=`date '+%C%y%m%d' -d "$begin_date"` |
---|
25 | |
---|
26 | while [ $current_date -ne $end_date ]; do |
---|
27 | |
---|
28 | year=`date '+%C%y' -d "$current_date"` |
---|
29 | current_date=`date '+%C%y%m%d' -d "$current_date + 1 day"` |
---|
30 | CDIR=${DIRECTORY}"/"${year} |
---|
31 | CFILE="dt_*"$current_date"*.nc.gz" |
---|
32 | |
---|
33 | echo "---> Extraction : "$FILE |
---|
34 | ftp -inv $HOST <<EOF |
---|
35 | quote USER $USER |
---|
36 | quote PASS $PASSWD |
---|
37 | cd $CDIR |
---|
38 | mget $CFILE |
---|
39 | quit |
---|
40 | EOF |
---|
41 | |
---|
42 | mv -f $CFILE $TARGET_DIR |
---|
43 | gunzip -f ${TARGET_DIR}"/"${CFILE} |
---|
44 | done |
---|
45 | |
---|
46 | |
---|
47 | |
---|
Note: See
TracBrowser
for help on using the repository browser.