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