You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am reporting an error in the file source/onera_desp_lib.f.
The issue lies within the SUN function, which utilizes the variables pi and rad prior to their initialization.
To resolve this, a preliminary call to the initize function is required for proper functionality.
Simple fix :
C++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SUBROUTINE SUN(iyr,iday,secs,gst,Slong,Srasn,Sdec)
C
IMPLICIT NONE
C
C program to calculate sideral, time and position of the Sun
C good for years 1901 through 2099. accuracy 0.006 degree
C input is iyr,iday (INTEGER*4s), and secs, defining universal time
C output is Greenwich mean sidereal time (gst) in degrees,
C longitude along ecliptic (Slong), and apparent right ascension
C and declination (Srasn,Sdec) of the Sun, all in degrees.
C
INTEGER*4 iyr,iday
INTEGER*4 iaux
REAL*8 secs,gst,Slong,Srasn,Sdec
C
REAL*8 aux
REAL*8 dj,fday
REAL*8 t,vl,g,obliq,slp,sind,cosd
REAL*8 pi,rad
common /rconst/rad,pi
+ CALL INITIZE
C
IF (iyr.LT.1901 .OR. iyr.GT.2099) RETURN
C
fday = secs/86400.D0
dj = 365.D0*(iyr-1900.D0) + INT((iyr-1901)/4)
& + iday + fday - 0.5D0
[...]
One consequence of this issue is that the get_mlt1 function invariably fails on its initial invocation.
The text was updated successfully, but these errors were encountered:
lkncl
changed the title
Missing initize in SUN functionget_mlt1 Initialization Failure: Fails on First Invocation
Jan 14, 2025
Hello,
I am reporting an error in the file
source/onera_desp_lib.f
.The issue lies within the
SUN
function, which utilizes the variablespi
andrad
prior to their initialization.To resolve this, a preliminary call to the
initize
function is required for proper functionality.Simple fix :
C++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SUBROUTINE SUN(iyr,iday,secs,gst,Slong,Srasn,Sdec) C IMPLICIT NONE C C program to calculate sideral, time and position of the Sun C good for years 1901 through 2099. accuracy 0.006 degree C input is iyr,iday (INTEGER*4s), and secs, defining universal time C output is Greenwich mean sidereal time (gst) in degrees, C longitude along ecliptic (Slong), and apparent right ascension C and declination (Srasn,Sdec) of the Sun, all in degrees. C INTEGER*4 iyr,iday INTEGER*4 iaux REAL*8 secs,gst,Slong,Srasn,Sdec C REAL*8 aux REAL*8 dj,fday REAL*8 t,vl,g,obliq,slp,sind,cosd REAL*8 pi,rad common /rconst/rad,pi + CALL INITIZE C IF (iyr.LT.1901 .OR. iyr.GT.2099) RETURN C fday = secs/86400.D0 dj = 365.D0*(iyr-1900.D0) + INT((iyr-1901)/4) & + iday + fday - 0.5D0 [...]
One consequence of this issue is that the
get_mlt1
function invariably fails on its initial invocation.The text was updated successfully, but these errors were encountered: