NOAA-EMC / NCEPLIBS-bufr

The NCEPLIBS-bufr library contains routines and utilites for working with the WMO BUFR format.
Other
44 stars 19 forks source link

adding test for stseq() #467

Closed edwardhartnett closed 1 year ago

edwardhartnett commented 1 year ago

Part of #445

adding test for stseq()

edwardhartnett commented 1 year ago

OK, I am trying to call the stseq() function. I open the file with openrb(), and then I try to call stseq(). Here's my test code:

    /* Open a real BUFR file, read a BUFR message, and close the file. */
    openrb(0, IN_9);
    if (!pb[0])
        return TEST_ERR;
    if (crdbufr(0, msg, MSG_SIZE_INT))
        return TEST_ERR;

    stseq(&lun, &irepct, &idn, nemo, cseq, cdesc, &ncdesc);

Within stseq() the Fortran subroutine NUMTBD(). It segfaults on this code:

DO I=1,NTBB(LUN)

because array NTBB is not allocated.

What function should I be calling which will cause NTBB to get allocated? @jbathegit @jack-woollen any suggestions?

jack-woollen commented 1 year ago

@edwardhartnett call openbf(0.'QUIET',0) will alloc the arrays.