C+ C NAME: C MkVeltd C PURPOSE: C To make a velocity map from the velocity ratios determined by the main program C CATEGORY: C Data processing C C INPUTS: C nLng,nLat,nMap,nT,nTmaxV,Cshift,Vmap,Vratio C C OUTPUTS: C TrueVel C C MODIFICATION HISTORY: C JULY-2001, Tamsen Dunn (UCSD; tdunn@ucsd.edu) C- subroutine MkVeltd(nLng,nLat,nMap,nTmaxV,XCshift,Vmap,Vratio, TrueVel) real Vmap(nLng,nLat,nTmaxV), ! Input velocity map at height RR & Vratio (nLng,nLat,nMap,nTmaxV), ! Map of accumulated velocity ratios at heights (from 1 RR) & TrueVel(nLng,NLat,nMap,nTmaxV), & XCshift(nLng,NLat,nMap,nTmaxV,3), & NewShift, & OriginalLng, & nCar /3.0/ c & Vcheck5(nLng,nLat), c & Vcheck7(nLng,nLat) Bad = BadR4() print *, 'Bad is', Bad do I=1,nLng do J=1,nLat do K=1,nMap do N=1, nTmaxV NewShift1 = XCshift(I,J,K,N,1) NewShift3 = XCshift(I,J,K,N,3) if (NewShift1 .le. -1.) then !hopefully redundant print *, 'big problem w/ XCshift1 in MkVeltd' c stop end if if (NewShift3 .le. -1.) then !hopefully redundant print *, 'big problem w/ XCshift3 in MkVeltd' c stop end if OriginalLng = I + ( NewShift1 * ((nLng-1) / nCar )) if (OriginalLng .le. 0) then OriginalLng = OriginalLng + nLng c print *, 'velocity wrapping around map' end if if (Vmap(I,J,N).eq. Bad) then TrueVel(I,J,K,N) = Bad else TrueVel(I,J,K,N) = Vratio(OriginalLng,J,K,N) * Vmap(I,J,N) end if if (Vratio(OriginalLng,J,K,N).eq. Bad) then TrueVel(I,J,K,N) = BAD end if c if (N .eq. 5) then !time five, radius 5 c if (K .eq. 5) then c Vcheck5(I,J) = TrueVel(I,J,K,N) c end if c end if c if (N .eq. 5) then !time five, radius 21 c if (K .eq. 30) then c Vcheck7(I,J) = TrueVel(I,J,K,N) c end if c end if end do end do end do end do c call WhatisR4(nLat*nMap, Vcheck5,'Vcheck radius 5 info as follows') c call WhatisR4(nLat*nMap, Vcheck7,'Vcheck radius 21 info as follows') return end