Commit dae6f86d authored by Paulo V C Medeiros's avatar Paulo V C Medeiros
Browse files

Adapt Fix_vobsfiles.ksh

parent 46900563
#!/bin/bash
#SBATCH --job-name=vobs
#SBATCH --workdir=/scratch/ms/se/smo/carra/conv
#SBATCH --workdir=/perm/ms/se/snz/carra_esbjorn_scrpts/carra/data_files
#SBATCH --qos=normal
#SBATCH --time=02:00:00
#
set -x
cd /scratch/ms/se/smo/carra/conv
cd /perm/ms/se/snz/carra_esbjorn_scrpts/carra/data_files
YYYY=$1
MM=$2
......@@ -39,10 +39,9 @@ DTGNO2=$YYYY$MM$ND"06"
DTG=$DTG1
export INPATH=/scratch/ms/se/smo/carra/conv/
./Fix_obsfiles_DK.ksh $DTG1 $DTG2
export INPATH=/perm/ms/se/snz/carra_esbjorn_scrpts/carra/data_files/
# TODO: Install mandtg in my own home
DTGF=$(/home/ms/se/smo/bin/mandtg.x $DTG1 + -24)
((BB = ${DTGF} / 100))
......@@ -50,28 +49,9 @@ DTGF=$(/home/ms/se/smo/bin/mandtg.x $DTG1 + -24)
((MMF = ( $BB - $YYF*10000) / 100))
IMF=`perl -e "printf('%2.2i', '$MMF')"`
cd $INPATH/FI/$YYYY
gunzip "synopCARRA_FMI_"$YYYY$MM".txt.gz"
cd $INPATH
./Fix_obsfiles_FI.ksh $DTG1 $DTG2
cd $INPATH/FI/$YYYY
gzip "synopCARRA_FMI_"$YYYY$MM".txt"
cd $INPATH/FI/$YYF
gunzip "synopCARRA_FMI_"$YYF$IMF".txt.gz"
grep $DTG1 "synopCARRA_FMI_"$YYF$IMF".txt" > "../obs_"$DTG1".txt"
gzip "synopCARRA_FMI_"$YYF$IMF".txt"
cd $INPATH
./Fix_obsfiles_IC.ksh $DTG1 $DTG2
./Fix_obsfiles_NO1.ksh $DTG1 $DTG2
./Fix_obsfiles_NO2.ksh $DTGNO1 $DTGNO2
./Fix_obsfiles_SE.ksh $DTG1 $DTG2
......@@ -108,25 +88,25 @@ done
cd $INPATH/vobs
TAR_FILE="vobs_"$YYYY$IMM".tar"
tar cvf $TAR_FILE vobs*
gzip $TAR_FILE
GZIP_FILE="vobs_"$YYYY$IMM".tar.gz"
ecp $GZIP_FILE ec:/smo/harmonie/CARRA/vobs/$YYYY/
echmod 755 ec:/smo/harmonie/CARRA/vobs/$YYYY/*
echgrp hirald ec:/smo/harmonie/CARRA/vobs/$YYYY/*
/bin/rm $GZIP_FILE vobs*
#TAR_FILE="vobs_"$YYYY$IMM".tar"
#
#tar cvf $TAR_FILE vobs*
#gzip $TAR_FILE
#
#GZIP_FILE="vobs_"$YYYY$IMM".tar.gz"
#
#ecp $GZIP_FILE ec:/smo/harmonie/CARRA/vobs/$YYYY/
#echmod 755 ec:/smo/harmonie/CARRA/vobs/$YYYY/*
#echgrp hirald ec:/smo/harmonie/CARRA/vobs/$YYYY/*
#
#/bin/rm $GZIP_FILE vobs*
cd $INPATH
/bin/rm $INPATH/DK/obs_*.txt
/bin/rm $INPATH/FI/obs_*.txt
/bin/rm $INPATH/IC/obs_*.txt
/bin/rm $INPATH/NO/carra_Norway*.txt
/bin/rm $INPATH/SE/obs_*.txt
#/bin/rm $INPATH/DK/obs_*.txt
#/bin/rm $INPATH/FI/obs_*.txt
#/bin/rm $INPATH/IC/obs_*.txt
#/bin/rm $INPATH/NO/carra_Norway*.txt
#/bin/rm $INPATH/SE/obs_*.txt
exit
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment