Fix_obsfiles_NO2.ksh 523 Bytes
Newer Older
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
29
30
31
32
33
34
#!/bin/ksh
#
set -x

cd /scratch/ms/se/smo/carra/conv

DTG1=$1
DTG2=$2

DTG=$DTG1
TXTPATH=/scratch/ms/se/smo/carra/conv/NO/

while (( $DTG<=$DTG2 ))
do

  FILE_OUT=$TXTPATH"carra_Norway_SA_RR24_"$DTG".txt"

  ((BB = ${DTG} / 100))
  ((YY = $BB / 10000))
  ((MM = ( $BB - $YY*10000) / 100))

  IY=$YY
  IM=`perl -e "printf('%2.2i', '$MM')"`

  INFILE1="/scratch/ms/se/smo/carra/conv/NO/"$IY"/carra_Norway_SA_RR24_"$IY$IM".txt"

  grep $DTG $INFILE1 > $FILE_OUT

  DTG=$(/home/ms/se/smo/bin/mandtg.x $DTG + 24) 

done

exit