You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jbathegit and I were talking about NCEPLIBS-bufr today and we conceived the idea of a new API, thoroughly modern, using all of Fortran's features including modules. This API would use the existing code, but would provide a new, better user experience.
The V2 API will be a complete replacement for the existing API, but also interoperable. It will do everything the existing API can do, and more, so that users will be able to write any application using NCEPLIBS-bufr without using the V1 API.
All public-facing functions will:
return 0 for success or an error code for failure.
be prefixed with "nbufr_" (or some other abbreviation).
take advantage of modern Fortran features such as optional parameters to provide a better API to the user.
have matching inq/def functions which get/set metadata associated with library objects.
use internally generated IDs (integers) for library objects like files, messages, data fields within messages, etc.
We would like this API to be similar to other data library APIs, with usage something like:
! Open an existing file.
ierr = nbufr_open(FILENAME, MODE, file_id)
if (ierr .ne. 0) stop ierr
! Read stuff from the file.
! Close the file
ierr = nbufr_close(file_id)
The user application opens the file with the filename, and gets an ID for the file. The user does stuff and then calls close with the file ID, and all resources allocated for this file are released.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
@jbathegit and I were talking about NCEPLIBS-bufr today and we conceived the idea of a new API, thoroughly modern, using all of Fortran's features including modules. This API would use the existing code, but would provide a new, better user experience.
The V2 API will be a complete replacement for the existing API, but also interoperable. It will do everything the existing API can do, and more, so that users will be able to write any application using NCEPLIBS-bufr without using the V1 API.
All public-facing functions will:
We would like this API to be similar to other data library APIs, with usage something like:
The user application opens the file with the filename, and gets an ID for the file. The user does stuff and then calls close with the file ID, and all resources allocated for this file are released.
Beta Was this translation helpful? Give feedback.
All reactions