C
C
	SUBROUTINE EASEGRID(IOPT,ALAT,ALON,THELON,THELAT,ASCALE)
C
C	COMPUTES THE FORWARD "EASE" GRID TRANSFORM
C
C	GIVEN A LAT,LON (ALAT,ALON) AND THE SCALE (ASCALE) THE IMAGE
C	TRANSFORMATION COORDINATES (THELON,THELAT) ARE COMUTED
C	USING THE "EASE GRID" (VERSION 1.0) TRANSFORMATION GIVEN IN FORTRAN
C	SOURCE CODE SUPPLIED BY NSIDC.
C
C	THE RADIUS OF THE EARTH USED IN THIS PROJECTION IS IMBEDDED INTO
C	ASCALE WHILE THE PIXEL DIMENSION IN KM IS IMBEDDED IN BSCALE
C	THE BASE VALUES ARE: RADIUS EARTH= 6371.228 KM
C			     PIXEL DIMEN =25.067525 KM
C	THEN, BSCALE = 2*(BASE_PIXEL_DIMEN)
C	      ASCALE = 4*(BASE_RADIUS_EARTH)
C
C	THESE VALUES ARE SET IN THE GETSIR AND PUTSIR ROUTINES
C
C	IOPT IS EASE TYPE: IOPT=11=NORTH, IOPT=12=SOUTH, IOPT=13=CYLINDRICAL
C
C	WRITTEN BY: DGL 4 MAR 1995
C
	IMPLICIT NONE
	INTEGER IOPT
	REAL ALAT, ALON, THELON, THELAT, ASCALE
c
	real cosd, sind   ! for some stupid compilers
c
	REAL PI2
	DATA PI2/1.57079633/		! Pi/2
C
	IF (IOPT.EQ.11) THEN		! EASE GRID NORTH
		THELON= ASCALE*SIND(ALON)*SIND(45.0-0.5*ALAT)
		THELAT=-ASCALE*COSD(ALON)*SIND(45.0-0.5*ALAT)
	ELSE IF (IOPT.EQ.12) THEN	! EASE GRID SOUTH
		THELON=ASCALE*SIND(ALON)*COSD(45.0-0.5*ALAT)
		THELAT=ASCALE*COSD(ALON)*COSD(45.0-0.5*ALAT)
	ELSE IF (IOPT.EQ.13) THEN	! EASE CYLINDRICAL
		THELON=ASCALE*PI2*ALON*COSD(30.0)/90.0
		THELAT=ASCALE*SIND(ALAT)*COSD(30.0)
	ENDIF
	RETURN
	END
