Opened 10 years ago
Closed 2 years ago
#412 closed defect (fixed)
Prevent tests of eum2bufr when MOBUFR is present
Reported by: | Ian Culverwell | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 11.1 |
Component: | ropp_io | Version: | 8.0 |
Keywords: | Cc: | olewis |
Description
If ECMWF BUFR and METO BUFR are both installed (unlikely), the latter takes precedence. The eum2bufr tools are designed to be used with the ECMWF BUFR library, and should not be tested with the METO BUFR. We should therefore update the test logic in ropp_io/tests/Makefile.am from
if HAVE_ECMWF_BUFR test_ecbufr: ./t_ropp2bufr @ echo "" @ echo "Testing BUFR encode/decode [ECMWF library] ..." @ echo "" @ ./t_ropp2bufr @ echo "" if HAVE_HDF5 test_eum2bufr: ./t_eum2bufr @ echo "" @ echo "Testing BUFR encode/decode [EUM netCDF4 files] ..." @ echo "" @ ./t_eum2bufr @ echo "" else test_eum2bufr:; @ echo "" endif else test_ecbufr:; @ echo "" test_eum2bufr:; @ echo "" endif
to something like
if HAVE_ECMWF_BUFR test_ecbufr: ./t_ropp2bufr @ echo "" @ echo "Testing BUFR encode/decode [ECMWF library] ..." @ echo "" @ ./t_ropp2bufr @ echo "" if HAVE_HDF5 if HAVE_METO_BUFR test_eum2bufr:; @ echo "" else test_eum2bufr: ./t_eum2bufr @ echo "" @ echo "Testing BUFR encode/decode [EUM netCDF4 files] ..." @ echo "" @ ./t_eum2bufr @ echo "" endif else test_eum2bufr:; @ echo "" endif else test_ecbufr:; @ echo "" test_eum2bufr:; @ echo "" endif
Or perhaps we should change
if test x$HAVE_LIBRARY_bufr = xyes ; then if test x$HAVE_LIBRARY_metdbbufr = xyes ; then AC_MSG_NOTICE([Both MetDB & ECMWF BUFR libraries found; using MetDB in preference]) AM_CONDITIONAL(HAVE_ECMWF_BUFR, test x$HAVE_LIBRARY_bufr = xno) AS_VAR_SET(HAVE_LIBRARY_bufr, no) LIBS="$NO_ECMWF_LIBS" fi fi
to
if test x$HAVE_LIBRARY_bufr = xyes ; then if test x$HAVE_LIBRARY_metdbbufr = xyes ; then AC_MSG_NOTICE([Both MetDB & ECMWF BUFR libraries found; using MetDB in preference]) AM_CONDITIONAL(HAVE_ECMWF_BUFR, test x$HAVE_LIBRARY_bufr = xno) AS_VAR_SET(HAVE_LIBRARY_bufr, no) AS_VAR_SET(HAVE_ECMWF_BUFR, no) LIBS="$NO_ECMWF_LIBS" fi fi
in ropp_io/configure.ac.
Note that errors apparently arising from this do not, worryingly, appear to be reproducible. Should we be using if tests on $HAVE_LIBRARY_bufr in Makefile.am instead? The whole thing needs looking at - at ROPP9.0.
Attachments (3)
Change history (12)
comment:1 by , 8 years ago
Milestone: | 9.0 → 10.0 |
---|
by , 5 years ago
Attachment: | log_make_test_both_bufrs added |
---|
by , 5 years ago
Attachment: | log_make_test_mobufr added |
---|
by , 5 years ago
Attachment: | log_make_test_ecbufr added |
---|
comment:2 by , 5 years ago
I can't seem to reproduce this error. With both BUFRs installed, the tests only use Met Office (MetDB) BUFR in preference. With just ECBFUR or MetDB BUFR installed, it runs only the appropriate test. This can be seen in the attached log files which contain the output of ropp_io make test.
So HAVE_METO_BUFR and HAVE_ECMWF_BUFR are set correctly somehow by Makefile.am and configure.ac
comment:3 by , 5 years ago
But log_make_test_mobufr shows that ROPP is building - or at least using - eum2bufr, which shouldn't be active if only have the MetDB BUFR installed. Were existing versions of this tool deleted before running the MetDB-only test? If so, how/why did it build a new version of this tool? That's what we're trying to understand.
comment:4 by , 4 years ago
Milestone: | 10.0 → 11.0 |
---|
Pity that Francis didn't fix this. Some overlap with #688. Defer to ROPP-11.0.
comment:5 by , 3 years ago
One other solution to this, with the changes made at ticket 688 https://trac.romsaf.org/ropp/ticket/688, would be that the test can be changed to use the correct version of ropp2bufr.
The file t_eum2bufr.sh could then have this
#----------------------------------------------------------------------------- # 2. Check that eum2bufr = eum2ropp | ropp2bufr, if possible #----------------------------------------------------------------------------- if [ -f ../tools/eum2ropp ] && [ -f ../tools/ropp2bufr_ec ] ; then echo echo "==================================================================================" echo "2. eum2bufrb: test eum2bufr by comparing against eum2ropp followed by ropp2bufr_ec" echo "==================================================================================" echo echo echo "--------------------------------------------------------------------" echo "2a. Converting EUM netCDF4 file -> BUFR file directly, with eum2bufr" echo "--------------------------------------------------------------------" echo
This would call the ropp2bufr built using the ECMWF bufr library ropp2bufr_ec rather than the linked tool and so the produced bufr files should be the same when compared. This change would also solve the one failure shown in ticket 688.
comment:6 by , 3 years ago
Cc: | added |
---|
Note that there's an eum2bufr_eccodes tool too, and the results of that are be compared against eum2ropp |ropp2bufr_ecodes in its own test script, t_eum2bufr_eccodes.sh. Can we borrow from that?
comment:7 by , 3 years ago
Milestone: | 11.0 → 11.1 |
---|
Should be included in ROPP-11.1 I/O devts, so change milestone accordingly.
comment:8 by , 2 years ago
Milestone: | 11.1 → 12.0 |
---|---|
Owner: | removed |
Status: | new → assigned |
comment:9 by , 2 years ago
Milestone: | 12.0 → 11.1 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
I think this is done, actually.
Still sounds like a good idea, but we've run out of time. Defer to ROPP10.0.