source: trunk/LMDZ.MARS/libf/phymars/calltherm_interface.F90 @ 689

Last change on this file since 689 was 660, checked in by acolaitis, 13 years ago

Thermals: updated computation of wstar to take into account vertical turbulent heat flux from diffusion. Without that, wstar is underestimated. We use the sensible heat flux and tendancies computed in vdifc to compute the vertical turbulent heat flux contribution from the diffusion, and then compute the maximum in the PBL. The resulting total heat flux profile and wstar correspond very well to LES results.

File size: 19.6 KB
RevLine 
[161]1!
2! AC 2011-01-05
3!
[185]4      SUBROUTINE calltherm_interface (firstcall, &
[652]5     & zzlev,zzlay, &
[161]6     & ptimestep,pu,pv,pt,pq,pdu,pdv,pdt,pdq,q2, &
[185]7     & pplay,pplev,pphi,zpopsk, &
[660]8     & pdu_th,pdv_th,pdt_th,pdq_th,lmax,zmaxth,pbl_dtke, &
9     & pdhdif,hfmax,wstar,sensibFlux)
[161]10
[342]11       USE ioipsl_getincom
[161]12
13      implicit none
14#include "callkeys.h"
[185]15#include "dimensions.h"
16#include "dimphys.h"
[342]17#include "comcstfi.h"
[508]18#include "tracer.h"
[185]19
[161]20!--------------------------------------------------------
[342]21! Input Variables
[161]22!--------------------------------------------------------
23
[652]24!      REAL, INTENT(IN) :: long(ngridmx),lati(ngridmx)
[161]25      REAL, INTENT(IN) :: ptimestep
[185]26      REAL, INTENT(IN) :: pplev(ngridmx,nlayermx+1),pplay(ngridmx,nlayermx)
27      REAL, INTENT(IN) :: pphi(ngridmx,nlayermx)
28      REAL, INTENT(IN) :: pu(ngridmx,nlayermx),pv(ngridmx,nlayermx)
29      REAL, INTENT(IN) :: pt(ngridmx,nlayermx),pq(ngridmx,nlayermx,nqmx)
30      REAL, INTENT(IN) :: zzlay(ngridmx,nlayermx)
31      REAL, INTENT(IN) :: zzlev(ngridmx,nlayermx+1)
[161]32      LOGICAL, INTENT(IN) :: firstcall
[185]33      REAL, INTENT(IN) :: pdu(ngridmx,nlayermx),pdv(ngridmx,nlayermx)
34      REAL, INTENT(IN) :: pdq(ngridmx,nlayermx,nqmx),pdt(ngridmx,nlayermx)
35      REAL, INTENT(IN) :: q2(ngridmx,nlayermx+1)
36      REAL, INTENT(IN) :: zpopsk(ngridmx,nlayermx)
[660]37      REAL, INTENT(IN) :: pdhdif(ngridmx,nlayermx)
38      REAL, INTENT(IN) :: sensibFlux(ngridmx)
[161]39
40!--------------------------------------------------------
[342]41! Output Variables
[161]42!--------------------------------------------------------
43
[342]44      REAL, INTENT(OUT) :: pdu_th(ngridmx,nlayermx)
45      REAL, INTENT(OUT) :: pdv_th(ngridmx,nlayermx)
46      REAL, INTENT(OUT) :: pdt_th(ngridmx,nlayermx)
47      REAL, INTENT(OUT) :: pdq_th(ngridmx,nlayermx,nqmx)
48      INTEGER, INTENT(OUT) :: lmax(ngridmx)
49      REAL, INTENT(OUT) :: zmaxth(ngridmx)
50      REAL, INTENT(OUT) :: pbl_dtke(ngridmx,nlayermx+1)
[499]51      REAL, INTENT(OUT) :: wstar(ngridmx)
[161]52
53!--------------------------------------------------------
[342]54! Thermals local variables
[161]55!--------------------------------------------------------
[342]56      REAL zu(ngridmx,nlayermx), zv(ngridmx,nlayermx)
57      REAL zt(ngridmx,nlayermx)
[185]58      REAL d_t_ajs(ngridmx,nlayermx)
59      REAL d_u_ajs(ngridmx,nlayermx), d_q_ajs(ngridmx,nlayermx,nqmx)
60      REAL d_v_ajs(ngridmx,nlayermx)
61      REAL fm_therm(ngridmx,nlayermx+1), entr_therm(ngridmx,nlayermx)
[628]62      REAL detr_therm(ngridmx,nlayermx),detrmod(ngridmx,nlayermx)
[185]63      REAL zw2(ngridmx,nlayermx+1)
[512]64      REAL fraca(ngridmx,nlayermx+1),zfraca(ngridmx,nlayermx+1)
[185]65      REAL ztla(ngridmx,nlayermx)
66      REAL q_therm(ngridmx,nlayermx), pq_therm(ngridmx,nlayermx,nqmx)
67      REAL q2_therm(ngridmx,nlayermx), dq2_therm(ngridmx,nlayermx)
[342]68      REAL lmax_real(ngridmx)
69      REAL masse(ngridmx,nlayermx)
[161]70      LOGICAL qtransport_thermals,dtke_thermals
[660]71      INTEGER l,ig,iq,ii(1),k
[628]72      CHARACTER (LEN=20) modname
[161]73
[342]74!--------------------------------------------------------
75! Local variables for sub-timestep
76!--------------------------------------------------------
[161]77
[342]78      REAL d_t_the(ngridmx,nlayermx), d_q_the(ngridmx,nlayermx,nqmx)
79      REAL d_u_the(ngridmx,nlayermx),d_v_the(ngridmx,nlayermx)
80      REAL dq2_the(ngridmx,nlayermx)
[561]81      INTEGER isplit
82      INTEGER,SAVE :: nsplit_thermals
83      REAL, SAVE :: r_aspect_thermals
[342]84      REAL fact
85      REAL zfm_therm(ngridmx,nlayermx+1),zdt
86      REAL zentr_therm(ngridmx,nlayermx),zdetr_therm(ngridmx,nlayermx)
87      REAL zheatFlux(ngridmx,nlayermx)
88      REAL zheatFlux_down(ngridmx,nlayermx)
89      REAL zbuoyancyOut(ngridmx,nlayermx)
90      REAL zbuoyancyEst(ngridmx,nlayermx)
91      REAL zzw2(ngridmx,nlayermx+1)
92      REAL zmax(ngridmx)
[628]93      INTEGER ndt,zlmax
[342]94
95!--------------------------------------------------------
96! Diagnostics
97!--------------------------------------------------------
98
[185]99      REAL heatFlux(ngridmx,nlayermx)
100      REAL heatFlux_down(ngridmx,nlayermx)
101      REAL buoyancyOut(ngridmx,nlayermx)
102      REAL buoyancyEst(ngridmx,nlayermx)
103      REAL hfmax(ngridmx),wmax(ngridmx)
[499]104      REAL pbl_teta(ngridmx),dteta(ngridmx,nlayermx)
[660]105      REAL rpdhd(ngridmx,nlayermx)
106      REAL wtdif(ngridmx,nlayermx),rho(ngridmx,nlayermx)
107      REAL wtth(ngridmx,nlayermx)
[161]108
[508]109!--------------------------------------------------------
110! Theta_m
111!--------------------------------------------------------
[342]112
[508]113      INTEGER ico2
114      SAVE ico2
[342]115
[161]116! **********************************************************************
[342]117! Initialization
[161]118! **********************************************************************
119
[621]120      lmax(:)=0
[161]121      pdu_th(:,:)=0.
122      pdv_th(:,:)=0.
123      pdt_th(:,:)=0.
124      entr_therm(:,:)=0.
125      detr_therm(:,:)=0.
126      q2_therm(:,:)=0.
127      dq2_therm(:,:)=0.
128      ztla(:,:)=0.
129      pbl_dtke(:,:)=0.
130      fm_therm(:,:)=0.
131      zw2(:,:)=0.
132      fraca(:,:)=0.
[512]133      zfraca(:,:)=0.
[161]134      if (tracer) then
135         pdq_th(:,:,:)=0.
136      end if
[342]137      d_t_ajs(:,:)=0.
138      d_u_ajs(:,:)=0.
139      d_v_ajs(:,:)=0.
140      d_q_ajs(:,:,:)=0.
141      heatFlux(:,:)=0.
142      heatFlux_down(:,:)=0.
143      buoyancyOut(:,:)=0.
144      buoyancyEst(:,:)=0.
145      zmaxth(:)=0.
146      lmax_real(:)=0.
[161]147
148
[342]149! **********************************************************************
150! Preparing inputs for the thermals
151! **********************************************************************
[161]152
[342]153       zu(:,:)=pu(:,:)+pdu(:,:)*ptimestep
154       zv(:,:)=pv(:,:)+pdv(:,:)*ptimestep
155       zt(:,:)=pt(:,:)+pdt(:,:)*ptimestep
[161]156
[342]157       pq_therm(:,:,:)=0.
158       qtransport_thermals=.true. !! default setting
159       !call getin("qtransport_thermals",qtransport_thermals)
[161]160
[342]161       if(qtransport_thermals) then
162          if(tracer) then
163                pq_therm(:,:,:)=pq(:,:,:)+pdq(:,:,:)*ptimestep
164          endif
165       endif
[161]166
[544]167       dtke_thermals=.false. !! default setting
168       call getin("dtke_thermals",dtke_thermals)
169       IF(dtke_thermals) THEN
170          DO l=1,nlayermx
171              q2_therm(:,l)=0.5*(q2(:,l)+q2(:,l+1))
172          ENDDO
173       ENDIF
[342]174
175! **********************************************************************
[508]176! Polar night mixing : theta_m
[342]177! **********************************************************************
[508]178
179      if(firstcall) then
180        ico2=0
181        if (tracer) then
182!     Prepare Special treatment if one of the tracers is CO2 gas
183           do iq=1,nqmx
184             if (noms(iq).eq."co2") then
185                ico2=iq
186             end if
187           enddo
188        endif
189      endif !of if firstcall
190
191
[342]192! **********************************************************************
[508]193! **********************************************************************
194! **********************************************************************
[342]195! CALLTHERM
196! **********************************************************************
197! **********************************************************************
198! **********************************************************************
199
[561]200!         r_aspect_thermals     ! Mainly control the shape of the temperature profile
201                                ! in the surface layer. Decreasing it goes toward
202                                ! a convective-adjustment like profile.
203!         nsplit_thermals       ! Sub-timestep for the thermals. Very dependant on the
204                                ! chosen timestep for the radiative transfer.
205                                ! It is recommended to run with 96 timestep per day and
206                                ! iradia = 1., configuration in which thermals can run
207                                ! very well with a sub-timestep of 10.
208         IF (firstcall) THEN
[342]209#ifdef MESOSCALE
[561]210            !! valid for timesteps < 200s
211            nsplit_thermals=4
212            r_aspect_thermals=0.7
[342]213#else
[592]214            IF ((ptimestep .le. 3699.*24./96.) .and. (iradia .eq. 1)) THEN
[561]215               nsplit_thermals=10
216            ELSE
217               nsplit_thermals=35
218            ENDIF
[592]219            r_aspect_thermals=1.
[342]220#endif
[561]221            call getin("nsplit_thermals",nsplit_thermals)
222            call getin("r_aspect_thermals",r_aspect_thermals)
223         ENDIF
[342]224
225! **********************************************************************
226! SUB-TIMESTEP LOOP
227! **********************************************************************
228
229         zdt=ptimestep/REAL(nsplit_thermals)
230
231         DO isplit=1,nsplit_thermals
232
233! Initialization of intermediary variables
234
[628]235!         zfm_therm(:,:)=0. !init is done inside
236!         zentr_therm(:,:)=0.
237!         zdetr_therm(:,:)=0.
238!         zheatFlux(:,:)=0. 
239!         zheatFlux_down(:,:)=0.
240!         zbuoyancyOut(:,:)=0.
241!         zbuoyancyEst(:,:)=0.
[342]242         zzw2(:,:)=0.
243         zmax(:)=0.
[621]244         lmax(:)=0
[628]245!         d_t_the(:,:)=0. !init is done inside
246
247!         d_u_the(:,:)=0. !transported outside
248!         d_v_the(:,:)=0.
[342]249         dq2_the(:,:)=0.
[628]250
251         if (nqmx .ne. 0 .and. ico2 .ne. 0) then
252            d_q_the(:,:,ico2)=0.
[161]253         endif
254
[342]255             CALL thermcell_main_mars(zdt  &
256     &      ,pplay,pplev,pphi,zzlev,zzlay  &
257     &      ,zu,zv,zt,pq_therm,q2_therm  &
258     &      ,d_u_the,d_v_the,d_t_the,d_q_the,dq2_the  &
259     &      ,zfm_therm,zentr_therm,zdetr_therm,lmax,zmax  &
260     &      ,r_aspect_thermals &
261     &      ,zzw2,fraca,zpopsk &
262     &      ,ztla,zheatFlux,zheatFlux_down &
263     &      ,zbuoyancyOut,zbuoyancyEst)
[161]264
[342]265      fact=1./REAL(nsplit_thermals)
[161]266
[342]267            d_t_the(:,:)=d_t_the(:,:)*ptimestep*fact
[628]268!            d_u_the(:,:)=d_u_the(:,:)*ptimestep*fact
269!            d_v_the(:,:)=d_v_the(:,:)*ptimestep*fact
270            dq2_the(:,:)=dq2_the(:,:)*fact
[508]271            if (ico2 .ne. 0) then
[624]272               d_q_the(:,:,ico2)=d_q_the(:,:,ico2)*ptimestep*fact
[508]273            endif
[161]274
[628]275            zmaxth(:)=zmaxth(:)+zmax(:)*fact
276            lmax_real(:)=lmax_real(:)+float(lmax(:))*fact
[342]277            fm_therm(:,:)=fm_therm(:,:)  &
278     &      +zfm_therm(:,:)*fact
279            entr_therm(:,:)=entr_therm(:,:)  &
280     &       +zentr_therm(:,:)*fact
281            detr_therm(:,:)=detr_therm(:,:)  &
282     &       +zdetr_therm(:,:)*fact
[512]283            zfraca(:,:)=zfraca(:,:) + fraca(:,:)*fact
[342]284
285            heatFlux(:,:)=heatFlux(:,:) &
286     &       +zheatFlux(:,:)*fact
287            heatFlux_down(:,:)=heatFlux_down(:,:) &
288     &       +zheatFlux_down(:,:)*fact
[508]289            buoyancyOut(:,:)=buoyancyOut(:,:) &
290     &       +zbuoyancyOut(:,:)*fact
291            buoyancyEst(:,:)=buoyancyEst(:,:) &
292     &       +zbuoyancyEst(:,:)*fact
[512]293 
[342]294
295            zw2(:,:)=zw2(:,:) + zzw2(:,:)*fact
296
297!  accumulation de la tendance
298
[624]299           d_t_ajs(:,:)=d_t_ajs(:,:)+d_t_the(:,:)
[628]300!           d_u_ajs(:,:)=d_u_ajs(:,:)+d_u_the(:,:)
301!           d_v_ajs(:,:)=d_v_ajs(:,:)+d_v_the(:,:)
[508]302            if (ico2 .ne. 0) then
303               d_q_ajs(:,:,ico2)=d_q_ajs(:,:,ico2)+d_q_the(:,:,ico2)
304            endif
[342]305!            dq2_therm(:,:)=dq2_therm(:,:)+dq2_the(:,:)
306!  incrementation des variables meteo
307
308            zt(:,:) = zt(:,:) + d_t_the(:,:)
[628]309!            zu(:,:) = zu(:,:) + d_u_the(:,:)
310!            zv(:,:) = zv(:,:) + d_v_the(:,:)
[508]311            if (ico2 .ne. 0) then
312             pq_therm(:,:,ico2) = &
[624]313     &          pq_therm(:,:,ico2) + d_q_the(:,:,ico2)
[508]314            endif
[342]315!            q2_therm(:,:) = q2_therm(:,:) + dq2_therm(:,:)
316
317
318         ENDDO ! isplit
319!****************************************************************
320
[621]321      lmax(:)=nint(lmax_real(:))
[628]322      zlmax=MAXVAL(lmax(:))+2
323      if (zlmax .ge. nlayermx) then
324        print*,'thermals have reached last layer of the model'
325        print*,'this is not good !'
326      endif
[621]327
[628]328
[342]329! Now that we have computed total entrainment and detrainment, we can
330! advect u, v, and q in thermals. (theta already advected). We can do
331! that separatly because u,v,and q are not used in thermcell_main for
332! any thermals-related computation : they are purely passive.
333
334! mass of cells
335      do l=1,nlayermx
336         masse(:,l)=(pplev(:,l)-pplev(:,l+1))/g
337      enddo
338
[628]339      detrmod(:,:)=0.
340      do l=1,zlmax
341         do ig=1,ngridmx
342            detrmod(ig,l)=fm_therm(ig,l)-fm_therm(ig,l+1) &
343     &      +entr_therm(ig,l)
344            if (detrmod(ig,l).lt.0.) then
345               entr_therm(ig,l)=entr_therm(ig,l)-detrmod(ig,l)
346               detrmod(ig,l)=0.
347            endif
348         enddo
349      enddo
350      ndt=10
351      call thermcell_dqup(ngridmx,nlayermx,ptimestep                &
352     &      ,fm_therm,entr_therm,detrmod,  &
353     &     masse,zu,d_u_ajs,ndt,zlmax)
[342]354
[628]355      call thermcell_dqup(ngridmx,nlayermx,ptimestep    &
356     &       ,fm_therm,entr_therm,detrmod,  &
357     &     masse,zv,d_v_ajs,ndt,zlmax)
358
[342]359      if (nqmx .ne. 0.) then
360      DO iq=1,nqmx
[508]361      if (iq .ne. ico2) then
[342]362      call thermcell_dqup(ngridmx,nlayermx,ptimestep     &
[628]363     &     ,fm_therm,entr_therm,detrmod,  &
364     &    masse,pq_therm(:,:,iq),d_q_ajs(:,:,iq),ndt,zlmax)
[508]365      endif
[342]366      ENDDO
367      endif
368
[544]369      if (dtke_thermals) then
[628]370      detrmod(:,:)=0.
[652]371      ndt=10
[628]372      do l=1,zlmax
373         do ig=1,ngridmx
374            detrmod(ig,l)=fm_therm(ig,l)-fm_therm(ig,l+1) &
375     &      +entr_therm(ig,l)
376            if (detrmod(ig,l).lt.0.) then
377               entr_therm(ig,l)=entr_therm(ig,l)-detrmod(ig,l)
378               detrmod(ig,l)=0.
379            endif
380         enddo
381      enddo
[544]382      call thermcell_dqup(ngridmx,nlayermx,ptimestep     &
[628]383     &     ,fm_therm,entr_therm,detrmod,  &
384     &    masse,q2_therm,dq2_therm,ndt,zlmax)
[544]385      endif
386
[342]387      DO ig=1,ngridmx
388         wmax(ig)=MAXVAL(zw2(ig,:))
389      ENDDO
390
391! **********************************************************************
392! **********************************************************************
393! **********************************************************************
394! CALLTHERM END
395! **********************************************************************
396! **********************************************************************
397! **********************************************************************
398
399
400! **********************************************************************
401! Preparing outputs
402! **********************************************************************
403
[628]404      do l=1,zlmax
405        pdu_th(:,l)=d_u_ajs(:,l)
406        pdv_th(:,l)=d_v_ajs(:,l)
407      enddo
[342]408
[161]409           if(qtransport_thermals) then
[342]410              if(tracer) then
[625]411               do iq=1,nqmx
412                if (iq .ne. ico2) then
[628]413                  do l=1,zlmax
414                     pdq_th(:,l,iq)=d_q_ajs(:,l,iq)
415                  enddo
[625]416                else
[628]417                  do l=1,zlmax
418                     pdq_th(:,l,iq)=d_q_ajs(:,l,iq)/ptimestep
419                  enddo
[625]420                endif
421               enddo
[342]422              endif
[161]423           endif
424
[544]425           IF(dtke_thermals) THEN
426              DO l=2,nlayermx
427                 pbl_dtke(:,l)=0.5*(dq2_therm(:,l-1)+dq2_therm(:,l))
428              ENDDO
429 
430              pbl_dtke(:,1)=0.5*dq2_therm(:,1)
431              pbl_dtke(:,nlayermx+1)=0.
432           ENDIF
[161]433
[628]434           do l=1,zlmax
435              pdt_th(:,l)=d_t_ajs(:,l)/ptimestep
436           enddo
[342]437
[499]438
[342]439! **********************************************************************
[499]440! Compute the free convection velocity scale for vdifc
441! **********************************************************************
442
443
444! Potential temperature gradient
445
446      dteta(:,nlayermx)=0.
447      DO l=1,nlayermx-1
448         DO ig=1, ngridmx
449            dteta(ig,l) = ((zt(ig,l+1)-zt(ig,l))/zpopsk(ig,l))          &
450     &              /(zzlay(ig,l+1)-zzlay(ig,l))
451         ENDDO
452      ENDDO
453
454! Computation of the pbl mixed layer temperature
455
456      DO ig=1, ngridmx
457         ii=MINLOC(abs(dteta(ig,1:lmax(ig))))
458         pbl_teta(ig) = zt(ig,ii(1))/zpopsk(ig,ii(1))
459      ENDDO
460
[660]461! we must add the heat flux from the diffusion scheme to hfmax
462
463! compute rho as it is after the diffusion
464
465      rho(:,:)=pplay(:,:)                                               &
466     & /(r*(pt(:,:)+pdhdif(:,:)*zpopsk(:,:)*ptimestep))
467
468! integrate -rho*pdhdif
469
470      rpdhd(:,:)=0.
471
472      DO ig=1,ngridmx
473       DO l=1,lmax(ig)
474        rpdhd(ig,l)=0.
475        DO k=1,l
476         rpdhd(ig,l)=rpdhd(ig,l)-rho(ig,k)*pdhdif(ig,k)*                &
477     & (zzlev(ig,k+1)-zzlev(ig,k))
478        ENDDO
479        rpdhd(ig,l)=rpdhd(ig,l)-sensibFlux(ig)/cpp
480       ENDDO
481      ENDDO
482
483! compute w'teta' from diffusion
484
485      wtdif(:,:)=rpdhd(:,:)/rho(:,:)
486
487! compute rho as it is after the thermals
488
489      rho(:,:)=pplay(:,:)/(r*(zt(:,:)))
490! integrate -rho*pdhdif
491
492      DO ig=1,ngridmx
493       DO l=1,lmax(ig)
494        rpdhd(ig,l)=0.
495        DO k=1,l
496         rpdhd(ig,l)=rpdhd(ig,l)-rho(ig,k)*(pdt_th(ig,k)/zpopsk(ig,k))* &
497     & (zzlev(ig,k+1)-zzlev(ig,k))
498        ENDDO
499        rpdhd(ig,l)=rpdhd(ig,l)+                                        &
500     &    rho(ig,1)*(heatFlux(ig,1)+heatFlux_down(ig,1))
501       ENDDO
502      ENDDO
503      rpdhd(:,nlayermx)=0.
504
505! compute w'teta' from thermals
506
507      wtth(:,:)=rpdhd(:,:)/rho(:,:)
508
509! We get the max heat flux from thermals and add the contribution from the diffusion
510
511      DO ig=1,ngridmx
512        hfmax(ig)=MAXVAL(wtth(ig,:)+wtdif(ig,:))
513      ENDDO
[499]514! We follow Spiga et. al 2010 (QJRMS)
515! ------------
516
517      DO ig=1, ngridmx
518         IF (zmax(ig) .gt. 0.) THEN
519            wstar(ig)=(g*zmaxth(ig)*hfmax(ig)/pbl_teta(ig))**(1./3.)
520         ELSE
521            wstar(ig)=0.
522         ENDIF
523      ENDDO
524
525
526
527! **********************************************************************
[342]528! Diagnostics
529! **********************************************************************
[161]530       
531        if(outptherm) then
[185]532        if (ngridmx .eq. 1) then
533        call WRITEDIAGFI(ngridmx,'entr_therm','entrainement thermique',&
[161]534     &                       'kg/m-2',1,entr_therm)
[185]535        call WRITEDIAGFI(ngridmx,'detr_therm','detrainement thermique',&
[161]536     &                       'kg/m-2',1,detr_therm)
[185]537        call WRITEDIAGFI(ngridmx,'fm_therm','flux masse thermique',&
[161]538     &                       'kg/m-2',1,fm_therm)
[185]539        call WRITEDIAGFI(ngridmx,'zw2','vitesse verticale thermique',&
[161]540     &                       'm/s',1,zw2)
[185]541        call WRITEDIAGFI(ngridmx,'heatFlux_up','heatFlux_updraft',&
[161]542     &                       'SI',1,heatFlux)
[185]543       call WRITEDIAGFI(ngridmx,'heatFlux_down','heatFlux_downdraft',&
[161]544     &                       'SI',1,heatFlux_down)
[185]545        call WRITEDIAGFI(ngridmx,'fraca','fraction coverage',&
[161]546     &                       'percent',1,fraca)
[185]547        call WRITEDIAGFI(ngridmx,'buoyancyOut','buoyancyOut',&
[161]548     &                       'm.s-2',1,buoyancyOut)
[185]549        call WRITEDIAGFI(ngridmx,'buoyancyEst','buoyancyEst',&
[161]550     &                       'm.s-2',1,buoyancyEst)
[185]551        call WRITEDIAGFI(ngridmx,'d_t_th',  &
[161]552     &         'tendance temp TH','K',1,d_t_ajs)
[619]553        call WRITEDIAGFI(ngridmx,'d_q_th',  &
554     &         'tendance traceur TH','kg/kg',1,d_q_ajs)
[185]555        call WRITEDIAGFI(ngridmx,'zmax',  &
[342]556     &         'pbl height','m',0,zmaxth)
[624]557        call WRITEDIAGFI(ngridmx,'d_u_th',  &
558     &         'tendance moment','m/s',1,pdu_th)
[660]559        call WRITEDIAGFI(ngridmx,'wtdif',  &
560     &         'heat flux from diffusion','K.m/s',1,wtdif)
561        call WRITEDIAGFI(ngridmx,'wtth',  &
562     &         'heat flux from thermals','K.m/s',1,wtth)
563        call WRITEDIAGFI(ngridmx,'wttot',  &
564     &         'heat flux PBL','K.m/s',1,wtdif(:,:)+wtth(:,:))
565
[161]566      else
567
[185]568        call WRITEDIAGFI(ngridmx,'entr_therm','entrainement thermique',&
[161]569     &                       'kg/m-2',3,entr_therm)
[185]570        call WRITEDIAGFI(ngridmx,'detr_therm','detrainement thermique',&
[161]571     &                       'kg/m-2',3,detr_therm)
[185]572        call WRITEDIAGFI(ngridmx,'fm_therm','flux masse thermique',&
[161]573     &                       'kg/m-2',3,fm_therm)
[185]574        call WRITEDIAGFI(ngridmx,'zw2','vitesse verticale thermique',&
[161]575     &                       'm/s',3,zw2)
[185]576        call WRITEDIAGFI(ngridmx,'heatFlux','heatFlux',&
[161]577     &                       'SI',3,heatFlux)
[185]578        call WRITEDIAGFI(ngridmx,'buoyancyOut','buoyancyOut',&
[161]579     &                       'SI',3,buoyancyOut)
[185]580        call WRITEDIAGFI(ngridmx,'d_t_th',  &
[161]581     &         'tendance temp TH','K',3,d_t_ajs)
582
583      endif
584      endif
585
586       END
Note: See TracBrowser for help on using the repository browser.