-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
converted tocgrib2super to user getgb2p2() (#338)
* converted tocgrib2super to user getgb2p2() * adding tests for tocgrib2super * more testing
- Loading branch information
1 parent
7d830bc
commit ab13383
Showing
6 changed files
with
108 additions
and
24 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,22 @@ | ||
#!/bin/sh | ||
# This is a test script for the NCEPLIBS-grib_util project. This tests | ||
# the tocgrib2 utility. | ||
# | ||
# Ed Hartnett, 4/20/24 | ||
|
||
set -e | ||
echo "" | ||
echo "*** Running tocgrib2 extra file tests" | ||
|
||
echo "*** Running tocgrib2 with input/output defined, but one missing field. It will fail." | ||
export FORT11="data/rrfs.t12z.prslevfaa.f010.na3km.grib2" | ||
export FORT51=out.grib2 | ||
../src/tocgrib2/tocgrib2 < data/tocgrib2_bad.nml && exit 1 | ||
|
||
echo "*** Running tocgrib2 with input/output defined. It will succeed." | ||
export FORT11="data/rrfs.t12z.prslevfaa.f010.na3km.grib2" | ||
export FORT51=out.grib2 | ||
../src/tocgrib2/tocgrib2 < data/tocgrib2.nml | ||
|
||
echo "*** SUCCESS!" | ||
exit 0 |
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,22 @@ | ||
#!/bin/sh | ||
# This is a test script for the NCEPLIBS-grib_util project. This tests | ||
# the tocgrib2super utility with extra files downloaded from FTP. | ||
# | ||
# Ed Hartnett, 5/28/24 | ||
|
||
set -e | ||
echo "" | ||
echo "*** Running tocgrib2super extra tests" | ||
|
||
echo "*** Running tocgrib2super with input/output defined, but one missing field. It will fail." | ||
export FORT11="data/rrfs.t12z.prslevfaa.f010.na3km.grib2" | ||
export FORT51=out.grib2 | ||
../src/tocgrib2super/tocgrib2super < data/tocgrib2_bad.nml && exit 1 | ||
|
||
echo "*** Running tocgrib2 with input/output defined. It will succeed." | ||
export FORT11="data/rrfs.t12z.prslevfaa.f010.na3km.grib2" | ||
export FORT51=out.grib2 | ||
../src/tocgrib2super/tocgrib2super < data/tocgrib2.nml | ||
|
||
echo "*** SUCCESS!" | ||
exit 0 |
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,27 @@ | ||
#!/bin/sh | ||
# This is a test script for the NCEPLIBS-grib_util project. This tests | ||
# the tocgrib2super utility. | ||
# | ||
# Ed Hartnett, 5/28/24 | ||
|
||
set -e | ||
echo "" | ||
echo "*** Running tocgrib2super tests" | ||
|
||
echo "*** Running tocgrib2 without input/output defined. Should return STOP 10" | ||
unset FORT11 | ||
unset FORT51 | ||
../src/tocgrib2super/tocgrib2super && exit 1 | ||
|
||
# echo "*** Running tocgrib2super with input/output defined, but one missing field. It will fail." | ||
# export FORT11="data/rrfs.t12z.prslevfaa.f010.na3km.grib2" | ||
# export FORT51=out.grib2 | ||
# ../src/tocgrib2super/tocgrib2super < data/tocgrib2_bad.nml && exit 1 | ||
|
||
# echo "*** Running tocgrib2 with input/output defined. It will succeed." | ||
# export FORT11="data/rrfs.t12z.prslevfaa.f010.na3km.grib2" | ||
# export FORT51=out.grib2 | ||
# ../src/tocgrib2super/tocgrib2super < data/tocgrib2.nml | ||
|
||
echo "*** SUCCESS!" | ||
exit 0 |