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

Last change on this file since 1112 was 1036, checked in by emillour, 11 years ago

Mars GCM: (a first step towards using parallel dynamics)

  • IMPORTANT CHANGE: Implemented dynamic tracers. It is no longer necessary to compile the model with the '-t #' option, number of tracers is simply read from tracer.def file (as before). Adapted makegcm_* scripts (and co.) accordingly. Technical aspects of the switch to dynamic tracers are:
    • advtrac.h (in dyn3d) removed and replaced by module infotrac.F
    • tracer.h (in phymars) removed and replaced by module tracer_mod.F90 (which contains nqmx, the number of tracers, etc. and can be used anywhere in the physics).
  • Included some side cleanups: removed unused files (in dyn3d) anldoppler2.F, anl_mcdstats.F and anl_stats-diag.F, and all the unecessary dimensions.* files in grid/dimension.
  • Checked that changes are clean and that GCM yields identical results (in debug mode) to previous svn version.

EM

File size: 19.5 KB
Line 
1!=======================================================================
2! CALLTHERM_INTERFACE
3!=======================================================================
4! Main interface to the Martian thermal plume model
5! This interface handles sub-timesteps for this model
6! A call to this interface must be inserted in the main 'physics' routine
7!   NB: for information:
8!   In the Mars LMD-GCM, the thermal plume model is called after
9!   the vertical turbulent mixing scheme (Mellor and Yamada) 
10!   and the surface layer scheme (Richardson-based surface layer + subgrid gustiness)
11!   Other routines called before the thermals model are
12!   radiative transfer and (orographic) gravity wave drag.
13! -----------------------------------------------------------------------
14! Author : A. Colaitis 2011-01-05 (with updates 2011-2013)
15!          after C. Rio and F. Hourdin
16! Institution : Laboratoire de Meteorologie Dynamique (LMD) Paris, France
17! -----------------------------------------------------------------------
18! Corresponding author : A. Spiga aymeric.spiga_AT_upmc.fr
19! -----------------------------------------------------------------------
20! ASSOCIATED FILES
21! --> thermcell_main_mars.F90
22! --> thermcell_dqup.F90
23! --> comtherm_h.F90
24! -----------------------------------------------------------------------
25! Reference paper:
26! A. Colaïtis, A. Spiga, F. Hourdin, C. Rio, F. Forget, and E. Millour.
27! A thermal plume model for the Martian convective boundary layer.
28! Journal of Geophysical Research (Planets), 118:1468-1487, July 2013.
29! http://dx.doi.org/10.1002/jgre.20104
30! http://arxiv.org/abs/1306.6215
31! -----------------------------------------------------------------------
32! Reference paper for terrestrial plume model:
33! C. Rio and F. Hourdin.
34! A thermal plume model for the convective boundary layer : Representation of cumulus clouds.
35! Journal of the Atmospheric Sciences, 65:407-425, 2008.
36! -----------------------------------------------------------------------
37
38      SUBROUTINE calltherm_interface (ngrid,nlayer,nq, &
39     & tracer,igcm_co2, &
40     & zzlev,zzlay, &
41     & ptimestep,pu,pv,pt,pq,pdu,pdv,pdt,pdq,q2, &
42     & pplay,pplev,pphi,zpopsk, &
43     & pdu_th,pdv_th,pdt_th,pdq_th,lmax,zmaxth,pbl_dtke, &
44     & pdhdif,hfmax,wstar,sensibFlux)
45
46      use comtherm_h
47      use tracer_mod, only: nqmx,noms
48      implicit none
49
50! SHARED VARIABLES. This needs adaptations in another climate model.
51#include "comcstfi.h" !contains physical constant values such as
52                      ! "g" : gravitational acceleration (m.s-2)
53                      ! "r" : recuced gas constant (J.K-1.mol-1)
54                      ! "cpp" : specific heat of the atmosphere (J.kg-1.K-1)
55
56!--------------------------------------------------------
57! Input Variables
58!--------------------------------------------------------
59
60      INTEGER, INTENT(IN) :: ngrid ! number of horizontal grid points
61      INTEGER, INTENT(IN) :: nlayer ! number of vertical grid points
62      INTEGER, INTENT(IN) :: nq ! number of tracer species
63      REAL, INTENT(IN) :: ptimestep !timestep (s)
64      REAL, INTENT(IN) :: pplev(ngrid,nlayer+1) !intermediate pressure levels (Pa)
65      REAL, INTENT(IN) :: pplay(ngrid,nlayer) !Pressure at the middle of the layers (Pa)
66      REAL, INTENT(IN) :: pphi(ngrid,nlayer) !Geopotential at the middle of the layers (m2s-2)
67      REAL, INTENT(IN) :: pu(ngrid,nlayer),pv(ngrid,nlayer) !u,v components of the wind (ms-1)
68      REAL, INTENT(IN) :: pt(ngrid,nlayer),pq(ngrid,nlayer,nq)!temperature (K) and tracer concentration (kg/kg)
69      REAL, INTENT(IN) :: zzlay(ngrid,nlayer) ! altitude at the middle of the layers
70      REAL, INTENT(IN) :: zzlev(ngrid,nlayer+1) ! altitude at layer boundaries
71      LOGICAL, INTENT(IN) :: tracer ! =.true. if tracers are present and to be transported
72      INTEGER, INTENT(IN) :: igcm_co2 ! index of the CO2 tracer in mixing ratio array
73                                      ! --> 0 if no tracer is CO2 (or no tracer at all)
74                                      ! --> this prepares special treatment for polar night mixing
75                                      !       (see thermcell_main_mars)
76      REAL, INTENT(IN) :: pdu(ngrid,nlayer),pdv(ngrid,nlayer) ! wind velocity change from routines called
77                                                                      ! before thermals du/dt (m/s/s)
78      REAL, INTENT(IN) :: pdq(ngrid,nlayer,nq) ! tracer concentration change from routines called
79                                                     ! before thermals dq/dt (kg/kg/s)
80      REAL, INTENT(IN) :: pdt(ngrid,nlayer) ! temperature change from routines called before thermals dT/dt (K/s)
81      REAL, INTENT(IN) :: q2(ngrid,nlayer+1) ! turbulent kinetic energy
82      REAL, INTENT(IN) :: zpopsk(ngrid,nlayer) ! ratio of pressure at middle of layer to surface pressure,
83                                                   ! to the power r/cp, i.e. zpopsk=(pplay(ig,l)/pplev(ig,1))**rcp
84      REAL, INTENT(IN) :: pdhdif(ngrid,nlayer) ! potential temperature change from turbulent diffusion scheme dT/dt (K/s)
85      REAL, INTENT(IN) :: sensibFlux(ngrid) ! sensible heat flux computed from surface layer scheme
86
87!--------------------------------------------------------
88! Output Variables
89!--------------------------------------------------------
90
91      REAL, INTENT(OUT) :: pdu_th(ngrid,nlayer) ! wind velocity change from thermals du/dt (m/s/s)
92      REAL, INTENT(OUT) :: pdv_th(ngrid,nlayer) ! wind velocity change from thermals dv/dt (m/s/s)
93      REAL, INTENT(OUT) :: pdt_th(ngrid,nlayer) ! temperature change from thermals dT/dt (K/s)
94      REAL, INTENT(OUT) :: pdq_th(ngrid,nlayer,nq) ! tracer change from thermals dq/dt (kg/kg/s)
95      INTEGER, INTENT(OUT) :: lmax(ngrid) ! layer number reacher by thermals in grid point
96      REAL, INTENT(OUT) :: zmaxth(ngrid) ! equivalent to lmax, but in (m), interpolated
97      REAL, INTENT(OUT) :: pbl_dtke(ngrid,nlayer+1) ! turbulent kinetic energy change from thermals dtke/dt
98      REAL, INTENT(OUT) :: wstar(ngrid) ! free convection velocity (m/s)
99
100!--------------------------------------------------------
101! Thermals local variables
102!--------------------------------------------------------
103      REAL zu(ngrid,nlayer), zv(ngrid,nlayer)
104      REAL zt(ngrid,nlayer)
105      REAL d_t_ajs(ngrid,nlayer)
106      REAL d_u_ajs(ngrid,nlayer), d_q_ajs(ngrid,nlayer,nq)
107      REAL d_v_ajs(ngrid,nlayer)
108      REAL fm_therm(ngrid,nlayer+1), entr_therm(ngrid,nlayer)
109      REAL detr_therm(ngrid,nlayer),detrmod(ngrid,nlayer)
110      REAL zw2(ngrid,nlayer+1)
111      REAL fraca(ngrid,nlayer+1),zfraca(ngrid,nlayer+1)
112      REAL q_therm(ngrid,nlayer), pq_therm(ngrid,nlayer,nq)
113      REAL q2_therm(ngrid,nlayer), dq2_therm(ngrid,nlayer)
114      REAL lmax_real(ngrid)
115      REAL masse(ngrid,nlayer)
116
117      INTEGER l,ig,iq,ii(1),k
118      CHARACTER (LEN=20) modname
119
120!--------------------------------------------------------
121! Local variables for sub-timestep
122!--------------------------------------------------------
123
124      REAL d_t_the(ngrid,nlayer), d_q_the(ngrid,nlayer,nq)
125      INTEGER isplit
126      REAL fact
127      REAL zfm_therm(ngrid,nlayer+1),zdt
128      REAL zentr_therm(ngrid,nlayer),zdetr_therm(ngrid,nlayer)
129      REAL zheatFlux(ngrid,nlayer)
130      REAL zheatFlux_down(ngrid,nlayer)
131      REAL zbuoyancyOut(ngrid,nlayer)
132      REAL zbuoyancyEst(ngrid,nlayer)
133      REAL zzw2(ngrid,nlayer+1)
134      REAL zmax(ngrid)
135      INTEGER ndt,zlmax
136
137!--------------------------------------------------------
138! Diagnostics
139!--------------------------------------------------------
140
141      REAL heatFlux(ngrid,nlayer)
142      REAL heatFlux_down(ngrid,nlayer)
143      REAL buoyancyOut(ngrid,nlayer)
144      REAL buoyancyEst(ngrid,nlayer)
145      REAL hfmax(ngrid),wmax(ngrid)
146      REAL pbl_teta(ngrid),dteta(ngrid,nlayer)
147      REAL rpdhd(ngrid,nlayer)
148      REAL wtdif(ngrid,nlayer),rho(ngrid,nlayer)
149      REAL wtth(ngrid,nlayer)
150
151! **********************************************************************
152! Initializations
153! **********************************************************************
154
155      lmax(:)=0
156      pdu_th(:,:)=0.
157      pdv_th(:,:)=0.
158      pdt_th(:,:)=0.
159      entr_therm(:,:)=0.
160      detr_therm(:,:)=0.
161      q2_therm(:,:)=0.
162      dq2_therm(:,:)=0.
163      pbl_dtke(:,:)=0.
164      fm_therm(:,:)=0.
165      zw2(:,:)=0.
166      fraca(:,:)=0.
167      zfraca(:,:)=0.
168      if (tracer) then
169         pdq_th(:,:,:)=0.
170      end if
171      d_t_ajs(:,:)=0.
172      d_u_ajs(:,:)=0.
173      d_v_ajs(:,:)=0.
174      d_q_ajs(:,:,:)=0.
175      heatFlux(:,:)=0.
176      heatFlux_down(:,:)=0.
177      buoyancyOut(:,:)=0.
178      buoyancyEst(:,:)=0.
179      zmaxth(:)=0.
180      lmax_real(:)=0.
181
182
183! **********************************************************************
184! Preparing inputs for the thermals: increment tendancies
185! from other subroutines called before the thermals model
186! **********************************************************************
187
188       zu(:,:)=pu(:,:)+pdu(:,:)*ptimestep ! u-component of wind velocity
189       zv(:,:)=pv(:,:)+pdv(:,:)*ptimestep ! v-component of wind velocity
190       zt(:,:)=pt(:,:)+pdt(:,:)*ptimestep ! temperature
191
192       pq_therm(:,:,:)=0. ! tracer concentration
193
194       if(qtransport_thermals) then
195          if(tracer) then ! tracer is a logical that is true if tracer must be transported in the GCM physics
196                pq_therm(:,:,:)=pq(:,:,:)+pdq(:,:,:)*ptimestep ! tracer concentration
197          endif
198       endif
199
200
201       IF(dtke_thermals) THEN
202          DO l=1,nlayer
203              q2_therm(:,l)=0.5*(q2(:,l)+q2(:,l+1))
204          ENDDO
205       ENDIF
206
207! **********************************************************************
208! --> CALLTHERM
209! SUB-TIMESTEP LOOP
210! **********************************************************************
211
212         zdt=ptimestep/REAL(nsplit_thermals) !subtimestep
213
214         DO isplit=1,nsplit_thermals !temporal loop on the subtimestep
215
216! Initialization of intermediary variables
217
218         zzw2(:,:)=0.
219         zmax(:)=0.
220         lmax(:)=0
221
222         if (nq .ne. 0 .and. igcm_co2 .ne. 0) then !initialize co2 tracer tendancy
223            d_q_the(:,:,igcm_co2)=0.
224         endif
225
226! CALL to main thermal routine
227             CALL thermcell_main_mars(ngrid,nlayer,nq &
228     &      ,tracer,igcm_co2 &
229     &      ,zdt  &
230     &      ,pplay,pplev,pphi,zzlev,zzlay  &
231     &      ,zu,zv,zt,pq_therm,q2_therm  &
232     &      ,d_t_the,d_q_the  &
233     &      ,zfm_therm,zentr_therm,zdetr_therm,lmax,zmax  &
234     &      ,zzw2,fraca,zpopsk &
235     &      ,zheatFlux,zheatFlux_down &
236     &      ,zbuoyancyOut,zbuoyancyEst)
237
238      fact=1./REAL(nsplit_thermals)
239
240! Update thermals tendancies
241            d_t_the(:,:)=d_t_the(:,:)*ptimestep*fact !temperature
242            if (igcm_co2 .ne. 0) then
243               d_q_the(:,:,igcm_co2)=d_q_the(:,:,igcm_co2)*ptimestep*fact !co2 mass mixing ratio
244            endif
245            zmaxth(:)=zmaxth(:)+zmax(:)*fact !thermals height
246            lmax_real(:)=lmax_real(:)+float(lmax(:))*fact !thermals height index
247            fm_therm(:,:)=fm_therm(:,:)  & !upward mass flux
248     &      +zfm_therm(:,:)*fact
249            entr_therm(:,:)=entr_therm(:,:)  & !entrainment mass flux
250     &       +zentr_therm(:,:)*fact
251            detr_therm(:,:)=detr_therm(:,:)  & !detrainment mass flux
252     &       +zdetr_therm(:,:)*fact
253            zfraca(:,:)=zfraca(:,:) + fraca(:,:)*fact !updraft fractional coverage
254            heatFlux(:,:)=heatFlux(:,:) & !upward heat flux
255     &       +zheatFlux(:,:)*fact
256            heatFlux_down(:,:)=heatFlux_down(:,:) & !downward heat flux
257     &       +zheatFlux_down(:,:)*fact
258            buoyancyOut(:,:)=buoyancyOut(:,:) & !plume final buoyancy
259     &       +zbuoyancyOut(:,:)*fact
260            buoyancyEst(:,:)=buoyancyEst(:,:) & !plume estimated buoyancy used for vertical velocity computation
261     &       +zbuoyancyEst(:,:)*fact
262            zw2(:,:)=zw2(:,:) + zzw2(:,:)*fact !vertical velocity
263
264! Save tendancies
265           d_t_ajs(:,:)=d_t_ajs(:,:)+d_t_the(:,:) !temperature tendancy (delta T)
266            if (igcm_co2 .ne. 0) then
267               d_q_ajs(:,:,igcm_co2)=d_q_ajs(:,:,igcm_co2)+d_q_the(:,:,igcm_co2) !tracer tendancy (delta q)
268            endif
269
270!  Increment temperature and co2 concentration for next pass in subtimestep loop
271            zt(:,:) = zt(:,:) + d_t_the(:,:) !temperature
272            if (igcm_co2 .ne. 0) then
273             pq_therm(:,:,igcm_co2) = &
274     &          pq_therm(:,:,igcm_co2) + d_q_the(:,:,igcm_co2) !co2 tracer
275            endif
276
277
278         ENDDO ! isplit
279!****************************************************************
280
281!     Do we have thermals that are too high ?
282
283      lmax(:)=nint(lmax_real(:))
284      zlmax=MAXVAL(lmax(:))+2
285      if (zlmax .ge. nlayer) then
286        print*,'thermals have reached last layer of the model'
287        print*,'this is not good !'
288      endif
289
290
291! Now that we have computed total entrainment and detrainment, we can
292! advect u, v, and q in thermals. (potential temperature and co2 MMR
293! have already been advected in thermcell_main because they are coupled
294! to the determination of the thermals caracteristics). This is done
295! separatly because u,v, and q are not used in thermcell_main for
296! any thermals-related computation : they are purely passive.
297
298! mass of cells
299      do l=1,nlayer
300         masse(:,l)=(pplev(:,l)-pplev(:,l+1))/g
301      enddo
302
303! recompute detrainment mass flux from entrainment and upward mass flux
304! this ensure mass flux conservation
305      detrmod(:,:)=0.
306      do l=1,zlmax
307         do ig=1,ngrid
308            detrmod(ig,l)=fm_therm(ig,l)-fm_therm(ig,l+1) &
309     &      +entr_therm(ig,l)
310            if (detrmod(ig,l).lt.0.) then
311               entr_therm(ig,l)=entr_therm(ig,l)-detrmod(ig,l)
312               detrmod(ig,l)=0.
313            endif
314         enddo
315      enddo
316
317      ! u component of wind velocity advection in thermals
318      ! result is a derivative (d_u_ajs in m/s/s)
319      ndt=10
320      call thermcell_dqup(ngrid,nlayer,ptimestep                &
321     &      ,fm_therm,entr_therm,detrmod,  &
322     &     masse,zu,d_u_ajs,ndt,zlmax)
323
324      ! v component of wind velocity advection in thermals
325      ! result is a derivative (d_v_ajs in m/s/s)
326      call thermcell_dqup(ngrid,nlayer,ptimestep    &
327     &       ,fm_therm,entr_therm,detrmod,  &
328     &     masse,zv,d_v_ajs,ndt,zlmax)
329
330      ! non co2 tracers advection in thermals
331      ! result is a derivative (d_q_ajs in kg/kg/s)
332
333      if (nq .ne. 0.) then
334      DO iq=1,nq
335      if (iq .ne. igcm_co2) then
336      call thermcell_dqup(ngrid,nlayer,ptimestep     &
337     &     ,fm_therm,entr_therm,detrmod,  &
338     &    masse,pq_therm(:,:,iq),d_q_ajs(:,:,iq),ndt,zlmax)
339      endif
340      ENDDO
341      endif
342
343      ! tke advection in thermals
344      ! result is a tendancy (d_u_ajs in J)
345      if (dtke_thermals) then
346      call thermcell_dqup(ngrid,nlayer,ptimestep     &
347     &     ,fm_therm,entr_therm,detrmod,  &
348     &    masse,q2_therm,dq2_therm,ndt,zlmax)
349      endif
350
351      ! compute wmax for diagnostics
352      DO ig=1,ngrid
353         wmax(ig)=MAXVAL(zw2(ig,:))
354      ENDDO
355
356! **********************************************************************
357! **********************************************************************
358! **********************************************************************
359! CALLTHERM END
360! **********************************************************************
361! **********************************************************************
362! **********************************************************************
363
364
365! **********************************************************************
366! Preparing outputs
367! **********************************************************************
368
369      do l=1,zlmax
370        pdu_th(:,l)=d_u_ajs(:,l)
371        pdv_th(:,l)=d_v_ajs(:,l)
372      enddo
373
374           ! if tracers are transported in thermals, update output variables, else these are 0.
375           if(qtransport_thermals) then
376              if(tracer) then
377               do iq=1,nq
378                if (iq .ne. igcm_co2) then
379                  do l=1,zlmax
380                     pdq_th(:,l,iq)=d_q_ajs(:,l,iq) !non-co2 tracers d_q_ajs are dq/dt (kg/kg/s)
381                  enddo
382                else
383                  do l=1,zlmax
384                     pdq_th(:,l,iq)=d_q_ajs(:,l,iq)/ptimestep !co2 tracer d_q_ajs is dq (kg/kg)
385                  enddo
386                endif
387               enddo
388              endif
389           endif
390
391           ! if tke is transported in thermals, update output variable, else this is 0.
392           IF(dtke_thermals) THEN
393              DO l=2,nlayer
394                 pbl_dtke(:,l)=0.5*(dq2_therm(:,l-1)+dq2_therm(:,l))
395              ENDDO
396 
397              pbl_dtke(:,1)=0.5*dq2_therm(:,1)
398              pbl_dtke(:,nlayer+1)=0.
399           ENDIF
400
401           ! update output variable for temperature. d_t_ajs is delta T in (K), pdt_th is dT/dt in (K/s)
402           do l=1,zlmax
403              pdt_th(:,l)=d_t_ajs(:,l)/ptimestep
404           enddo
405
406
407! **********************************************************************
408! SURFACE LAYER INTERFACE
409! Compute the free convection velocity w* scale for surface layer gustiness
410! speed parameterization. The computed value of w* will be used at the next
411! timestep to modify surface-atmosphere exchange fluxes, because the surface
412! layer scheme and diffusion are called BEFORE the thermals. (outside of these
413! routines)
414! **********************************************************************
415
416! Potential temperature gradient
417
418      dteta(:,nlayer)=0.
419      DO l=1,nlayer-1
420         DO ig=1, ngrid
421            dteta(ig,l) = ((zt(ig,l+1)-zt(ig,l))/zpopsk(ig,l))          &
422     &              /(zzlay(ig,l+1)-zzlay(ig,l))
423         ENDDO
424      ENDDO
425
426! Computation of the PBL mixed layer temperature
427
428      DO ig=1, ngrid
429         ii=MINLOC(abs(dteta(ig,1:lmax(ig))))
430         pbl_teta(ig) = zt(ig,ii(1))/zpopsk(ig,ii(1))
431      ENDDO
432
433! In order to have an accurate w*, we must add the heat flux from the
434! diffusion scheme to the computation of the maximum heat flux hfmax
435! Here pdhdif is the potential temperature change from the diffusion
436! scheme (Mellor and Yamada, see paper section 6, paragraph 57)
437
438! compute rho as it is after the diffusion
439
440      rho(:,:)=pplay(:,:)                                               &
441     & /(r*(pt(:,:)+pdhdif(:,:)*zpopsk(:,:)*ptimestep))
442
443! integrate -rho*pdhdif
444
445      rpdhd(:,:)=0.
446
447      DO ig=1,ngrid
448       DO l=1,lmax(ig)
449        rpdhd(ig,l)=0.
450        DO k=1,l
451         rpdhd(ig,l)=rpdhd(ig,l)-rho(ig,k)*pdhdif(ig,k)*                &
452     & (zzlev(ig,k+1)-zzlev(ig,k))
453        ENDDO
454        rpdhd(ig,l)=rpdhd(ig,l)-sensibFlux(ig)/cpp
455       ENDDO
456      ENDDO
457
458! compute w'theta' (vertical turbulent flux of temperature) from
459! the diffusion scheme
460
461      wtdif(:,:)=rpdhd(:,:)/rho(:,:)
462
463! Now we compute the contribution of the thermals to w'theta':
464! compute rho as it is after the thermals
465
466      rho(:,:)=pplay(:,:)/(r*(zt(:,:)))
467
468! integrate -rho*pdhdif
469
470      DO ig=1,ngrid
471       DO l=1,lmax(ig)
472        rpdhd(ig,l)=0.
473        DO k=1,l
474         rpdhd(ig,l)=rpdhd(ig,l)-rho(ig,k)*(pdt_th(ig,k)/zpopsk(ig,k))* &
475     & (zzlev(ig,k+1)-zzlev(ig,k))
476        ENDDO
477        rpdhd(ig,l)=rpdhd(ig,l)+                                        &
478     &    rho(ig,1)*(heatFlux(ig,1)+heatFlux_down(ig,1))
479       ENDDO
480      ENDDO
481      rpdhd(:,nlayer)=0.
482
483! compute w'teta' from thermals
484
485      wtth(:,:)=rpdhd(:,:)/rho(:,:)
486
487! Add vertical turbulent heat fluxes from the thermals and the diffusion scheme
488! and compute the maximum
489
490      DO ig=1,ngrid
491        hfmax(ig)=MAXVAL(wtth(ig,:)+wtdif(ig,:))
492      ENDDO
493
494! Finally we can compute the free convection velocity scale
495! We follow Spiga et. al 2010 (QJRMS)
496! ------------
497
498      DO ig=1, ngrid
499         IF (zmax(ig) .gt. 0.) THEN
500            wstar(ig)=(g*zmaxth(ig)*hfmax(ig)/pbl_teta(ig))**(1./3.)
501         ELSE
502            wstar(ig)=0.
503         ENDIF
504      ENDDO
505
506       END
Note: See TracBrowser for help on using the repository browser.