diff --git a/fortran/eccodes_f90_tail.f90 b/fortran/eccodes_f90_tail.f90 index 9ddee0d37..cb9546cf1 100644 --- a/fortran/eccodes_f90_tail.f90 +++ b/fortran/eccodes_f90_tail.f90 @@ -511,6 +511,17 @@ subroutine codes_new_from_file ( ifile, gribid , status) call grib_new_from_file ( ifile, gribid , status) end subroutine codes_new_from_file +!! TODO: temporary fix for BUFR +subroutine codes_bufr_new_from_file ( ifile, bufrid , status) + integer(kind=kindOfInt),intent(in) :: ifile + integer(kind=kindOfInt),intent(out) :: bufrid + integer(kind=kindOfInt),optional,intent(out) :: status + integer(kind=kindOfInt) :: iret + + call bufr_new_from_file ( ifile, bufrid, status) +end subroutine codes_bufr_new_from_file + + ! subroutine codes_new_from_message_char( gribid, message, status ) integer(kind=kindOfInt),intent(out) :: gribid diff --git a/fortran/grib_api_externals.h b/fortran/grib_api_externals.h index b4ecccb53..bde6fc6cb 100644 --- a/fortran/grib_api_externals.h +++ b/fortran/grib_api_externals.h @@ -17,6 +17,7 @@ integer, external :: grib_f_new_from_message, & grib_f_new_from_samples, & grib_f_read_any_from_file, & grib_f_new_from_file, & + bufr_f_new_from_file, & grib_f_headers_only_new_from_file integer, external :: grib_f_release integer, external :: grib_f_dump, grib_f_print diff --git a/fortran/grib_f90_tail.f90 b/fortran/grib_f90_tail.f90 index 6fff9ae09..094569455 100644 --- a/fortran/grib_f90_tail.f90 +++ b/fortran/grib_f90_tail.f90 @@ -1291,6 +1291,22 @@ call grib_check(iret,'grib_new_from_file','') endif end subroutine grib_new_from_file +!! TODO: temporary + subroutine bufr_new_from_file ( ifile, bufrid , status) + integer(kind=kindOfInt),intent(in) :: ifile + integer(kind=kindOfInt),intent(out) :: bufrid + integer(kind=kindOfInt),optional,intent(out) :: status + integer(kind=kindOfInt) :: iret + + iret=bufr_f_new_from_file( ifile, bufrid ) + if (present(status)) then + status = iret + else + call grib_check(iret,'bufr_new_from_file','') + endif + end subroutine bufr_new_from_file + + !> Create a new message in memory from a character array containting the coded message. !> diff --git a/fortran/grib_fortran_prototypes.h b/fortran/grib_fortran_prototypes.h index 559d63bb6..67192ca8f 100644 --- a/fortran/grib_fortran_prototypes.h +++ b/fortran/grib_fortran_prototypes.h @@ -109,9 +109,15 @@ int grib_f_copy_namespace(int *gidsrc, char *name, int *giddest, int len); int grib_f_count_in_file(int *fid, int *n); int grib_f_count_in_file_(int *fid, int *n); int grib_f_count_in_file__(int *fid, int *n); + int grib_f_new_from_file_(int *fid, int *gid); int grib_f_new_from_file__(int *fid, int *gid); int grib_f_new_from_file(int *fid, int *gid); + +int bufr_f_new_from_file_(int *fid, int *gid); +int bufr_f_new_from_file__(int *fid, int *gid); +int bufr_f_new_from_file(int *fid, int *gid); + int grib_f_headers_only_new_from_file_(int *fid, int *gid); int grib_f_headers_only_new_from_file__(int *fid, int *gid); int grib_f_headers_only_new_from_file(int *fid, int *gid);