C+ C NAME: C MkVModel C PURPOSE: C Make model line of sight velocities from a velocity map at a given height. C The LOS. values are assumed to vary with the densities from a model C relative to a mean which includes densities determined from that model. C Note - this is somewhat unlike the LOS. weights determined for densities. C CATEGORY: C Data processing C CALLING SEQUENCE: subroutine MkVModel(XCbeg,XCend,XEV,XLON,XLAT,RP,WTS1,DFAC,VFAC, & PW,NL,NLOS,NLOSP1,VMAP,VLIM,DMAP,nLng,nLat,DREF, & VREF,DCON,VM,VWTij) C INPUTS: C XCbeg real Beginning Carrington Rotation value C XCend real Ending Carrington Rotation value C XEV(NL) real Source elongations C XLON(NLOSP1,NL) real Projected Carr. rot. value of point on L.O.S. C XLAT(NLOSP1,NL) real Heliographic lat. (in deg.) point on L.O.S. C RP (NLOSP1,NL) real Distance above Sun of point on L.O.S. C WTS1(NLOS ,NL) real Weights of each point along the L.O.S. C DFAC(NLOSP1,NL) real Density factors for each L.O.S. point C VFAC(NLOSP1,NL) real Velocity factors for each L.O.S. point C PW real Density power C NL integer Number of G-level data points C NLOS integer Number of L.O.S. distance segments C NLOSP1 integer Number of L.O.S. distance segments + 1 C VMAP(nLng,nLat) real Velocity map C VLIM real Linit on velocity (maximum) C DMAP(nLng,nLat) real Density map C nLng integer Number of longitude points in DMAP C nLat integer Number of latitude points in DMAP C DREF real Height of density reference map C VREF real Height of velocity reference map C DCON real Height of deconvolved velocity map C OUTPUTS: C VM(NL) real Model Velocities for a given source C VWTij(NLOS ,NL) real L.O.S. weights C CALLS: C BadR4, Get2Dval C PROCEDURE: C MODIFICATION HISTORY: C NOV, 1995 B. Jackson (STEL,UCSD), MAR, 1999 B. Jackson (UCSD) to C include VFAC C- real XEV(NL) ! Source elongations real XLON(NLOSP1,NL) ! Projected Carr. rot. value of point on L.O.S. real XLAT(NLOSP1,NL) ! Heliographic lat. (in deg.) point on L.O.S. real RP (NLOSP1,NL) ! Distance above Sun of point on L.O.S. real WTS1(NLOS ,NL) ! Weights of each point along the L.O.S. real DFAC(NLOSP1,NL) ! Density factors for each L.O.S. point real VFAC(NLOSP1,NL) ! Velocity factors for each L.O.S. point real VMAP(nLng,nLat) ! Velocity map real DMAP(nLng,nLat) ! Density map real VM(NL) ! Model velocities for a given source real VWTij(NLOS ,NL) ! L.O.S. weights BAD = BadR4() do I=1,NL do J=1,NLOS XLON(J,I) = max(XCbeg,min(XCend,XLON(J,I))) call Get2Dval(XCbeg,XCend,nLng,nLat,DMAP,1,XLON(J,I),XLAT(J,I),DENj) if (DENj .eq. BAD) stop ' Bad density in MkVModel' DENj = DENj*DFAC(J,I)*((DREF/RP(J,I))**2) VWTij(J,I) = (DENj**(2.0*PW))*WTS1(J,I) !VWTij(J,I) = (DENj**PW)*WTS1(J,I)*cosd(XLAT(J,I)) end do end do do I=1,NL VPERP = 0 VWT = 0 VWTi = 0 sinE = sind(abs(XEV(I))) do J=1,NLOS VSN = sinE/RP(J,I) XLON(J,I) = max(XCbeg,min(XCend,XLON(J,I))) call Get2Dval(XCbeg,XCend,nLng,nLat,VMAP,1,XLON(J,I),XLAT(J,I),VELO) if (VELO .eq. BAD) stop 'Bad velocity in MAKE_VMODEL' VELO = VELO*VFAC(J,I) ! Added B. Jackson 3/99 !VELO = min(VELO,VLIM) VPERP = VPERP + VWTij(J,I)*VSN*VELO VWT = VWT + VWTij(J,I) VWTij(J,I) = VWTij(J,I)*VSN*VELO VWTi = VWTi + VWTij(J,I) end do VM(I) = VPERP/VWT end do do I=1,NL do J=1,NLOS VWTij(J,I) = VWTij(J,I)/VWTi !VWTij(J,I) = VWTij(J,I)/VWT end do end do return end