source: LMDZ4/trunk/libf/phylmd/calltherm.F @ 559

Last change on this file since 559 was 541, checked in by lmdzadmin, 20 years ago

Convergence avec la version d'Olivia Coindreau incluant:

  • le offline
  • les thermiques
  • mellor & yamada dans la couche limite

LF

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1!
2! $Header$
3!
4      subroutine calltherm(dtime
5     s      ,pplay,paprs,pphi
6     s      ,u_seri,v_seri,t_seri,q_seri
7     s      ,d_u_ajs,d_v_ajs,d_t_ajs,d_q_ajs
8     s      ,fm_therm,entr_therm)
9
10      implicit none
11#include "dimensions.h"
12#include "dimphy.h"
13#include "thermcell.h"
14
15c  A inclure eventuellement dans les fichiers de configuration
16      data r_aspect_thermals,l_mix_thermals,tho_thermals/4.,10.,0./
17      data w2di_thermals/0/
18
19      REAL dtime
20
21      REAL u_seri(klon,klev),v_seri(klon,klev)
22      REAL t_seri(klon,klev),q_seri(klon,klev)
23      REAL paprs(klon,klev+1)
24      REAL pplay(klon,klev)
25      REAL pphi(klon,klev)
26
27CFH Update Thermiques
28      REAL d_t_ajs(klon,klev), d_q_ajs(klon,klev)
29      REAL d_u_ajs(klon,klev),d_v_ajs(klon,klev)
30      real fm_therm(klon,klev+1),entr_therm(klon,klev)
31
32
33c variables locales
34      REAL d_t_the(klon,klev), d_q_the(klon,klev)
35      REAL d_u_the(klon,klev),d_v_the(klon,klev)
36c
37      real zfm_therm(klon,klev+1),zentr_therm(klon,klev),zdt
38      save zentr_therm,zfm_therm
39
40      integer i,k
41
42*********************************************************
43
44c  Modele du thermique
45c  ===================
46c         print*,'thermiques: WARNING on passe t au lieu de t_seri'
47       print*,'avant isplit ',nsplit_thermals
48
49
50         fm_therm(:,:)=0.
51         entr_therm(:,:)=0.
52
53c   tests sur les valeurs negatives de l'eau
54         do k=1,klev
55            do i=1,klon
56               if (.not.q_seri(i,k).ge.0.) then
57                   print*,'WARN eau<0 avant therm i=',i,'  k=',k
58     s         ,' dq,q',d_q_the(i,k),q_seri(i,k)
59                  q_seri(i,k)=1.e-15
60               endif
61            enddo
62         enddo
63
64
65         zdt=dtime/float(nsplit_thermals)
66         do isplit=1,nsplit_thermals
67
68            CALL thermcell(klon,klev,zdt
69     s      ,pplay,paprs,pphi
70     s      ,u_seri,v_seri,t_seri,q_seri
71     s      ,d_u_the,d_v_the,d_t_the,d_q_the
72     s      ,zfm_therm,zentr_therm
73     s      ,r_aspect_thermals,l_mix_thermals,w2di_thermals
74     s      ,tho_thermals,3)
75
76c  transformation de la derivee en tendance
77            d_t_the(:,:)=d_t_the(:,:)*dtime/float(nsplit_thermals)
78            d_u_the(:,:)=d_u_the(:,:)*dtime/float(nsplit_thermals)
79            d_v_the(:,:)=d_v_the(:,:)*dtime/float(nsplit_thermals)
80            d_q_the(:,:)=d_q_the(:,:)*dtime/float(nsplit_thermals)
81            fm_therm(:,:)=fm_therm(:,:)
82     s      +zfm_therm(:,:)/float(nsplit_thermals)
83            entr_therm(:,:)=entr_therm(:,:)
84     s       +zentr_therm(:,:)/float(nsplit_thermals)
85            fm_therm(:,klev+1)=0.
86
87
88
89c  accumulation de la tendance
90            d_t_ajs(:,:)=d_t_ajs(:,:)+d_t_the(:,:)
91            d_u_ajs(:,:)=d_u_ajs(:,:)+d_u_the(:,:)
92            d_v_ajs(:,:)=d_v_ajs(:,:)+d_v_the(:,:)
93            d_q_ajs(:,:)=d_q_ajs(:,:)+d_q_the(:,:)
94
95c  incrementation des variables meteo
96            t_seri(:,:) = t_seri(:,:) + d_t_the(:,:)
97            u_seri(:,:) = u_seri(:,:) + d_u_the(:,:)
98            v_seri(:,:) = v_seri(:,:) + d_v_the(:,:)
99            q_seri(:,:) = q_seri(:,:) + d_q_the(:,:)
100
101c   tests sur les valeurs negatives de l'eau
102            DO k = 1, klev
103            DO i = 1, klon
104               if (.not.q_seri(i,k).ge.0.) then
105                   print*,'WARN eau<0 apres therm i=',i,'  k=',k
106     s         ,' dq,q',d_q_the(i,k),q_seri(i,k)
107                  q_seri(i,k)=1.e-15
108               endif
109            ENDDO
110            ENDDO
111
112         enddo ! isplit
113
114      return
115
116      end
Note: See TracBrowser for help on using the repository browser.