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

Last change on this file since 5115 was 5114, checked in by abarral, 4 months ago

Rename modules in misc from *_mod > lmdz_*
Turn description.h into lmdz_description.f90

  • 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 5114 2024-07-24 11:27:51Z 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.