[1403] | 1 | ! $Id: traceurpole.f90 5136 2024-07-28 14:17:54Z abarral $ |
---|
[5099] | 2 | |
---|
[5114] | 3 | SUBROUTINE traceurpole(q, masse) |
---|
| 4 | USE lmdz_description, ONLY: descript |
---|
[5134] | 5 | USE lmdz_comdissip, ONLY: coefdis, tetavel, tetatemp, gamdissip, niterdis |
---|
[5136] | 6 | USE lmdz_comgeom2 |
---|
[5134] | 7 | |
---|
[5114] | 8 | IMPLICIT NONE |
---|
[524] | 9 | |
---|
[5134] | 10 | INCLUDE "dimensions.h" |
---|
| 11 | INCLUDE "paramet.h" |
---|
[524] | 12 | |
---|
| 13 | |
---|
[5105] | 14 | ! Arguments |
---|
[5116] | 15 | INTEGER :: iq |
---|
| 16 | REAL :: masse(iip1, jjp1, llm) |
---|
| 17 | REAL :: q(iip1, jjp1, llm) |
---|
[524] | 18 | |
---|
| 19 | |
---|
[5105] | 20 | ! Locals |
---|
[5116] | 21 | INTEGER :: i, j, l |
---|
| 22 | REAL :: sommemassen(llm) |
---|
| 23 | REAL :: sommemqn(llm) |
---|
| 24 | REAL :: sommemasses(llm) |
---|
| 25 | REAL :: sommemqs(llm) |
---|
| 26 | REAL :: qpolen(llm), qpoles(llm) |
---|
[5105] | 27 | |
---|
| 28 | |
---|
| 29 | ! On impose une seule valeur au pôle Sud j=jjm+1=jjp1 |
---|
[5114] | 30 | sommemasses = 0 |
---|
| 31 | sommemqs = 0 |
---|
| 32 | do l = 1, llm |
---|
| 33 | do i = 1, iip1 |
---|
| 34 | sommemasses(l) = sommemasses(l) + masse(i, jjp1, l) |
---|
| 35 | sommemqs(l) = sommemqs(l) + masse(i, jjp1, l) * q(i, jjp1, l) |
---|
| 36 | enddo |
---|
| 37 | qpoles(l) = sommemqs(l) / sommemasses(l) |
---|
| 38 | enddo |
---|
[524] | 39 | |
---|
[5105] | 40 | ! On impose une seule valeur du traceur au pôle Nord j=1 |
---|
[5114] | 41 | sommemassen = 0 |
---|
| 42 | sommemqn = 0 |
---|
| 43 | do l = 1, llm |
---|
| 44 | do i = 1, iip1 |
---|
| 45 | sommemassen(l) = sommemassen(l) + masse(i, 1, l) |
---|
| 46 | sommemqn(l) = sommemqn(l) + masse(i, 1, l) * q(i, 1, l) |
---|
| 47 | enddo |
---|
| 48 | qpolen(l) = sommemqn(l) / sommemassen(l) |
---|
| 49 | enddo |
---|
[5105] | 50 | |
---|
| 51 | ! On force le traceur à prendre cette valeur aux pôles |
---|
[5114] | 52 | do l = 1, llm |
---|
| 53 | do i = 1, iip1 |
---|
| 54 | q(i, 1, l) = qpolen(l) |
---|
| 55 | q(i, jjp1, l) = qpoles(l) |
---|
[5105] | 56 | enddo |
---|
[5114] | 57 | enddo |
---|
[5105] | 58 | |
---|
[5116] | 59 | RETURN |
---|
| 60 | END SUBROUTINE traceurpole |
---|