1 Subroutine da_gen_eigen(kz, covm, eve, val)
5 integer, intent(in) :: kz
6 real , dimension(1:kz,1:kz), intent(inout) :: covm
7 real , dimension(1:kz,1:kz), intent(out) :: eve
8 real , dimension(1:kz) , intent(out) :: val
13 call da_1d_eigendecomposition( covm, eve, val )
16 if ( val(k1) < 0.0 ) val(k1) = 0.0
21 covm(k1,k2) = SUM( eve(k1,:) * val(:) * eve(k2,:) )
27 covm(k1,k2) = covm(k2,k1)
31 call da_1d_eigendecomposition( covm, eve, val )
34 if ( val(k1) < 0.0 ) val(k1) = 0.0
37 end Subroutine da_gen_eigen