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

Contents of /trunk/dyn3d/caldyn0.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 104 - (show annotations)
Thu Sep 4 10:05:52 2014 UTC (9 years, 8 months ago) by guez
File size: 2428 byte(s)
Removed procedure sortvarc0. Called sortvarc with an additional
argument resetvarc instead. (Following LMDZ.) Moved current time
computations and some printing statements from sortvarc to
caldyn. Could then remove arguments itau and time_0 of sortvarc, and
could remove "use dynetat0". Better to keep "dynetat0.f" as a gcm-only
file.

Moved some variables from module ener to module sortvarc.

Split file "mathelp.f" into single-procedure files.

Removed unused argument nadv of adaptdt. Removed dimension arguments
of bernoui.

Removed unused argument nisurf of interfoce_lim. Changed the size of
argument lmt_sst of interfoce_lim from klon to knon. Removed case when
newlmt is false.

dynredem1 is called only once in each run, either ce0l or gcm. So
variable nb in call to nf95_put_var was always 1. Removed variable nb.

Removed dimension arguments of calcul_fluxs. Removed unused arguments
precip_rain, precip_snow, snow of calcul_fluxs. Changed the size of
all the arrays in calcul_fluxs from klon to knon.

Removed dimension arguments of fonte_neige. Changed the size of all
the arrays in fonte_neige from klon to knon.

Changed the size of arguments tsurf and tsurf_new of interfsurf_hq
from klon to knon. Changed the size of argument ptsrf of soil from
klon to knon.

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

  ViewVC Help
Powered by ViewVC 1.1.21