source: ether_ndacc/trunk/dev_ndacc/livraison/src/goutail/run_ndacc @ 84

Last change on this file since 84 was 84, checked in by cbipsl, 14 years ago

import ether_ndacc

  • Property svn:executable set to *
File size: 2.4 KB
Line 
1#!/bin/ksh
2
3#parametres en entree
4
5typeset -i NbrOptionOblig=0
6typeset -i nbfiles=0
7while [ $# -ge 1 ]
8do
9  case $1 in
10    -y) shift 1;annee="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #annee traitee
11    -s) shift 1;suf="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #suffixe des fichiers de données
12    -d) shift 1;rep_data="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #repertoire des fichiers de donnees
13    -r) shift 1;reader="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #nom du lecteur
14    -dr) shift 1;rep_reader="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #repertoire du lecteur
15    -m) shift 1;debug="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #mode affichage
16    -st) shift 1;station="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #abreviation station
17    -res) shift 1;rep_res="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #repertoire resultat
18    *) echo 'Parameter ' $1 'not defined';
19        echo "-y : annee traitee";     
20        echo "-s : station";
21        echo "-d : repertoire des fichiers de donnees";
22        echo "-r : nom du lecteur";     
23        echo "-dr : repertoire du lecteur";     
24        echo "-m : mode affichage";
25        exit 1;;
26
27  esac
28  shift 1
29done
30
31if [[ $debug == '' ]]
32then
33        debug=1
34fi
35
36if [[ $rep_res == '' ]]
37then
38        rep_res="." 
39fi
40
41echo "annee=$annee"
42
43list_file=`ls "$rep_data"./O3NO2_20"$annee"_co.$station`
44rm data_files_tmp
45
46echo "$rep_data" > data_files_tmp
47nbfiles=`ls "$rep_data"./O3NO2_20"$annee"_co.$station | wc -l`
48echo "$nbfiles" >> data_files_tmp
49echo "$debug" >> data_files_tmp
50echo "20$annee" >> data_files_tmp
51echo "$station" >> data_files_tmp
52echo "$rep_res" >> data_files_tmp
53echo "$suf" >> data_files_tmp
54
55
56for file in $list_file
57do
58        echo "$file" >> data_files_tmp
59done
60
61if [[ $station == 'oh' ]] then
62        stationM="OH"
63fi
64if [[ $station == 'sb' ]] then
65        stationM="SB"
66fi
67if [[ $station == 'ba' ]] then
68        stationM="BA"
69fi
70if [[ $station == 're' ]] then
71        stationM="RE"
72fi
73if [[ $station == 'kr' ]] then
74        stationM="KR"
75fi
76if [[ $station == 'dd' ]] then
77        stationM="DD"
78fi
79if [[ $station == 'so' ]] then
80        stationM="SO"
81fi
82if [[ $station == 'zg' ]] then
83        stationM="ZG"
84fi
85if [[ $station == 'sa' ]] then
86        stationM="SA"
87fi
88if [[ $station == 'sk' ]] then
89        stationM="SK"
90fi
91
92
93rm $rep_data/list_info
94list_info=`ls "$rep_data"./SAOZ_*.$stationM`
95for file in $list_info
96do
97        echo "$file" >> list_info
98done
99
100mv list_info $rep_data
101
102./treat_files_list data_files_tmp
103 
Note: See TracBrowser for help on using the repository browser.