Last change
on this file since 115 was
38,
checked in by emillour, 15 years ago
|
Ajout du modè Martien (mon LMDZ.MARS.BETA, du 28/01/2011) dans le rértoire mars, pour pouvoir suivre plus facilement les modifs.
EM
|
File size:
915 bytes
|
Rev | Line | |
---|
[38] | 1 | subroutine interpfast(escout,p,nlayer,escin,pin,nl,limdown,limup) |
---|
| 2 | C |
---|
| 3 | C subroutine to perform linear interpolation in pressure from 1D profile |
---|
| 4 | C escin(nl) sampled on pressure grid pin(nl) to profile |
---|
| 5 | C escout(nlayer) on pressure grid p(nlayer). |
---|
| 6 | C |
---|
| 7 | real escout(nlayer),p(nlayer) |
---|
| 8 | real escin(nl),pin(nl),wm,wp |
---|
| 9 | real limup,limdown |
---|
| 10 | integer nl,nlayer,n1,n,nm,np |
---|
| 11 | nm=1 |
---|
| 12 | do 5 n1=1,nlayer |
---|
| 13 | if(p(n1) .gt. limup .or. p(n1) .lt. limdown) then |
---|
| 14 | escout(n1) = 0.0 |
---|
| 15 | else |
---|
| 16 | do n = nm,nl-1 |
---|
| 17 | if (p(n1).ge.pin(n).and.p(n1).le.pin(n+1)) then |
---|
| 18 | nm=n |
---|
| 19 | np=n+1 |
---|
| 20 | wm=abs(pin(nm)-p(n1))/(pin(np)-pin(nm)) |
---|
| 21 | wp=1.0 - wm |
---|
| 22 | goto 33 |
---|
| 23 | endif |
---|
| 24 | enddo |
---|
| 25 | 33 escout(n1) = escin(np)*wm + escin(nm)*wp |
---|
| 26 | endif |
---|
| 27 | 5 continue |
---|
| 28 | return |
---|
| 29 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.