source: LMDZ5/trunk/libf/dyn3dpar/interpre.F @ 1907

Last change on this file since 1907 was 1907, checked in by lguez, 10 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
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

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • 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: 3.6 KB
Line 
1!
2! $Id: interpre.F 1907 2013-11-26 13:10:46Z lguez $
3!
4       subroutine interpre(q,qppm,w,fluxwppm,masse,
5     s            apppm,bpppm,massebx,masseby,pbaru,pbarv,
6     s            unatppm,vnatppm,psppm)
7
8      USE control_mod
9      implicit none
10
11#include "dimensions.h"
12c#include "paramr2.h"
13#include "paramet.h"
14#include "comconst.h"
15#include "comdissip.h"
16#include "comvert.h"
17#include "comgeom2.h"
18#include "logic.h"
19#include "temps.h"
20#include "ener.h"
21#include "description.h"
22
23c---------------------------------------------------
24c Arguments     
25      real   apppm(llm+1),bpppm(llm+1)
26      real   q(iip1,jjp1,llm),qppm(iim,jjp1,llm)
27c---------------------------------------------------
28      real   masse(iip1,jjp1,llm)
29      real   massebx(iip1,jjp1,llm),masseby(iip1,jjm,llm)     
30      real   w(iip1,jjp1,llm+1)
31      real   fluxwppm(iim,jjp1,llm)
32      real   pbaru(iip1,jjp1,llm )
33      real   pbarv(iip1,jjm,llm)
34      real   unatppm(iim,jjp1,llm)
35      real   vnatppm(iim,jjp1,llm)
36      real   psppm(iim,jjp1)
37c---------------------------------------------------
38c Local
39      real   vnat(iip1,jjp1,llm)
40      real   unat(iip1,jjp1,llm)
41      real   fluxw(iip1,jjp1,llm)
42      real   smass(iip1,jjp1)
43c----------------------------------------------------
44      integer l,ij,i,j
45
46c       CALCUL DE LA PRESSION DE SURFACE
47c       Les coefficients ap et bp sont passés en common
48c       Calcul de la pression au sol en mb optimisée pour
49c       la vectorialisation
50                   
51         do j=1,jjp1
52             do i=1,iip1
53                smass(i,j)=0.
54             enddo
55         enddo
56
57         do l=1,llm
58             do j=1,jjp1
59                 do i=1,iip1
60                    smass(i,j)=smass(i,j)+masse(i,j,l)
61                 enddo
62             enddo
63         enddo
64     
65         do j=1,jjp1
66             do i=1,iim
67                 psppm(i,j)=smass(i,j)/aire(i,j)*g*0.01
68             end do
69         end do                       
70       
71c RECONSTRUCTION DES CHAMPS CONTRAVARIANTS
72c Le programme ppm3d travaille avec les composantes
73c de vitesse et pas les flux, on doit donc passer de l'un à l'autre
74c Dans le même temps, on fait le changement d'orientation du vent en v
75      do l=1,llm
76          do j=1,jjm
77              do i=1,iip1
78                  vnat(i,j,l)=-pbarv(i,j,l)/masseby(i,j,l)*cv(i,j)             
79              enddo
80          enddo
81          do  i=1,iim
82          vnat(i,jjp1,l)=0.
83          enddo
84          do j=1,jjp1
85              do i=1,iip1
86                  unat(i,j,l)=pbaru(i,j,l)/massebx(i,j,l)*cu(i,j)
87              enddo
88          enddo
89      enddo
90             
91c CALCUL DU FLUX MASSIQUE VERTICAL
92c Flux en l=1 (sol) nul
93      fluxw=0.       
94      do l=1,llm
95           do j=1,jjp1
96              do i=1,iip1             
97               fluxw(i,j,l)=w(i,j,l)*g*0.01/aire(i,j)
98C               print*,i,j,l,'fluxw(i,j,l)=',fluxw(i,j,l),
99C     c                      'w(i,j,l)=',w(i,j,l)
100              enddo
101           enddo
102      enddo
103     
104c INVERSION DES NIVEAUX
105c le programme ppm3d travaille avec une 3ème coordonnée inversée par rapport
106c de celle du LMDZ: z=1<=>niveau max, z=llm+1<=>surface
107c On passe donc des niveaux du LMDZ à ceux de Lin
108     
109      do l=1,llm+1
110          apppm(l)=ap(llm+2-l)
111          bpppm(l)=bp(llm+2-l)         
112      enddo
113     
114      do l=1,llm
115          do j=1,jjp1
116             do i=1,iim     
117                 unatppm(i,j,l)=unat(i,j,llm-l+1)
118                 vnatppm(i,j,l)=vnat(i,j,llm-l+1)
119                 fluxwppm(i,j,l)=fluxw(i,j,llm-l+1)
120                 qppm(i,j,l)=q(i,j,llm-l+1)                             
121             enddo
122          enddo                               
123      enddo
124   
125      return
126      end
127
128
129
130
131
132
Note: See TracBrowser for help on using the repository browser.