/[lmdze]/trunk/Sources/dyn3d/limz.f
ViewVC logotype

Contents of /trunk/Sources/dyn3d/limz.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 178 - (show annotations)
Fri Mar 11 18:47:26 2016 UTC (8 years, 3 months ago) by guez
File size: 1825 byte(s)
Moved variables date0, deltat, datasz_max, ncvar_ids, point, buff_pos,
buffer, regular from module histcom_var to modules where they are
defined.

Removed procedure ioipslmpp, useless for a sequential program.

Added argument datasz_max to histwrite_real (to avoid circular
dependency with histwrite).

Removed useless variables and computations everywhere.

Changed real litteral constants from default kind to double precision
in lwb, lwu, lwvn, sw1s, swtt, swtt1, swu.

Removed unused arguments: paer of sw, sw1s, sw2s, swclr; pcldsw of
sw1s, sw2s; pdsig, prayl of swr; co2_ppm of clmain, clqh; tsol of
transp_lay; nsrf of screenp; kcrit and kknu of gwstress; pstd of
orosetup.

Added output of relative humidity.

1
2 ! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/limz.F,v 1.1.1.1 2004/05/19
3 ! 12:53:07 lmdzadmin Exp $
4
5 SUBROUTINE limz(s0, sz, sm, pente_max)
6
7 ! Auteurs: P.Le Van, F.Hourdin, F.Forget
8
9 ! ********************************************************************
10 ! Shema d'advection " pseudo amont " .
11 ! ********************************************************************
12 ! nq,iq,q,pbaru,pbarv,w sont des arguments d'entree pour le s-pg ....
13
14
15 ! --------------------------------------------------------------------
16 USE dimens_m
17 USE paramet_m
18 USE comconst
19 USE disvert_m
20 USE conf_gcm_m
21 USE comgeom
22 IMPLICIT NONE
23
24
25
26 ! Arguments:
27 ! ----------
28 REAL pente_max
29 REAL s0(ip1jmp1, llm), sm(ip1jmp1, llm)
30 REAL sz(ip1jmp1, llm)
31
32 ! Local
33 ! ---------
34
35 INTEGER ij, l
36
37 REAL q(ip1jmp1, llm)
38 REAL dzq(ip1jmp1, llm)
39
40 REAL dzqw(ip1jmp1)
41 REAL adzqw(ip1jmp1), dzqmax(ip1jmp1)
42
43 EXTERNAL convflu
44
45 DO l = 1, llm
46 DO ij = 1, ip1jmp1
47 q(ij, l) = s0(ij, l)/sm(ij, l)
48 dzq(ij, l) = sz(ij, l)/sm(ij, l)
49 END DO
50 END DO
51
52 ! calcul de la pente en haut et en bas de la maille
53 DO ij = 1, ip1jmp1
54 DO l = 1, llm - 1
55 dzqw(l) = q(ij, l+1) - q(ij, l)
56 END DO
57 dzqw(llm) = 0.
58
59 DO l = 1, llm
60 adzqw(l) = abs(dzqw(l))
61 END DO
62
63 ! calcul de la pente maximum dans la maille en valeur absolue
64
65 DO l = 2, llm - 1
66 dzqmax(l) = pente_max*min(adzqw(l-1), adzqw(l))
67 END DO
68
69 ! calcul de la pente avec limitation
70
71 DO l = 2, llm - 1
72 IF (dzqw(l-1)*dzqw(l)>0. .AND. dzq(ij,l)*dzqw(l)>0.) THEN
73 dzq(ij, l) = sign(min(abs(dzq(ij,l)),dzqmax(l)), dzq(ij,l))
74 ELSE
75 ! extremum local
76 dzq(ij, l) = 0.
77 END IF
78 END DO
79
80 DO l = 1, llm
81 sz(ij, l) = dzq(ij, l)*sm(ij, l)
82 END DO
83
84 END DO
85
86 RETURN
87 END SUBROUTINE limz

  ViewVC Help
Powered by ViewVC 1.1.21