IBM XL Fortran Enterprise Edition V10.1 for AIX (5724-M13)  Version 10.01.0000.0002 --- /gpfs/m/nco/ops/nwprod/sorc/nam_nampost.fd/GENLL.f 08/24/06 16:06:05
 
>>>>> OPTIONS SECTION <<<<<
***   Options In Effect   ***
  
         ==  On / Off Options  ==
         CR              DBG             ESCAPE          FULLPATH
         I4              INLGLUE         NOLIBESSL       NOLIBPOSIX
         OBJECT          SOURCE          STDFRAMEWORK    STRICT
         SWAPOMP         THREADED        UNWIND          NOZEROSIZE
  
         ==  Options Of Integer Type ==
         FIXED(72)             MAXMEM(-1)            OPTIMIZE(2)
         SPILLSIZE(2000)       STACKTEMP(0)
  
         ==  Options Of Character Type  ==
         64(LARGETYPE)         ALIAS(STD,INTPTR)     ALIGN(BINDC(POWER),STRUCT(NATURAL))
         ARCH(PWR5X)           ATTR(FULL)            AUTODBL(NONE)
         DIRECTIVE(IBM*,IBMT)  ENUM()                FLAG(I,I)
         FLOAT(RNDSNGL,MAF,FOLD,RNGCHK)
         HALT(S)               IEEE(NEAR)            INTSIZE(4)
         LANGLVL(EXTENDED)     POSITION(APPENDOLD)   REALSIZE(4)
         SAVE(ALL)             TUNE(PWR5)            UNROLL(AUTO)
         XREF(FULL)            XLF77(NOLEADZERO,GEDIT77,NOBLANKPAD,OLDBOZ,INTARG,INTXOR,PERSISTENT,SOFTEOF)
         XLF90(NOSIGNEDZERO,NOAUTODEALLOC)
  
>>>>> SOURCE SECTION <<<<<
          1 |      SUBROUTINE GENLL(GDLAT,GDLON)
          2 |C
          3 |C$$$  SUBPROGRAM DOCUMENTATION BLOCK
          4 |C                .      .    .
          5 |C SUBPROGRAM:    GENLL       COMPUTE (LAT,LON) FOR OUTPUT GRID
          6 |C   PRGRMMR: TREADON         ORG: W/NP2      DATE: 92-12-23
          7 |C
          8 |C ABSTRACT:
          9 |C     GIVEN THE STANDARD NMC GRID SPECIFICATIONS THIS ROUTINE
         10 |C     COMPUTES THE GEODETIC (LAT,LON) OF THE GRID POINTS.
         11 |C   .
         12 |C
         13 |C PROGRAM HISTORY LOG:
         14 |C   ??-??-??  DAVID PLUMMER - SUBROUTINE CGTLL IN ETAPACKC
         15 |C   93-02-26  RUSS TREADON  - EXTRACTED THIS CODE FROM CGTLL
         16 |C                             AND GENERALIZED TO HANDLE
         17 |C                             VARIOUS OUTPUT GRIDS.
         18 |C   93-06-13  RUSS TREADON  - ADDED LOLA PROJECTION.
         19 |C
         20 |C USAGE:    CALL GENLL(GDLAT,GDLON)
         21 |C   INPUT ARGUMENT LIST:
         22 |C     NONE
         23 |C
         24 |C   OUTPUT ARGUMENT LIST:
         25 |C     GDLAT    - GEODETIC LATITUDE OF OUTPUT GRID POINTS.
         26 |C     GDLON    - GEODETIC LONGITUDE OF OUTPUT GRID POINTS.
         27 |C
         28 |C   OUTPUT FILES:
         29 |C     NONE
         30 |C
         31 |C   SUBPROGRAMS CALLED:
         32 |C     UTILITIES:
         33 |C       NONE
         34 |C     LIBRARY:
         35 |C       COMMON   - OUTGRD
         36 |C
         37 |C   ATTRIBUTES:
         38 |C     LANGUAGE: FORTRAN
         39 |C     MACHINE : CRAY C-90
         40 |C$$$
         41 |C
         42 |C
         43 |C     INCLUDE/SET PARAMETERS.
         44 |C
         45 |      INCLUDE "parmeta"
  1       1 |C-------------------------------------------------------------
  1       2 |C***  SET PRIMARY GRID DIMENSIONS AND PRESSURE OUTPUT LEVELS
  1       3 |      PARAMETER (IM=606,JM=1067,LM=60,LSM=39)
  1       4 |C-------------------------------------------------------------
  1       5 |C***  SET THE NUMBER OF PEs IN THE I-DIRECTION AND J-DIRECTION
  1       6 |      PARAMETER(INPES=05,JNPES=06)
  1       7 |C-------------------------------------------------------------
  1       8 |C
  1       9 |      PARAMETER(IGSTL=-5,IGSTR=5)
  1      10 |      PARAMETER(JGSTL=-5,JGSTR=5)
  1      11 |      PARAMETER(ITAIL=IM-(INPES*(IM/INPES)))
  1      12 |      PARAMETER(JTAIL=JM-(JNPES*(JM/JNPES)))
  1      13 |C
  1      14 |      PARAMETER(IDIM1=IGSTL,IDIM2=IM/INPES+IGSTR+1)
  1      15 |      PARAMETER(JDIM1=JGSTL,JDIM2=JM/JNPES+JGSTR+1)
  1      16 |C
  1      17 |C-------------------------------------------------------------
         46 |      INCLUDE "parmout"
  2       1 |C     MAXIMUM DIMENSIONS FOR OUTPUT GRID, FIELDS, AND LEVELS.
  2       2 |C
  2       3 |      PARAMETER(IMX=IM,JMX=JM,MXFLD=300,MXLVL=LM)
         47 |C
         48 |C     DECLARE VARIABLES.
         49 |C
         50 |      LOGICAL NORTH
         51 |      CHARACTER*6 PROJ
         52 |      REAL LAMBDA
         53 |      REAL GDLAT(IMX,JMX), GDLON(IMX,JMX)
         54 |C
         55 |C     INCLUDE OUTPUT GRID COMMON BLOCK.
         56 |      INCLUDE "OUTGRD.comm"
  3       1 |C
  3       2 |      COMMON /OUTGRD/ ALATVT,ALONVT,POLEI,POLEJ,XMESHL,
  3       3 |     X	   IGOUT,JGOUT,IMDLTY,RE,GI2,NORTH,PROJ
         57 |C
         58 |C     SET EARTH RADIUS.
         59 |      DATA EARTHR /6371.2/
         60 |C
         61 |C*********************************************************************
         62 |C     START GENLL HERE.
         63 |C
         64 |C     SET CONSTANTS.
         65 |      PI     = ACOS(-1.)
         66 |      HALFPI = PI/2.
         67 |      TWOPI  = 2.*PI
         68 |      D2R    = PI/180.
         69 |      R2D    = 1./D2R
         70 |C
         71 |C     CASE 1:  POLAR STEROGRAPHIC PROJECTION.
         72 |C
         73 |      IF (INDEX(PROJ,'POLA').NE.0) THEN
         74 |C
         75 |C        COMPUTE GEODETIC (LAT,LON) FOR OUTPUT GRID.
         76 |         DO 20 J = 1,JGOUT
         77 |            DO 10 I = 1,IGOUT
         78 |               XI   = REAL(I)
         79 |               YJ   = REAL(J)
         80 |               DELX = XI-POLEI
         81 |               DELY = YJ-POLEJ
         82 |               R2   = DELX*DELX+DELY*DELY
         83 |C
         84 |C              VARIABLES YLAT AND WLON ARE THE GEODETIC
         85 |C              LATITUDE (POSITIVE NORTH) AND LONGITUDE
         86 |C              (POSITIVE WEST) OF THE OUTPUT GRID POINTS.
         87 |C
         88 |               IF (R2.NE.0.) THEN
         89 |                  TLON = R2D*ATAN2(DELY,DELX)
         90 |                  IF (NORTH) THEN
         91 |                     WLON = ALONVT-90.-TLON
         92 |                     YLAT = ASIN((GI2-R2)/(GI2+R2))*R2D
         93 |                  ELSE
         94 |                     WLON = ALONVT+90.+TLON
         95 |                     YLAT = -ASIN((GI2-R2)/(GI2+R2))*R2D
         96 |                  ENDIF
         97 |                  IF (WLON.GT.360.) WLON = WLON-360.
         98 |                  IF (WLON.LT.0.)   WLON = WLON+360.
         99 |               ELSE
        100 |                  YLAT = 90.
        101 |                  IF (.NOT.NORTH) YLAT = -90.
        102 |                  WLON = ALONVT
        103 |               ENDIF
        104 |               GDLAT(I,J) = YLAT
        105 |               GDLON(I,J) = WLON
        106 | 10         CONTINUE
        107 | 20      CONTINUE
        108 |C
        109 |C     CASE II:  LATITUDE-LONGITUDE PROJECTION.
        110 |C
        111 |      ELSEIF (INDEX(PROJ,'LOLA').NE.0) THEN
        112 |         SWLAT = ALONVT
        113 |         SWLON = POLEJ
        114 |         DO 40 J = 1,JGOUT
        115 |            DLAT = (J-1)*POLEI
        116 |            DO 30 I = 1,IGOUT
        117 |               DLON = (I-1)*XMESHL
        118 |               GDLAT(I,J) = SWLAT + DLAT
        119 |               GDLON(I,J) = SWLON - DLON
        120 | 30         CONTINUE
        121 | 40      CONTINUE
        122 |C
        123 |C     CASE III:  LAMBERT CONFORMAL (TANGENT) PROJECTION).
        124 |C
        125 |      ELSEIF (INDEX(PROJ,'LMBC').NE.0) THEN
        126 |C
        127 |C        CONVERT WEST LONGITUDE TO EAST.
        128 |         POLEJE  = -1.*POLEJ
        129 |         ALONVTE = -1.*ALONVT
        130 |C
        131 |C        COMPUTE TANGENT CONE CONSTANT AND FACTOR A.
        132 |         PSIT = HALFPI - ABS(ALATVT*D2R)
        133 |         CONE = COS(PSIT)
        134 |         A    = EARTHR/CONE
        135 |C
        136 |C        COMPUTE LINEAR COORDINATES CORRESPONDING TO
        137 |C        GRIDPOINT (1,1)=(POLEI,POLEJE).
        138 |         PHI    = POLEI*D2R
        139 |         LAMBDA = POLEJE*D2R
        140 |         IF (NORTH) THEN
        141 |            PSI = HALFPI - PHI
        142 |         ELSE
        143 |            PSI = HALFPI + PHI
        144 |         ENDIF
        145 |         TERMA  = PSI/2.
        146 |         TERMB  = CONE*(LAMBDA-ALONVTE*D2R)
        147 |         X1     = A * TAN(TERMA)**CONE * SIN(TERMB)
        148 |         Y1     = A * TAN(TERMA)**CONE * COS(TERMB)
        149 |         IF (NORTH) Y1 = -1. * Y1
        150 |C
        151 |C        LOOP TO COMPUTE GEODETIC (LAT,LON).
        152 |         ALPHA = (TAN(PSIT/2.)**CONE) / SIN(PSIT)
        153 |         DO 60 J = 1,JGOUT
        154 |            DO 50 I = 1,IGOUT
        155 |               X = X1 + (I-1)*ALPHA*XMESHL
        156 |               Y = Y1 + (J-1)*ALPHA*XMESHL
        157 |C
        158 |               TERM = (SQRT(X*X+Y*Y)/A)**(1./CONE)
        159 |               GPHI = HALFPI - 2.*ATAN(TERM)
        160 |C
        161 |               IF (.NOT.NORTH) GPHI = -1.*GPHI
        162 |               IF (NORTH) THEN
        163 |                  GTHETA = ATAN2(X,-1.*Y)
        164 |               ELSE
        165 |                  GTHETA = ATAN2(X,Y)
        166 |               ENDIF
        167 |C
        168 |               GLAM = ALONVTE*D2R + GTHETA/CONE
        169 |               IF (GLAM.GT.PI)     GLAM = GLAM - TWOPI
        170 |               IF (GLAM.LT.-PI) GLAM = GLAM + TWOPI
        171 |C
        172 |               GDLAT(I,J) = GPHI*R2D
        173 |               GDLON(I,J) = ABS(GLAM*R2D)
        174 |C
        175 | 50         CONTINUE
        176 | 60      CONTINUE
        177 |C
        178 |C     CASE IV:  ETA PROJECTION (TRANSFORMED LAT-LON).
        179 |C        (DO NOTHING HERE, SINCE THE MODEL PROVIDES GDLAT,GDLON.)
        180 |C
        181 |      ENDIF
        182 |C
        183 |C     END OF ROUTINE.
        184 |C
        185 |      RETURN
        186 |      END
 
>>>>> ATTRIBUTE AND CROSS REFERENCE SECTION <<<<<
 
 
 
IDENTIFIER NAME                  CROSS REFERENCE AND ATTRIBUTES
 
a                                Static, Real(4), Offset: 0, Alignment: full word
                                 0-134.10@  0-147.19  0-148.19  0-158.38
 
abs                              Pure Intrinsic
                                 0-132.26  0-173.29
 
acos                             Pure Intrinsic
                                 0-65.16
 
alatvt                           Common member, Real(4), Offset: 0, Alignment: quadruple word
                                 3-2.23$  0-132.30
 
alonvt                           Common member, Real(4), Offset: 4, Alignment: full word
                                 3-2.30$  0-91.29  0-94.29  0-102.26  0-112.18  0-129.24
 
alonvte                          Static, Real(4), Offset: 0, Alignment: full word
                                 0-129.10@  0-146.32  0-168.23
 
alpha                            Static, Real(4), Offset: 0, Alignment: full word
                                 0-152.10@  0-155.31  0-156.31
 
asin                             Pure Intrinsic
                                 0-92.29  0-95.30
 
atan                             Pure Intrinsic
                                 0-159.35
 
atan2                            Pure Intrinsic
                                 0-89.30  0-163.28  0-165.28
 
cone                             Static, Real(4), Offset: 0, Alignment: full word
                                 0-133.10@  0-134.24  0-146.19  0-147.35  0-148.35  0-152.33  0-158.46  0-168.44
 
cos                              Pure Intrinsic
                                 0-133.17  0-148.42
 
d2r                              Static, Real(4), Offset: 0, Alignment: full word
                                 0-68.7@  0-69.19  0-132.37  0-138.25  0-139.26  0-146.40  0-168.31
 
delx                             Static, Real(4), Offset: 0, Alignment: full word
                                 0-80.16@  0-82.23  0-82.28  0-89.41
 
dely                             Static, Real(4), Offset: 0, Alignment: full word
                                 0-81.16@  0-82.33  0-82.38  0-89.36
 
dlat                             Static, Real(4), Offset: 0, Alignment: full word
                                 0-115.13@  0-118.37
 
dlon                             Static, Real(4), Offset: 0, Alignment: full word
                                 0-117.16@  0-119.37
 
earthr                           Static, Real(4), Offset: 0, Alignment: full word
                                 0-59.12*  0-134.17
 
gdlat                            Reference argument, Real(4) (1:606, 1:1067), Offset: 0, Alignment: full word
                                 0-53.12$  0-1.24  0-104.16@  0-118.16@  0-172.16@
 
gdlon                            Reference argument, Real(4) (1:606, 1:1067), Offset: 0, Alignment: full word
                                 0-53.28$  0-1.30  0-105.16@  0-119.16@  0-173.16@
 
genll                            Subroutine
                                 0-1.18$
 
gi2                              Common member, Real(4), Offset: 36, Alignment: full word
                                 3-3.33$  0-92.35  0-92.44  0-95.36  0-95.45
 
glam                             Static, Real(4), Offset: 0, Alignment: full word
                                 0-168.16@  0-169.20  0-169.36@  0-169.43  0-170.20  0-170.33@  0-170.40  0-173.33
 
gphi                             Static, Real(4), Offset: 0, Alignment: full word
                                 0-159.16@  0-161.32@  0-161.43  0-172.29
 
gtheta                           Static, Real(4), Offset: 0, Alignment: full word
                                 0-163.19@  0-165.19@  0-168.37
 
halfpi                           Static, Real(4), Offset: 0, Alignment: full word
                                 0-66.7@  0-132.17  0-141.19  0-143.19  0-159.23
 
i                                Static, Integer(4), Offset: 0, Alignment: full word
                                 0-77.19@  0-78.28  0-104.22  0-105.22  0-116.19@  0-117.24  0-118.22  0-119.22  0-154.19@  0-155.26
                                 0-172.22  0-173.22
 
idim1                            Parameter, Integer(4)
                                 1-14.17$
 
idim2                            Parameter, Integer(4)
                                 1-14.29$
 
igout                            Common member, Integer(4), Offset: 20, Alignment: full word
                                 3-3.11$  0-77.25  0-116.25  0-154.25
 
igstl                            Parameter, Integer(4)
                                 1-9.17$  1-14.23
 
igstr                            Parameter, Integer(4)
                                 1-9.26$  1-14.44
 
im                               Parameter, Integer(4)
                                 1-3.18$  1-11.23  1-11.34  1-14.35  2-3.21
 
imdlty                           Common member, Integer(4), Offset: 28, Alignment: full word
                                 3-3.23$
 
imx                              Parameter, Integer(4)
                                 2-3.17$  0-53.18  0-53.34
 
index                            Pure Intrinsic
                                 0-73.11  0-111.15  0-125.15
 
inpes                            Parameter, Integer(4)
                                 1-6.17$  1-11.27  1-11.37  1-14.38
 
itail                            Parameter, Integer(4)
                                 1-11.17$
 
j                                Static, Integer(4), Offset: 0, Alignment: full word
                                 0-76.16@  0-79.28  0-104.24  0-105.24  0-114.16@  0-115.21  0-118.24  0-119.24  0-153.16@  0-156.26
                                 0-172.24  0-173.24
 
jdim1                            Parameter, Integer(4)
                                 1-15.17$
 
jdim2                            Parameter, Integer(4)
                                 1-15.29$
 
jgout                            Common member, Integer(4), Offset: 24, Alignment: double word
                                 3-3.17$  0-76.22  0-114.22  0-153.22
 
jgstl                            Parameter, Integer(4)
                                 1-10.17$  1-15.23
 
jgstr                            Parameter, Integer(4)
                                 1-10.26$  1-15.44
 
jm                               Parameter, Integer(4)
                                 1-3.25$  1-12.23  1-12.34  1-15.35  2-3.28
 
jmx                              Parameter, Integer(4)
                                 2-3.24$  0-53.22  0-53.38
 
jnpes                            Parameter, Integer(4)
                                 1-6.26$  1-12.27  1-12.37  1-15.38
 
jtail                            Parameter, Integer(4)
                                 1-12.17$
 
lambda                           Static, Real(4), Offset: 0, Alignment: full word
                                 0-52.12$  0-139.10@  0-146.25
 
lm                               Parameter, Integer(4)
                                 1-3.33$  2-3.47
 
lsm                              Parameter, Integer(4)
                                 1-3.39$
 
mxfld                            Parameter, Integer(4)
                                 2-3.31$
 
mxlvl                            Parameter, Integer(4)
                                 2-3.41$
 
north                            Common member, Logical(4), Offset: 40, Alignment: double word
                                 0-50.15$  3-3.37$  0-90.23  0-101.28  0-140.14  0-149.14  0-161.25  0-162.20
 
outgrd                           Common Block, Alignment: double word
                                 3-2.15$
 
phi                              Static, Real(4), Offset: 0, Alignment: full word
                                 0-138.10@  0-141.28  0-143.28
 
pi                               Static, Real(4), Offset: 0, Alignment: full word
                                 0-65.7@  0-66.16  0-67.19  0-68.16  0-169.28  0-170.29
 
polei                            Common member, Real(4), Offset: 8, Alignment: double word
                                 3-2.37$  0-80.26  0-115.26  0-138.19
 
polej                            Common member, Real(4), Offset: 12, Alignment: full word
                                 3-2.43$  0-81.26  0-113.18  0-128.24
 
poleje                           Static, Real(4), Offset: 0, Alignment: full word
                                 0-128.10@  0-139.19
 
proj                             Common member, Character(6), Offset: 44, Alignment: full word
                                 0-51.19$  3-3.43$  0-73.17  0-111.21  0-125.21
 
psi                              Static, Real(4), Offset: 0, Alignment: full word
                                 0-141.13@  0-143.13@  0-145.19
 
psit                             Static, Real(4), Offset: 0, Alignment: full word
                                 0-132.10@  0-133.21  0-152.23  0-152.45
 
r2                               Static, Real(4), Offset: 0, Alignment: full word
                                 0-82.16@  0-88.20  0-92.39  0-92.48  0-95.40  0-95.49
 
r2d                              Static, Real(4), Offset: 0, Alignment: full word
                                 0-69.7@  0-89.26  0-92.53  0-95.54  0-172.34  0-173.38
 
re                               Common member, Real(4), Offset: 32, Alignment: quadruple word
                                 3-3.30$
 
real                             Pure Intrinsic
                                 0-78.23  0-79.23
 
sin                              Pure Intrinsic
                                 0-147.42  0-152.41
 
sqrt                             Pure Intrinsic
                                 0-158.24
 
swlat                            Static, Real(4), Offset: 0, Alignment: full word
                                 0-112.10@  0-118.29
 
swlon                            Static, Real(4), Offset: 0, Alignment: full word
                                 0-113.10@  0-119.29
 
tan                              Pure Intrinsic
                                 0-147.23  0-148.23  0-152.19
 
term                             Static, Real(4), Offset: 0, Alignment: full word
                                 0-158.16@  0-159.40
 
terma                            Static, Real(4), Offset: 0, Alignment: full word
                                 0-145.10@  0-147.27  0-148.27
 
termb                            Static, Real(4), Offset: 0, Alignment: full word
                                 0-146.10@  0-147.46  0-148.46
 
tlon                             Static, Real(4), Offset: 0, Alignment: full word
                                 0-89.19@  0-91.40  0-94.40
 
twopi                            Static, Real(4), Offset: 0, Alignment: full word
                                 0-67.7@  0-169.50  0-170.47
 
wlon                             Static, Real(4), Offset: 0, Alignment: full word
                                 0-91.22@  0-94.22@  0-97.23  0-97.37@  0-97.44  0-98.23  0-98.37@  0-98.44  0-102.19@  0-105.29
 
x                                Static, Real(4), Offset: 0, Alignment: full word
                                 0-155.16@  0-158.29  0-158.31  0-163.34  0-165.34
 
x1                               Static, Real(4), Offset: 0, Alignment: full word
                                 0-147.10@  0-155.20
 
xi                               Static, Real(4), Offset: 0, Alignment: full word
                                 0-78.16@  0-80.23
 
xmeshl                           Common member, Real(4), Offset: 16, Alignment: quadruple word
                                 3-2.49$  0-117.29  0-155.37  0-156.37
 
y                                Static, Real(4), Offset: 0, Alignment: full word
                                 0-156.16@  0-158.33  0-158.35  0-163.40  0-165.36
 
y1                               Static, Real(4), Offset: 0, Alignment: full word
                                 0-148.10@  0-149.21@  0-149.32  0-156.20
 
yj                               Static, Real(4), Offset: 0, Alignment: full word
                                 0-79.16@  0-81.23
 
ylat                             Static, Real(4), Offset: 0, Alignment: full word
                                 0-92.22@  0-95.22@  0-100.19@  0-101.35@  0-104.29
 
** genll   === End of Compilation 1 ===
 
>>>>> FILE TABLE SECTION <<<<<
 
 
                                       FILE CREATION        FROM
FILE NO   FILENAME                    DATE       TIME       FILE    LINE
     0    GENLL.f                     02/07/06   08:28:15
     1    /gpfs/m/nco/ops/nwprod/sorc/nam_nampost.fd/parmeta
                                      02/07/06   08:28:16      0      45
     2    /gpfs/m/nco/ops/nwprod/sorc/nam_nampost.fd/parmout
                                      02/07/06   08:28:16      0      46
     3    /gpfs/m/nco/ops/nwprod/sorc/nam_nampost.fd/OUTGRD.comm
                                      02/07/06   08:28:15      0      56
 
 
>>>>> COMPILATION EPILOGUE SECTION <<<<<
 
 
FORTRAN Summary of Diagnosed Conditions
 
TOTAL   UNRECOVERABLE  SEVERE       ERROR     WARNING    INFORMATIONAL
               (U)       (S)         (E)        (W)          (I)
    0           0         0           0          0            0
 
 
    Source records read.......................................     209
1501-510  Compilation successful for file GENLL.f.
1501-543  Object file created.