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

expose some of the new g2c functions in the C library #328

Open
edwardhartnett opened this issue Nov 21, 2022 · 1 comment
Open

expose some of the new g2c functions in the C library #328

edwardhartnett opened this issue Nov 21, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@edwardhartnett
Copy link
Contributor

edwardhartnett commented Nov 21, 2022

The C library contains some g2c functions, like g2c_open(), which I would like to use in testing in NCEPLIBS-g2c. For that it would be good to have these functions exposed in the fortran API.

This is related to #23

@edwardhartnett
Copy link
Contributor Author

There is a test, test_g2cf.F90, which contains:

program test_g2cf
  use g2cf
  implicit none
  character (len = *), parameter :: fileName = "gdaswave.t00z.wcoast.0p16.f000.grib2"
  integer :: g2cid, num_msg
  integer(kind = 1) :: discipline
  integer(kind = 4) :: num_fields, num_local
  integer(kind = 2) :: center, subcenter
  integer(kind = 1) :: master_version, local_version
  integer :: ierr

  print *, 'Testing g2cf API...'
  ierr = g2cf_set_log_level(1)

  ! Open the test file.
  ierr = g2cf_open(fileName, 0, g2cid)
  if (ierr .ne. 0) stop 2

At one point I had this test code working, when I was prototyping all this last year, but now it is commented out in the cmake file, and there is no sign of a g2cf.F90 module file anywhere. So somehow that got lost.

I will recreate it and get the test working again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In progress
Development

No branches or pull requests

2 participants