-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
118 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
!non-diffuse filtering for single time point | ||
subroutine filteronestepnv(ymiss, yt, zt, tt, at,vt, ft,kt,p,m,j) | ||
|
||
implicit none | ||
|
||
integer, intent(in) :: p, m,j | ||
integer :: i | ||
integer, intent(in), dimension(p) :: ymiss | ||
double precision, intent(in), dimension(p) :: yt | ||
double precision, intent(in), dimension(m,p) :: zt | ||
double precision, intent(in), dimension(m,m) :: tt | ||
double precision, intent(inout), dimension(m) :: at | ||
double precision, intent(in), dimension(p) :: ft | ||
double precision, intent(inout), dimension(p) :: vt | ||
double precision, intent(in), dimension(m,p) :: kt | ||
double precision, dimension(m) :: ahelp | ||
|
||
double precision, external :: ddot | ||
|
||
external dgemv | ||
|
||
do i = j+1, p | ||
if(ymiss(i).EQ.0) then | ||
vt(i) = yt(i) - ddot(m,zt(:,i),1,at,1) | ||
if (ft(i) .GT. 0.0d0) then | ||
at = at + vt(i)/ft(i)*kt(:,i) | ||
end if | ||
end if | ||
end do | ||
|
||
call dgemv('n',m,m,1.0d0,tt,m,at,1,0.0d0,ahelp,1) | ||
at = ahelp | ||
|
||
end subroutine filteronestepnv | ||
|
||
|
||
!diffuse filtering for single time point | ||
subroutine diffusefilteronestepnv(ymiss, yt, zt, tt, at, vt, ft,kt,& | ||
finf,kinf,p,m,j) | ||
|
||
implicit none | ||
|
||
integer, intent(in) :: p, m, j | ||
integer :: i | ||
integer, intent(in), dimension(p) :: ymiss | ||
double precision, intent(in), dimension(p) :: yt | ||
double precision, intent(in), dimension(m,p) :: zt | ||
double precision, intent(in), dimension(m,m) :: tt | ||
double precision, intent(inout), dimension(m) :: at | ||
double precision, intent(inout), dimension(p) :: vt | ||
double precision, intent(in), dimension(p) :: ft,finf | ||
double precision, intent(in), dimension(m,p) :: kt,kinf | ||
double precision, dimension(m) :: ahelp | ||
|
||
double precision, external :: ddot | ||
|
||
external dgemv | ||
|
||
do i = 1, j | ||
if(ymiss(i).EQ.0) then | ||
vt(i) = yt(i) - ddot(m,zt(:,i),1,at,1) | ||
if (finf(i) .GT. 0.0d0) then | ||
at = at + vt(i)/finf(i)*kinf(:,i) | ||
else | ||
if (ft(i) .GT. 0.0d0) then | ||
at = at + vt(i)/ft(i)*kt(:,i) | ||
end if | ||
end if | ||
end if | ||
end do | ||
if(j .EQ. p) then | ||
call dgemv('n',m,m,1.0d0,tt,m,at,1,0.0d0,ahelp,1) | ||
at = ahelp | ||
end if | ||
end subroutine diffusefilteronestepnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters