/[lmdze]/trunk/libf/dyn3d/limx.f
ViewVC logotype

Contents of /trunk/libf/dyn3d/limx.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 57 - (show annotations)
Mon Jan 30 12:54:02 2012 UTC (12 years, 4 months ago) by guez
File size: 2565 byte(s)
Write used namelists to file "" instead of standard output.

Avoid aliasing in "inidissip" in calls to "divgrad2", "divgrad",
"gradiv2", "gradiv", "nxgraro2" and "nxgrarot". Add a degenerate
dimension to arrays so they have rank 3, like the dummy arguments in
"divgrad2", "divgrad", "gradiv2", "gradiv", "nxgraro2" and "nxgrarot".

Extract the initialization part from "bilan_dyn" and make a separate
procedure, "init_dynzon", from it.

Move variables from modules "iniprint" and "logic" to module
"conf_gcm_m".

Promote internal procedures of "fxy" to private procedures of module
"fxy_m".

Extracted documentation from "inigeom". Removed useless "save"
attributes. Removed useless intermediate variables. Extracted
processing of poles from loop on latitudes. Write coordinates to file
"longitude_latitude.txt" instead of standard output.

Do not use ozone tracer for radiative transfer.

1 !
2 ! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/limx.F,v 1.1.1.1 2004/05/19 12:53:06 lmdzadmin Exp $
3 !
4 SUBROUTINE limx(s0,sx,sm,pente_max)
5 c
6 c Auteurs: P.Le Van, F.Hourdin, F.Forget
7 c
8 c ********************************************************************
9 c Shema d'advection " pseudo amont " .
10 c ********************************************************************
11 c nq,iq,q,pbaru,pbarv,w sont des arguments d'entree pour le s-pg ....
12 c
13 c
14 c --------------------------------------------------------------------
15 use dimens_m
16 use paramet_m
17 use comconst
18 use comvert
19 use conf_gcm_m
20 use comgeom
21 IMPLICIT NONE
22 c
23 c
24 c
25 c Arguments:
26 c ----------
27 real pente_max
28 REAL s0(ip1jmp1,llm),sm(ip1jmp1,llm)
29 real sx(ip1jmp1,llm)
30 c
31 c Local
32 c ---------
33 c
34 INTEGER ij,l,j,i,iju,ijq,indu(ip1jmp1),niju
35 integer n0,iadvplus(ip1jmp1,llm),nl(llm)
36 c
37 REAL q(ip1jmp1,llm)
38 real dxq(ip1jmp1,llm)
39
40
41 REAL new_m,zm
42 real dxqu(ip1jmp1)
43 real adxqu(ip1jmp1),dxqmax(ip1jmp1)
44
45 Logical extremum,first
46 save first
47
48 REAL SSUM,CVMGP,CVMGT
49 integer ismax,ismin
50 EXTERNAL SSUM, convflu,ismin,ismax
51
52 data first/.true./
53
54
55 DO l = 1,llm
56 DO ij=1,ip1jmp1
57 q(ij,l) = s0(ij,l) / sm ( ij,l )
58 dxq(ij,l) = sx(ij,l) /sm(ij,l)
59 ENDDO
60 ENDDO
61
62 c calcul de la pente a droite et a gauche de la maille
63
64 do l = 1, llm
65 do ij=iip2,ip1jm-1
66 dxqu(ij)=q(ij+1,l)-q(ij,l)
67 enddo
68 do ij=iip1+iip1,ip1jm,iip1
69 dxqu(ij)=dxqu(ij-iim)
70 enddo
71
72 do ij=iip2,ip1jm
73 adxqu(ij)=abs(dxqu(ij))
74 enddo
75
76 c calcul de la pente maximum dans la maille en valeur absolue
77
78 do ij=iip2+1,ip1jm
79 dxqmax(ij)=pente_max*min(adxqu(ij-1),adxqu(ij))
80 enddo
81
82 do ij=iip1+iip1,ip1jm,iip1
83 dxqmax(ij-iim)=dxqmax(ij)
84 enddo
85
86 c calcul de la pente avec limitation
87
88 do ij=iip2+1,ip1jm
89 if( dxqu(ij-1)*dxqu(ij).gt.0.
90 & .and. dxq(ij,l)*dxqu(ij).gt.0.) then
91 dxq(ij,l)=
92 & sign(min(abs(dxq(ij,l)),dxqmax(ij)),dxq(ij,l))
93 else
94 c extremum local
95 dxq(ij,l)=0.
96 endif
97 enddo
98 do ij=iip1+iip1,ip1jm,iip1
99 dxq(ij-iim,l)=dxq(ij,l)
100 enddo
101
102 DO ij=1,ip1jmp1
103 sx(ij,l) = dxq(ij,l)*sm(ij,l)
104 ENDDO
105
106 ENDDO
107
108 RETURN
109 END

  ViewVC Help
Powered by ViewVC 1.1.21