source: altifloat/scripts/extract_aviso.sh @ 199

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"
6begin_date="20090814"
7end_date="20090916"
8
9#specifiy where the data will be downloaded
10TARGET_DIR='/usr/home/jbrlod/these/postdoc/collaborations/leila/data/AVISO'
11
12#specifiy the AVISO directory on the FTP repository
13DIRECTORY="regional-mediterranean/delayed-time/grids/madt/all-sat-merged/uv"
14
15#connection ids
16HOST='ftp.aviso.altimetry.fr'
17USER='laub_kodalazian'
18PASSWD="opzdf54"
19PORT=21
20
21
22#The following don't have to be modifiy
23
24current_date=`date '+%C%y%m%d' -d "$begin_date"` 
25
26while [ $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
35quote USER $USER
36quote PASS $PASSWD
37cd $CDIR
38mget $CFILE
39quit
40EOF
41
42mv -f $CFILE $TARGET_DIR
43gunzip -f ${TARGET_DIR}"/"${CFILE}
44done 
45
46
47
Note: See TracBrowser for help on using the repository browser.