-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added netcdf4 flag to Linux_options.yml (#121)
* added netcdf4 flag to Linux_options.yml * Update CMakeLists.txt * Update Config.c * Added tests for netcdf * fixed potential source of error in developer workflow * removed tarball * restored netcdf tarball --------- Co-authored-by: Edward Hartnett <[email protected]>
- Loading branch information
1 parent
e7f52f1
commit a928f5d
Showing
6 changed files
with
73 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,9 @@ jobs: | |
- { | ||
options: "-DUSE_AEC=ON" | ||
} | ||
- { | ||
options: "-DUSE_NETCDF4=ON" | ||
} | ||
|
||
steps: | ||
|
||
|
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,28 @@ | ||
#!/bin/sh | ||
# This checks the use of AEC compression, only available if USE_NETCDF4 is turned on in CMake. | ||
# | ||
# Alyson Stahl, 4/22/24 | ||
|
||
set -e | ||
set -x | ||
|
||
# make template | ||
../wgrib2/wgrib2 data/tmp_int.grb -rpn 0 -grib_out junk.template | ||
|
||
# make netcdf file | ||
../wgrib2/wgrib2 data/tmp_int.grb -nc3 -netcdf junk.nc | ||
|
||
# convert netcdf to grb | ||
../wgrib2/wgrib2 junk.template -import_netcdf junk.nc TMP_500mb "0:1:0:181:0:360" -grib_out junk.grb | ||
|
||
n=`../wgrib2/wgrib2 data/tmp_int.grb -var -lev -rpn "sto_1" -import_grib junk.grb -rpn "rcl_1:print_rms" | \ | ||
grep -v ":rpn=0:" | wc -l` | ||
|
||
rm junk.grb junk.nc junk.template | ||
if [ "$n" -eq 1 ] ; then | ||
echo "success" | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
|
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,28 @@ | ||
#!/bin/sh | ||
# This checks the use of AEC compression, only available if USE_NETCDF4 is turned on in CMake. | ||
# | ||
# Alyson Stahl, 4/22/24 | ||
|
||
set -e | ||
set -x | ||
|
||
# make template | ||
../wgrib2/wgrib2 data/tmp_int.grb -rpn 0 -grib_out junk.template | ||
|
||
# make netcdf file | ||
../wgrib2/wgrib2 data/tmp_int.grb -nc4 -netcdf junk.nc | ||
|
||
# convert netcdf to grb | ||
../wgrib2/wgrib2 junk.template -import_netcdf junk.nc TMP_500mb "0:1:0:181:0:360" -grib_out junk.grb | ||
|
||
n=`../wgrib2/wgrib2 data/tmp_int.grb -var -lev -rpn "sto_1" -import_grib junk.grb -rpn "rcl_1:print_rms" | \ | ||
grep -v ":rpn=0:" | wc -l` | ||
|
||
rm junk.grb junk.nc junk.template | ||
if [ "$n" -eq 1 ] ; then | ||
echo "success" | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
|
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