Skip to content

Commit

Permalink
adding implicit none to gb_info.F90, gdt2gds.F90, getgb2r.f, jpcpack.…
Browse files Browse the repository at this point in the history
…F90, and jpcunpack.F90 (#513)

* adding implicit none to gb_info.F90

* added implicit none to gdt2gds.F90

* added implicit none to getgb2r.f

* added implicit none to jpcpack.F90

* added implicit none to jpcunpack

* fixed error

* fixed error
  • Loading branch information
edwardhartnett authored Aug 3, 2023
1 parent 2fef994 commit 6dfc19c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
5 changes: 4 additions & 1 deletion src/gb_info.F90
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
!> @author Stephen Gilbert @date 2000-05-25
subroutine gb_info(cgrib, lcgrib, listsec0, listsec1, &
numfields, numlocal, maxlocal, ierr)
implicit none

character(len = 1), intent(in) :: cgrib(lcgrib)
integer, intent(in) :: lcgrib
Expand All @@ -63,7 +64,9 @@ subroutine gb_info(cgrib, lcgrib, listsec0, listsec1, &
integer, parameter :: zero = 0, one = 1
integer, parameter :: mapsec1len = 13
integer, parameter :: mapsec1(mapsec1len) = (/ 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1 /)
integer iofst, istart
integer :: iofst, istart
integer :: nbits, lensec1, lensec0, lensec, lenposs, lengrib, j
integer :: i, ipos, isecnum

ierr = 0
numlocal = 0
Expand Down
4 changes: 3 additions & 1 deletion src/gdt2gds.F90
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@
!>
!> @author Stephen Gilbert @date 2003-06-17
subroutine gdt2gds(igds, igdstmpl, idefnum, ideflist, kgds, igrid, iret)

implicit none

integer, intent(in) :: idefnum
integer, intent(in) :: igds(*), igdstmpl(*), ideflist(*)
integer, intent(out) :: kgds(*), igrid, iret

integer :: kgds72(200), kgds71(200), idum(200), jdum(200)
integer :: ierr, j

iret = 0
idum = 0
Expand Down
4 changes: 2 additions & 2 deletions src/getgb2r.f
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
!>
!> @author Stephen Gilbert @date 2002-01-11
SUBROUTINE GETGB2R(LUGB,CINDEX,GFLD,IRET)
USE GRIB_MOD
use grib_mod
implicit none

INTEGER,INTENT(IN) :: LUGB
Expand All @@ -49,7 +49,7 @@ SUBROUTINE GETGB2R(LUGB,CINDEX,GFLD,IRET)
CHARACTER(LEN=1):: CSIZE(4)
CHARACTER(LEN=1),ALLOCATABLE :: CTEMP(:)
real,pointer,dimension(:) :: newfld
integer :: iskip, j, lread, n, idum, ierr, ilen, iofst
integer :: n, lread, j, iskip, iofst, ilen, ierr, idum

interface
subroutine gf_unpack6(cgrib,lcgrib,iofst,ngpts,ibmap,
Expand Down
10 changes: 5 additions & 5 deletions src/jpcpack.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
!> the packed data in bytes.
!>
!> @author Stephen Gilbert @date 2002-12-17
subroutine jpcpack(fld, width, height, idrstmpl, cpack, lcpack)
subroutine jpcpack(fld,width,height,idrstmpl,cpack,lcpack)
implicit none

integer,intent(in) :: width, height
real,intent(in) :: fld(width * height)
integer,intent(in) :: width,height
real,intent(in) :: fld(width*height)
character(len=1),intent(out) :: cpack(*)
integer,intent(inout) :: idrstmpl(*)
integer,intent(inout) :: lcpack
integer :: ndpts, nbytes, nbits, maxdif, j, imin, imax
real :: temp, dscale, bscale
integer :: ndpts, nbits, maxdif, imin, imax, j, nbytes
real :: dscale, bscale, temp

interface
function enc_jpeg2000(cin, width, height, nbits, ltype, ratio, retry, outjpc, jpclen) &
Expand Down
2 changes: 1 addition & 1 deletion src/jpcunpack.F90
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ subroutine jpcunpack(cpack,len,idrstmpl,ndpts,fld)
function dec_jpeg2000(cin, len, ifld) &
bind(c, name="g2c_dec_jpeg2000")
use iso_c_binding
character(kind = c_char), intent(in) :: cin(*)
character(kind = c_char), intent(in) :: cin(*)
integer(c_size_t), value, intent(in) :: len
integer(c_int), intent(inout) :: ifld(*)
integer(c_int) :: dec_jpeg2000
Expand Down

0 comments on commit 6dfc19c

Please sign in to comment.