Program i : windv

      program progi
      implicit none

      real ranf
      external ranf
      real fu(13,16),fv(13,16),vu(13,16),vv(13,16),w(13,16)
      real rms,rms2

      integer i,j
      do i=1,13
         do j=1,16
            vu(i,j)=1.23+i*j
            vv(i,j)=2.3*i-5.0*j
            fu(i,j)=vu(i,j)+2*(ranf()-0.5)
            fv(i,j)=vv(i,j)+2*(ranf()-0.5)
            w(i,j)=1
         enddo   
      enddo
      
      call windv(rms,fu,fv,fu,fv,w,13,16,1,1,13,16)
      call windv(rms2,fu,fv,vu,vv,w,13,16,1,1,13,16)

      print *,'The rms error calculated by windv:'
      print *,'  for a field compared to itself:',rms
      print *,'  for the field f compared to the field v:',rms2

      stop
      end

      real function ranf()      
      integer rand
      
      ranf=rand()/32767.0
      return
      end