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

Last change on this file since 5140 was 5136, checked in by abarral, 4 months ago

Put comgeom.h, comgeom2.h into modules

  • 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
RevLine 
[1403]1! $Id: traceurpole.f90 5136 2024-07-28 14:17:54Z abarral $
[5099]2
[5114]3SUBROUTINE 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
60END SUBROUTINE traceurpole
Note: See TracBrowser for help on using the repository browser.