1 |
guez |
3 |
module gath_cpl |
2 |
|
|
|
3 |
|
|
! From phylmd/interface_surf.F90,v 1.8 2005/05/25 13:10:09 |
4 |
|
|
|
5 |
|
|
implicit none |
6 |
|
|
|
7 |
|
|
contains |
8 |
|
|
|
9 |
|
|
SUBROUTINE gath2cpl(champ_in, champ_out, klon, knon, iim, jjm, knindex) |
10 |
|
|
|
11 |
|
|
! Cette routine ecrit un champ 'gathered' sur la grille 2D pour le passer |
12 |
|
|
! au coupleur. |
13 |
|
|
! |
14 |
|
|
! |
15 |
|
|
! input: |
16 |
|
|
! champ_in champ sur la grille gathere |
17 |
|
|
! knon nombre de points dans le domaine a traiter |
18 |
|
|
! knindex index des points de la surface a traiter |
19 |
|
|
! klon taille de la grille |
20 |
|
|
! iim,jjm dimension de la grille 2D |
21 |
|
|
! |
22 |
|
|
! output: |
23 |
|
|
! champ_out champ sur la grille 2D |
24 |
|
|
! |
25 |
|
|
! input |
26 |
|
|
integer :: klon, knon, iim, jjm |
27 |
|
|
real, dimension(klon) :: champ_in |
28 |
|
|
integer, dimension(klon) :: knindex |
29 |
|
|
! output |
30 |
|
|
real, dimension(iim,jjm+1) :: champ_out |
31 |
|
|
! local |
32 |
|
|
integer :: i, ig, j |
33 |
|
|
real, dimension(klon) :: tamp |
34 |
|
|
|
35 |
|
|
tamp = 0. |
36 |
|
|
do i = 1, knon |
37 |
|
|
ig = knindex(i) |
38 |
|
|
tamp(ig) = champ_in(i) |
39 |
|
|
enddo |
40 |
|
|
ig = 1 |
41 |
|
|
champ_out(:,1) = tamp(ig) |
42 |
|
|
do j = 2, jjm |
43 |
|
|
do i = 1, iim |
44 |
|
|
ig = ig + 1 |
45 |
|
|
champ_out(i,j) = tamp(ig) |
46 |
|
|
enddo |
47 |
|
|
enddo |
48 |
|
|
ig = ig + 1 |
49 |
|
|
champ_out(:,jjm+1) = tamp(ig) |
50 |
|
|
|
51 |
|
|
END SUBROUTINE gath2cpl |
52 |
|
|
|
53 |
|
|
end module gath_cpl |