subroutine szamodels (error,errorlat,itype) c programmer: Bob Joyce c date created: 3/2/2000 c purpose: Subroutine read zenith angle corrections models c c For itype enter "0" if using PC or LINUX, "1" if SGI or HP parameter (J5MAX=240,ZABINMX=64,TMPBINMX=170,ISEASMX=8) real difflat(J5MAX,ISEASMX) real error(ZABINMX,TMPBINMX), errorlat(J5MAX,ISEASMX) character*98 regridin, errorlatin c Read in IR correction table regridin ="/export-1/lnx57/wd52rj/mcidas/src/sza/error_regrid" open (unit=10, file = regridin, access = 'direct', 1 form='unformatted', recl=64*170*4) read (10,rec=1) error if (itype.eq.1) then call SWAP46(error,10880) endif c Read in latitude adjustment errorlatin = &"/export-1/lnx57/wd52rj/mcidas/src/sza/latitudinal-error_annual-cy &cle-model" open (unit=22, file = errorlatin, & access = 'direct',form='unformatted', recl=240*2*4) do 50 iseas = 1, ISEASMX read (22, rec=iseas) (errorlat(j5,iseas),j5=1,J5MAX), & (difflat(j5,iseas),j5=1,J5MAX) 50 continue if (itype.eq.0) then call SWAP46(errorlat,240*8) endif return end SUBROUTINE SWAP46(A,N) C REVERSE ORDER OF BYTES IN INTEGER*4 WORD, or REAL*4 real*4 A(N),ITEMP CHARACTER*1 JTEMP(4) CHARACTER*1 KTEMP SAVE EQUIVALENCE (JTEMP(1),ITEMP) DO 10 I = 1,N ITEMP = A(I) KTEMP = JTEMP(4) JTEMP(4) = JTEMP(1) JTEMP(1) = KTEMP KTEMP = JTEMP(3) JTEMP(3) = JTEMP(2) JTEMP(2) = KTEMP A(I) = ITEMP 10 CONTINUE RETURN END