Skip to content

Commit

Permalink
Solve issue #359
Browse files Browse the repository at this point in the history
from e-support OYW-455599.

Problem was that in nctime.c#CDMonthDay, it was setting up
the month -> #days table correctly, but it did not use it
because it forgot to check for Cd366, it only checked for Cd365.
  • Loading branch information
DennisHeimbigner committed Jul 25, 2017
1 parent 1b564ed commit 0ccece7
Show file tree
Hide file tree
Showing 8 changed files with 1,429 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ncdump/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ tst_formatx3.sh tst_formatx4.sh ref_tst_utf8_4.cdl \
tst_inttags.sh tst_inttags4.sh \
CMakeLists.txt XGetopt.c tst_bom.sh tst_inmemory_nc3.sh \
tst_dimsizes.sh tst_inmemory_nc4.sh tst_fileinfo.sh run_ncgen_tests.sh \
run_ncgen_nc4_tests.sh
run_ncgen_nc4_tests.sh \
test_360_day_1900.nc test_365_day_1900.nc test_366_day_1900.nc \
ref_test_360_day_1900.cdl ref_test_365_day_1900.cdl ref_test_366_day_1900.cdl

# CDL files and Expected results
SUBDIRS=cdl expected
Expand Down
470 changes: 470 additions & 0 deletions ncdump/ref_test_360_day_1900.cdl

Large diffs are not rendered by default.

470 changes: 470 additions & 0 deletions ncdump/ref_test_365_day_1900.cdl

Large diffs are not rendered by default.

470 changes: 470 additions & 0 deletions ncdump/ref_test_366_day_1900.cdl

Large diffs are not rendered by default.

Binary file added ncdump/test_360_day_1900.nc
Binary file not shown.
Binary file added ncdump/test_365_day_1900.nc
Binary file not shown.
Binary file added ncdump/test_366_day_1900.nc
Binary file not shown.
16 changes: 16 additions & 0 deletions ncdump/tst_calendars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,21 @@ echo "*** creating tst_times.cdl from tst_calendars.nc with ncdump -t ..."
${NCDUMP} -n tst_times -t tst_calendars.nc > tst_times.cdl
echo "*** comparing tst_times.cdl with ref_times.cdl..."
diff -b tst_times.cdl $srcdir/ref_times.cdl
echo ""
echo "*** Testing ncdump -t output"
echo "*** creating tst_mud4.cdl from tst_mud4.nc ..."

# Test 360, 365 and 366 day calendars specifically
TSTS="test_360_day_1900 test_365_day_1900 test_366_day_1900"
for t in $TSTS ; do
rm -f ./${t}.cdl
echo "create: ${t}.cdl from ${t}.nc"
${NCDUMP} -n ${t} -t $srcdir/${t}.nc > ${t}.cdl
echo "compare: ${t}.cdl ref_${t}.cdl"
diff -b ${t}.cdl $srcdir/ref_${t}.cdl
rm -f ${t}.cdl
done

echo "*** All ncdump test output for -t option with CF calendar atts passed!"

exit 0

0 comments on commit 0ccece7

Please sign in to comment.