LMDZ
dissip.F
Go to the documentation of this file.
1 !
2 ! $Id: dissip.F 1987 2014-02-24 15:05:47Z emillour $
3 !
4  SUBROUTINE dissip( vcov,ucov,teta,p, dv,du,dh )
5 c
6  IMPLICIT NONE
7 
8 
9 c .. Avec nouveaux operateurs star : gradiv2 , divgrad2, nxgraro2 ...
10 c ( 10/01/98 )
11 
12 c=======================================================================
13 c
14 c Auteur: P. Le Van
15 c -------
16 c
17 c Objet:
18 c ------
19 c
20 c Dissipation horizontale
21 c
22 c=======================================================================
23 c-----------------------------------------------------------------------
24 c Declarations:
25 c -------------
26 
27 #include "dimensions.h"
28 #include "paramet.h"
29 #include "comconst.h"
30 #include "comgeom.h"
31 #include "comdissnew.h"
32 #include "comdissipn.h"
33 
34 c Arguments:
35 c ----------
36 
37  REAL,INTENT(IN) :: vcov(ip1jm,llm) ! covariant meridional wind
38  REAL,INTENT(IN) :: ucov(ip1jmp1,llm) ! covariant zonal wind
39  REAL,INTENT(IN) :: teta(ip1jmp1,llm) ! potential temperature
40  REAL,INTENT(IN) :: p(ip1jmp1,llmp1) ! pressure
41  ! tendencies (.../s) on covariant winds and potential temperature
42  REAL,INTENT(OUT) :: dv(ip1jm,llm)
43  REAL,INTENT(OUT) :: du(ip1jmp1,llm)
44  REAL,INTENT(OUT) :: dh(ip1jmp1,llm)
45 
46 c Local:
47 c ------
48 
49  REAL gdx(ip1jmp1,llm),gdy(ip1jm,llm)
50  REAL grx(ip1jmp1,llm),gry(ip1jm,llm)
51  REAL te1dt(llm),te2dt(llm),te3dt(llm)
52  REAL deltapres(ip1jmp1,llm)
53 
54  INTEGER l,ij
55 
56  REAL SSUM
57 
58 c-----------------------------------------------------------------------
59 c initialisations:
60 c ----------------
61 
62  DO l=1,llm
63  te1dt(l) = tetaudiv(l) * dtdiss
64  te2dt(l) = tetaurot(l) * dtdiss
65  te3dt(l) = tetah(l) * dtdiss
66  ENDDO
67  du=0.
68  dv=0.
69  dh=0.
70 
71 c-----------------------------------------------------------------------
72 c Calcul de la dissipation:
73 c -------------------------
74 
75 c Calcul de la partie grad ( div ) :
76 c -------------------------------------
77 
78 
79  IF(lstardis) THEN
80  CALL gradiv2( llm,ucov,vcov,nitergdiv,gdx,gdy )
81  ELSE
82  CALL gradiv ( llm,ucov,vcov,nitergdiv,gdx,gdy )
83  ENDIF
84 
85  DO l=1,llm
86 
87  DO ij = 1, iip1
88  gdx( ij ,l) = 0.
89  gdx(ij+ip1jm,l) = 0.
90  ENDDO
91 
92  DO ij = iip2,ip1jm
93  du(ij,l) = du(ij,l) - te1dt(l) *gdx(ij,l)
94  ENDDO
95  DO ij = 1,ip1jm
96  dv(ij,l) = dv(ij,l) - te1dt(l) *gdy(ij,l)
97  ENDDO
98 
99  ENDDO
100 
101 c calcul de la partie n X grad ( rot ):
102 c ---------------------------------------
103 
104  IF(lstardis) THEN
105  CALL nxgraro2( llm,ucov, vcov, nitergrot,grx,gry )
106  ELSE
107  CALL nxgrarot( llm,ucov, vcov, nitergrot,grx,gry )
108  ENDIF
109 
110 
111  DO l=1,llm
112  DO ij = 1, iip1
113  grx(ij,l) = 0.
114  ENDDO
115 
116  DO ij = iip2,ip1jm
117  du(ij,l) = du(ij,l) - te2dt(l) * grx(ij,l)
118  ENDDO
119  DO ij = 1, ip1jm
120  dv(ij,l) = dv(ij,l) - te2dt(l) * gry(ij,l)
121  ENDDO
122  ENDDO
123 
124 c calcul de la partie div ( grad ):
125 c -----------------------------------
126 
127 
128  IF(lstardis) THEN
129 
130  DO l = 1, llm
131  DO ij = 1, ip1jmp1
132  deltapres(ij,l) = amax1( 0., p(ij,l) - p(ij,l+1) )
133  ENDDO
134  ENDDO
135 
136  CALL divgrad2( llm,teta, deltapres ,niterh, gdx )
137  ELSE
138  CALL divgrad ( llm,teta, niterh, gdx )
139  ENDIF
140 
141  DO l = 1,llm
142  DO ij = 1,ip1jmp1
143  dh( ij,l ) = dh( ij,l ) - te3dt(l) * gdx( ij,l )
144  ENDDO
145  ENDDO
146 
147  RETURN
148  END
!$Id mode_top_bound COMMON comconstr dtdiss
Definition: comconst.h:7
!$Header iip2
Definition: paramet.h:14
!$Header llmm1 INTEGER ip1jmp1
Definition: paramet.h:14
subroutine divgrad2(klevel, h, deltapres, lh, divgra)
Definition: divgrad2.F:5
!$Header cdivh!COMMON comdissipn tetaudiv(llm)
!$Header llmp1
Definition: paramet.h:14
!$Id nitergdiv
Definition: comdissnew.h:13
!$Id Turb_fcg_gcssold get_uvd hqturb_gcssold endif!large scale llm day day1 day day1 *dt_toga endif!time annee_ref dt_toga u_toga vq_toga w_prof vq_prof llm day day1 day day1 *dt_dice endif!time annee_ref dt_dice swup_dice vg_dice omega_dice tg_prof vg_profd w_profd omega_profd!do llm!print llm l llm
subroutine nxgraro2(klevel, xcov, ycov, lr, grx, gry)
Definition: nxgraro2.F:5
!$Id nitergrot
Definition: comdissnew.h:13
!$Header llmm1 INTEGER ip1jm
Definition: paramet.h:14
subroutine dissip(vcov, ucov, teta, p, dv, du, dh)
Definition: dissip.F:5
subroutine divgrad(klevel, h, lh, divgra)
Definition: divgrad.F:5
subroutine gradiv(klevel, xcov, ycov, ld, gdx, gdy)
Definition: gradiv.F:5
subroutine nxgrarot(klevel, xcov, ycov, lr, grx, gry)
Definition: nxgrarot.F:5
!$Header tetaurot
Definition: comdissipn.h:11
!$Id niterh
Definition: comdissnew.h:13
!$Header tetah
Definition: comdissipn.h:11
subroutine gradiv2(klevel, xcov, ycov, ld, gdx, gdy)
Definition: gradiv2.F:5