/[lmdze]/trunk/phylmd/calltherm.f
ViewVC logotype

Annotation of /trunk/phylmd/calltherm.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 91 - (hide annotations)
Wed Mar 26 17:18:58 2014 UTC (10 years, 1 month ago) by guez
File size: 3165 byte(s)
Removed unused variables lock_startdate and time_stamp of module
calendar.

Noticed that physiq does not change the surface pressure. So removed
arguments ps and dpfi of subroutine addfi. dpfi was always 0. The
computation of ps in addfi included some averaging at the poles. In
principle, this does not change ps but in practice it does because of
finite numerical precision. So the results of the simulation are
changed. Removed arguments ps and dpfi of calfis. Removed argument
d_ps of physiq.

du at the poles is not computed by dudv1, so declare only the
corresponding latitudes in dudv1. caldyn passes only a section of the
array dudyn as argument.

Removed variable niadv of module iniadvtrac_m.

Declared arguments of exner_hyb as assumed-shape arrays and made all
other horizontal sizes in exner_hyb dynamic. This allows the external
program test_disvert to use exner_hyb at a single horizontal position.

1 guez 52 module calltherm_m
2 guez 3
3 guez 52 implicit none
4 guez 3
5 guez 52 contains
6 guez 3
7 guez 52 subroutine calltherm(dtime, pplay, paprs, pphi, u_seri, v_seri, t_seri, &
8     q_seri, d_u_ajs, d_v_ajs, d_t_ajs, d_q_ajs, fm_therm, entr_therm)
9 guez 3
10 guez 52 ! From LMDZ4/libf/phylmd/calltherm.F, version 1.2 2004/12/10 11:27:46
11 guez 3
12 guez 52 USE dimphy, ONLY: klev, klon
13     USE ctherm, ONLY: l_mix_thermals, nsplit_thermals, r_aspect_thermals, &
14     tho_thermals, w2di_thermals
15 guez 54 use thermcell_m, only: thermcell
16 guez 3
17 guez 52 REAL, intent(in):: dtime
18 guez 3
19 guez 91 REAL, intent(inout):: u_seri(klon, klev), v_seri(klon, klev)
20 guez 52 REAL, intent(inout):: t_seri(klon, klev)
21     real q_seri(klon, klev)
22     REAL, intent(in):: paprs(klon, klev+1)
23     REAL, intent(in):: pplay(klon, klev)
24     REAL, intent(in):: pphi(klon, klev)
25 guez 3
26 guez 52 ! Update thermiques
27     REAL d_t_ajs(klon, klev), d_q_ajs(klon, klev)
28     REAL d_u_ajs(klon, klev), d_v_ajs(klon, klev)
29     real fm_therm(klon, klev+1), entr_therm(klon, klev)
30 guez 3
31 guez 52 ! Variables locales
32     REAL d_t_the(klon, klev), d_q_the(klon, klev)
33     REAL d_u_the(klon, klev), d_v_the(klon, klev)
34     !
35     real, save:: zfm_therm(klon, klev+1), zentr_therm(klon, klev)
36     real zdt
37 guez 3
38 guez 52 integer i, k, isplit
39 guez 3
40 guez 52 !----------------------------------------------------------------
41 guez 3
42 guez 52 ! Modele du thermique
43     print*, 'avant isplit ', nsplit_thermals
44 guez 3
45 guez 52 fm_therm=0.
46     entr_therm=0.
47 guez 3
48 guez 52 ! tests sur les valeurs negatives de l'eau
49     do k=1, klev
50     do i=1, klon
51     if (.not.q_seri(i, k).ge.0.) then
52     print*, 'WARN eau<0 avant therm i=', i, ' k=', k, ' dq, q', &
53     d_q_the(i, k), q_seri(i, k)
54     q_seri(i, k)=1.e-15
55     endif
56     enddo
57     enddo
58 guez 3
59 guez 52 zdt=dtime/float(nsplit_thermals)
60     do isplit = 1, nsplit_thermals
61     CALL thermcell(klon, klev, zdt, pplay, paprs, pphi, u_seri, v_seri, &
62     t_seri, q_seri, d_u_the, d_v_the, d_t_the, d_q_the, zfm_therm, &
63     zentr_therm, r_aspect_thermals, l_mix_thermals, w2di_thermals, &
64     tho_thermals)
65 guez 3
66 guez 52 ! transformation de la derivee en tendance
67     d_t_the=d_t_the*dtime/float(nsplit_thermals)
68     d_u_the=d_u_the*dtime/float(nsplit_thermals)
69     d_v_the=d_v_the*dtime/float(nsplit_thermals)
70     d_q_the=d_q_the*dtime/float(nsplit_thermals)
71     fm_therm=fm_therm +zfm_therm/float(nsplit_thermals)
72     entr_therm=entr_therm +zentr_therm/float(nsplit_thermals)
73     fm_therm(:, klev+1)=0.
74 guez 3
75 guez 52 ! accumulation de la tendance
76     d_t_ajs=d_t_ajs+d_t_the
77     d_u_ajs=d_u_ajs+d_u_the
78     d_v_ajs=d_v_ajs+d_v_the
79     d_q_ajs=d_q_ajs+d_q_the
80 guez 3
81 guez 52 ! incrementation des variables meteo
82     t_seri = t_seri + d_t_the
83     u_seri = u_seri + d_u_the
84     v_seri = v_seri + d_v_the
85     q_seri = q_seri + d_q_the
86 guez 3
87 guez 52 ! tests sur les valeurs negatives de l'eau
88     DO k = 1, klev
89     DO i = 1, klon
90     if (.not.q_seri(i, k).ge.0.) then
91     print*, 'WARN eau<0 apres therm i=', i, ' k=', k, ' dq, q', &
92     d_q_the(i, k), q_seri(i, k)
93     q_seri(i, k)=1.e-15
94     endif
95     ENDDO
96     ENDDO
97     enddo
98 guez 3
99 guez 52 end subroutine calltherm
100 guez 3
101 guez 52 end module calltherm_m

  ViewVC Help
Powered by ViewVC 1.1.21