C+ C NAME: C iReadProxyMap N C PURPOSE: C Read a proxy map for velocity, density or g-level. C CATEGORY: C Data processing C CALLING SEQUENCE: C I = iReadProxyMapN(iq,nLng,nLat,ROT,AMAP) C INPUTS: C iq integer Type of map C iq = 1 velocity map (vmap.dat) C iq = 2 density map (dmap.dat) C iq = 3 g-level map (gmap.dat) C nLng integer # longitudes points in GMAP C nLat integer # latitude points in GMAP C ROT real Modified Carrington variable C OUTPUTS: C AMAP(nLng,nLat) real Proxy map read from file C FUNCTIONS/SUBROUTINES: C bOpenFile C PROCEDURE: C MODIFICATION HISTORY: C NOV, 1995 B. Jackson (STEL,UCSD) C- function iReadProxyMapN(iq,Rot,nLng,nLat,Z) parameter (nq = 3) character cFileQ(nq)*10 /'v????.???','d????.???','g????.map'/ real ZBad(nq) C real Z(nLng,nLat) character cFile*80 character cDir(2)*80 external fncWZ integer nPad(4) /4*0/ include 'dirspec.h' cDir(1) = 'dat' cDir(2) = 'proxy' C ZBad(1) = -999.99 9 ZBad(2) = -999999.0 ZBad(3) = -99.9999 I = iFilePath(cHome,2,cDir,cFileQ(iq),cFile) I = index(cFile,'????') if (I .ne. 0) write (cFile(I:I+3),'(I4)') nint(Rot) if (I .ne. 0 .and. iq. eq. 1) write (cFile(I:I+7),'(F8.3)') Rot if (I .ne. 0 .and. iq. eq. 2) write (cFile(I:I+7),'(F8.3)') Rot C iReadProxyMapN = iFltArr(cFile,100,0.,1.,fncWZ,ZBad(iq),nLng*nLat,nLng,nLat,nPad,Z) iReadProxyMapN = iFltArr(cFile,0,0.,1.,fncWZ,0,nLng*nLat,nLng,nLat,nPad,Z) call ArrR4Mask(nLng*nLat,Z,ZBad(iq),BadR4(),0.,0.,1.,Z) return end