C================================================================================	
C        CALCULATE PHASE FUNCTION LEGENDRE EXPANSION COEFFICIENTS
C        IN VARIOUS SPECIAL CASES
C--------------------------------------------------------------------------------
C       INPUT: IPHAS   PHASE FUNCTION OPTIONS
C                      1 : ISOTROPIC
C                      2 : RAYLEIGH
C                      3 : HENYEY-GREENSTEIN WITH ASYMMETRY FACTOR -GG-
C                      4 : HAZE L AS SPECIFIED BY GARCIA/SIEWERT
C                      5 : CLOUD C.1 AS SPECIFIED BY GARCIA/SIEWERT
C              GG      ASYMMETRY FACTOR FOR HENYEY-GREENSTEIN CASE
C              NMOM    INDEX OF HIGHEST LEGENDRE COEFFICIENT NEEDED
C                        ( = NUMBER OF STREAMS 'NSTR'  CHOSEN
C                         FOR THE DISCRETE ORDINATE METHOD)
C--------------------------------------------------------------------------------
C      OUTPUT: PMOM(K)  LEGENDRE EXPANSION COEFFICIENTS (K=0 TO NMOM)
C                         (BE SURE TO DIMENSION '0:maxval' IN CALLING PROGRAM)
C--------------------------------------------------------------------------------
C      REFERENCE:  GARCIA, R. AND C. SIEWERT, 1985: BENCHMARK RESULTS
C                     IN RADIATIVE TRANSFER, TRANSP. THEORY AND STAT.
C                     PHYSICS 14, 437-484, TABLES 10 AND 17
C--------------------------------------------------------------------------------

	SUBROUTINE  GETMOM( IPHAS, GG, NMOM, PMOM ) 2

	INTEGER  IPHAS, NMOM
	REAL     GG, PMOM( 0:* )

	REAL  HAZELM( 82 ), CLDMOM( 299 )

	DATA HAZELM /  2.41260, 3.23047, 3.37296, 3.23150, 2.89350,
     A               2.49594, 2.11361, 1.74812, 1.44692, 1.17714,
     B               0.96643, 0.78237, 0.64114, 0.51966, 0.42563,
     C               0.34688, 0.28351, 0.23317, 0.18963, 0.15788,
     D               0.12739, 0.10762, 0.08597, 0.07381, 0.05828,
     E               0.05089, 0.03971, 0.03524, 0.02720, 0.02451,
     F               0.01874, 0.01711, 0.01298, 0.01198, 0.00904,
     G               0.00841, 0.00634, 0.00592, 0.00446, 0.00418,
     H               0.00316, 0.00296, 0.00225, 0.00210, 0.00160,
     I               0.00150, 0.00115, 0.00107, 0.00082, 0.00077,
     J               0.00059, 0.00055, 0.00043, 0.00040, 0.00031,
     K               0.00029, 0.00023, 0.00021, 0.00017, 0.00015,
     L               0.00012, 0.00011, 0.00009, 0.00008, 0.00006,
     M               0.00006, 0.00005, 0.00004, 0.00004, 0.00003,
     N               0.00003, 3*0.00002, 8*0.00001 /

	DATA  ( CLDMOM(K), K = 1, 159 ) /
     A  2.544,  3.883,  4.568,  5.235,  5.887,  6.457,  7.177,  7.859,
     B  8.494,  9.286,  9.856, 10.615, 11.229, 11.851, 12.503, 13.058,
     C 13.626, 14.209, 14.660, 15.231, 15.641, 16.126, 16.539, 16.934,
     D 17.325, 17.673, 17.999, 18.329, 18.588, 18.885, 19.103, 19.345,
     E 19.537, 19.721, 19.884, 20.024, 20.145, 20.251, 20.330, 20.401,
     F 20.444, 20.477, 20.489, 20.483, 20.467, 20.427, 20.382, 20.310,
     G 20.236, 20.136, 20.036, 19.909, 19.785, 19.632, 19.486, 19.311,
     H 19.145, 18.949, 18.764, 18.551, 18.348, 18.119, 17.901, 17.659,
     I 17.428, 17.174, 16.931, 16.668, 16.415, 16.144, 15.883, 15.606,
     J 15.338, 15.058, 14.784, 14.501, 14.225, 13.941, 13.662, 13.378,
     K 13.098, 12.816, 12.536, 12.257, 11.978, 11.703, 11.427, 11.156,
     L 10.884, 10.618, 10.350, 10.090,  9.827,  9.574,  9.318,  9.072,
     M  8.822, 8.584, 8.340, 8.110, 7.874, 7.652, 7.424, 7.211, 6.990,
     N  6.785, 6.573, 6.377, 6.173, 5.986, 5.790, 5.612, 5.424, 5.255,
     O  5.075, 4.915, 4.744, 4.592, 4.429, 4.285, 4.130, 3.994, 3.847,
     P  3.719, 3.580, 3.459, 3.327, 3.214, 3.090, 2.983, 2.866, 2.766,
     Q  2.656, 2.562, 2.459, 2.372, 2.274, 2.193, 2.102, 2.025, 1.940,
     R  1.869, 1.790, 1.723, 1.649, 1.588, 1.518, 1.461, 1.397, 1.344,
     S  1.284, 1.235, 1.179, 1.134, 1.082, 1.040, 0.992, 0.954, 0.909 /
	DATA  ( CLDMOM(K), K = 160, 299 ) /
     T  0.873, 0.832, 0.799, 0.762, 0.731, 0.696, 0.668, 0.636, 0.610,
     U  0.581, 0.557, 0.530, 0.508, 0.483, 0.463, 0.440, 0.422, 0.401,
     V  0.384, 0.364, 0.349, 0.331, 0.317, 0.301, 0.288, 0.273, 0.262,
     W  0.248, 0.238, 0.225, 0.215, 0.204, 0.195, 0.185, 0.177, 0.167,
     X  0.160, 0.151, 0.145, 0.137, 0.131, 0.124, 0.118, 0.112, 0.107,
     Y  0.101, 0.097, 0.091, 0.087, 0.082, 0.079, 0.074, 0.071, 0.067,
     Z  0.064, 0.060, 0.057, 0.054, 0.052, 0.049, 0.047, 0.044, 0.042,
     A  0.039, 0.038, 0.035, 0.034, 0.032, 0.030, 0.029, 0.027, 0.026,
     B  0.024, 0.023, 0.022, 0.021, 0.020, 0.018, 0.018, 0.017, 0.016,
     C  0.015, 0.014, 0.013, 0.013, 0.012, 0.011, 0.011, 0.010, 0.009,
     D  0.009, 3*0.008, 2*0.007, 3*0.006, 4*0.005, 4*0.004, 6*0.003,
     E  9*0.002, 18*0.001 /

	IF ( IPHAS.LT.1 .OR. IPHAS.GT.5 )
     $     CALL ERRMSG( 'GETMOM--BAD INPUT VARIABLE IPHAS', .TRUE. )
	IF ( IPHAS.EQ.3 .AND. (GG.LE.-1.0 .OR. GG.GE.1.0) )
     $     CALL ERRMSG( 'GETMOM--BAD INPUT VARIABLE GG', .TRUE. )
	IF ( NMOM.LT.2 )
     $     CALL ERRMSG( 'GETMOM--BAD INPUT VARIABLE NMOM', .TRUE. )

	PMOM(0) = 1.0
	DO  10  K = 1, NMOM
	   PMOM(K) = 0.0
   10 CONTINUE

	IF ( IPHAS.EQ.2 )  THEN
C---------------------------
C    RAYLEIGH PHASE FUNCTION
C---------------------------

	   PMOM(2) = 0.1

	ELSE IF ( IPHAS.EQ.3 ) THEN
C------------------------------
C   HENYEY-GREENSTEIN PHASE FCN
C------------------------------
	   DO  20  K = 1, NMOM
	      PMOM(K) = GG**K
   20    CONTINUE

	ELSE IF ( IPHAS.EQ.4 ) THEN
C---------------------------
C    HAZE-L PHASE FUNCTION
C---------------------------
	   DO  30  K = 1, MIN0(82,NMOM)
	      PMOM(K) = HAZELM(K) / ( 2*K+1 )
   30    CONTINUE

	ELSE IF ( IPHAS.EQ.5 ) THEN
C---------------------------
C   CLOUD C.1 PHASE FUNCTION
C---------------------------
	   DO  40  K = 1, MIN0(298,NMOM)
	      PMOM(K) = CLDMOM(K) / ( 2*K+1 )
40       CONTINUE

	END IF

	RETURN
	END