source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/massdair.f90 @ 5214

Last change on this file since 5214 was 5159, checked in by abarral, 7 weeks ago

Put dimensions.h and paramet.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: 2.9 KB
RevLine 
[5099]1
[524]2! $Header$
[5099]3
[5105]4SUBROUTINE massdair( p, masse )
[5159]5
[5105]6  ! *********************************************************************
7  !   ....  Calcule la masse d'air  dans chaque maille   ....
8  ! *********************************************************************
[5159]9
[5105]10  !    Auteurs : P. Le Van , Fr. Hourdin  .
11  !   ..........
[5159]12
[5105]13  !  ..    p                      est  un argum. d'entree pour le s-pg ...
14  !  ..  masse                    est un  argum.de sortie pour le s-pg ...
[5159]15
[5105]16  !  ....  p est defini aux interfaces des llm couches   .....
[5159]17
[5136]18  USE lmdz_comgeom
19
[5159]20USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
21  USE lmdz_paramet
[5105]22  IMPLICIT NONE
23  !
[5159]24
25
26
[5105]27  !  .....   arguments  ....
[5159]28
[5105]29  REAL :: p(ip1jmp1,llmp1), masse(ip1jmp1,llm)
[524]30
[5105]31  !   ....  Variables locales  .....
[524]32
[5105]33  INTEGER :: l,ij
34  REAL :: massemoyn, massemoys
[524]35
[5159]36
37
[5105]38  !   Methode pour calculer massebx et masseby .
39  !   ----------------------------------------
[5159]40
[5105]41  !    A chaque point scalaire P (i,j) est affecte 4 coefficients d'aires
42  !   alpha1(i,j)  calcule  au point ( i+1/4,j-1/4 )
43  !   alpha2(i,j)  calcule  au point ( i+1/4,j+1/4 )
44  !   alpha3(i,j)  calcule  au point ( i-1/4,j+1/4 )
45  !   alpha4(i,j)  calcule  au point ( i-1/4,j-1/4 )
[5159]46
[5105]47  !    Avec  alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j)
[5159]48
[5105]49  !    N.B .  Pour plus de details, voir s-pg  ...  iniconst ...
[5159]50
51
52
[5105]53  !   alpha4 .         . alpha1    . alpha4
54  !    (i,j)             (i,j)       (i+1,j)
[5159]55
[5105]56  !         P .        U .          . P
57  !       (i,j)       (i,j)         (i+1,j)
[5159]58
[5105]59  !   alpha3 .         . alpha2    .alpha3
60  !    (i,j)              (i,j)     (i+1,j)
[5159]61
[5105]62  !         V .        Z .          . V
63  !       (i,j)
[5159]64
[5105]65  !   alpha4 .         . alpha1    .alpha4
66  !   (i,j+1)            (i,j+1)   (i+1,j+1)
[5159]67
[5105]68  !         P .        U .          . P
69  !      (i,j+1)                    (i+1,j+1)
[5159]70
71
72
[5105]73  !                   On  a :
[5159]74
[5105]75  !    massebx(i,j) = masse(i  ,j) * ( alpha1(i  ,j) + alpha2(i,j))   +
76  !               masse(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) )
77  ! localise  au point  ... U (i,j) ...
[5159]78
[5105]79  !    masseby(i,j) = masse(i,j  ) * ( alpha2(i,j  ) + alpha3(i,j  )  +
80  !               masse(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1)
81  ! localise  au point  ... V (i,j) ...
[5159]82
83
[5105]84  !=======================================================================
[524]85
[5105]86  DO   l = 1 , llm
[5159]87
[5105]88    DO    ij     = 1, ip1jmp1
89     masse(ij,l) = airesurg(ij) * ( p(ij,l) - p(ij,l+1) )
90    ENDDO
[5159]91
[5105]92    DO   ij = 1, ip1jmp1,iip1
93     masse(ij+ iim,l) = masse(ij,l)
94    ENDDO
[5159]95
[5105]96  !   DO    ij     = 1,  iim
97  !    masse(   ij   ,l) = masse(   ij   ,l) * aire(  ij    )
98  !    masse(ij+ip1jm,l) = masse(ij+ip1jm,l) * aire(ij+ip1jm)
99  !   ENDDO
100  !    massemoyn         = SSUM(iim,masse(   1   ,l),1)/ apoln
101  !    massemoys         = SSUM(iim,masse(ip1jm+1,l),1)/ apols
102  !   DO    ij     = 1, iip1
103  !    masse(   ij   ,l )    = massemoyn
104  !    masse(ij+ip1jm,l )    = massemoys
105  !   ENDDO
106
107  END DO
[5159]108
[5105]109  RETURN
110END SUBROUTINE massdair
Note: See TracBrowser for help on using the repository browser.