Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more bort testing #442

Closed
wants to merge 27 commits into from
Closed

more bort testing #442

wants to merge 27 commits into from

Conversation

edwardhartnett
Copy link
Contributor

@edwardhartnett edwardhartnett commented Apr 7, 2023

Part of #381
Fixes #354

More bort testing for a number of functions.

@edwardhartnett
Copy link
Contributor Author

@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?

@edwardhartnett
Copy link
Contributor Author

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?

@edwardhartnett edwardhartnett marked this pull request as ready for review April 9, 2023 21:41
@jbathegit
Copy link
Collaborator

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.

@edwardhartnett
Copy link
Contributor Author

OK, I am breaking this into smaller PRs. There's something here that's causing the CI to be weird...

1 similar comment
@edwardhartnett
Copy link
Contributor Author

OK, I am breaking this into smaller PRs. There's something here that's causing the CI to be weird...

@edwardhartnett edwardhartnett deleted the ejh_more_bort branch April 14, 2023 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

complete testing of idxmsg.f
2 participants