Commit 88fd04b8 authored by saeed's avatar saeed
Browse files

cycle is seperated in era5

parent 92532b7f
......@@ -8,16 +8,16 @@ module add odb/1.0.3
module add odb_api/0.19.1
. ./functionsodb.sh
do_era5=0
do_precise=1
do_era5=1
do_precise=0
do_only_monthy=0
use_report_file=0 ###if you want to have a list of report types in a file
report_type_filename="report_type_list"
list_report=(16001)
startdate="2017-01-01"
enddate="2018-01-06"
time_cycle="12"
enddate="2017-01-03"
time_cycle="00,12"
PRECISE_ODB_DIR="/scratch/ms/se/smdk/scratchdir/"
OUTPUT_DIR="/home/ms/se/smdk/odb_panel/OUTPUT"
......@@ -71,41 +71,42 @@ if [ ${do_era5} -eq 1 ];then
vb=`echo ${time_cycle} | cut -d, -f${nf}`
fout_cycle=`output_name_cycle ${fout} ${vb}`
if [ ! -f ${OUTPUT_DIR}/${fout_cycle} ];then
lexist=0
fi
done
#lexist=0
#fi
#done
if [ ${lexist} -eq 0 ];then
echo "==========================================="
echo "we are extracting odb for repportype ${vr} for a period ${startdate_out} ${enddate_out}"
echo "==========================================="
sed -e "s/<reptype>/${vr}/g" -e "s/<time_cycle>/${time_cycle_out}/g" -e "s/<startdate_out>/${startdate_out}/g" -e "s/<enddate_out>/${enddate_out}/g" -e "s/<startdate>/${startdate}/g" -e "s/<enddate>/${enddate}/g" request_odb_temp_era5 > request_odb_temp
mars request_odb_temp
if [ ! -f ${fin} ];then
echo "something went wrong in creating odb file ${fin} so we quit check your mars request"
fi
do_filter ${fin} &>/dev/null
#if [ ${lexist} -eq 0 ];then
echo "==========================================="
echo "we are extracting odb for repportype ${vr} for a period ${startdate_out} ${enddate_out} cycle ${fout_cycle}"
echo "==========================================="
sed -e "s/<reptype>/${vr}/g" -e "s/<cycle>/${vb}/g" -e "s/<startdate_out>/${startdate_out}/g" -e "s/<enddate_out>/${enddate_out}/g" -e "s/<startdate>/${startdate}/g" -e "s/<enddate>/${enddate}/g" request_odb_temp_era5 > request_odb_temp
mars request_odb_temp
if [ ! -f ${fin} ];then
echo "something went wrong in creating odb file ${fin} so we quit check your mars request"
fi
do_filter ${fin} &>/dev/null
if [ $? -ne 0 ];then
echo "some thing went wrong in odb filtering on file ${fin} so we quit"
echo "it is very likely that you have a problem with time_cycle ${time_cycle_out} so maybe you can change the cycle"
if [ $? -ne 0 ];then
echo "some thing went wrong in odb filtering on file ${fin} so we quit"
echo "it is very likely that you have a problem with time_cycle ${time_cycle_out} so maybe you can change the cycle"
rm -f ${fin} 2>/dev/null
exit
fi
rm -f ${fin} 2>/dev/null
exit
fi
rm -f ${fin} 2>/dev/null
nc=`echo ${time_cycle} | awk -F',' '{print NF}'`
for nf in `seq 1 ${nc}`;do
vb=`echo ${time_cycle} | cut -d, -f${nf}`
#nc=`echo ${time_cycle} | awk -F',' '{print NF}'`
#for nf in `seq 1 ${nc}`;do
#vb=`echo ${time_cycle} | cut -d, -f${nf}`
${path_bin}/era5_cycle.exe ${fout} ${vb}
fout_cycle=`output_name_cycle ${fout} ${vb}`
#fout_cycle=`output_name_cycle ${fout} ${vb}`
#echo "fout_cycle ${fout_cycle}"
mv ${fout_cycle} ${OUTPUT_DIR} 2>/dev/null
done
rm -f ${fout}
rm -f request_odb_temp 2>/dev/null
else
echo "${OUTPUT_DIR}/${fout} already exists"
fi
#done
rm -f ${fout}
rm -f request_odb_temp 2>/dev/null
else
echo "${OUTPUT_DIR}/${fout_cycle} already exists"
fi
done
done
fi
......
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