Program 9 : corcof, mwerms, s1scor

      program prog9
      implicit none

      real ranf
      external ranf
      real cc,fi(12,13),ff(12,13),fv(12,13)
      real w(12,13),s1,bias,std
      integer i,j

# define initial field, verifying field and forecast field
      do i=1,12
         do j=1,13
            fi(i,j)=i**2+i+j**2-j-12.0
            fv(i,j)=fi(i,j)+i+j
            ff(i,j)=fv(i,j)+j*ranf()
            w(i,j)=1.0
         enddo
      enddo

# display some results about the forecast
      print *,'Some properties of this forecast;'
      call corcof(cc,fi,ff,fv,w,12,13,1,1,12,13)
      print *,'correlation coeficient :',cc
      call s1scor(s1,ff,fv,12,13,1,1,12,13,1)
      print *,'s1 score :',s1
      call mwerms(bias,std,ff,fv,w,12,13,1,1,12,13)
      print *,'mean weighted error :',bias
      print *,'weighted rms deviation from the mean',std

      stop
      end

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