Hi,
I have attached the f90 code, the f77 stub file, and
my comp_f90.sh file which I used to compile
the code.
I recently purchased the PG compiliers and assume
I have the latest version.
It occured the me that I never tested the cormat.f90
code to make sure it acually works. I can report,
however, that it does.
Thanks for your help,
Jan
! a subroutine to create a correlation matrix for use in NCL
! this routine will be used in conjunction with an another subr
! to EOF decompose
subroutine cormat(M,N, A, cor)
integer, intent(in) :: M,N
real, dimension(1:M,1:N), intent(in) :: A
real, dimension(:,:), allocatable :: A_t
real, dimension(1:N,1:N), intent(out) :: cor
! begin Executable
allocate(A_t(1:N,1:M))
! transpose the matrix
A_t = transpose(A)
! calculate the correlation matrix
cor = matmul(A_t,A) / real(N)
deallocate (A_t)
return
end
CNCLFORTSTART
subroutine cormat(M,N, A, cor)
integer M
integer N
real A(M,N)
real A_t(N,M)
real cor(N,N)
CNCLEND
C a stub file to accompany cormat.F90
C a correlation matrix muliplication subr for use in NCL
This archive was generated by hypermail 2b29 : Fri Mar 09 2001 - 07:11:19 MST