source: LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/thermcell_closure.F90 @ 1369

Last change on this file since 1369 was 1311, checked in by Laurent Fairhead, 14 years ago

Modifications to thermals for TKE transport


Modifications aux thermiques pour le transport de la TKE

pbl_surface_mode.F90 : ok_flux_surf=.false. seulement pour klon>1
physiq.F : option iflag_pbl=10 pour transporter la TKE avec les thermiques.
calltherm.F90 : passage de iflag_thermals_ed en argument pour thermcell_plume
thermcell_main.F90 : Appel a plusieurs version de thermcell_plume en option
thermcell_plume.F90 : plusieurs versions dans le meme fichier (temporaire)
thermcell_height.F90 : verrue pour les cas ou les thermiques montent tout

en haut

yamada4 : inclusion de la diffusion verticale en option iflag_pbl=9

+ variables anciennement common, puis save/allocatable, remises en local

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1!
2! $Header$
3!
4      SUBROUTINE thermcell_closure(ngrid,nlay,r_aspect,ptimestep,rho,  &
5     &   zlev,lalim,alim_star,f_star,zmax,wmax,f,lev_out)
6
7!-------------------------------------------------------------------------
8!thermcell_closure: fermeture, determination de f
9!
10! Modification 7 septembre 2009
11! 1. On enleve alim_star_tot des arguments pour le recalculer et etre ainis
12! coherent avec l'integrale au numerateur.
13! 2. On ne garde qu'une version des couples wmax,zmax et wmax_sec,zmax_sec
14! l'idee etant que le choix se fasse a l'appel de thermcell_closure
15! 3. Vectorisation en mettant les boucles en l l'exterieur avec des if
16!-------------------------------------------------------------------------
17      IMPLICIT NONE
18
19#include "iniprint.h"
20#include "thermcell.h"
21INTEGER ngrid,nlay
22INTEGER ig,k       
23REAL r_aspect,ptimestep
24integer lev_out                           ! niveau pour les print
25
26INTEGER lalim(ngrid)
27REAL alim_star(ngrid,nlay)
28REAL f_star(ngrid,nlay+1)
29REAL rho(ngrid,nlay)
30REAL zlev(ngrid,nlay)
31REAL zmax(ngrid)
32REAL wmax(ngrid)
33REAL zdenom(ngrid)
34REAL alim_star2(ngrid)
35REAL f(ngrid)
36
37REAL alim_star_tot(ngrid)
38INTEGER llmax
39
40!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
41!print*,'THERMCELL CLOSURE 26E'
42
43alim_star2(:)=0.
44alim_star_tot(:)=0.
45f(:)=0.
46
47! Indice vertical max (max de lalim) atteint par les thermiques sur le domaine
48llmax=1
49do ig=1,ngrid
50   if (lalim(ig)>llmax) llmax=lalim(ig)
51enddo
52
53
54! Calcul des integrales sur la verticale de alim_star et de
55!   alim_star^2/(rho dz)
56do k=1,llmax-1
57   do ig=1,ngrid
58      if (k<lalim(ig)) then
59         alim_star2(ig)=alim_star2(ig)+alim_star(ig,k)**2  &
60&                    /(rho(ig,k)*(zlev(ig,k+1)-zlev(ig,k)))
61         alim_star_tot(ig)=alim_star_tot(ig)+alim_star(ig,k)
62      endif
63   enddo
64enddo
65
66
67do ig=1,ngrid
68   if (alim_star2(ig)>1.e-10) then
69      f(ig)=wmax(ig)*alim_star_tot(ig)/  &
70&     (max(500.,zmax(ig))*r_aspect*alim_star2(ig))
71   endif
72enddo
73
74
75!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
76! TESTS POUR UNE NOUVELLE FERMETURE DANS LAQUELLE ALIM_STAR NE SERAIT
77! PAS NORMALISE
78!           f(ig)=f(ig)*f_star(ig,2)/(f_star(ig,lalim(ig)))
79!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
80
81      return
82      end
Note: See TracBrowser for help on using the repository browser.