#!/bin/sh set -e if [ $# -lt 2 ] then echo "usage: $0 [-f] in.grib1 out.grib2" echo "-f convert to grib2 only typeOfLevel='hybrid' and copy other level types as grib1" exit 1 fi grib_filter=@CMAKE_INSTALL_PREFIX@/bin/grib_filter rules_filter=rules.filter$$ force=0 out=$2 in=$1 while getopts fd:D:t:b:w:e:r:s:n:p: options do case $options in f) force=1 out=$3 in=$2 ;; esac done if [ $force = 1 ] then cat >> $rules_filter <> $rules_filter <