Skip to content

Commit

Permalink
Replace all instances of #if (RWORDSIZE == 8) with equivalent #ifdef …
Browse files Browse the repository at this point in the history
…DOUBLE_PRECISION
  • Loading branch information
islas committed Aug 24, 2024
1 parent 1823bc5 commit ab44106
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion frame/module_alloc_space.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
inter_domain = inter_domain_in
okay_to_alloc = okay_to_alloc_in

#if ( RWORDSIZE == 8 )
#ifdef DOUBLE_PRECISION
initial_data_value = 0.
#else
CALL get_initial_data_value ( initial_data_value )
Expand Down
6 changes: 3 additions & 3 deletions frame/module_cpl_oasis3.F
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ MODULE module_cpl_oasis3
TYPE :: FLD_CPL ! Coupling field information
CHARACTER(len = 64) :: clname ! Name of the coupling field, jpeighty defined in oasis
INTEGER :: nid ! Id of the field
#if ( RWORDSIZE == 8 )
#ifdef DOUBLE_PRECISION
REAL , POINTER, DIMENSION(:,:) :: dbl2d ! 2d array to store received field
#else
REAL(kind=8), POINTER, DIMENSION(:,:) :: dbl2d ! 2d array to store received field
Expand Down Expand Up @@ -308,7 +308,7 @@ SUBROUTINE cpl_oasis_snd( kdomwrf, kdomext, kfldid, ksec, pdata )
kdomwrf, kdomext, kfldid, ' ', TRIM(ssnd(kdomwrf,kdomext,kfldid)%clname), ksec
CALL wrf_debug(nlevdbg, cltxt)

#if ( RWORDSIZE == 8 )
#ifdef DOUBLE_PRECISION
CALL oasis_put(ssnd(kdomwrf,kdomext,kfldid)%nid, ksec, pdata(:,:) , info)
#else
CALL oasis_put(ssnd(kdomwrf,kdomext,kfldid)%nid, ksec, DBLE(pdata(:,:)), info)
Expand Down Expand Up @@ -362,7 +362,7 @@ SUBROUTINE cpl_oasis_rcv( kdomwrf, kdomext, kfldid, ksec, pcplrcv )
CALL wrf_debug(nlevdbg, cltxt)

CALL oasis_get( srcv(kdomwrf,kdomext,kfldid)%nid, ksec, srcv(kdomwrf,kdomext,kfldid)%dbl2d, info )
#if ( RWORDSIZE == 8 )
#ifdef DOUBLE_PRECISION
pcplrcv(:,:) = srcv(kdomwrf,kdomext,kfldid)%dbl2d
#else
pcplrcv(:,:) = REAL(srcv(kdomwrf,kdomext,kfldid)%dbl2d, kind=4)
Expand Down
10 changes: 5 additions & 5 deletions phys/module_ra_rrtmg_aero_optical_util_cmaq.F
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,7 @@ SUBROUTINE BHCOAT (XX, YY, RRFRL1, RRFRL2, QQEXT, QQSCA, QBACK, GGSCA, SUCCESS)
SUCCESS = .TRUE.
#if ( RWORDSIZE == 8 )
#ifdef DOUBLE_PRECISION
II = c_set(0.0, 1.0)
#else
II = c_set(0.0D0, 1.0D0)
Expand Down Expand Up @@ -1733,13 +1733,13 @@ SUBROUTINE BHCOAT (XX, YY, RRFRL1, RRFRL2, QQEXT, QQSCA, QBACK, GGSCA, SUCCESS)
xi0y = c_sub(psi0y, c_mul(chi0y, II))
xi1y = c_sub(psi1y, c_mul(chi1y, II))
#if ( RWORDSIZE == 8 )
#ifdef DOUBLE_PRECISION
chi0y2 = c_mul(-1.0, c_SIN(y2))
#else
chi0y2 = c_mul(-1.0d0, c_SIN(y2))
#endif
chi1y2 = c_COS(y2)
#if ( RWORDSIZE == 8 )
#ifdef DOUBLE_PRECISION
chi0x2 = c_mul(-1.0, c_SIN(x2))
#else
chi0x2 = c_mul(-1.0d0, c_SIN(x2))
Expand All @@ -1748,7 +1748,7 @@ SUBROUTINE BHCOAT (XX, YY, RRFRL1, RRFRL2, QQEXT, QQSCA, QBACK, GGSCA, SUCCESS)
qsca = 0.0d0
qext = 0.0d0
GSCA = 0.0d0
#if ( RWORDSIZE == 8 )
#ifdef DOUBLE_PRECISION
xback = c_set(0.0, 0.0)
#else
xback = c_set(0.0d0, 0.0d0)
Expand Down Expand Up @@ -1806,7 +1806,7 @@ SUBROUTINE BHCOAT (XX, YY, RRFRL1, RRFRL2, QQEXT, QQSCA, QBACK, GGSCA, SUCCESS)
(c_ABS(amess3) .LE. del*c_ABS(d1y2)) .AND. &
(c_ABS(amess4) .LE. del) ) THEN
! convergence for inner sphere
#if ( RWORDSIZE == 8 )
#ifdef DOUBLE_PRECISION
brack = c_set(0.0,0.0)
crack = c_set(0.0,0.0)
#else
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 @@ -32,7 +32,7 @@ module parkind

#if 0
! Modified for WRF:
#if (RWORDSIZE == 8)
#ifdef DOUBLE_PRECISION
integer, parameter :: kind_rb = selected_real_kind(12) ! 8 byte real
#endif
#ifndef DOUBLE_PRECISION
Expand Down

0 comments on commit ab44106

Please sign in to comment.