
! Tinh trung binh khi hau cac chi so cho OBS va BL (1 OBS + Nmodels = 7)

Subroutine Calc_Clim (ifile) 
Integer :: ilon,ilat,ifile
Real :: X(Ntime)

Do ifile=1, Nmodels+1
   Do ilon=1, Nlon
      Do ilat=1, Nlat
         if (Int(Reg(ilon,ilat))>=1.AND.Int(Reg(ilon,ilat))<=Nreg) then
            
            X(1:Ntime)=PDSI_All(ilon,ilat,1:Ntime,ifile); PDSI_Clim_BL(ilon,ilat,ifile) = Time_Ave(X, Ntime)
            
         endif
      Enddo
   Enddo
Enddo

End Subroutine
