10 |
|
|
11 |
! Authors: Robert Sadourny, P. Le Van |
! Authors: Robert Sadourny, P. Le Van |
12 |
|
|
13 |
! INTERPOLATION BARYCENTRIQUE BASEE SUR LES AIRES |
! Interpolation barycentrique bas\'ee sur les aires. Version |
14 |
! VERSION UNIDIMENSIONNELLE, EN LONGITUDE . |
! unidimensionnelle, en longitude. |
15 |
|
|
16 |
use nr_util, only: assert_eq, pi |
use nr_util, only: assert_eq, pi |
17 |
|
|
18 |
REAL, intent(in):: dlonid(:) ! (idatmax) |
REAL, intent(in):: dlonid(:) ! (idatmax) |
19 |
! abscisses des interfaces des mailles donnees |
! abscisses des interfaces des mailles donn\'ees |
20 |
|
|
21 |
real, intent(in):: fdat(:) ! (idatmax) champ de donnees |
real, intent(in):: fdat(:) ! (idatmax) champ de donn\'ees |
22 |
|
|
23 |
real, intent(in):: rlonimod(:) ! (imodmax) |
real, intent(in):: rlonimod(:) ! (imodmax) |
24 |
! Abscisses des interfaces des mailles modele. L'indice 1 |
! Abscisses des interfaces des mailles mod\`ele. L'indice 1 |
25 |
! correspond a l'interface mailLE 1 / maille 2. Les abscisses sont |
! correspond a l'interface maille 1 / maille 2. Les abscisses sont |
26 |
! exprim\'ees en degres. |
! exprim\'ees en degres. |
27 |
|
|
28 |
real inter_barx(size(rlonimod)) ! champ du modele |
real inter_barx(size(rlonimod)) ! champ du mod\`ele |
29 |
|
|
30 |
! Local: |
! Local: |
31 |
INTEGER idatmax, imodmax |
INTEGER idatmax, imodmax |
43 |
idatmax = assert_eq(size(dlonid), size(fdat), "inter_barx idatmax") |
idatmax = assert_eq(size(dlonid), size(fdat), "inter_barx idatmax") |
44 |
imodmax = size(rlonimod) |
imodmax = size(rlonimod) |
45 |
|
|
46 |
! REDEFINITION DE L'ORIGINE DES ABSCISSES |
! Red\'efinition de l'origine des abscisses \`a l'interface ouest de |
47 |
! A L'INTERFACE OUEST DE LA PREMIERE MAILLE DU MODELE |
! la premi\`ere maille du mod\`ele |
48 |
DO imod = 1, imodmax |
DO imod = 1, imodmax |
49 |
xxim(imod) = rlonimod(imod) |
xxim(imod) = rlonimod(imod) |
50 |
ENDDO |
ENDDO |
86 |
ENDDO |
ENDDO |
87 |
IF (xxd(i) < xxd(i-1)) THEN |
IF (xxd(i) < xxd(i-1)) THEN |
88 |
ichang = i |
ichang = i |
89 |
! *** reorganisation des longitudes entre 0. et 360. degres **** |
! R\'eorganisation des longitudes entre 0 et 360 degr\'es |
90 |
nid = idatmax - ichang +1 |
nid = idatmax - ichang +1 |
91 |
DO i = 1, nid |
DO i = 1, nid |
92 |
xchan (i) = xxd(i+ichang -1) |
xchan (i) = xxd(i+ichang -1) |
102 |
ENDDO |
ENDDO |
103 |
end IF |
end IF |
104 |
|
|
105 |
! translation des champs de donnees par rapport |
! Translation des champs de donn\'ees par rapport \`a la nouvelle |
106 |
! a la nouvelle origine, avec redondance de la |
! origine, avec redondance de la maille \`a cheval sur les bords |
|
! maille a cheval sur les bords |
|
107 |
|
|
108 |
id0 = 0 |
id0 = 0 |
109 |
id1 = 0 |
id1 = 0 |
148 |
xxid(idatmax1) = xxid(1) + 360. |
xxid(idatmax1) = xxid(1) + 360. |
149 |
fxd (idatmax1) = fxd(1) |
fxd (idatmax1) = fxd(1) |
150 |
|
|
151 |
! initialisation du champ du modele |
! Initialisation du champ du mod\`ele |
152 |
|
|
153 |
inter_barx(:) = 0. |
inter_barx(:) = 0. |
154 |
|
|
155 |
! iteration |
! Iteration |
156 |
|
|
157 |
x0 = xim0 |
x0 = xim0 |
158 |
dxm = 0. |
dxm = 0. |