Commit e4a63fda authored by saeed's avatar saeed
Browse files

thin is added

parent 4ca42559
...@@ -59,6 +59,13 @@ function output_name_cycle(){ ...@@ -59,6 +59,13 @@ function output_name_cycle(){
echo ${fout_cycle} echo ${fout_cycle}
} }
function output_name_thin(){
fin=${1}
cycle=${2}
fout=${fin/".txt"/}
fout_cycle=${fout}"_cycle""${cycle}""_thin"".txt"
echo ${fout_cycle}
}
function ismonthly(){ function ismonthly(){
......
...@@ -16,13 +16,22 @@ report_type_filename="report_type_list" ...@@ -16,13 +16,22 @@ report_type_filename="report_type_list"
list_report=(16001) list_report=(16001)
startdate="2017-01-05" startdate="2017-01-05"
enddate="2017-01-06" enddate="2017-01-07"
time_cycle="00,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"
OUTPUT_DIR_THIN="/home/ms/se/smdk/odb_panel/OUTPUT_THIN"
path_bin="/home/ms/se/smdk/odb_panel/bin/" path_bin="/home/ms/se/smdk/odb_panel/bin/"
if [ ! -d ${OUTPUT_DIR} ];then
mkdir -p ${OUTPUT_DIR}
fi
if [ ! -d ${OUTPUT_DIR_THIN} ];then
mkdir -p ${OUTPUT_DIR_THIN}
fi
if [ ${use_report_file} -eq 1 ];then if [ ${use_report_file} -eq 1 ];then
if [ ! -f ${report_type_filename} ];then if [ ! -f ${report_type_filename} ];then
echo "please provide the file named ${report_type_filename}" echo "please provide the file named ${report_type_filename}"
...@@ -70,6 +79,7 @@ if [ ${do_era5} -eq 1 ];then ...@@ -70,6 +79,7 @@ if [ ${do_era5} -eq 1 ];then
for nf in `seq 1 ${nc}`;do for nf in `seq 1 ${nc}`;do
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}`
fout_thin=`output_name_thin ${fout} ${vb}`
if [ ! -f ${OUTPUT_DIR}/${fout_cycle} ];then if [ ! -f ${OUTPUT_DIR}/${fout_cycle} ];then
echo "===========================================" echo "==========================================="
echo "we are extracting odb for repportype ${vr} for a period ${startdate_out} ${enddate_out} cycle ${fout_cycle}" echo "we are extracting odb for repportype ${vr} for a period ${startdate_out} ${enddate_out} cycle ${fout_cycle}"
...@@ -83,12 +93,18 @@ if [ ${do_era5} -eq 1 ];then ...@@ -83,12 +93,18 @@ if [ ${do_era5} -eq 1 ];then
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 cycle ${vb} so maybe you can change the cycle"
rm -f ${fin} 2>/dev/null rm -f ${fin} 2>/dev/null
exit exit
fi fi
rm -f ${fin} 2>/dev/null rm -f ${fin} 2>/dev/null
${path_bin}/era5_cycle.exe ${fout} ${vb} ${path_bin}/era5_cycle.exe ${fout} ${vb}
if [ -f ${fout_cycle} ];then
${path_bin}/thinera5 ${fout_cycle}
if [ -f ${fout_thin} ];then
mv ${fout_thin} ${OUTPUT_DIR_THIN}
fi
fi
mv ${fout_cycle} ${OUTPUT_DIR} 2>/dev/null mv ${fout_cycle} ${OUTPUT_DIR} 2>/dev/null
rm -f ${fout} rm -f ${fout}
rm -f request_odb_temp 2>/dev/null rm -f request_odb_temp 2>/dev/null
......
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