My Project
Functions/Subroutines
sinter Module Reference

Functions/Subroutines

subroutine sinter_extrp_up (X, A, Y, B, M1, N1)
 
subroutine sinter_extrp_down (X, A, Y, B, M1, N1)
 
subroutine sinter_extrp_none (X, A, Y, B, M1, N1)
 
subroutine sinter_extrp_both (X, A, Y, B, M1, N1)
 

Function/Subroutine Documentation

◆ sinter_extrp_both()

subroutine sinter::sinter_extrp_both ( real(sp), dimension(m1), intent(in)  X,
real(sp), dimension(m1), intent(in)  A,
real(sp), dimension(n1), intent(in)  Y,
real(sp), dimension(n1), intent(out)  B,
integer, intent(in)  M1,
integer, intent(in)  N1 
)

Definition at line 181 of file sinter.f90.

181 !==============================================================================|
182 
183 
184 !==============================================================================|
185  USE mod_prec
186  IMPLICIT NONE
187  INTEGER, INTENT(IN) :: M1,N1
188  REAL(SP), INTENT(IN) :: X(M1),A(M1),Y(N1)
189  REAL(SP), INTENT(OUT) :: B(N1)
190  INTEGER :: I,J,NM
191 !==============================================================================|
192 
193 !
194 ! EXTRAPOLATION
195 !
196  DO i=1,n1
197  IF(y(i) > x(1 )) b(i) = a(1) + ((a(1)-a(2))/(x(1)-x(2))) * (y(i)-x(1))
198  IF(y(i) < x(m1)) b(i)=a(m1)+(a(m1-1)-a(m1))*(y(i)-x(m1))/(x(m1-1)-x(m1))
199  END DO
200 
201 !
202 ! INTERPOLATION
203 !
204  nm = m1 - 1
205  DO i=1,n1
206  DO j=1,nm
207  IF (y(i)<=x(j).AND.y(i)>=x(j+1)) &
208  b(i) = a(j) - (a(j)- a(j+1)) *(x(j)-y(i)) / (x(j)-x(j+1))
209  END DO
210  END DO
211 
212  RETURN

◆ sinter_extrp_down()

subroutine sinter::sinter_extrp_down ( real(sp), dimension(m1), intent(in)  X,
real(sp), dimension(m1), intent(in)  A,
real(sp), dimension(n1), intent(in)  Y,
real(sp), dimension(n1), intent(out)  B,
integer, intent(in)  M1,
integer, intent(in)  N1 
)

Definition at line 98 of file sinter.f90.

98 ! for baroclinic interpolation |
99 !==============================================================================|
100 
101 
102 !==============================================================================|
103  USE mod_prec
104  IMPLICIT NONE
105  INTEGER, INTENT(IN) :: M1,N1
106  REAL(SP), INTENT(IN) :: X(M1),A(M1),Y(N1)
107  REAL(SP), INTENT(OUT) :: B(N1)
108  INTEGER :: I,J,NM
109 !==============================================================================|
110 
111 !
112 ! EXTRAPOLATION
113 !
114  DO i=1,n1
115  IF(y(i) > x(1 )) b(i) = a(1)
116  IF(y(i) < x(m1)) b(i)=a(m1)+(a(m1-1)-a(m1))*(y(i)-x(m1))/(x(m1-1)-x(m1))
117  END DO
118 
119 !
120 ! INTERPOLATION
121 !
122  nm = m1 - 1
123  DO i=1,n1
124  DO j=1,nm
125  IF (y(i)<=x(j).AND.y(i)>=x(j+1)) &
126  b(i) = a(j) - (a(j)- a(j+1)) *(x(j)-y(i)) / (x(j)-x(j+1))
127  END DO
128  END DO
129 
130  RETURN
Here is the caller graph for this function:

◆ sinter_extrp_none()

subroutine sinter::sinter_extrp_none ( real(sp), dimension(m1), intent(in)  X,
real(sp), dimension(m1), intent(in)  A,
real(sp), dimension(n1), intent(in)  Y,
real(sp), dimension(n1), intent(out)  B,
integer, intent(in)  M1,
integer, intent(in)  N1 
)

Definition at line 140 of file sinter.f90.

140 ! for t&s obc interpolation |
141 !==============================================================================|
142 
143 
144  USE mod_prec
145  IMPLICIT NONE
146  INTEGER, INTENT(IN) :: M1,N1
147  REAL(SP), INTENT(IN) :: X(M1),A(M1),Y(N1)
148  REAL(SP), INTENT(OUT) :: B(N1)
149  INTEGER :: I,J,NM
150 !==============================================================================|
151 
152 
153 !
154 ! EXTRAPOLATION
155 !
156  DO i=1,n1
157  IF (y(i) > x(1 )) b(i) = a(1)
158  IF (y(i) < x(m1)) b(i) = a(m1)
159  END DO
160 
161 !
162 ! INTERPOLATION
163 !
164  nm = m1 - 1
165  DO i=1,n1
166  DO j=1,nm
167  IF (y(i) <= x(j).AND.y(i) >= x(j+1)) &
168  b(i) = a(j) - (a(j)- a(j+1)) * (x(j)-y(i)) / (x(j)-x(j+1))
169  END DO
170  END DO
171 
172  RETURN
Here is the caller graph for this function:

◆ sinter_extrp_up()

subroutine sinter::sinter_extrp_up ( real(sp), dimension(m1), intent(in)  X,
real(sp), dimension(m1), intent(in)  A,
real(sp), dimension(n1), intent(in)  Y,
real(sp), dimension(n1), intent(out)  B,
integer, intent(in)  M1,
integer, intent(in)  N1 
)

Definition at line 60 of file sinter.f90.

60 
61 !==============================================================================|
62  USE mod_prec
63  IMPLICIT NONE
64  INTEGER, INTENT(IN) :: M1,N1
65  REAL(SP), INTENT(IN) :: X(M1),A(M1),Y(N1)
66  REAL(SP), INTENT(OUT) :: B(N1)
67  INTEGER I,J,NM
68 !==============================================================================|
69 
70 !
71 ! EXTRAPOLATION
72 !
73  DO i=1,n1
74  IF (y(i) > x(1 )) b(i) = a(1) + ((a(1)-a(2))/(x(1)-x(2))) * (y(i)-x(1))
75  IF (y(i) < x(m1)) b(i) = a(m1)
76  END DO
77 
78 !
79 ! INTERPOLATION
80 !
81  nm = m1 - 1
82  DO i=1,n1
83  DO j=1,nm
84  IF (y(i) <= x(j) .AND. y(i) >= x(j+1)) &
85  b(i) = a(j) - (a(j)- a(j+1)) * (x(j)-y(i)) / (x(j)-x(j+1))
86  END DO
87  END DO
88 
89  RETURN
Here is the caller graph for this function: