Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
saeed
odb_panel
Commits
88fd04b8
Commit
88fd04b8
authored
Nov 19, 2019
by
saeed
Browse files
cycle is seperated in era5
parent
92532b7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
odb_manger.sh
View file @
88fd04b8
...
...
@@ -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
=
"201
8
-01-0
6
"
time_cycle
=
"12"
enddate
=
"201
7
-01-0
3
"
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment