Closed edwardhartnett closed 1 year ago
@jbathegit I'm having trouble with this test code:
open(unit = 12, file = 'testfiles/IN_2', form = 'UNFORMATTED', iostat = ios)
if (ios .ne. 0) stop 3
call openbf(12, 'IN', 12)
call readmg(12, char_val_8, jdate, iret)
if (iret .ne. 0) stop 100
call readsb(12, iret)
if (iret .ne. 0) stop 101
call ufbcpy(12, 12)
I am trying to open a file and read a subset into memory.
I open the file with openbf(), but when I call readmg() I get this error:
+++++++++++++++++++++WARNING+++++++++++++++++++++++
BUFRLIB: OPENBT - THIS IS A DUMMY BUFRLIB ROUTINE CALLED BY CKTABA OR APPL. PGM; OPENBT SHOULD BE INCL. IN-LINE IN APPL. PGM
+++++++++++++++++++++WARNING+++++++++++++++++++++++
+++++++++++++++++++++WARNING+++++++++++++++++++++++
BUFRLIB: CKTABA - UNRECOGNIZED TABLE A MESSAGE TYPE (FN005064) - RETURN WITH IRET = -1
+++++++++++++++++++++WARNING+++++++++++++++++++++++
What am I doing wrong?
How do I read a subset into memory?
Here's another question. I'm trying this code:
open(unit = 12, file = 'testfiles/IN_2', form = 'UNFORMATTED', iostat = ios)
if (ios .ne. 0) stop 3
call openbf(12, 'IN', 10)
call readns(12, char_val_8, jdate, iret)
This fails in the readns() call like this:
+++++++++++++++++++++WARNING+++++++++++++++++++++++
BUFRLIB: OPENBT - THIS IS A DUMMY BUFRLIB ROUTINE CALLED BY CKTABA OR APPL. PGM; OPENBT SHOULD BE INCL. IN-LINE IN APPL. PGM
+++++++++++++++++++++WARNING+++++++++++++++++++++++
+++++++++++++++++++++WARNING+++++++++++++++++++++++
BUFRLIB: CKTABA - UNRECOGNIZED TABLE A MESSAGE TYPE (FN005064) - RETURN WITH IRET = -1
+++++++++++++++++++++WARNING+++++++++++++++++++++++
What am I doing wrong?
Hey Ed, I'm away at an interagency meeting all this week in Omaha, so I won't be terribly active (if at all) on any NCEPLIBS-bufr stuff this week. But for future reference you can always reach out to @jack-woollen on these types of library usage questions as well, b/c I'm not the only person who's an expert on the details of the library ;-)
At any rate, what's going on here is that there's no DX BUFR table information embedded inside of the testfiles/IN_2 file, so you can never call openbf where the first and third arguments both point to that same file. Instead, you have to open the separate file testfiles/IN_2_bufrtab as a separate logical unit, then pass that unit number in as the third argument to openbf, as shown in the test/intest2.F90 code. This is basically what you tried to do in your second case where you tried to pass in a different logical unit 10 as the third argument, except that you never actually pointed that logical unit number to the testfiles/IN_2_bufrtab file, and which is why it's still failing.
OK, I am breaking this into smaller PRs. There's something here that's causing the CI to be weird...
OK, I am breaking this into smaller PRs. There's something here that's causing the CI to be weird...
Part of https://github.com/NOAA-EMC/NCEPLIBS-bufr/issues/381 Fixes #354
More bort testing for a number of functions.