Skip to content

Commit 447269c

Browse files
authored
Merge pull request #134 from dalesteam/dev-fix-uninitialized
modradrrtmg: merge duplicate definitions of orbital parameters Some orbital parameters were defined both in modradrrtmg and modraddata. Moved all orbital parameters to modraddata, which is where shr_orb_decl() looks for them. This is to resolve use of undefined variables found on Fugaku (debug build). Note the orbit calculations aren't actually used anyway.
2 parents 89cef19 + 5e54bf5 commit 447269c

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

src/modraddata.f90

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,14 @@ module modraddata
155155
ssaaersw, &
156156
asmaersw, &
157157
ecaersw
158-
real(SHR_KIND_R4) :: eccen, & ! Eccentricity
159-
obliqr, & ! Earths obliquity in radians
160-
lambm0, & ! Mean long of perihelion at the vernal equinox (radians)
161-
mvelpp, & ! moving vernal equinox longitude of perihelion plus pi (radians)
162-
delta, & ! Solar declination angle in rad
163-
eccf ! Earth-sun distance factor (ie. (1/r)**2)
158+
real(SHR_KIND_R4) :: eccen, & ! Earth's eccentricity factor (unitless) (typically 0 to 0.1)
159+
obliq, & ! Earth's obliquity angle (deg) (-90 to +90) (typically 22-26)
160+
obliqr, & ! Earths obliquity in radians
161+
lambm0, & ! Mean long of perihelion at the vernal equinox (radians)
162+
mvelp, & ! Earth's moving vernal equinox at perhelion (deg)(0 to 360.0)
163+
mvelpp, & ! moving vernal equinox longitude of perihelion plus pi (radians)
164+
delta, & ! Solar declination angle in rad
165+
eccf ! Earth-sun distance factor (ie. (1/r)**2)
164166

165167
real,parameter :: mwdry = 28.966, &
166168
mwh2o = 18.016, &

src/modradrrtmg.f90

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@ subroutine radrrtmg
2525
integer :: npatch ! Sounding levels above domain
2626
integer :: i,j,k,ierr(4)
2727
logical :: sunUp
28-
real(SHR_KIND_R4),save :: eccen, & ! Earth's eccentricity factor (unitless) (typically 0 to 0.1)
29-
obliq, & ! Earth's obliquity angle (deg) (-90 to +90) (typically 22-26)
30-
mvelp, & ! Earth's moving vernal equinox at perhelion (deg)(0 to 360.0)
31-
!
32-
! Orbital information after processed by orbit_params
33-
!
34-
obliqr, & ! Earth's obliquity in radians
35-
lambm0, & ! Mean longitude of perihelion at the vernal equinox (radians)
36-
mvelpp ! Earth's moving vernal equinox longitude
37-
! of perihelion plus pi (radians)
3828

3929
real :: thlpld,thlplu,thlpsd,thlpsu
4030
real(KIND=kind_rb) :: cpdair

0 commit comments

Comments
 (0)