ECC-60: Rename API functions which are GRIB specific

This commit is contained in:
Shahram Najm 2015-02-11 16:23:21 +00:00
parent af59f7af69
commit fca9cc43b1
8 changed files with 44 additions and 46 deletions

View File

@ -44,7 +44,7 @@ implicit none
allocate(lons(numberOfPoints))
allocate(values(numberOfPoints))
call codes_get_data(igrib,lats,lons,values)
call codes_grib_get_data(igrib,lats,lons,values)
do i=1,numberOfPoints
if (values(i) /= missingValue) then

View File

@ -7,14 +7,13 @@
! virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
!
!
! Description: How to decode grib messages containing multiple
! Description: How to decode GRIB messages containing multiple
! fields. Try to turn on and off multi support to
! see the difference. Default is OFF.
! For all the tools default is multi support ON.
!
!
!
!
program multi
use eccodes
implicit none
@ -27,10 +26,10 @@ program multi
call codes_open_file(ifile, '../../data/multi_created.grib2','r')
! turn on support for multi fields messages */
call codes_multi_support_on()
call codes_grib_multi_support_on()
! turn off support for multi fields messages */
!call codes_multi_support_off()
!call codes_grib_multi_support_off()
call codes_new_from_file(ifile,igrib, iret)
! Loop on all the messages in a file.

View File

@ -7,7 +7,7 @@
! virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
!
!
! Description: How to decode grib messages containing multiple
! Description: How to decode GRIB messages containing multiple
! fields. Try to turn on and off multi support to
! see the difference. Default is OFF.
! For all the tools default is multi support ON.
@ -26,10 +26,10 @@ program multi
'../../data/multi.grib2','r')
! turn on support for multi fields messages */
call codes_multi_support_on()
call codes_grib_multi_support_on()
! turn off support for multi fields messages */
! call codes_multi_support_off()
!call codes_grib_multi_support_off()
call codes_new_from_file(ifile,igrib)
! Loop on all the messages in a file.
@ -66,4 +66,3 @@ program multi
call codes_close_file(ifile)
end program multi

View File

@ -35,12 +35,12 @@ program multi_write
do step=0,240,12
call codes_set(in_gribid,"step",step)
call codes_multi_append(in_gribid,startsection,multi_gribid)
call codes_grib_multi_append(in_gribid,startsection,multi_gribid)
enddo
! write messages to a file
call codes_multi_write(multi_gribid,outfile)
call codes_grib_multi_write(multi_gribid,outfile)
call codes_release(in_gribid)
call codes_release(multi_gribid)

View File

@ -7,7 +7,7 @@
! virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
!
!
! Description: how to use codes_find_nearest and codes_get_element
! Description: how to use codes_grib_find_nearest and codes_get_element
!
!
!
@ -50,7 +50,7 @@ program find
call codes_new_from_file(infile,igrib)
call codes_find_nearest(igrib, .true., lats, lons, nearest_lats, nearest_lons,lsm_values, distances, indexes)
call codes_grib_find_nearest(igrib, .true., lats, lons, nearest_lats, nearest_lons,lsm_values, distances, indexes)
call codes_release(igrib)
call codes_close_file(infile)

View File

@ -103,11 +103,11 @@ module eccodes
!> @param[out] index zero based index
!> @param[out] value value of the field in the nearest point
!> @param[out] status CODES_SUCCESS if OK, integer value on error
interface codes_find_nearest
module procedure codes_find_nearest_single, &
codes_find_nearest_four_single, &
codes_find_nearest_multiple
end interface codes_find_nearest
interface codes_grib_find_nearest
module procedure codes_grib_find_nearest_single, &
codes_grib_find_nearest_four_single, &
codes_grib_find_nearest_multiple
end interface codes_grib_find_nearest
!> Get latitude/longitude and data values.
!>
@ -126,7 +126,7 @@ module eccodes
!> @param[out] lats latitudes array with dimension "size"
!> @param[out] lons longitudes array with dimension "size"
!> @param[out] values data values array with dimension "size"
interface codes_get_data
module procedure codes_get_data_real4, &
codes_get_data_real8
end interface codes_get_data
interface codes_grib_get_data
module procedure codes_grib_get_data_real4, &
codes_grib_get_data_real8
end interface codes_grib_get_data

View File

@ -577,7 +577,7 @@ subroutine codes_clone ( gribid_src, gribid_dest, status )
end subroutine codes_clone
!
subroutine codes_util_sections_copy ( gribid_from, gribid_to, what, gribid_out,status )
subroutine codes_grib_util_sections_copy ( gribid_from, gribid_to, what, gribid_out,status )
integer(kind=kindOfInt), intent(in) :: gribid_from
integer(kind=kindOfInt), intent(in) :: gribid_to
integer(kind=kindOfInt), intent(out) :: gribid_out
@ -586,7 +586,7 @@ subroutine codes_util_sections_copy ( gribid_from, gribid_to, what, gribid_out,s
integer(kind=kindOfInt) :: iret
call grib_util_sections_copy ( gribid_from, gribid_to, what, gribid_out,status )
end subroutine codes_util_sections_copy
end subroutine codes_grib_util_sections_copy
!
subroutine codes_copy_namespace ( gribid_src, namespace, gribid_dest, status )
@ -609,7 +609,7 @@ subroutine codes_check ( status,caller,string )
end subroutine codes_check
!
subroutine codes_get_data_real4 ( gribid, lats, lons, values, status )
subroutine codes_grib_get_data_real4 ( gribid, lats, lons, values, status )
integer(kind=kindOfInt), intent(in) :: gribid
real ( kind = kindOfFloat ), dimension(:),intent(out) :: lats, lons
real ( kind = kindOfFloat ), dimension(:),intent(out) :: values
@ -618,10 +618,10 @@ subroutine codes_get_data_real4 ( gribid, lats, lons, values, status )
integer(kind=kindOfSize_t) :: npoints
call grib_get_data_real4 ( gribid, lats, lons, values, status )
end subroutine codes_get_data_real4
end subroutine codes_grib_get_data_real4
!
subroutine codes_get_data_real8 ( gribid, lats, lons, values, status )
subroutine codes_grib_get_data_real8 ( gribid, lats, lons, values, status )
integer(kind=kindOfInt), intent(in) :: gribid
real ( kind = kindOfDouble ), dimension(:),intent(out) :: lats, lons
real ( kind = kindOfDouble ), dimension(:),intent(out) :: values
@ -630,7 +630,7 @@ subroutine codes_get_data_real8 ( gribid, lats, lons, values, status )
integer(kind=kindOfSize_t) :: npoints
call grib_get_data_real8 ( gribid, lats, lons, values, status )
end subroutine codes_get_data_real8
end subroutine codes_grib_get_data_real8
!
subroutine codes_keys_iterator_new ( gribid, iterid, namespace, status )
@ -1094,17 +1094,17 @@ subroutine codes_write ( gribid, ifile , status)
end subroutine codes_write
!
subroutine codes_multi_write ( multigribid, ifile , status)
subroutine codes_grib_multi_write ( multigribid, ifile , status)
integer(kind=kindOfInt), intent(in) :: multigribid
integer(kind=kindOfInt), intent(in) :: ifile
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
call grib_multi_write ( multigribid, ifile , status)
end subroutine codes_multi_write
end subroutine codes_grib_multi_write
!
subroutine codes_multi_append ( ingribid, startsection, multigribid , status)
subroutine codes_grib_multi_append ( ingribid, startsection, multigribid , status)
integer(kind=kindOfInt), intent(in) :: ingribid
integer(kind=kindOfInt), intent(in) :: startsection
integer(kind=kindOfInt), intent(out) :: multigribid
@ -1112,10 +1112,10 @@ subroutine codes_multi_append ( ingribid, startsection, multigribid , status)
integer(kind=kindOfInt) :: iret
call grib_multi_append ( ingribid, startsection, multigribid , status)
end subroutine codes_multi_append
end subroutine codes_grib_multi_append
!
subroutine codes_find_nearest_multiple(gribid,is_lsm, &
subroutine codes_grib_find_nearest_multiple(gribid,is_lsm, &
inlats,inlons,outlats,outlons, &
values,distances, indexes,status)
integer(kind=kindOfInt), intent(in) :: gribid
@ -1135,10 +1135,10 @@ subroutine codes_find_nearest_multiple(gribid,is_lsm, &
call grib_find_nearest_multiple(gribid,is_lsm, &
inlats,inlons,outlats,outlons, &
values,distances, indexes,status)
end subroutine codes_find_nearest_multiple
end subroutine codes_grib_find_nearest_multiple
!
subroutine codes_find_nearest_single(gribid,is_lsm, &
subroutine codes_grib_find_nearest_single(gribid,is_lsm, &
inlat,inlon,outlat,outlon, &
value,distance, index,status)
integer(kind=kindOfInt), intent(in) :: gribid
@ -1157,10 +1157,10 @@ subroutine codes_find_nearest_single(gribid,is_lsm, &
call grib_find_nearest_single(gribid,is_lsm, &
inlat,inlon,outlat,outlon, &
value,distance, index,status)
end subroutine codes_find_nearest_single
end subroutine codes_grib_find_nearest_single
!
subroutine codes_find_nearest_four_single(gribid,is_lsm, &
subroutine codes_grib_find_nearest_four_single(gribid,is_lsm, &
inlat,inlon,outlat,outlon, &
value,distance, index,status)
integer(kind=kindOfInt), intent(in) :: gribid
@ -1179,23 +1179,23 @@ subroutine codes_find_nearest_four_single(gribid,is_lsm, &
call grib_find_nearest_four_single(gribid,is_lsm, &
inlat,inlon,outlat,outlon, &
value,distance, index,status)
end subroutine codes_find_nearest_four_single
end subroutine codes_grib_find_nearest_four_single
!
subroutine codes_multi_support_on (status )
subroutine codes_grib_multi_support_on (status )
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
call grib_multi_support_on (status )
end subroutine codes_multi_support_on
end subroutine codes_grib_multi_support_on
!
subroutine codes_multi_support_off ( status )
subroutine codes_grib_multi_support_off ( status )
integer(kind=kindOfInt),optional, intent(out) :: status
integer(kind=kindOfInt) :: iret
call grib_multi_support_off ( status )
end subroutine codes_multi_support_off
end subroutine codes_grib_multi_support_off
!
subroutine codes_gribex_mode_on (status )

View File

@ -1,6 +1,6 @@
public :: codes_get, codes_set, codes_set_force, codes_get_data, codes_is_missing, codes_is_defined
public :: codes_get, codes_set, codes_set_force, codes_grib_get_data, codes_is_missing, codes_is_defined
public :: codes_open_file, codes_close_file,codes_read_bytes,codes_write_bytes
public :: codes_multi_support_on, codes_multi_support_off
public :: codes_grib_multi_support_on, codes_grib_multi_support_off
public :: codes_keys_iterator_new, &
codes_keys_iterator_next, &
codes_keys_iterator_delete
@ -18,9 +18,9 @@ public :: codes_dump
public :: codes_get_error_string
public :: codes_get_size
public :: codes_get_message_size, codes_copy_message
public :: codes_write, codes_multi_append
public :: codes_write, codes_grib_multi_append
public :: codes_check
public :: codes_clone, codes_copy_namespace
public :: codes_index_get,codes_index_select,&
codes_index_create,codes_index_get_size,codes_index_release,&
codes_util_sections_copy
codes_grib_util_sections_copy