-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…nalias_is_called ECC-1898 GRIB: Key 'levelist' persists despite being taken out of the mars namespace
- Loading branch information
Showing
4 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
# (C) Copyright 2005- ECMWF. | ||
# | ||
# This software is licensed under the terms of the Apache Licence Version 2.0 | ||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by | ||
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. | ||
# | ||
|
||
. ./include.ctest.sh | ||
|
||
label="grib_ecc-1898_test" | ||
|
||
tempGrib=temp.$label.grib | ||
tempOut=temp.${label}.txt | ||
|
||
$tools_dir/grib_dump -Da $samp_dir/reduced_gg_pl_32_grib2.tmpl > $tempOut | ||
grep -q '288-288 g2level level = 1000 \[vertical.level, mars.levelist\]' $tempOut | ||
|
||
# For given MARS stream/types, we unalias the mars.levelist key | ||
$tools_dir/grib_set -s stream=gfas,type=gsd $samp_dir/reduced_gg_pl_32_grib2.tmpl $tempGrib | ||
|
||
# Check that the key is unaliased | ||
$tools_dir/grib_dump -Da $tempGrib > $tempOut | ||
grep -q '288-288 g2level level = 1000 \[vertical.level\]' $tempOut | ||
|
||
$tools_dir/grib_dump -p levelist -Da $tempGrib 2> $tempOut | ||
grep -q 'levelist: Key/value not found' $tempOut | ||
|
||
result=$($tools_dir/grib_get -fp levelist $tempGrib) | ||
[ "$result" = "not_found" ] | ||
|
||
result=$($tools_dir/grib_get -fp mars.levelist $tempGrib) | ||
[ "$result" = "not_found" ] | ||
|
||
# Clean up | ||
rm -f $tempGrib $tempOut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters