4 SUBROUTINE vlspltgen_loc( q,iadv,pente_max,masse,w,pbaru,pbarv,
8 c auteurs: p.le van, f.hourdin, f.forget, f.codron
10 c ********************************************************************
11 c shema d
'advection " pseudo amont " .
12 c + test sur humidite specifique: Q advecte< Qsat aval
14 c ********************************************************************
15 c q,pbaru,pbarv,w sont des arguments d'entree pour le s-pg ....
17 c pente_max facteur
de limitation des pentes: 2 en general
18 c 0 pour un schema amont
19 c pbaru,pbarv,w flux
de masse en
u ,v ,w
22 c teta temperature potentielle, p
pression aux interfaces,
23 c pk exner au milieu des couches necessaire pour calculer
qsat
24 c --------------------------------------------------------------------
36 #include "dimensions.h"
61 DATA qmin,qmax/0.,1.e33/
63 c--pour rapport
de melange saturant--
65 REAL rtt,retv,r2es,r3les,r3ies,r4les,r4ies,play
66 REAL ptarg,pdelarg,foeew,zdelta
68 INTEGER ijb,ije,iq,iq2,ifils
69 LOGICAL,
SAVE :: firstcall=.
true.
71 type(
request),
SAVE :: MyRequest1
73 type(
request),
SAVE :: MyRequest2
77 foeew( ptarg,pdelarg ) = exp(
78 * (r3les*(1.-pdelarg)+r3ies*pdelarg) * (ptarg-rtt)
79 * / (ptarg-(r4les*(1.-pdelarg)+r4ies*pdelarg)) )
89 c
Allocate variables depending on dynamic variable
nqtot
94 c-- calcul
de qsat en chaque point
95 c-- approximation: au milieu des couches play(l)=(p(l)+p(l+1))/2
96 c pour eviter une exponentielle.
98 call settag(myrequest1,100)
99 call settag(myrequest2,101)
110 tempe(ij) = teta(ij,l) * pk(ij,l) /
cpp
113 zdelta = max( 0., sign(1., rtt - tempe(ij)) )
114 play = 0.5*(p(ij,l)+p(ij,l+1))
115 qsat(ij,l) = min(0.5, r2es* foeew(tempe(ij),zdelta) / play )
120 c print*,
'Debut vlsplt version debug sans vlyqs'
133 mu(ij,l)=pbaru(ij,l) * zzpbar
146 mv(ij,l)=pbarv(ij,l) * zzpbar
158 mw(ij,l,iq)=w(ij,l) * zzw
173 c
CALL scopy(ijp1llm,masse,1,
zm,1)
181 zq(ijb:ije,l,iq)=q(ijb:ije,l,iq)
182 zm(ijb:ije,l,iq)=masse(ijb:ije,l)
197 if (ok_iso_verif)
then
209 if(iadv(iq) == 0)
then
213 else if (iadv(iq)==10)
then
242 else if (iadv(iq)==14)
then
271 stop
'vlspltgen_p : schema non parallelise'
295 if (ok_iso_verif)
then
302 if(iadv(iq) == 0)
then
306 else if (iadv(iq)==10)
then
312 else if (iadv(iq)==14)
then
319 stop
'vlspltgen_p : schema non parallelise'
341 if (ok_iso_verif)
then
344 if (ok_iso_verif)
then
359 if(iadv(iq) == 0)
then
363 else if (iadv(iq)==10)
then
367 else if (iadv(iq)==14)
then
374 stop
'vlspltgen_p : schema non parallelise'
380 if (ok_iso_verif)
then
390 if(iadv(iq) == 0)
then
394 else if (iadv(iq)==10 .or. iadv(iq)==14 )
then
426 stop
'vlspltgen_p : schema non parallelise'
444 if (ok_iso_verif)
then
452 if(iadv(iq) == 0)
then
456 else if (iadv(iq)==10 .or. iadv(iq)==14 )
then
467 stop
'vlspltgen_p : schema non parallelise'
492 if (ok_iso_verif)
then
502 if(iadv(iq) == 0)
then
506 else if (iadv(iq)==10)
then
510 else if (iadv(iq)==14)
then
517 stop
'vlspltgen_p : schema non parallelise'
523 if (ok_iso_verif)
then
533 if(iadv(iq) == 0)
then
537 else if (iadv(iq)==10)
then
542 else if (iadv(iq)==14)
then
549 stop
'vlspltgen_p : schema non parallelise'
556 if (ok_iso_verif)
then
575 c print *,
'zq-->',ij,l,iq,
zq(ij,l,iq)
576 c print *,
'q-->',ij,l,iq,q(ij,l,iq)
577 q(ij,l,iq)=
zq(ij,l,iq)
585 DO ij=ijb,ije-iip1+1,iip1
586 q(ij+
iim,l,iq)=q(ij,l,iq)
593 if (ok_iso_verif)
then
subroutine check_isotopes(q, ijb, ije, err_msg)
subroutine vlxqs_loc(q, pente_max, masse, u_m, qsat, ijb_x, ije_x, iq)
integer, dimension(:), allocatable, save nqdesc
recursive subroutine vlx_loc(q, pente_max, masse, u_m, ijb_x, ije_x, iq)
subroutine vlyqs_loc(q, pente_max, masse, masse_adv_v, qsat, iq)
!$Id Turb_fcg_gcssold get_uvd hqturb_gcssold endif!large scale llm day day1 day day1 *dt_toga endif!time annee_ref dt_toga u_toga vq_toga w_prof vq_prof llm day day1 day day1 *dt_dice endif!time annee_ref dt_dice swup_dice vg_dice omega_dice tg_prof vg_profd w_profd omega_profd!do llm!print llm l llm
real, dimension(:,:,:), pointer, save zm
subroutine scopy(n, sx, incx, sy, incy)
integer, dimension(:,:), allocatable, save iqfils
subroutine pression(ngrid, ap, bp, ps, p)
real, dimension(:,:), pointer, save qsat
!$Id itapm1 ENDIF!IM on interpole les champs sur les niveaux STD de pression!IM a chaque pas de temps de la physique c!positionnement de l argument logique a false c!pour ne pas recalculer deux fois la meme chose!c!a cet effet un appel a plevel_new a ete deplace c!a la fin de la serie d appels c!la boucle DO nlevSTD a ete internalisee c!dans d ou la creation de cette routine c c!CALL false
!$Id mode_top_bound COMMON comconstr omeg dissip_zref ihf INTEGER lcl REAL dtvr!dynamical time mu
!$Id mode_top_bound COMMON comconstr cpp
integer, parameter vthallo
subroutine register_hallo_u(Field, ll, RUp, Rdown, SUp, SDown, a_request)
subroutine qsat(dq, q, e, p, t, r)
!$Id Turb_fcg_gcssold get_uvd hqturb_gcssold endif!large scale llm day day1 day day1 *dt_toga endif!time annee_ref dt_toga u_toga vq_toga w_prof vq_prof llm u(l)
subroutine sendrequest(a_Request)
recursive subroutine vly_loc(q, pente_max, masse, masse_adv_v, iq)
subroutine vlspltgen_loc(q, iadv, pente_max, masse, w, pbaru, pbarv,
!$Id itapm1 ENDIF!IM on interpole les champs sur les niveaux STD de pression!IM a chaque pas de temps de la physique c!positionnement de l argument logique a false c!pour ne pas recalculer deux fois la meme chose!c!a cet effet un appel a plevel_new a ete deplace c!a la fin de la serie d appels c!la boucle DO nlevSTD a ete internalisee c!dans d ou la creation de cette routine c c!CALL ulevSTD CALL &zphi philevSTD CALL &zx_rh rhlevSTD!DO klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon klev DO klon du jour ou toutes les read_climoz CALL true
integer, dimension(:), allocatable, save nqfils
subroutine waitsendrequest(a_Request)
c c zjulian c cym CALL iim cym klev iim
subroutine settag(a_request, tag)
real, dimension(:,:,:), pointer, save zq
real, dimension(:,:,:), pointer, save mw
real, dimension(:,:), pointer, save mv
subroutine waitrequest(a_Request)
recursive subroutine vlz_loc(q, pente_max, masse, w, ijb_x, ije_x, iq)