Skip to content

Commit

Permalink
Replace all instances of #if (RWORDSIZE == 4) with equivalent #ifndef…
Browse files Browse the repository at this point in the history
… DOUBLE_PRECISION
  • Loading branch information
islas committed Aug 24, 2024
1 parent 6d75b15 commit 1823bc5
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion dyn_em/module_big_step_utilities_em.F
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!wrf:MODEL_LAYER:DYNAMICS
!

#if (RWORDSIZE == 4)
#ifndef DOUBLE_PRECISION
# define VPOWX vspowx
# define VPOW vspow
#else
Expand Down
2 changes: 1 addition & 1 deletion frame/module_clear_halos.F
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ subroutine clear_ij_halos(grid,how,full_domain)
ips, ipe, jps, jpe, kps, kpe
logical :: fulldom
real :: badR, badR_N,badR_NE,badR_NW,badR_S,badR_SW,badR_SE,badR_E,badR_W
#if (RWORDSIZE==4)
#ifndef DOUBLE_PRECISION
double precision :: badD, badD_N,badD_NE,badD_NW,badD_S,badD_SW,badD_SE,badD_E,badD_W
#else
real :: badD, badD_N,badD_NE,badD_NW,badD_S,badD_SW,badD_SE,badD_E,badD_W
Expand Down
2 changes: 1 addition & 1 deletion phys/ccpp_kind_types.F
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module ccpp_kind_types
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
integer, parameter :: kind_phys = selected_real_kind(6)
#else
integer, parameter :: kind_phys = selected_real_kind(12)
Expand Down
2 changes: 1 addition & 1 deletion phys/module_mp_wdm5.F
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
# define VREC vsrec
# define VSQRT vssqrt
#else
Expand Down
2 changes: 1 addition & 1 deletion phys/module_mp_wdm6.F
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
# define VREC vsrec
# define VSQRT vssqrt
#else
Expand Down
2 changes: 1 addition & 1 deletion phys/module_mp_wdm7.F
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
# define VREC vsrec
# define VSQRT vssqrt
#else
Expand Down
2 changes: 1 addition & 1 deletion phys/module_mp_wsm3.F
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef _ACCEL
# include "module_mp_wsm3_accel.F"
#else
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
# define VREC vsrec
# define VSQRT vssqrt
#else
Expand Down
2 changes: 1 addition & 1 deletion phys/module_mp_wsm3_accel.F
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
# define VREC vsrec
# define VSQRT vssqrt
#else
Expand Down
2 changes: 1 addition & 1 deletion phys/module_mp_wsm5.F
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef _ACCEL
# include "module_mp_wsm5_accel.F"
#else
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
# define VREC vsrec
# define VSQRT vssqrt
#else
Expand Down
2 changes: 1 addition & 1 deletion phys/module_mp_wsm5_accel.F
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
# define VREC vsrec
# define VSQRT vssqrt
#else
Expand Down
2 changes: 1 addition & 1 deletion phys/module_mp_wsm7.F
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
# define VREC vsrec
# define VSQRT vssqrt
#else
Expand Down
4 changes: 2 additions & 2 deletions phys/module_ra_goddard.F
Original file line number Diff line number Diff line change
Expand Up @@ -2062,7 +2062,7 @@ subroutine goddardrad( sw_or_lw, dx &
ENDDO


#if (RWORDSIZE == 4)
#ifndef DOUBLE_PRECISION
call swrad ( np=dk_half, icb=icb, ict=ict, fcld=dble(fcld1d), &
pl=dble(p8w1d), ta=dble(t1d), wa=dble(sh1d), oa=dble(o31d), &
taucl=dble(taucl_sw), ssacl=dble(ssacl_sw), asycl=dble(asycl_sw), &
Expand Down Expand Up @@ -2312,7 +2312,7 @@ subroutine goddardrad( sw_or_lw, dx &
! 1-dimension driver of longwave radiative transfer scheme
!

#if (RWORDSIZE == 4)
#ifndef DOUBLE_PRECISION
call lwrad ( np=dk_half, tb=dble(tsfc), ts=dble(tskin), ict=ict, icb=icb,&
pl=dble(p8w1d), ta=dble(t1d), wa=dble(sh1d), oa=dble(o31d), &
emiss=dble(emis1d), fcld=dble(fcld1d), &
Expand Down
2 changes: 1 addition & 1 deletion phys/module_ra_rrtmg_lw.F
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module parkind
#if (RWORDSIZE == 8)
integer, parameter :: kind_rb = selected_real_kind(12) ! 8 byte real
#endif
#if (RWORDSIZE == 4)
#ifndef DOUBLE_PRECISION
integer, parameter :: kind_rb = selected_real_kind(6) ! 4 byte real
#endif
#else
Expand Down
6 changes: 3 additions & 3 deletions var/da/da_obs_io/da_read_obs_bufr.inc
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ bufrfile: do ibufr=1,numbufr
end if
if ( obs(7,1) < r8bfms ) then
pwq=nint(qms(7,1))
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
pwe = min(DBLE(err_pw), oes(7,1))
#else
pwe = min(err_pw, oes(7,1))
Expand Down Expand Up @@ -604,7 +604,7 @@ bufrfile: do ibufr=1,numbufr
!Not currently used
!cat=nint(obs(8,k))

#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
toe = min(DBLE(err_t), oes(3,k))
woe = min(DBLE(err_uv), oes(5,k))
qoe = min(DBLE(err_q), oes(2,k)*10.0) ! convert to % from PREPBUFR percent divided by 10
Expand Down Expand Up @@ -686,7 +686,7 @@ bufrfile: do ibufr=1,numbufr

! assign u,v,t,q obs errors for synop and metar
if ( t29 == 512 .or. t29 == 511 .or. t29 == 514 ) then
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
toe = min(DBLE(err_t), oes(3,1))
woe = min(DBLE(err_uv), oes(5,1))
qoe = min(DBLE(err_q), oes(2,1)*10.0) ! convert to % from PREPBUFR percent divided by 10
Expand Down
4 changes: 2 additions & 2 deletions var/da/da_par_util/da_proc_maxmin_combine.inc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ subroutine da_proc_maxmin_combine(n, max, min)
in(2*i) = myproc
end do

#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
call mpi_reduce(in, out, n, mpi_2real, mpi_minloc, root, comm, ierr)
#else
call mpi_reduce(in, out, n, mpi_2double_precision, mpi_minloc, root, comm, ierr)
Expand Down Expand Up @@ -65,7 +65,7 @@ subroutine da_proc_maxmin_combine(n, max, min)
in(2*i-1) = max(i)%value
in(2*i) = myproc
end do
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
call mpi_reduce(in, out, n, mpi_2real, mpi_maxloc, root, comm, ierr)
#else
call mpi_reduce(in, out, n, mpi_2double_precision, mpi_maxloc, root, comm, ierr)
Expand Down
4 changes: 2 additions & 2 deletions var/da/da_par_util/da_proc_stats_combine.inc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ subroutine da_proc_stats_combine(proc_ave, proc_err, proc_min, proc_max, &
! Get minimum value and associated processor index.
in(1) = proc_min
in(2) = myproc
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
call mpi_reduce(in, out, 1, mpi_2real, mpi_minloc, root, comm, ierr)
#else
call mpi_reduce(in, out, 1, mpi_2double_precision, mpi_minloc, root, comm, ierr)
Expand Down Expand Up @@ -73,7 +73,7 @@ subroutine da_proc_stats_combine(proc_ave, proc_err, proc_min, proc_max, &
in(1) = proc_max
in(2) = myproc

#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
call mpi_reduce(in, out, 1, mpi_2real, mpi_maxloc, root, comm, ierr)
#else
call mpi_reduce(in, out, 1, mpi_2double_precision, mpi_maxloc, root, comm, ierr)
Expand Down
2 changes: 1 addition & 1 deletion var/da/da_radiance/gsi_kinds.f90
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ module gsi_kinds
! Default values
! **** CHANGE THE FOLLOWING TO CHANGE THE DEFAULT REAL TYPE KIND ***
! 1=single, 2=double, 3=quad
#if ( RWORDSIZE == 4 )
#ifndef DOUBLE_PRECISION
integer, parameter, private :: default_real = 1
#else
integer, parameter, private :: default_real = 2
Expand Down
2 changes: 1 addition & 1 deletion wrftladj/module_big_step_utilities_em_ad.F
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MODULE a_module_big_step_utilities_em
kfetascheme, mskfscheme, g3scheme, p_qv, param_first_scalar, p_qr, p_qc, DFI_FWD
USE module_configure, ONLY : grid_config_rec_type
USE module_wrf_error
#if (RWORDSIZE == 4)
#ifndef DOUBLE_PRECISION
# define VPOWX vspowx
# define VPOW vspow
#else
Expand Down
2 changes: 1 addition & 1 deletion wrftladj/module_big_step_utilities_em_tl.F
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
! and LSEC of ICMSEC, AMSS(2001-2003)
! The copyright of the DFT system was declared by Walls at LASG, 1998-2010
! ======================================================================================
#if (RWORDSIZE == 4)
#ifndef DOUBLE_PRECISION
# define VPOWX vspowx
# define VPOW vspow
#else
Expand Down

0 comments on commit 1823bc5

Please sign in to comment.