FORTRAN Generation
(/./ftp/cats/J/A_A/584/A73)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/584/A73 into FORTRAN code for reading data files line by line.

Note that special values are assigned to unknown or unspecified numbers (also called NULL numbers); when necessary, the coordinate components making up the right ascension and declination are converted into floating-point numbers representing these angles in degrees.



      program load_ReadMe
C=============================================================================
C  F77-compliant program generated by readme2f_1.81 (2015-09-23), on 2026-Jul-13
C=============================================================================
*  This code was generated from the ReadMe file documenting a catalogue
*  according to the "Standard for Documentation of Astronomical Catalogues"
*  currently in use by the Astronomical Data Centers (CDS, ADC, A&A)
*  (see full documentation at URL http://vizier.u-strasbg.fr/doc/catstd.htx)
*  Please report problems or questions to   
C=============================================================================

      implicit none
*  Unspecified or NULL values, generally corresponding to blank columns,
*  are assigned one of the following special values:
*     rNULL__    for unknown or NULL floating-point values
*     iNULL__    for unknown or NULL   integer      values
      real*4     rNULL__
      integer*4  iNULL__
      parameter  (rNULL__=--2147483648.)  	! NULL real number
      parameter  (iNULL__=(-2147483647-1))	! NULL int  number
      integer    idig			! testing NULL number

C=============================================================================
Cat. J/A+A/584/A73       Sunspot areas and tilt angles     (Senthamizh Pavai+, 2015)
*================================================================================
*Sunspot areas and tilt angles for solar cycles 7-10.
*    Senthamizh Pavai V., Arlt R., Dasi-Espuig M., Krivova N., Solanki S.
*    <Astron. Astrophys. 584, A73 (2015)>
*    =2015A&A...584A..73S        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

C  Declarations for 'table3.dat'	! Sunspot positions and areas

      integer*4 nr__
      parameter (nr__=135921)	! Number of records
      character*106 ar__   	! Full-size record

      integer*4     Obs_Y       ! (yr) Observation date (YYY)
      integer*4     Obs_M       ! ("month") Observation date (MM)
      integer*4     Obs_D       ! (d) Observation date, day referring to the German
*                                   civil calendar running from midnight to
*                                   midnight (DD)
      integer*4     Obs_h       ! (h) Observation time in mean local time
*                                   in Dessau, Germany (HH)
      integer*4     Obs_m_1     ! (min) Observation time, typically accurate
*                                   to 15 minutes (MI)
      integer*4     T           ! [0/1] Indicates how accurate the time is (1)
      real*4        HLON0       ! (deg) Heliographic longitude of apparent disk centre
*                                   seen from Dessau (L0)
      real*4        HLAT0       ! (deg) Heliographic latitude of apparent disk centre
*                                   seen from Dessau (B0)
      real*4        CMD         ! (deg) ? Central meridian distance, difference in
*                                     longitude from disk centre
      character*1   n_CMD       ! [n-] Note for no data (2)
      real*4        HLON        ! (deg) ? Heliographic longitude in the Carrington
*                                     rotation frame (LLL.L)
      character*1   n_HLON      ! [n-] Note for no data (2)
      real*4        HLAT        ! (deg) ? Heliographic latitude,
*                                     southern latitudes are negative (BBB.B)
      character*1   n_HLAT      ! [n-] Note for no data (2)
      character*1   M           ! [CHQ-01] Method of determining the
*                                   orientation (3)
      integer*4     Q           ! [0/4] Subjective quality (4)
      integer*4     SS          ! Size estimate in 12 classes running from 1 to
*                                   12; a spotless day is indicated with 0
      character*8   Group       ! Group designation based on Schwabe,
*                                   but modified by our regrouping
      character*10  Measurer    ! Last name of person who obtained position
      real*4        HLONM       ! (deg) ?=- Model longitude from rotational matching
*                                   (only spots used for matching have this)
*                                   (MOD_L)
      real*4        HLATM       ! (deg) ?=- Model latitude from rotational matching
*                                   (only spots used for matching have this)
*                                   (MOD_B)
      real*4        Sigma       ! (deg) ?=- Total residual of model positions compared
*                                   with measurements of reference spots in
*                                   rotational matching (only spots used for the
*                                   matching have this), holds for entire day
      real*4        delta       ! (deg) ? Heliocentric angle between the spot and the
*                                     apparent disk centre in degrees
*                                     (disk-centre distance)
      character*1   n_delta     ! [n-] Note for no data (2)
      integer*4     Umb         ! ? Inferred umbral area in millionths of the
*                                    solar hemisphere (MSH)
      character*1   n_Umb       ! [n] Note for no data (5)
      character*1   A           ! [!U-] Flag for area mapping (6)
*Note (1): Timeflag as follows:
* 0 = time has been inferred by the measurer (in most cases to be 12h local time)
* 1 = the time is as given by the observer
*Note (2): Code for no data as follows:
* - = indicates spotless day
* n = position of spot could not be measured
*Note (3): Method of determining the orientation as follows:
* C = horizontal pencil line parallel to celestial equator
* H = book aligned with azimuth-elevation
* Q = rotational matching with other drawings (spot used for the matching have
*       MHLON, HLAT and sigma {diff} "-")
*Note (4): Subjective quality as follows:
* 1 = all observations with coordinate system drawn by Schwabe
* 2 = Positions derived from rotational matching with the probability
*      distributions fixing the position angle of the drawing were not very sharp
* 3 = Positions derived from rotational matching with the probability
*      distributions fixing the position angle of the drawing were broad and
*      asymmetric
* 0 = spotless day
* 4 = spots for which no position could be derived, but have sizes
*Note (5): Note for umbral no data:
*     Umb=0 for spotless days
*   n_Umb=n if spot position could not be derived or Delta>85deg
*Note (6): Flag as follows:
*   U = area mapping is based on umbral area
*   ! = area mapping is based on penumbral area (less certain than from umbral)
*        (actual area given in Umb is always umbral)
*   - = spotless day

c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

C  Declarations for 'table4.dat'	! Tilt angles of the sunspot groups with two or
                                 more spots

      integer*4 nr__1
      parameter (nr__1=23141)	! Number of records
      character*108 ar__1  	! Full-size record

      integer*4     Obs_Y_1     ! (yr) Observation date (YYY)
      integer*4     Obs_M_2     ! ("month") Observation date (MM)
      integer*4     Obs_D_1     ! (d) Observation date, day referring to the German
*                                   civil calendar running from midnight to
*                                   midnight (DD)
      integer*4     Obs_h_1     ! (h) Observation time in mean local time
*                                     in Dessau, Germany (HH)
      integer*4     Obs_m_3     ! (min) Observation time, typically accurate
*                                     to 15 minutes (MI)
      character*8   Group_1     ! Group name based on Schwabe, but modified
*                                   by our regrouping
      integer*4     SP          ! Number of spots in a group
      integer*4     ARA         ! Sum of umbral area of all spots in a group,
*                                   in millionths of the solar hemisphere (MSH)
      real*4        HLONA       ! (deg) Area-weighted heliographic longitude of the
*                                   group (AWL.L)
      real*4        HLATA       ! (deg) Area-weighted heliographic latitude of the
*                                   group (AWB.B)
      real*4        TiltAn      ! (deg) Tilt angle of the group (1)
      real*4        TiltHo      ! (deg) Tilt angle computed as in Howard (1991,
*                                   Sol.  Phys., 136, 251) for compatibility
*                                   reasons (2)
      real*4        PolSP       ! (deg) Polarity separation of the group in degrees on
*                                   the solar sphere (3)
      integer*4     FN          ! Number of spots in the following polarity
      integer*4     LN          ! Number of spots in the leading polarity
      integer*4     FAR         ! Umbral area of the following polarity, in MSH
      integer*4     LAR         ! Umbral area of the leading polarity, in MSH
      real*4        HLONF       ! (deg) Area-weighted longitude of the following
*                                   polarity (FLL.L) (3)
      real*4        HLATF       ! (deg) Area-weighted latitude of the following
*                                   polarity (FBB.B) (3)
      real*4        HLONL       ! (deg) Area-weighted longitude of the leading
*                                   polarity (LLL.L) (3)
      real*4        HLATL       ! (deg) Area-weighted latitude of the leading
*                                   polarity (BBB.B) (3)
      real*4        GFC         ! (deg) Heliocentric distance of the group from the
*                                   disk centre in degrees
*Note (1): Tilt angle of the group ; positive sign means leading polarity closer
*  to equator in either hemisphere. This tilt angle was found using an isotropic
*  search for the most likely dividing line between the polarities.
*Note (2): It is based on a fixed vertical dividing line between the polarities
*  and an approximative formula for the tilt angle.
*Note (3): based on the polarity definition for TiltAn.

C=============================================================================

C  Loading file 'table3.dat'	! Sunspot positions and areas

C  Format for file interpretation

    1 format(
     +  I4,1X,I2,1X,I2,1X,I2,1X,I2,1X,I1,1X,F5.1,1X,F5.1,1X,F5.1,A1,
     +  F5.1,A1,F5.1,A1,1X,A1,1X,I1,1X,I2,1X,A8,1X,A10,1X,F5.1,1X,
     +  F5.1,1X,F5.3,1X,F4.1,A1,I4,A1,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,135921
        read(1,'(A106)')ar__
        read(ar__,1)
     +  Obs_Y,Obs_M,Obs_D,Obs_h,Obs_m_1,T,HLON0,HLAT0,CMD,n_CMD,HLON,
     +  n_HLON,HLAT,n_HLAT,M,Q,SS,Group,Measurer,HLONM,HLATM,Sigma,
     +  delta,n_delta,Umb,n_Umb,A
        if(ar__(32:36) .EQ. '') CMD = rNULL__
        if(ar__(38:42) .EQ. '') HLON = rNULL__
        if(ar__(44:48) .EQ. '') HLAT = rNULL__
        if (idig(ar__(78:82)).EQ.0) HLONM =  rNULL__
        if (idig(ar__(84:88)).EQ.0) HLATM =  rNULL__
        if (idig(ar__(90:94)).EQ.0) Sigma =  rNULL__
        if(ar__(96:99) .EQ. '') delta = rNULL__
        if(ar__(101:104) .EQ. '') Umb = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  Obs_Y,Obs_M,Obs_D,Obs_h,Obs_m_1,T,HLON0,HLAT0,CMD,n_CMD,HLON,
     +  n_HLON,HLAT,n_HLAT,M,Q,SS,Group,Measurer,HLONM,HLATM,Sigma,
     +  delta,n_delta,Umb,n_Umb,A
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================

C  Loading file 'table4.dat'	! Tilt angles of the sunspot groups with two or
*                                 more spots

C  Format for file interpretation

    2 format(
     +  I4,1X,I2,1X,I2,1X,I2,1X,I2,1X,A8,1X,I2,1X,I3,1X,F5.1,1X,F5.1,
     +  1X,F6.2,1X,F6.2,1X,F5.2,1X,I2,1X,I2,1X,I3,1X,I3,1X,F5.1,1X,
     +  F5.1,1X,F5.1,1X,F5.1,1X,F5.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,23141
        read(1,'(A108)')ar__1
        read(ar__1,2)
     +  Obs_Y_1,Obs_M_2,Obs_D_1,Obs_h_1,Obs_m_3,Group_1,SP,ARA,HLONA,
     +  HLATA,TiltAn,TiltHo,PolSP,FN,LN,FAR,LAR,HLONF,HLATF,HLONL,
     +  HLATL,GFC
c    ..............Just test output...........
        write(6,2)
     +  Obs_Y_1,Obs_M_2,Obs_D_1,Obs_h_1,Obs_m_3,Group_1,SP,ARA,HLONA,
     +  HLATA,TiltAn,TiltHo,PolSP,FN,LN,FAR,LAR,HLONF,HLATF,HLONL,
     +  HLATL,GFC
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================
      stop
      end

C Locate position of first digit in string; or return 0
      integer function idig(c)
      character*(*) c
      character*1 c1
      integer lc,i
      lc=len(c)
      idig=0
      do i=1,lc
         if(c(i:i).ne.' ') go to 1
      end do
    1 if(i.gt.lc) return
      c1=c(i:i)
      if(c1.eq.'.'.or.c1.eq.'-'.or.c1.eq.'+') i=i+1
      if(i.gt.lc) return
      c1=c(i:i)
      if(c1.ge.'0'.and.c1.le.'9') idig=i
      return
      end