/[lmdze]/trunk/dyn3d/caldyn0.f
ViewVC logotype

Annotation of /trunk/dyn3d/caldyn0.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 259 - (hide annotations)
Tue Mar 6 16:19:52 2018 UTC (6 years, 4 months ago) by guez
File size: 2732 byte(s)
Try to clarify the logic. Remove module ener. Move variables from
module ener to module dynetat0_m, where they are defined in program
gcm. In sortvarc, I do not see how ptot0 could be 0, discard this possibility.

Remove dummy argument resetvarc of procedure sortvarc. The difference
is that sortvarc is called by caldyn or caldyn0 so just do different
processing in caldyn and caldyn0 instead of inside sortvarc.

No need for variables ang, etot, ptot, rmsdpdt, rmsv, stot, ztot to be
at module level in module sortvarc_m, downgrade them to arguments of
sortvarc. Instead of modyfying the meaning of ang, etot, ptot,
rmsdpdt, rmsv, stot, ztot from absolute quantities to variations of
these quantities, print the ratio in caldyn.

1 guez 23 module caldyn0_m
2 guez 3
3 guez 23 IMPLICIT NONE
4 guez 4
5 guez 23 contains
6 guez 3
7 guez 163 SUBROUTINE caldyn0(ucov, vcov, teta, ps, pk, phis, phi)
8 guez 3
9 guez 91 ! From dyn3d/caldyn0.F, version 1.1.1.1, 2004/05/19 12:53:07
10 guez 79 ! Authors: P. Le Van, F. Forget
11 guez 78 ! Objet : calcul des tendances dynamiques
12 guez 3
13 guez 104 use bernoui_m, only: bernoui
14 guez 252 USE comgeom, ONLY: airesurg_2d
15 guez 91 use convmas_m, only: convmas
16 guez 161 use covcont_m, only: covcont
17 guez 79 USE dimens_m, ONLY: iim, jjm, llm
18 guez 78 USE disvert_m, ONLY: ap, bp
19 guez 259 use dynetat0_m, only: ang0, etot0, ptot0, stot0, ztot0
20 guez 207 use enercin_m, only: enercin
21 guez 78 use flumass_m, only: flumass
22 guez 91 use massbar_m, only: massbar
23 guez 78 use massbarxy_m, only: massbarxy
24 guez 67 use massdair_m, only: massdair
25 guez 79 USE paramet_m, ONLY: iip1, ip1jmp1, jjp1, llmp1
26 guez 104 use sortvarc_m, only: sortvarc
27 guez 78 use tourpot_m, only: tourpot
28 guez 91 use vitvert_m, only: vitvert
29 guez 3
30 guez 79 REAL, INTENT(IN):: ucov(:, :, :) ! (iim + 1, jjm + 1, llm) vent covariant
31     REAL, INTENT(IN):: vcov(:, :, :) ! (iim + 1, jjm, llm) ! vent covariant
32 guez 73 REAL, INTENT(IN):: teta(ip1jmp1, llm)
33 guez 78 REAL, INTENT (IN):: ps(ip1jmp1)
34     REAL, INTENT (IN):: pk(iip1, jjp1, llm)
35     REAL, INTENT (IN):: phis(ip1jmp1)
36 guez 104 REAL, INTENT (IN):: phi(iim + 1, jjm + 1, llm)
37 guez 3
38 guez 78 ! Local:
39 guez 163 real masse(ip1jmp1, llm)
40     REAL w(iim + 1, jjm + 1, llm)
41     REAL pbaru(ip1jmp1, llm), pbarv((iim + 1) * jjm, llm)
42 guez 79 REAL vcont((iim + 1) * jjm, llm), ucont(ip1jmp1, llm)
43 guez 78 REAL p(ip1jmp1, llmp1)
44 guez 79 REAL massebx(ip1jmp1, llm), masseby((iim + 1) * jjm, llm)
45     REAL vorpot(iim + 1, jjm, llm)
46 guez 252 real ecin(iim + 1, jjm + 1, llm), convm(iim + 1, jjm + 1, llm)
47     REAL massebxy(iim + 1, jjm, llm), dp(iim + 1, jjm + 1)
48 guez 79 INTEGER l
49 guez 259 real ang, etot, ptot, ztot, stot, rmsdpdt, rmsv
50 guez 3
51 guez 23 !-----------------------------------------------------------------------
52 guez 3
53 guez 23 PRINT *, 'Call sequence information: caldyn0'
54 guez 3
55 guez 23 CALL covcont(llm, ucov, vcov, ucont, vcont)
56 guez 37 forall (l = 1: llm + 1) p(:, l) = ap(l) + bp(l) * ps
57 guez 23 CALL massdair(p, masse)
58     CALL massbar(masse, massebx, masseby)
59     CALL massbarxy(masse, massebxy)
60     CALL flumass(massebx, masseby, vcont, ucont, pbaru, pbarv)
61     CALL convmas(pbaru, pbarv, convm)
62 guez 252 dp = convm(:, :, 1) / airesurg_2d
63     w = vitvert(convm)
64 guez 23 CALL tourpot(vcov, ucov, massebxy, vorpot)
65     CALL enercin(vcov, ucov, vcont, ucont, ecin)
66 guez 133 CALL sortvarc(ucov, teta, ps, masse, pk, phis, vorpot, phi, &
67 guez 259 bernoui(phi, ecin), dp, ang, etot, ptot, ztot, stot, rmsdpdt, rmsv)
68     PRINT *, 'ptot = ', ptot
69     PRINT *, 'etot = ', etot
70     PRINT *, 'ztot = ', ztot
71     PRINT *, 'stot = ', stot
72     PRINT *, 'ang = ', ang
73     etot0 = etot
74     ptot0 = ptot
75     ztot0 = ztot
76     stot0 = stot
77     ang0 = ang
78 guez 23
79     END SUBROUTINE caldyn0
80    
81     end module caldyn0_m

  ViewVC Help
Powered by ViewVC 1.1.21