Skip to content

Commit

Permalink
chore: change variables named unit to 'iunit' (#1394)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrooks1085 authored Nov 13, 2023
1 parent 302e3cb commit 0ede185
Show file tree
Hide file tree
Showing 19 changed files with 160 additions and 160 deletions.
6 changes: 3 additions & 3 deletions affinity/fms_affinity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ subroutine fms_affinity_init()
!--- local variables
integer:: io_stat
integer:: ierr
integer:: unit
integer:: iunit

!--- return if module is initialized
if (module_is_initialized) return
Expand All @@ -105,8 +105,8 @@ subroutine fms_affinity_init()

!--- output information to logfile
call write_version_number("fms_affinity_mod", version)
unit = stdlog()
write(unit,nml=fms_affinity_nml)
iunit = stdlog()
write(iunit,nml=fms_affinity_nml)

module_is_initialized = .TRUE.

Expand Down
8 changes: 4 additions & 4 deletions amip_interp/amip_interp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ module amip_interp_mod
! ---- global unit & date ----

integer, parameter :: maxc = 128
integer :: unit
integer :: iunit
character(len=maxc) :: file_name_sst, file_name_ice
type(FmsNetcdfFile_t), target :: fileobj_sst, fileobj_ice

Expand Down Expand Up @@ -367,7 +367,7 @@ module amip_interp_mod

!> initialize @ref amip_interp_mod for use
subroutine amip_interp_init
integer :: unit,io,ierr
integer :: iunit,io,ierr

!-----------------------------------------------------------------------

Expand All @@ -381,9 +381,9 @@ subroutine amip_interp_init
! ----- write namelist/version info -----
call write_version_number("AMIP_INTERP_MOD", version)

unit = stdlog ( )
iunit = stdlog ( )
if (mpp_pe() == 0) then
write (unit,nml=amip_interp_nml)
write (iunit,nml=amip_interp_nml)
endif

if (use_mpp_io) then
Expand Down
6 changes: 3 additions & 3 deletions amip_interp/include/amip_interp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ subroutine GET_AMIP_SST_ (Time, Interp, sst, err_msg, lon_model, lat_model)
! end add by JHC
logical, parameter :: DEBUG = .false. !> switch for debugging output
!> These are fms_io specific
integer :: unit
integer :: iunit
integer, parameter :: lkind = FMS_AMIP_INTERP_KIND_

if(present(err_msg)) err_msg = ''
Expand Down Expand Up @@ -103,7 +103,7 @@ if ( .not.use_daily ) then
Date2 = date_type( year2, month2, 0 )

! -- open/rewind file --
unit = -1
iunit = -1
!-----------------------------------------------------------------------

if (Date1 /= Interp%Date1) then
Expand Down Expand Up @@ -368,7 +368,7 @@ else
Date1 = date_type( year1, month1, 0 )
Date2 = date_type( year2, month2, 0 )

unit = -1
iunit = -1
!-----------------------------------------------------------------------

if (Date1 /= Interp%Date1) then
Expand Down
6 changes: 3 additions & 3 deletions astronomy/astronomy.F90
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ subroutine astronomy_init (latb, lonb)
!-------------------------------------------------------------------
! local variables:
!-------------------------------------------------------------------
integer :: unit, ierr, io, seconds, days, jd, id
integer :: iunit, ierr, io, seconds, days, jd, id
character(len=17) :: err_str

!-------------------------------------------------------------------
Expand All @@ -463,8 +463,8 @@ subroutine astronomy_init (latb, lonb)
!---------------------------------------------------------------------
call write_version_number("ASTRONOMY_MOD", version)
if (mpp_pe() == mpp_root_pe() ) then
unit = stdlog()
write (unit, nml=astronomy_nml)
iunit = stdlog()
write (iunit, nml=astronomy_nml)
endif
!--------------------------------------------------------------------
!> Be sure input values are within valid ranges.
Expand Down
24 changes: 12 additions & 12 deletions axis_utils/include/axis_utils2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
function FRAC_INDEX_(rval, array)
integer :: ia, i, ii, unit
integer :: ia, i, ii, iunit
real(kind=FMS_AU_KIND_) :: rval !< arbitrary data...same units as elements in "array"
real(kind=FMS_AU_KIND_) :: FRAC_INDEX_
real(kind=FMS_AU_KIND_), dimension(:) :: array !< array of data points (must be monotonically increasing)
Expand All @@ -230,13 +230,13 @@
do i = 2, ia
if (array(i) < array(i-1)) then
unit = stdout()
write (unit,*) '=> Error: "frac_index" array must be monotonically' &
iunit = stdout()
write (iunit,*) '=> Error: "frac_index" array must be monotonically' &
& // 'increasing when searching for nearest value to ', rval
write (unit,*) ' array(i) < array(i-1) for i=',i
write (unit,*) ' array(i) for i=1..ia follows:'
write (iunit,*) ' array(i) < array(i-1) for i=',i
write (iunit,*) ' array(i) for i=1..ia follows:'
do ii = 1, ia
write (unit,*) 'i=',ii, ' array(i)=',array(ii)
write (iunit,*) 'i=',ii, ' array(i)=',array(ii)
enddo
call mpp_error(FATAL,' "frac_index" array must be monotonically increasing.')
endif
Expand Down Expand Up @@ -300,7 +300,7 @@
integer :: NEAREST_INDEX_
integer :: ia !< dimension of "array"
integer :: i, ii, unit
integer :: i, ii, iunit
real(kind=FMS_AU_KIND_) :: rval !< arbitrary data...same units as elements in "array"
real(kind=FMS_AU_KIND_), dimension(:) :: array !< array of data points (must be monotonically increasing)
logical :: keep_going
Expand All @@ -309,13 +309,13 @@
do i = 2, ia
if (array(i) < array(i-1)) then
unit = stdout()
write (unit,*) '=> Error: "nearest_index" array must be monotonically increasing' &
iunit = stdout()
write (iunit,*) '=> Error: "nearest_index" array must be monotonically increasing' &
& // 'when searching for nearest value to ', rval
write (unit,*) ' array(i) < array(i-1) for i=',i
write (unit,*) ' array(i) for i=1..ia follows:'
write (iunit,*) ' array(i) < array(i-1) for i=',i
write (iunit,*) ' array(i) for i=1..ia follows:'
do ii = 1, ia
write (unit,*) 'i=',ii, ' array(i)=', array(ii)
write (iunit,*) 'i=',ii, ' array(i)=', array(ii)
enddo
call mpp_error(FATAL,' "nearest_index" array must be monotonically increasing.')
endif
Expand Down
6 changes: 3 additions & 3 deletions column_diagnostics/column_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ subroutine column_diagnostics_init
!--------------------------------------------------------------------
! local variables:
!
integer :: unit !< unit number for nml file
integer :: iunit !< unit number for nml file
integer :: ierr !< error return flag
integer :: io !< error return code

Expand Down Expand Up @@ -164,8 +164,8 @@ subroutine column_diagnostics_init
!---------------------------------------------------------------------
call write_version_number("COLUMN_DIAGNOSTICS_MOD", version)
if (mpp_pe() == mpp_root_pe()) then
unit = stdlog()
write (unit, nml=column_diagnostics_nml)
iunit = stdlog()
write (iunit, nml=column_diagnostics_nml)
endif
!--------------------------------------------------------------------
module_is_initialized = .true.
Expand Down
6 changes: 3 additions & 3 deletions data_override/include/data_override.inc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ subroutine DATA_OVERRIDE_INIT_IMPL_(Atm_domain_in, Ocean_domain_in, Ice_domain_i

character(len=128) :: grid_file = 'INPUT/grid_spec.nc'
integer :: is,ie,js,je,use_get_grid_version
integer :: i, unit, io_status, ierr
integer :: i, iunit, io_status, ierr
logical :: atm_on, ocn_on, lnd_on, ice_on, lndUG_on
logical :: file_open
type(FmsNetcdfFile_t) :: fileobj
Expand All @@ -153,8 +153,8 @@ subroutine DATA_OVERRIDE_INIT_IMPL_(Atm_domain_in, Ocean_domain_in, Ice_domain_i

read (input_nml_file, data_override_nml, iostat=io_status)
ierr = check_nml_error(io_status, 'data_override_nml')
unit = stdlog()
write(unit, data_override_nml)
iunit = stdlog()
write(iunit, data_override_nml)

! grid_center_bug is no longer supported.
if (grid_center_bug) then
Expand Down
6 changes: 3 additions & 3 deletions exchange/xgrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ subroutine xgrid_init(remap_method)
integer, intent(out) :: remap_method !< exchange grid interpolation method. It has four possible values:
!! FIRST_ORDER (=1), SECOND_ORDER(=2).

integer :: unit, ierr, io, out_unit
integer :: iunit, ierr, io, out_unit

if (module_is_initialized) return
module_is_initialized = .TRUE.
Expand All @@ -534,9 +534,9 @@ subroutine xgrid_init(remap_method)
!--------- write version number and namelist ------------------
call write_version_number("XGRID_MOD", version)

unit = stdlog ( )
iunit = stdlog ( )
out_unit = stdout()
if ( mpp_pe() == mpp_root_pe() ) write (unit,nml=xgrid_nml)
if ( mpp_pe() == mpp_root_pe() ) write (iunit,nml=xgrid_nml)

if (use_mpp_io) then
! FATAL error if trying to use mpp_io
Expand Down
6 changes: 3 additions & 3 deletions horiz_interp/horiz_interp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,16 @@ module horiz_interp_mod

!> Initialize module and writes version number to logfile.out
subroutine horiz_interp_init
integer :: unit, ierr, io
integer :: iunit, ierr, io

if(module_is_initialized) return
call write_version_number("HORIZ_INTERP_MOD", version)

read (input_nml_file, horiz_interp_nml, iostat=io)
ierr = check_nml_error(io,'horiz_interp_nml')
if (mpp_pe() == mpp_root_pe() ) then
unit = stdlog()
write (unit, nml=horiz_interp_nml)
iunit = stdlog()
write (iunit, nml=horiz_interp_nml)
endif

if (reproduce_siena) then
Expand Down
50 changes: 25 additions & 25 deletions horiz_interp/include/horiz_interp_bicubic.inc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
integer :: nlon_in, nlat_in, nlon_out, nlat_out
integer :: jcl, jcu, icl, icu, jj
real(FMS_HI_KIND_) :: xz, yz
integer :: unit
integer :: iunit
integer, parameter :: kindl = FMS_HI_KIND_ !< real size at compile time
if(present(verbose)) verbose_bicubic = verbose
Expand Down Expand Up @@ -74,21 +74,21 @@
Interp%HI_KIND_TYPE_%lat_in = lat_in
if ( verbose_bicubic > 0 ) then
unit = stdout()
write (unit,'(/,"Initialising bicubic interpolation, interface horiz_interp_bicubic_new_1d_s")')
write (unit,'(/," Longitude of coarse grid points (radian): xc(i) i=1, ",i4)') Interp%nlon_src
write (unit,'(1x,10f10.4)') (Interp%HI_KIND_TYPE_%lon_in(jj),jj=1,Interp%nlon_src)
write (unit,'(/," Latitude of coarse grid points (radian): yc(j) j=1, ",i4)') Interp%nlat_src
write (unit,'(1x,10f10.4)') (Interp%HI_KIND_TYPE_%lat_in(jj),jj=1,Interp%nlat_src)
iunit = stdout()
write (iunit,'(/,"Initialising bicubic interpolation, interface horiz_interp_bicubic_new_1d_s")')
write (iunit,'(/," Longitude of coarse grid points (radian): xc(i) i=1, ",i4)') Interp%nlon_src
write (iunit,'(1x,10f10.4)') (Interp%HI_KIND_TYPE_%lon_in(jj),jj=1,Interp%nlon_src)
write (iunit,'(/," Latitude of coarse grid points (radian): yc(j) j=1, ",i4)') Interp%nlat_src
write (iunit,'(1x,10f10.4)') (Interp%HI_KIND_TYPE_%lat_in(jj),jj=1,Interp%nlat_src)
do i=1, Interp%nlat_dst
write (unit,*)
write (unit,'(/," Longitude of fine grid points (radian): xf(i) i=1, ",i4)') Interp%nlat_dst
write (unit,'(1x,10f10.4)') (lon_out(jj,i),jj=1,Interp%nlon_dst)
write (iunit,*)
write (iunit,'(/," Longitude of fine grid points (radian): xf(i) i=1, ",i4)') Interp%nlat_dst
write (iunit,'(1x,10f10.4)') (lon_out(jj,i),jj=1,Interp%nlon_dst)
enddo
do i=1, Interp%nlon_dst
write (unit,*)
write (unit,'(/," Latitude of fine grid points (radian): yf(j) j=1, ",i4)') Interp%nlon_dst
write (unit,'(1x,10f10.4)') (lat_out(i,jj),jj=1,Interp%nlat_dst)
write (iunit,*)
write (iunit,'(/," Latitude of fine grid points (radian): yf(j) j=1, ",i4)') Interp%nlon_dst
write (iunit,'(1x,10f10.4)') (lat_out(i,jj),jj=1,Interp%nlat_dst)
enddo
endif
Expand Down Expand Up @@ -210,7 +210,7 @@
integer :: nlon_in, nlat_in, nlon_out, nlat_out
integer :: jcl, jcu, icl, icu, jj
real(FMS_HI_KIND_) :: xz, yz
integer :: unit
integer :: iunit
integer, parameter :: kindl = FMS_HI_KIND_ !< real size at compile time
if(present(verbose)) verbose_bicubic = verbose
Expand All @@ -234,17 +234,17 @@
Interp%HI_KIND_TYPE_%lat_in = lat_in
if ( verbose_bicubic > 0 ) then
unit = stdout()
write (unit,'(/,"Initialising bicubic interpolation, interface HORIZ_INTERP_BICUBIC_NEW_1D_")')
write (unit,'(/," Longitude of coarse grid points (radian): xc(i) i=1, ",i4)') Interp%nlon_src
write (unit,'(1x,10f10.4)') (Interp%HI_KIND_TYPE_%lon_in(jj),jj=1,Interp%nlon_src)
write (unit,'(/," Latitude of coarse grid points (radian): yc(j) j=1, ",i4)') Interp%nlat_src
write (unit,'(1x,10f10.4)') (Interp%HI_KIND_TYPE_%lat_in(jj),jj=1,Interp%nlat_src)
write (unit,*)
write (unit,'(/," Longitude of fine grid points (radian): xf(i) i=1, ",i4)') Interp%nlat_dst
write (unit,'(1x,10f10.4)') (lon_out(jj),jj=1,Interp%nlon_dst)
write (unit,'(/," Latitude of fine grid points (radian): yf(j) j=1, ",i4)') Interp%nlon_dst
write (unit,'(1x,10f10.4)') (lat_out(jj),jj=1,Interp%nlat_dst)
iunit = stdout()
write (iunit,'(/,"Initialising bicubic interpolation, interface HORIZ_INTERP_BICUBIC_NEW_1D_")')
write (iunit,'(/," Longitude of coarse grid points (radian): xc(i) i=1, ",i4)') Interp%nlon_src
write (iunit,'(1x,10f10.4)') (Interp%HI_KIND_TYPE_%lon_in(jj),jj=1,Interp%nlon_src)
write (iunit,'(/," Latitude of coarse grid points (radian): yc(j) j=1, ",i4)') Interp%nlat_src
write (iunit,'(1x,10f10.4)') (Interp%HI_KIND_TYPE_%lat_in(jj),jj=1,Interp%nlat_src)
write (iunit,*)
write (iunit,'(/," Longitude of fine grid points (radian): xf(i) i=1, ",i4)') Interp%nlat_dst
write (iunit,'(1x,10f10.4)') (lon_out(jj),jj=1,Interp%nlon_dst)
write (iunit,'(/," Latitude of fine grid points (radian): yf(j) j=1, ",i4)') Interp%nlon_dst
write (iunit,'(1x,10f10.4)') (lat_out(jj),jj=1,Interp%nlat_dst)
endif
Expand Down
Loading

0 comments on commit 0ede185

Please sign in to comment.