[541] | 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 | |
---|
| 15 | c 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 | |
---|
| 27 | CFH 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 | |
---|
| 33 | c 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) |
---|
| 36 | c |
---|
| 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 | |
---|
| 44 | c Modele du thermique |
---|
| 45 | c =================== |
---|
| 46 | c 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 | |
---|
| 53 | c 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 | |
---|
[566] | 68 | cym CALL thermcell(klon,klev,zdt |
---|
| 69 | cym s ,pplay,paprs,pphi |
---|
| 70 | cym s ,u_seri,v_seri,t_seri,q_seri |
---|
| 71 | cym s ,d_u_the,d_v_the,d_t_the,d_q_the |
---|
| 72 | cym s ,zfm_therm,zentr_therm |
---|
| 73 | cym s ,r_aspect_thermals,l_mix_thermals,w2di_thermals |
---|
| 74 | cym s ,tho_thermals,3) |
---|
| 75 | |
---|
[541] | 76 | CALL thermcell(klon,klev,zdt |
---|
| 77 | s ,pplay,paprs,pphi |
---|
| 78 | s ,u_seri,v_seri,t_seri,q_seri |
---|
| 79 | s ,d_u_the,d_v_the,d_t_the,d_q_the |
---|
| 80 | s ,zfm_therm,zentr_therm |
---|
| 81 | s ,r_aspect_thermals,l_mix_thermals,w2di_thermals |
---|
[566] | 82 | s ,tho_thermals) |
---|
[541] | 83 | |
---|
| 84 | c transformation de la derivee en tendance |
---|
| 85 | d_t_the(:,:)=d_t_the(:,:)*dtime/float(nsplit_thermals) |
---|
| 86 | d_u_the(:,:)=d_u_the(:,:)*dtime/float(nsplit_thermals) |
---|
| 87 | d_v_the(:,:)=d_v_the(:,:)*dtime/float(nsplit_thermals) |
---|
| 88 | d_q_the(:,:)=d_q_the(:,:)*dtime/float(nsplit_thermals) |
---|
| 89 | fm_therm(:,:)=fm_therm(:,:) |
---|
| 90 | s +zfm_therm(:,:)/float(nsplit_thermals) |
---|
| 91 | entr_therm(:,:)=entr_therm(:,:) |
---|
| 92 | s +zentr_therm(:,:)/float(nsplit_thermals) |
---|
| 93 | fm_therm(:,klev+1)=0. |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | c accumulation de la tendance |
---|
| 98 | d_t_ajs(:,:)=d_t_ajs(:,:)+d_t_the(:,:) |
---|
| 99 | d_u_ajs(:,:)=d_u_ajs(:,:)+d_u_the(:,:) |
---|
| 100 | d_v_ajs(:,:)=d_v_ajs(:,:)+d_v_the(:,:) |
---|
| 101 | d_q_ajs(:,:)=d_q_ajs(:,:)+d_q_the(:,:) |
---|
| 102 | |
---|
| 103 | c incrementation des variables meteo |
---|
| 104 | t_seri(:,:) = t_seri(:,:) + d_t_the(:,:) |
---|
| 105 | u_seri(:,:) = u_seri(:,:) + d_u_the(:,:) |
---|
| 106 | v_seri(:,:) = v_seri(:,:) + d_v_the(:,:) |
---|
| 107 | q_seri(:,:) = q_seri(:,:) + d_q_the(:,:) |
---|
| 108 | |
---|
| 109 | c tests sur les valeurs negatives de l'eau |
---|
| 110 | DO k = 1, klev |
---|
| 111 | DO i = 1, klon |
---|
| 112 | if (.not.q_seri(i,k).ge.0.) then |
---|
| 113 | print*,'WARN eau<0 apres therm i=',i,' k=',k |
---|
| 114 | s ,' dq,q',d_q_the(i,k),q_seri(i,k) |
---|
| 115 | q_seri(i,k)=1.e-15 |
---|
| 116 | endif |
---|
| 117 | ENDDO |
---|
| 118 | ENDDO |
---|
| 119 | |
---|
| 120 | enddo ! isplit |
---|
| 121 | |
---|
| 122 | return |
---|
| 123 | |
---|
| 124 | end |
---|