source: codes/icosagcm/branches/SATURN_DYNAMICO/LMDZ.COMMON/config/ppsrc/phys/bilinear.f90 @ 224

Last change on this file since 224 was 224, checked in by ymipsl, 10 years ago
File size: 460 bytes
Line 
1!-------------------------------------------------------------------------
2subroutine bilinear(f,f11,f21,f12,f22,x,x1,x2,y,y1,y2) 
3! Used for interpolation of continuum data
4
5  implicit none
6
7  real*8 x,y,x1,x2,y1,y2
8  real*8 f,f11,f12,f21,f22,fA,fB
9
10  ! 1st in x-direction
11  fA=f11*(x2-x)/(x2-x1)+f21*(x-x1)/(x2-x1)
12  fB=f12*(x2-x)/(x2-x1)+f22*(x-x1)/(x2-x1)
13
14  ! then in y-direction
15  f=fA*(y2-y)/(y2-y1)+fB*(y-y1)/(y2-y1)
16
17  return
18end subroutine bilinear
Note: See TracBrowser for help on using the repository browser.