C+ C NAME: C FillMapOL S C PURPOSE: C To fill maps at opposite the region of interest with a smooth average of the C data from the other nearby longitudes. This is an attempt to completely fill C the side of a two dimensional Carrington map away from the observer. C This subroutine is used only cosmetically in ipshtd. C CATEGORY: C Data processing C CALLING SEQUENCE: C call FillMapOLS(XCbeg,XCend,XCmid,nLng,nLat,Const,DMap) C INPUTS: C XCbeg real Beginning rotation values C XCend real Ending rotation value C XCmid real Longitude of most interest (smooth data 180 degrees from this) C nLng integer # Longitude points C nLat integer # Latitude points C Const real Longitude filter constant (in terms of the numbers of intervals in one rotation) C DMap(nLng,nLat) real Input map C OUTPUTS: C DMap(nLng,nLat) real Output map C FUNCTIONS/SUBROUTINES: C PROCEDURE: C Bad values (indicated by BadR4()) are processed C MODIFICATION HISTORY: C MAY, 1999 B. Jackson (STEL,UCSD) C- subroutine FillMapOLS(XCbeg,XCend,XCmid,nLng,nLat,Const,DMap) real DMap(nLng,nLat) ! Map C C Average the other non-Bad longitude values. C Bad = BadR4() ExpPWC = 50. C C This part Filters or smooths the data C NXC = (XCend-XCbeg) + 0.1 ! Usually 3 Lmod = nLng/NXC ! Usually 18 IXCopp = (XCend - XCmid)*Lmod + 0.5 ! Middle I of region of interest nlngB1 = IXCopp - Lmod/2 nLngE1 = nLngB1 + 1 nLngE2 = IXCopp + Lmod/2 nLngB2 = nLngE2 - 1 NX = 2 C print *, 'NXC, Lmod, XCbeg, XCend, XCmid, IXCopp, nLngB, nLngE', NXC, Lmod, XCbeg, XCend, XCmid, IXCopp, nLngB1, nLngE1, nLngB2, nLngE2 do I=nLngE1,nLngB1 do J=1,nLat DMNT = 0. ANDMNT = 0. do II=1,NX IP = I + II IM = I - II if(IP.le.nLng) then if(DMap(IP,J).ne.Bad) then ExpPW = (II/Const)**2 Expot = 999999. if(ExpPW.gt.ExpPWC) Expot = 0. if(Expot.ne.0.) Expot = Exp(-ExpPW) DMNT = DMNT + DMap(IP,J)*Expot ANDMNT = ANDMNT + Expot end if end if if(IM.ge.1) then if(DMap(IM,J).ne.Bad) then ExpPW = (II/Const)**2 Expot = 999999. if(ExpPW.gt.ExpPWC) Expot = 0. if(Expot.ne.0.) Expot = Exp(-ExpPW) DMNT = DMNT + DMap(IM,J)*Expot ANDMNT = ANDMNT + Expot end if end if end do if(ANDMNT.ne.0.) then if(DMap(I,J).eq.Bad) then DMap(I,J) = DMNT/ANDMNT end if end if end do end do do I=nLngB2,nLng E2 do J=1,nLat DMNT = 0. ANDMNT = 0. do II=1,NX IP = I + II IM = I - II if(IP.le.nLng) then if(DMap(IP,J).ne.Bad) then ExpPW = (II/Const)**2 Expot = 999999. if(ExpPW.gt.ExpPWC) Expot = 0. if(Expot.ne.0.) Expot = Exp(-ExpPW) DMNT = DMNT + DMap(IP,J)*Expot ANDMNT = ANDMNT + Expot end if end if if(IM.ge.1) then if(DMap(IM,J).ne.Bad) then ExpPW = (II/Const)**2 Expot = 999999. if(ExpPW.gt.ExpPWC) Expot = 0. if(Expot.ne.0.) Expot = Exp(-ExpPW) DMNT = DMNT + DMap(IM,J)*Expot ANDMNT = ANDMNT + Expot end if end if end do if(ANDMNT.ne.0.) then if(DMap(I,J).eq.Bad) then DMap(I,J) = DMNT/ANDMNT end if end if end do end do return end