Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
685232f0
Commit
685232f0
authored
Apr 04, 2016
by
Ralf Mueller
Browse files
add test for reducegrid
parent
984b8873
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitattributes
View file @
685232f0
...
...
@@ -732,6 +732,7 @@ test/Gradsdes.test.in -text
test/Gridarea.test.in -text
test/Makefile.am -text
test/Makefile.in -text
test/MapReduce.test.in -text
test/README -text
test/Read_grib.test.in -text
test/Read_netcdf.test.in -text
...
...
@@ -794,6 +795,8 @@ test/data/grib_testfile01_sinfo_ref -text
test/data/grib_testfile02.grb -text
test/data/grib_testfile02_info_ref -text
test/data/grib_testfile02_sinfo_ref -text
test/data/griddes.ni4 -text
test/data/griddes.r18x9 -text
test/data/hl_l19.grb -text
test/data/ml2pl_ref -text
test/data/n16_bic_ref -text
...
...
configure.ac
View file @
685232f0
...
...
@@ -253,6 +253,7 @@ AC_CONFIG_FILES([test/Select.test test/Spectral.test test/Timstat.test test/Vert
AC_CONFIG_FILES([test/Ymonstat.test test/Fldstat.test test/Fldpctl.test test/Ensstat.test test/Enspctl.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Afterburner.test test/Detrend.test test/Arith.test test/Expr.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Gradsdes.test test/Collgrid.test test/threads.test test/wildcard.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/MapReduce.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([Makefile src/Makefile contrib/Makefile test/Makefile test/data/Makefile cdo.spec cdo.settings])
AC_OUTPUT
...
...
test/Makefile.am
View file @
685232f0
...
...
@@ -14,7 +14,7 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
TESTS
=
threads.test wildcard.test File.test Read_grib.test Read_netcdf.test Copy_netcdf.test Cat.test Gridarea.test Detrend.test
\
Genweights.test Remap.test Select.test Spectral.test Ymonstat.test Timstat.test Ensstat.test
\
Enspctl.test Fldstat.test Fldpctl.test Vertint.test Afterburner.test Arith.test Expr.test
\
Gradsdes.test Collgrid.test
Gradsdes.test Collgrid.test
MapReduce.test
# tests which should fail
XFAIL_TESTS
=
...
...
test/MapReduce.test.in
0 → 100644
View file @
685232f0
#! @SHELL@
echo 1..2 # Number of tests to be executed.
#
test -n "$CDO" || CDO=cdo
test -n "$DATAPATH" || DATAPATH=./data
#
NTEST=1
#
for OPERATOR in reducegrid; do
for grid in r18x9 ni4; do
RSTAT=0
REF="$DATAPATH/griddes.${grid}"
CDOTEST="$OPERATOR on grid ${grid}"
$CDO -temp,$grid data_${grid}.grb
$CDO -gtc,273.15 -temp,${grid} mask_${grid}.grb
if [ "@ENABLE_NETCDF@" = yes ] ; then
echo "Running test: $NTEST"
CDOCOMMAND="$CDO -f nc reducegrid,mask_${grid}.grb data_${grid}.grb reduced_${grid}.nc"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO griddes reduced_${grid}.nc > griddes.${grid}
cmp griddes.${grid} $REF
test $? -eq 0 || let RSTAT+=1
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
else
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST # SKIP netCDF not enabled"
fi
let NTEST+=1
done
done
#
exit 0
test/data/griddes.ni4
0 → 100644
View file @
685232f0
This diff is collapsed.
Click to expand it.
test/data/griddes.r18x9
0 → 100644
View file @
685232f0
#
# gridID 1
#
gridtype = unstructured
gridsize = 88
xname = lon
xlongname = longitude
xunits = degrees_east
yname = lat
ylongname = latitude
yunits = degrees_north
nvertex = 4
xvals = 180 200 260 280 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280
300 320 340 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300
320 340 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320
340 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340
0 40 140 160 180 200 220 300 320 340 0 340
xbounds = 170 190 190 170
190 210 210 190
250 270 270 250
270 290 290 270
-10 10 10 -10
10 30 30 10
30 50 50 30
50 70 70 50
70 90 90 70
90 110 110 90
110 130 130 110
130 150 150 130
150 170 170 150
170 190 190 170
190 210 210 190
210 230 230 210
230 250 250 230
250 270 270 250
270 290 290 270
290 310 310 290
310 330 330 310
330 350 350 330
-10 10 10 -10
10 30 30 10
30 50 50 30
50 70 70 50
70 90 90 70
90 110 110 90
110 130 130 110
130 150 150 130
150 170 170 150
170 190 190 170
190 210 210 190
210 230 230 210
230 250 250 230
250 270 270 250
270 290 290 270
290 310 310 290
310 330 330 310
330 350 350 330
-10 10 10 -10
10 30 30 10
30 50 50 30
50 70 70 50
70 90 90 70
90 110 110 90
110 130 130 110
130 150 150 130
150 170 170 150
170 190 190 170
190 210 210 190
210 230 230 210
230 250 250 230
250 270 270 250
270 290 290 270
290 310 310 290
310 330 330 310
330 350 350 330
-10 10 10 -10
10 30 30 10
30 50 50 30
50 70 70 50
70 90 90 70
90 110 110 90
110 130 130 110
130 150 150 130
150 170 170 150
170 190 190 170
190 210 210 190
210 230 230 210
230 250 250 230
250 270 270 250
270 290 290 270
290 310 310 290
310 330 330 310
330 350 350 330
-10 10 10 -10
30 50 50 30
130 150 150 130
150 170 170 150
170 190 190 170
190 210 210 190
210 230 230 210
290 310 310 290
310 330 330 310
330 350 350 330
-10 10 10 -10
330 350 350 330
yvals = -67.5 -67.5 -67.5 -67.5 -45 -45 -45 -45 -45 -45 -45 -45 -45 -45 -45
-45 -45 -45 -45 -45 -45 -45 -22.5 -22.5 -22.5 -22.5 -22.5 -22.5 -22.5
-22.5 -22.5 -22.5 -22.5 -22.5 -22.5 -22.5 -22.5 -22.5 -22.5 -22.5 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 22.5 22.5 22.5 22.5 22.5 22.5 22.5
22.5 22.5 22.5 22.5 22.5 22.5 22.5 22.5 22.5 22.5 22.5 45 45 45 45 45
45 45 45 45 45 67.5 67.5
ybounds = -78.75 -78.75 -56.25 -56.25
-78.75 -78.75 -56.25 -56.25
-78.75 -78.75 -56.25 -56.25
-78.75 -78.75 -56.25 -56.25
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-56.25 -56.25 -33.75 -33.75
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-33.75 -33.75 -11.25 -11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
-11.25 -11.25 11.25 11.25
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
11.25 11.25 33.75 33.75
33.75 33.75 56.25 56.25
33.75 33.75 56.25 56.25
33.75 33.75 56.25 56.25
33.75 33.75 56.25 56.25
33.75 33.75 56.25 56.25
33.75 33.75 56.25 56.25
33.75 33.75 56.25 56.25
33.75 33.75 56.25 56.25
33.75 33.75 56.25 56.25
33.75 33.75 56.25 56.25
56.25 56.25 78.75 78.75
56.25 56.25 78.75 78.75
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment