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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 178 - (show annotations)
Fri Mar 11 18:47:26 2016 UTC (8 years, 2 months ago) by guez
File size: 1253 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/groupeun.F,v 1.1.1.1 2004/05/19
3 ! 12:53:07 lmdzadmin Exp $
4
5 SUBROUTINE groupeun(jjmax, llmax, q)
6 USE dimens_m
7 USE paramet_m
8 USE comconst
9 USE comgeom
10 IMPLICIT NONE
11
12
13 INTEGER jjmax, llmax
14 REAL q(iip1, jjmax, llmax)
15
16 INTEGER ngroup
17 PARAMETER (ngroup=3)
18
19 REAL airen, qn
20 REAL aires, qs
21
22 INTEGER i, j, l, ig, j1, j2, i0, jd
23
24 ! hamps 3D
25 jd = jjp1 - jjmax
26 DO l = 1, llm
27 j1 = 1 + jd
28 j2 = 2
29 DO ig = 1, ngroup
30 DO j = j1 - jd, j2 - jd
31 DO i0 = 1, iim, 2**(ngroup-ig+1)
32 airen = 0.
33 qn = 0.
34 aires = 0.
35 qs = 0.
36 DO i = i0, i0 + 2**(ngroup-ig+1) - 1
37 airen = airen + aire_2d(i, j)
38 aires = aires + aire_2d(i, jjp1-j+1)
39 qn = qn + q(i, j, l)
40 qs = qs + q(i, jjp1-j+1-jd, l)
41 END DO
42 DO i = i0, i0 + 2**(ngroup-ig+1) - 1
43 q(i, j, l) = qn*aire_2d(i, j)/airen
44 q(i, jjp1-j+1-jd, l) = qs*aire_2d(i, jjp1-j+1)/aires
45 END DO
46 END DO
47 q(iip1, j, l) = q(1, j, l)
48 q(iip1, jjp1-j+1-jd, l) = q(1, jjp1-j+1-jd, l)
49 END DO
50 j1 = j2 + 1
51 j2 = j2 + 2**ig
52 END DO
53 END DO
54
55 RETURN
56 END SUBROUTINE groupeun

  ViewVC Help
Powered by ViewVC 1.1.21