Skip to content

Commit 50b3340

Browse files
committed
Inclide trigger starting conversion jobs using the aviso system
1 parent ab08103 commit 50b3340

File tree

5 files changed

+104
-3
lines changed

5 files changed

+104
-3
lines changed

aviso/aviso_readme.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Use of aviso to trigger job scripts on the European Weather Cloud (EWC)
2+
=======================================================================
3+
4+
5+
* The aviso service runs automatically on EWC machines with the data setup
6+
It can be activated and deactivated by the command
7+
sudo systemctl start aviso.service
8+
sudo systemctl stop aviso.service
9+
The status can be viewd be
10+
sudo systemctl status aviso.service
11+
12+
* For test purposes it my be used to test the behaviour on past trigger
13+
events for a given (past) time range. This can be done by the listen
14+
command within an env, where aviso is installed, like
15+
sudo systemctl stop aviso.service
16+
mamba activate avisoenv
17+
aviso listen --from 2025-03-05T00:00:00.0Z --to 2025-03-05T08:00:00.0Z
18+
19+
* The file config.yaml in the direactory $HOME/.aviso guides the triggering
20+
21+
* if multiple steps are given in a trigger command, like
22+
step: [36,72,144]
23+
the programs called by the trigger are executed sequentially, possibly
24+
not in the time order of the triggers
25+
26+
* the script get_ecmwf_aviso.sh creates ECMWF grib files and converts
27+
them to MSS-convorm NetCDF files. One can speed up the process by
28+
parallel download the grib files using "DOWNLOAD_ONLY=yes" in the file
29+
settings.config and starting convert_all.sh separately.

aviso/config.yaml.parallel

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
listeners:
2+
- event: mars
3+
request:
4+
class: od
5+
expver: 1
6+
domain: g
7+
stream: oper
8+
step: 36
9+
triggers:
10+
- type: command
11+
working_dir: $HOME/data-retrieval/aviso
12+
command: $HOME/data-retrieval/bin/get_ecmwf_aviso.sh --date ${request.date} --time ${request.time} --step ${request.step} > mars_${request.time}_${request.step}.out
13+
- event: mars
14+
request:
15+
class: od
16+
expver: 1
17+
domain: g
18+
stream: oper
19+
step: 72
20+
triggers:
21+
- type: command
22+
working_dir: $HOME/aviso
23+
command: $HOME/data-retrieval/bin/get_ecmwf_aviso.sh --date ${request.date} --time ${request.time} --step ${request.step} > mars_${request.time}_${request.step}.out
24+
- event: mars
25+
request:
26+
class: od
27+
expver: 1
28+
domain: g
29+
stream: oper
30+
step: 108
31+
triggers:
32+
- type: command
33+
working_dir: $HOME/aviso
34+
command: $HOME/data-retrieval/bin/get_ecmwf_aviso.sh --date ${request.date} --time ${request.time} --step ${request.step} > mars_${request.time}_${request.step}.out
35+
- event: mars
36+
request:
37+
class: od
38+
expver: 1
39+
domain: g
40+
stream: oper
41+
step: 144
42+
triggers:
43+
- type: command
44+
working_dir: $HOME/aviso
45+
command: $HOME/data-retrieval/bin/get_ecmwf_aviso.sh --date ${request.date} --time ${request.time} --step ${request.step} > mars_${request.time}_${request.step}.out
46+
- event: mars
47+
request:
48+
class: od
49+
expver: 1
50+
domain: g
51+
stream: oper
52+
step: 228
53+
triggers:
54+
- type: command
55+
working_dir: $HOME/aviso
56+
command: $HOME/data-retrieval/bin/get_ecmwf_aviso.sh --date ${request.date} --time ${request.time} --step ${request.step} > mars_${request.time}_${request.step}.out

aviso/config.yaml.sequential

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
listeners:
2+
- event: mars
3+
request:
4+
class: od
5+
expver: 1
6+
domain: g
7+
stream: oper
8+
step: [36, 72, 108, 144, 228]
9+
triggers:
10+
- type: command
11+
working_dir: $HOME/data-retrieval/aviso
12+
command: $HOME/data-retrieval/bin/get_ecmwf_aviso.sh --date ${request.date} --time ${request.time} --step ${request.step} > mars_${request.time}_${request.step}.out

bin/convert_all.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fi
3131
# script should start at 06h/18h to look for 00 12h forecast
3232
export h_exit=`date --date="+6hours" +%H`
3333

34-
for FCSTEP in 036 072 108 144 228
34+
for FCSTEP in $FCSTEPS
3535
do
3636

3737
# Set path, filenames and variables used later in the script
@@ -42,7 +42,7 @@ do
4242
export init_date=${DATE}T${TIME}
4343
echo BASE: $BASE
4444
export time_units="hours since ${init_date}"
45-
echo time_units: "hours since ${init_date}"
45+
4646

4747
lockfile=grib/${DATASET}.${YMD}T${HH}.${FCSTEP}.ready
4848
echo `date` waiting for lockfile $lockfile
@@ -58,6 +58,7 @@ do
5858
fi
5959
done
6060
rm $lockfile
61+
6162
# Convert grib to netCDF, set init time
6263
echo `date`: converting ${FCSTEP}h forecast
6364
. $BINDIR/convert.sh
@@ -76,7 +77,6 @@ do
7677
fi
7778
if [ -f $pvfile ]; then
7879
mv $pvfile $MSSDIR
79-
8080
fi
8181
if [ -f $alfile ]; then
8282
mv $alfile $MSSDIR

settings.default

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
export PYTHON=python
55
export CLEANUP=no
6+
export CLEANUP_DAY=`date --date=-2day +%d`
7+
export CLEANUP_MONTH=`date --date=-2day +%m`
8+
export CLEANUP_YEAR=`date --date=-2day +%Y`
9+
610
export MODEL_REDUCTION="-d lev,0,0 -d lev,16,28,4 -d lev,32,124,2"
711
export DATASET=ecmwf
812

0 commit comments

Comments
 (0)