source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/traceurpole.f90 @ 5122

Last change on this file since 5122 was 5116, checked in by abarral, 4 months ago

rename modules properly lmdz_*
move ismin, ismax, minmax into new lmdz_libmath.f90
(lint) uppercase fortran keywords

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1! $Id: traceurpole.f90 5116 2024-07-24 12:54:37Z abarral $
2
3SUBROUTINE traceurpole(q, masse)
4  USE lmdz_description, ONLY: descript
5  IMPLICIT NONE
6
7  include "dimensions.h"
8  include "paramet.h"
9  include "comdissip.h"
10  include "comgeom2.h"
11
12
13  !   Arguments
14  INTEGER :: iq
15  REAL :: masse(iip1, jjp1, llm)
16  REAL :: q(iip1, jjp1, llm)
17
18
19  !   Locals
20  INTEGER :: i, j, l
21  REAL :: sommemassen(llm)
22  REAL :: sommemqn(llm)
23  REAL :: sommemasses(llm)
24  REAL :: sommemqs(llm)
25  REAL :: qpolen(llm), qpoles(llm)
26
27
28  ! On impose une seule valeur au pôle Sud j=jjm+1=jjp1
29  sommemasses = 0
30  sommemqs = 0
31  do l = 1, llm
32    do i = 1, iip1
33      sommemasses(l) = sommemasses(l) + masse(i, jjp1, l)
34      sommemqs(l) = sommemqs(l) + masse(i, jjp1, l) * q(i, jjp1, l)
35    enddo
36    qpoles(l) = sommemqs(l) / sommemasses(l)
37  enddo
38
39  ! On impose une seule valeur du traceur au pôle Nord j=1
40  sommemassen = 0
41  sommemqn = 0
42  do l = 1, llm
43    do i = 1, iip1
44      sommemassen(l) = sommemassen(l) + masse(i, 1, l)
45      sommemqn(l) = sommemqn(l) + masse(i, 1, l) * q(i, 1, l)
46    enddo
47    qpolen(l) = sommemqn(l) / sommemassen(l)
48  enddo
49
50  ! On force le traceur à prendre cette valeur aux pôles
51  do l = 1, llm
52    do i = 1, iip1
53      q(i, 1, l) = qpolen(l)
54      q(i, jjp1, l) = qpoles(l)
55    enddo
56  enddo
57
58  RETURN
59END SUBROUTINE traceurpole
Note: See TracBrowser for help on using the repository browser.