6 |
|
|
7 |
function inter_barx(dlonid, fdat, rlonimod) |
function inter_barx(dlonid, fdat, rlonimod) |
8 |
|
|
9 |
! From dyn3d/inter_barx.F, version 1.1.1.1 2004/05/19 12:53:06 |
! From dyn3d/inter_barx.F, version 1.1.1.1, 2004/05/19 12:53:06 |
10 |
|
|
11 |
! Authors: Robert Sadourny, P. Le Van |
! Authors: Robert Sadourny, P. Le Van |
12 |
|
|
13 |
! INTERPOLATION BARYCENTRIQUE BASEE SUR LES AIRES |
! INTERPOLATION BARYCENTRIQUE BASEE SUR LES AIRES |
14 |
! VERSION UNIDIMENSIONNELLE, EN LONGITUDE . |
! VERSION UNIDIMENSIONNELLE, EN LONGITUDE . |
15 |
|
|
|
! idat : indice du champ de donnees, de 1 a idatmax |
|
|
! imod : indice du champ du modele, de 1 a imodmax |
|
|
! fdat(idat) : champ de donnees (entrees) |
|
|
! inter_barx(imod) : champ du modele (sorties) |
|
|
! dlonid(idat): abscisses des interfaces des mailles donnees |
|
|
! rlonimod(imod): abscisses des interfaces des mailles modele |
|
|
! (L'indice 1 correspond a l'interface mailLE 1 / maille 2) |
|
|
! (Les abscisses sont exprimées en degres) |
|
|
|
|
16 |
use nr_util, only: assert_eq, pi |
use nr_util, only: assert_eq, pi |
17 |
|
|
18 |
REAL, intent(in):: dlonid(:) |
REAL, intent(in):: dlonid(:) ! (idatmax) |
19 |
real, intent(in):: fdat(:) |
! abscisses des interfaces des mailles donnees |
20 |
real, intent(in):: rlonimod(:) |
|
21 |
|
real, intent(in):: fdat(:) ! (idatmax) champ de donnees |
22 |
real inter_barx(size(rlonimod)) |
|
23 |
|
real, intent(in):: rlonimod(:) ! (imodmax) |
24 |
|
! Abscisses des interfaces des mailles modele. L'indice 1 |
25 |
|
! correspond a l'interface mailLE 1 / maille 2. Les abscisses sont |
26 |
|
! exprim\'ees en degres. |
27 |
|
|
28 |
! Variables locales |
real inter_barx(size(rlonimod)) ! champ du modele |
29 |
|
|
30 |
|
! Local: |
31 |
INTEGER idatmax, imodmax |
INTEGER idatmax, imodmax |
32 |
REAL xxid(size(dlonid)+1), xxd(size(dlonid)+1), fdd(size(dlonid)+1) |
REAL xxid(size(dlonid)+1), xxd(size(dlonid)+1), fdd(size(dlonid)+1) |
33 |
REAL fxd(size(dlonid)+1), xchan(size(dlonid)+1), fdchan(size(dlonid)+1) |
REAL fxd(size(dlonid)+1), xchan(size(dlonid)+1), fdchan(size(dlonid)+1) |
34 |
REAL xxim(size(rlonimod)) |
REAL xxim(size(rlonimod)) |
|
|
|
35 |
REAL x0, xim0, dx, dxm |
REAL x0, xim0, dx, dxm |
36 |
REAL chmin, chmax |
REAL chmax |
37 |
|
integer idat ! indice du champ de donnees, de 1 a idatmax |
38 |
INTEGER imod, idat, i, ichang, id0, id1, nid, idatmax1 |
INTEGER imod ! indice du champ du modele, de 1 a imodmax |
39 |
|
integer i, ichang, id0, id1, nid, idatmax1 |
40 |
|
|
41 |
!----------------------------------------------------- |
!----------------------------------------------------- |
42 |
|
|
49 |
xxim(imod) = rlonimod(imod) |
xxim(imod) = rlonimod(imod) |
50 |
ENDDO |
ENDDO |
51 |
|
|
52 |
CALL minmax(imodmax, xxim, chmin, chmax) |
chmax = maxval(xxim) |
53 |
IF(chmax < 6.50) THEN |
IF(chmax < 6.50) THEN |
54 |
DO imod = 1, imodmax |
DO imod = 1, imodmax |
55 |
xxim(imod) = xxim(imod) * 180./pi |
xxim(imod) = xxim(imod) * 180./pi |
68 |
xxd(idat) = dlonid(idat) |
xxd(idat) = dlonid(idat) |
69 |
ENDDO |
ENDDO |
70 |
|
|
71 |
CALL minmax(idatmax, xxd, chmin, chmax) |
chmax = maxval(xxd(:idatmax)) |
72 |
IF(chmax < 6.50) THEN |
IF(chmax < 6.50) THEN |
73 |
DO idat = 1, idatmax |
DO idat = 1, idatmax |
74 |
xxd(idat) = xxd(idat) * 180./pi |
xxd(idat) = xxd(idat) * 180./pi |