This commit is contained in:
Shahram Najm 2021-02-15 12:46:59 +00:00
parent b62e22fef9
commit de42c8f6a5
17 changed files with 2877 additions and 2913 deletions

View File

@ -17,13 +17,12 @@ module eccodes
include "eccodes_visibility.h"
include "eccodes_settings.h"
real(8), parameter,public :: CODES_MISSING_DOUBLE = -1.D+100
integer(4), parameter,public :: CODES_MISSING_LONG = 2147483647
integer, parameter,public :: CODES_PRODUCT_ANY = 0
integer, parameter,public :: CODES_PRODUCT_GRIB = 1
integer, parameter,public :: CODES_PRODUCT_BUFR = 2
real(8), parameter, public :: CODES_MISSING_DOUBLE = -1.D+100
integer(4), parameter, public :: CODES_MISSING_LONG = 2147483647
integer, parameter, public :: CODES_PRODUCT_ANY = 0
integer, parameter, public :: CODES_PRODUCT_GRIB = 1
integer, parameter, public :: CODES_PRODUCT_BUFR = 2
!> Create a new message in memory from an integer or character array containting the coded message.
!>

View File

@ -6,7 +6,6 @@
! In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
! virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
!> Get the distinct values of the key in argument contained in the index. The key must belong to the index.
!>
!>
@ -105,7 +104,6 @@
codes_get_real8_array
end interface codes_get
!> Get the size of an array key.
!>
!> To get the size of a key representing an array.

View File

@ -6,7 +6,6 @@
! In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
! virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
!> Get the distinct values of the key in argument contained in the index. The key must belong to the index.
!>
!>

File diff suppressed because it is too large Load Diff

View File

@ -4,25 +4,25 @@ integer function kind_of_long_long
integer(8), dimension(2) :: x8 = (/1, 2/)
character(len=1) :: ret
kind_of_long_long=-1
kind_of_long_long = -1
call check_long_long(x2(0),x2(1),ret)
call check_long_long(x2(0), x2(1), ret)
if (ret == 't') then
kind_of_long_long=2
kind_of_long_long = 2
return
endif
end if
call check_long_long(x4(0),x4(1),ret)
call check_long_long(x4(0), x4(1), ret)
if (ret == 't') then
kind_of_long_long=4
kind_of_long_long = 4
return
endif
end if
call check_long_long(x8(0),x8(1),ret)
call check_long_long(x8(0), x8(1), ret)
if (ret == 't') then
kind_of_long_long=8
kind_of_long_long = 8
return
endif
end if
end function kind_of_long_long
@ -32,25 +32,25 @@ integer function kind_of_size_t
integer(8), dimension(2) :: x8 = (/1, 2/)
character(len=1) :: ret
kind_of_size_t=-1
kind_of_size_t = -1
call check_size_t(x2(0),x2(1),ret)
call check_size_t(x2(0), x2(1), ret)
if (ret == 't') then
kind_of_size_t=2
kind_of_size_t = 2
return
endif
end if
call check_size_t(x4(0),x4(1),ret)
call check_size_t(x4(0), x4(1), ret)
if (ret == 't') then
kind_of_size_t=4
kind_of_size_t = 4
return
endif
end if
call check_size_t(x8(0),x8(1),ret)
call check_size_t(x8(0), x8(1), ret)
if (ret == 't') then
kind_of_size_t=8
kind_of_size_t = 8
return
endif
end if
end function kind_of_size_t
@ -60,25 +60,25 @@ integer function kind_of_long
integer(8), dimension(2) :: x8 = (/1, 2/)
character(len=1) :: ret
kind_of_long=-1
kind_of_long = -1
call check_long(x2(0),x2(1),ret)
call check_long(x2(0), x2(1), ret)
if (ret == 't') then
kind_of_long=2
kind_of_long = 2
return
endif
end if
call check_long(x4(0),x4(1),ret)
call check_long(x4(0), x4(1), ret)
if (ret == 't') then
kind_of_long=4
kind_of_long = 4
return
endif
end if
call check_long(x8(0),x8(1),ret)
call check_long(x8(0), x8(1), ret)
if (ret == 't') then
kind_of_long=8
kind_of_long = 8
return
endif
end if
end function kind_of_long
@ -88,25 +88,25 @@ integer function kind_of_int
integer(8), dimension(2) :: x8 = (/1, 2/)
character(len=1) :: ret
kind_of_int=-1
kind_of_int = -1
call check_int(x2(0),x2(1),ret)
call check_int(x2(0), x2(1), ret)
if (ret == 't') then
kind_of_int=2
kind_of_int = 2
return
endif
end if
call check_int(x4(0),x4(1),ret)
call check_int(x4(0), x4(1), ret)
if (ret == 't') then
kind_of_int=4
kind_of_int = 4
return
endif
end if
call check_int(x8(0),x8(1),ret)
call check_int(x8(0), x8(1), ret)
if (ret == 't') then
kind_of_int=8
kind_of_int = 8
return
endif
end if
end function kind_of_int
@ -115,19 +115,19 @@ integer function kind_of_float
real(8), dimension(2) :: x8 = (/1., 2./)
character(len=1) :: ret
kind_of_float=-1
kind_of_float = -1
call check_float(x4(0),x4(1),ret)
call check_float(x4(0), x4(1), ret)
if (ret == 't') then
kind_of_float=4
kind_of_float = 4
return
endif
end if
call check_float(x8(0),x8(1),ret)
call check_float(x8(0), x8(1), ret)
if (ret == 't') then
kind_of_float=8
kind_of_float = 8
return
endif
end if
end function kind_of_float
@ -136,30 +136,30 @@ integer function kind_of_double
real(8), dimension(2) :: real8 = (/1., 2./)
character(len=1) :: ret
kind_of_double=-1
kind_of_double = -1
call check_double(real4(0),real4(1),ret)
call check_double(real4(0), real4(1), ret)
if (ret == 't') then
kind_of_double=4
kind_of_double = 4
return
endif
end if
call check_double(real8(0),real8(1),ret)
call check_double(real8(0), real8(1), ret)
if (ret == 't') then
kind_of_double=8
kind_of_double = 8
return
endif
end if
end function kind_of_double
program test
print *,'kind_of_double=',kind_of_double()
print *,'kind_of_float=',kind_of_float()
print *,'kind_of_int=',kind_of_int()
print *,'kind_of_long=',kind_of_long()
print *,'kind_of_size_t=',kind_of_size_t()
print *,'kind_of_long_long=',kind_of_long_long()
print *, 'kind_of_double=', kind_of_double()
print *, 'kind_of_float=', kind_of_float()
print *, 'kind_of_int=', kind_of_int()
print *, 'kind_of_long=', kind_of_long()
print *, 'kind_of_size_t=', kind_of_size_t()
print *, 'kind_of_long_long=', kind_of_long_long()
end program test

View File

@ -18,9 +18,8 @@ module grib_api
include "grib_api_externals.h"
include "grib_api_visibility.h"
real(8), parameter,public :: GRIB_MISSING_DOUBLE = -1.D+100
integer(4), parameter,public :: GRIB_MISSING_LONG = 2147483647
real(8), parameter, public :: GRIB_MISSING_DOUBLE = -1.D+100
integer(4), parameter, public :: GRIB_MISSING_LONG = 2147483647
!> Create a new message in memory from an integer or character array containting the coded message.
!>

View File

@ -6,7 +6,6 @@
! In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
! virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
!> Get the distinct values of the key in argument contained in the index. The key must belong to the index.
!>
!>
@ -103,7 +102,6 @@
grib_get_real8_array
end interface grib_get
!> Get the size of an array key.
!>
!> To get the size of a key representing an array.

View File

@ -6,7 +6,6 @@
! In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
! virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
!> Get the distinct values of the key in argument contained in the index. The key must belong to the index.
!>
!>

File diff suppressed because it is too large Load Diff

View File

@ -33,8 +33,8 @@ module grib_typeSizes
integer, parameter :: FourByteInt = selected_int_kind(9), &
EightByteInt = selected_int_kind(18)
integer, parameter :: FourByteReal = selected_real_kind(P = 6, R = 37), &
EightByteReal = selected_real_kind(P = 13, R = 307)
integer, parameter :: FourByteReal = selected_real_kind(P=6, R=37), &
EightByteReal = selected_real_kind(P=13, R=307)
contains
logical function byteSizesOK()
! Users may call this function once to ensure that the kind parameters
@ -45,7 +45,7 @@ contains
! the bit_size intrinsic, but I haven't seen this in a long time.
! Local variables
integer (kind = FourByteInt) :: Four
integer(kind=FourByteInt) :: Four
if (bit_size(Four) == 32 .and. &
FourByteReal > 0 .and. EightByteReal > 0 .and. &

View File

@ -12,25 +12,25 @@ integer function kind_of_size_t()
integer(8), dimension(2) :: x8 = (/1, 2/)
character(len=1) :: ret
kind_of_size_t=-1
kind_of_size_t = -1
call check_size_t(x2(1),x2(2),ret)
call check_size_t(x2(1), x2(2), ret)
if (ret == 't') then
kind_of_size_t=2
kind_of_size_t = 2
return
endif
end if
call check_size_t(x4(1),x4(2),ret)
call check_size_t(x4(1), x4(2), ret)
if (ret == 't') then
kind_of_size_t=4
kind_of_size_t = 4
return
endif
end if
call check_size_t(x8(1),x8(2),ret)
call check_size_t(x8(1), x8(2), ret)
if (ret == 't') then
kind_of_size_t=8
kind_of_size_t = 8
return
endif
end if
end function kind_of_size_t
@ -40,25 +40,25 @@ integer function kind_of_long()
integer(8), dimension(2) :: x8 = (/1, 2/)
character(len=1) :: ret
kind_of_long=-1
kind_of_long = -1
call check_long(x2(1),x2(2),ret)
call check_long(x2(1), x2(2), ret)
if (ret == 't') then
kind_of_long=2
kind_of_long = 2
return
endif
end if
call check_long(x4(1),x4(2),ret)
call check_long(x4(1), x4(2), ret)
if (ret == 't') then
kind_of_long=4
kind_of_long = 4
return
endif
end if
call check_long(x8(1),x8(2),ret)
call check_long(x8(1), x8(2), ret)
if (ret == 't') then
kind_of_long=8
kind_of_long = 8
return
endif
end if
end function kind_of_long
@ -68,25 +68,25 @@ integer function kind_of_int()
integer(8), dimension(2) :: x8 = (/1, 2/)
character(len=1) :: ret
kind_of_int=-1
kind_of_int = -1
call check_int(x2(1),x2(2),ret)
call check_int(x2(1), x2(2), ret)
if (ret == 't') then
kind_of_int=2
kind_of_int = 2
return
endif
end if
call check_int(x4(1),x4(2),ret)
call check_int(x4(1), x4(2), ret)
if (ret == 't') then
kind_of_int=4
kind_of_int = 4
return
endif
end if
call check_int(x8(1),x8(2),ret)
call check_int(x8(1), x8(2), ret)
if (ret == 't') then
kind_of_int=8
kind_of_int = 8
return
endif
end if
end function kind_of_int
@ -95,19 +95,19 @@ integer function kind_of_float()
real(8), dimension(2) :: x8 = (/1., 2./)
character(len=1) :: ret
kind_of_float=-1
kind_of_float = -1
call check_float(x4(1),x4(2),ret)
call check_float(x4(1), x4(2), ret)
if (ret == 't') then
kind_of_float=4
kind_of_float = 4
return
endif
end if
call check_float(x8(1),x8(2),ret)
call check_float(x8(1), x8(2), ret)
if (ret == 't') then
kind_of_float=8
kind_of_float = 8
return
endif
end if
end function kind_of_float
@ -116,19 +116,19 @@ integer function kind_of_double()
real(8), dimension(2) :: real8 = (/1., 2./)
character(len=1) :: ret
kind_of_double=-1
kind_of_double = -1
call check_double(real4(1),real4(2),ret)
call check_double(real4(1), real4(2), ret)
if (ret == 't') then
kind_of_double=4
kind_of_double = 4
return
endif
end if
call check_double(real8(1),real8(2),ret)
call check_double(real8(1), real8(2), ret)
if (ret == 't') then
kind_of_double=8
kind_of_double = 8
return
endif
end if
end function kind_of_double
@ -140,22 +140,22 @@ program kind_h
real(kind=4), dimension(2) :: r4
real(kind=8), dimension(2) :: r8
print *,"integer,public,parameter :: kindOfInt=",kind_of_int()
print *,"integer,public,parameter :: kindOfLong=",kind_of_long()
print *,"integer,public,parameter :: kindOfSize_t=",kind_of_size_t()
print *,"integer,public,parameter :: kindOfSize=",kind_of_size_t()
print *,"integer,public,parameter :: kindOfDouble=",kind_of_double()
print *,"integer,public,parameter :: kindOfFloat=",kind_of_float()
call f_sizeof(i(1),i(2),size)
print *,"integer,public,parameter :: sizeOfInteger=",size
call f_sizeof(i2(1),i2(2),size)
print *,"integer,public,parameter :: sizeOfInteger2=",size
call f_sizeof(i4(1),i4(2),size)
print *,"integer,public,parameter :: sizeOfInteger4=",size
call f_sizeof(r4(1),r4(2),size)
print *,"integer,public,parameter :: sizeOfReal4=",size
call f_sizeof(r8(1),r8(2),size)
print *,"integer,public,parameter :: sizeOfReal8=",size
print *, "integer,public,parameter :: kindOfInt=", kind_of_int()
print *, "integer,public,parameter :: kindOfLong=", kind_of_long()
print *, "integer,public,parameter :: kindOfSize_t=", kind_of_size_t()
print *, "integer,public,parameter :: kindOfSize=", kind_of_size_t()
print *, "integer,public,parameter :: kindOfDouble=", kind_of_double()
print *, "integer,public,parameter :: kindOfFloat=", kind_of_float()
call f_sizeof(i(1), i(2), size)
print *, "integer,public,parameter :: sizeOfInteger=", size
call f_sizeof(i2(1), i2(2), size)
print *, "integer,public,parameter :: sizeOfInteger2=", size
call f_sizeof(i4(1), i4(2), size)
print *, "integer,public,parameter :: sizeOfInteger4=", size
call f_sizeof(r4(1), r4(2), size)
print *, "integer,public,parameter :: sizeOfReal4=", size
call f_sizeof(r8(1), r8(2), size)
print *, "integer,public,parameter :: sizeOfReal8=", size
end program kind_h

View File

@ -12,25 +12,25 @@ integer function kind_of_long()
integer(8), dimension(2) :: x8 = (/1, 2/)
character(len=1) :: ret
kind_of_long=-1
kind_of_long = -1
call check_long(x2(1),x2(2),ret)
call check_long(x2(1), x2(2), ret)
if (ret == 't') then
kind_of_long=2
kind_of_long = 2
return
endif
end if
call check_long(x4(1),x4(2),ret)
call check_long(x4(1), x4(2), ret)
if (ret == 't') then
kind_of_long=4
kind_of_long = 4
return
endif
end if
call check_long(x8(1),x8(2),ret)
call check_long(x8(1), x8(2), ret)
if (ret == 't') then
kind_of_long=8
kind_of_long = 8
return
endif
end if
end function kind_of_long
@ -40,37 +40,37 @@ integer function kind_of_int()
integer(8), dimension(2) :: x8 = (/1, 2/)
character(len=1) :: ret
kind_of_int=-1
kind_of_int = -1
call check_int(x2(1),x2(2),ret)
call check_int(x2(1), x2(2), ret)
if (ret == 't') then
kind_of_int=2
kind_of_int = 2
return
endif
end if
call check_int(x4(1),x4(2),ret)
call check_int(x4(1), x4(2), ret)
if (ret == 't') then
kind_of_int=4
kind_of_int = 4
return
endif
end if
call check_int(x8(1),x8(2),ret)
call check_int(x8(1), x8(2), ret)
if (ret == 't') then
kind_of_int=8
kind_of_int = 8
return
endif
end if
end function kind_of_int
program same_int_long
integer ki,kl
integer ki, kl
ki=kind_of_int()
kl=kind_of_long()
ki = kind_of_int()
kl = kind_of_long()
if (ki /= kl) then
write (*,'(i1)') 0
write (*, '(i1)') 0
else
write (*,'(i1)') 1
endif
write (*, '(i1)') 1
end if
end program same_int_long

View File

@ -12,25 +12,25 @@ integer function kind_of_size_t()
integer(8), dimension(2) :: x8 = (/1, 2/)
character(len=1) :: ret
kind_of_size_t=-1
kind_of_size_t = -1
call check_size_t(x2(1),x2(2),ret)
call check_size_t(x2(1), x2(2), ret)
if (ret == 't') then
kind_of_size_t=2
kind_of_size_t = 2
return
endif
end if
call check_size_t(x4(1),x4(2),ret)
call check_size_t(x4(1), x4(2), ret)
if (ret == 't') then
kind_of_size_t=4
kind_of_size_t = 4
return
endif
end if
call check_size_t(x8(1),x8(2),ret)
call check_size_t(x8(1), x8(2), ret)
if (ret == 't') then
kind_of_size_t=8
kind_of_size_t = 8
return
endif
end if
end function kind_of_size_t
@ -40,37 +40,37 @@ integer function kind_of_int()
integer(8), dimension(2) :: x8 = (/1, 2/)
character(len=1) :: ret
kind_of_int=-1
kind_of_int = -1
call check_int(x2(1),x2(2),ret)
call check_int(x2(1), x2(2), ret)
if (ret == 't') then
kind_of_int=2
kind_of_int = 2
return
endif
end if
call check_int(x4(1),x4(2),ret)
call check_int(x4(1), x4(2), ret)
if (ret == 't') then
kind_of_int=4
kind_of_int = 4
return
endif
end if
call check_int(x8(1),x8(2),ret)
call check_int(x8(1), x8(2), ret)
if (ret == 't') then
kind_of_int=8
kind_of_int = 8
return
endif
end if
end function kind_of_int
program same_int_size_t
integer ki,kl
integer ki, kl
ki=kind_of_int()
kl=kind_of_size_t()
ki = kind_of_int()
kl = kind_of_size_t()
if (ki /= kl) then
write (*,'(i1)') 0
write (*, '(i1)') 0
else
write (*,'(i1)') 1
endif
write (*, '(i1)') 1
end if
end program same_int_size_t