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