File: filter.sh

package info (click to toggle)
grib-api 1.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,008 kB
  • ctags: 10,015
  • sloc: ansic: 63,157; sh: 9,355; f90: 2,545; makefile: 2,496; yacc: 519; perl: 240; lex: 217
file content (32 lines) | stat: -rwxr-xr-x 792 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
# Copyright 2005-2007 ECMWF
# 
# Licensed under the GNU Lesser General Public License which
# incorporates the terms and conditions of version 3 of the GNU
# General Public License.
# See LICENSE and gpl-3.0.txt for details.


. ./include.sh

if [ -f ${data_dir}/geavg.t12z.pgrbaf108 ]
then

tmpdata=grib_api.grib

rm -f $tmpdata || true

${tools_dir}grib_filter ${data_dir}/filter_rules ${data_dir}/geavg.t12z.pgrbaf108 > /dev/null

rm -f $tmpdata

fi

cat >${data_dir}/f.rules <<EOF
write "${data_dir}/split/[centre]_[date]_[dataType]_[gridType]_[levelType]_[level]_[short_name]_[packingType].grib[editionNumber]";
EOF

[ -d ${data_dir}/split ] || mkdir -p ${data_dir}/split 

${tools_dir}grib_filter ${data_dir}/f.rules ${data_dir}/tigge_pf_ecmwf.grib2 2> /dev/null > /dev/null