Changeset 185 for trunk/LMDZ.MARS/libf/phymars/calltherm_mars.F90
- Timestamp:
- Jul 1, 2011, 5:22:34 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/calltherm_mars.F90
r173 r185 2 2 ! $Id: calltherm.F90 1428 2010-09-13 08:43:37Z fairhead $ 3 3 ! 4 subroutine calltherm_mars( ngrid,nlayer,dtime,nq,zzlev,zzlay &4 subroutine calltherm_mars(dtime,zzlev,zzlay & 5 5 & ,pplay,paprs,pphi & 6 6 & ,u_seri,v_seri,t_seri,pq_therm,q2_therm & 7 7 & ,d_u_ajs,d_v_ajs,d_t_ajs,d_q_ajs,dq2_therm & 8 & ,fm_therm,entr_therm,detr_therm,lmax, &8 & ,fm_therm,entr_therm,detr_therm,lmax,zmax,& 9 9 & zw2,fraca,zpopsk,ztla,heatFlux,heatFlux_down,& 10 10 & buoyancyOut,buoyancyEst,hfmax,wmax) 11 11 12 USE thermcell, only : nsplit_thermals,r_aspect_thermals13 12 USE ioipsl_getincom 14 13 implicit none 15 14 16 INTEGER, INTENT(IN) :: ngrid,nlayer 15 #include "dimensions.h" 16 #include "dimphys.h" 17 17 18 REAL dtime 18 LOGICAL logexpr0, logexpr2(ngrid ,nlayer), logexpr1(ngrid)19 LOGICAL logexpr0, logexpr2(ngridmx,nlayermx), logexpr1(ngridmx) 19 20 REAL fact 20 INTEGER nbptspb ,nq21 22 REAL, INTENT(IN) :: zzlay(ngrid ,nlayer)23 REAL, INTENT(IN) :: zzlev(ngrid ,nlayer+1)24 25 REAL u_seri(ngrid ,nlayer),v_seri(ngrid,nlayer)26 REAL t_seri(ngrid ,nlayer),pq_therm(ngrid,nlayer,nq)27 REAL q2_therm(ngrid ,nlayer)28 REAL paprs(ngrid ,nlayer+1)29 REAL pplay(ngrid ,nlayer)30 REAL pphi(ngrid ,nlayer)31 real zlev(ngrid ,nlayer+1)21 INTEGER nbptspb 22 23 REAL, INTENT(IN) :: zzlay(ngridmx,nlayermx) 24 REAL, INTENT(IN) :: zzlev(ngridmx,nlayermx+1) 25 26 REAL u_seri(ngridmx,nlayermx),v_seri(ngridmx,nlayermx) 27 REAL t_seri(ngridmx,nlayermx),pq_therm(ngridmx,nlayermx,nqmx) 28 REAL q2_therm(ngridmx,nlayermx) 29 REAL paprs(ngridmx,nlayermx+1) 30 REAL pplay(ngridmx,nlayermx) 31 REAL pphi(ngridmx,nlayermx) 32 real zlev(ngridmx,nlayermx+1) 32 33 !test: on sort lentr et a* pour alimenter KE 33 REAL zw2(ngrid ,nlayer+1),fraca(ngrid,nlayer+1)34 REAL zzw2(ngrid ,nlayer+1)34 REAL zw2(ngridmx,nlayermx+1),fraca(ngridmx,nlayermx+1) 35 REAL zzw2(ngridmx,nlayermx+1) 35 36 36 37 !FH Update Thermiques 37 REAL d_t_ajs(ngrid ,nlayer), d_q_ajs(ngrid,nlayer,nq)38 REAL d_u_ajs(ngrid ,nlayer),d_v_ajs(ngrid,nlayer)39 REAL dq2_therm(ngrid ,nlayer), dq2_the(ngrid,nlayer)40 real fm_therm(ngrid ,nlayer+1)41 real entr_therm(ngrid ,nlayer),detr_therm(ngrid,nlayer)38 REAL d_t_ajs(ngridmx,nlayermx), d_q_ajs(ngridmx,nlayermx,nqmx) 39 REAL d_u_ajs(ngridmx,nlayermx),d_v_ajs(ngridmx,nlayermx) 40 REAL dq2_therm(ngridmx,nlayermx), dq2_the(ngridmx,nlayermx) 41 real fm_therm(ngridmx,nlayermx+1) 42 real entr_therm(ngridmx,nlayermx),detr_therm(ngridmx,nlayermx) 42 43 43 44 !******************************************************** 44 45 ! declarations 45 real zpopsk(ngrid,nlayer) 46 real ztla(ngrid,nlayer) 47 real wmax(ngrid) 48 real hfmax(ngrid) 49 integer lmax(ngrid) 46 real zpopsk(ngridmx,nlayermx) 47 real ztla(ngridmx,nlayermx) 48 real wmax(ngridmx) 49 real hfmax(ngridmx) 50 integer lmax(ngridmx) 51 real zmax(ngridmx) 50 52 51 53 !nouvelles variables pour la convection … … 56 58 57 59 ! variables locales 58 REAL d_t_the(ngrid ,nlayer), d_q_the(ngrid,nlayer,nq)59 REAL d_u_the(ngrid ,nlayer),d_v_the(ngrid,nlayer)60 REAL d_t_the(ngridmx,nlayermx), d_q_the(ngridmx,nlayermx,nqmx) 61 REAL d_u_the(ngridmx,nlayermx),d_v_the(ngridmx,nlayermx) 60 62 ! 61 integer isplit 62 real zfm_therm(ngrid,nlayer+1),zdt 63 real zentr_therm(ngrid,nlayer),zdetr_therm(ngrid,nlayer) 64 real heatFlux(ngrid,nlayer) 65 real heatFlux_down(ngrid,nlayer) 66 real buoyancyOut(ngrid,nlayer) 67 real buoyancyEst(ngrid,nlayer) 68 real zheatFlux(ngrid,nlayer) 69 real zheatFlux_down(ngrid,nlayer) 70 real zbuoyancyOut(ngrid,nlayer) 71 real zbuoyancyEst(ngrid,nlayer) 63 integer isplit,nsplit_thermals 64 real r_aspect_thermals 65 66 real zfm_therm(ngridmx,nlayermx+1),zdt 67 real zentr_therm(ngridmx,nlayermx),zdetr_therm(ngridmx,nlayermx) 68 real heatFlux(ngridmx,nlayermx) 69 real heatFlux_down(ngridmx,nlayermx) 70 real buoyancyOut(ngridmx,nlayermx) 71 real buoyancyEst(ngridmx,nlayermx) 72 real zheatFlux(ngridmx,nlayermx) 73 real zheatFlux_down(ngridmx,nlayermx) 74 real zbuoyancyOut(ngridmx,nlayermx) 75 real zbuoyancyEst(ngridmx,nlayermx) 72 76 73 77 character (len=20) :: modname='calltherm' … … 77 81 logical, save :: first=.true. 78 82 83 REAL tstart,tstop 84 85 79 86 ! Modele du thermique 80 87 ! =================== 81 82 nsplit_thermals=20 88 89 r_aspect_thermals=3. 90 nsplit_thermals=40 83 91 call getin("nsplit_thermals",nsplit_thermals) 84 92 … … 98 106 do isplit=1,nsplit_thermals 99 107 108 ! call cpu_time(tstart) 109 110 100 111 ! On reinitialise les flux de masse a zero pour le cumul en 101 112 ! cas de splitting … … 116 127 d_v_the(:,:)=0. 117 128 dq2_the(:,:)=0. 118 if (nq .ne. 0) then129 if (nqmx .ne. 0) then 119 130 d_q_the(:,:,:)=0. 120 131 endif 121 132 122 CALL thermcell_main_mars( ngrid,nlayer,nq,zdt &133 CALL thermcell_main_mars(zdt & 123 134 & ,pplay,paprs,pphi,zzlev,zzlay & 124 135 & ,u_seri,v_seri,t_seri,pq_therm,q2_therm & 125 136 & ,d_u_the,d_v_the,d_t_the,d_q_the,dq2_the & 126 & ,zfm_therm,zentr_therm,zdetr_therm,lmax &137 & ,zfm_therm,zentr_therm,zdetr_therm,lmax,zmax & 127 138 & ,r_aspect_thermals & 128 139 & ,zzw2,fraca,zpopsk & … … 138 149 dq2_the(:,:)=dq2_the(:,:)*fact 139 150 140 if (nq .ne. 0) then151 if (nqmx .ne. 0) then 141 152 d_q_the(:,:,:)=d_q_the(:,:,:)*fact 142 153 endif … … 175 186 q2_therm(:,:) = q2_therm(:,:) + dq2_therm(:,:) 176 187 188 189 ! call cpu_time(tstop) 190 ! print*,'elapsed time in thermals : ',tstop-tstart 191 177 192 enddo ! isplit 178 193 … … 180 195 !**************************************************************** 181 196 182 ! do i=1,ngrid 183 ! do k=1,nlayer 197 ! do i=1,ngridmx 198 ! do k=1,nlayermx 184 199 ! if (ztla(i,k) .lt. 1.e-10) fraca(i,k) =0. 185 200 ! print*,'youpi je sers a quelque chose !' … … 187 202 ! enddo 188 203 189 DO i=1,ngrid 204 DO i=1,ngridmx 190 205 hfmax(i)=MAXVAL(heatFlux(i,:)+heatFlux_down(i,:)) 191 206 wmax(i)=MAXVAL(zw2(i,:))
Note: See TracChangeset
for help on using the changeset viewer.