/[lmdze]/trunk/dyn3d/inigrads.f
ViewVC logotype

Annotation of /trunk/dyn3d/inigrads.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 56 - (hide annotations)
Tue Jan 10 19:02:02 2012 UTC (12 years, 5 months ago) by guez
Original Path: trunk/libf/dyn3d/inigrads.f90
File size: 2195 byte(s)
Imported "writehist.f" from LMDZ.

Moved module variable "histaveid" from "com_io_dyn" to "initdynav_m".

In "inithist", access directly module variables from "com_io_dyn"
instead of going through the arguments. Copying from LMDZ, write "u"
and scalar variables to separate files. Create a new variable for the
new file in "com_io_dyn". Copying from LMDZ, change the vertical axes
of the three files.

Removed some useless initializations in "dissip".

In "bilan_dyn", removed useless variable "time". Avoiding the
approximate test on "dt_cum" being a multiple of "dt_app", just
compute "ncum" from known usage of "bilan_dyn" and compute "dt_cum"
from "ncum". Change "periodav" from real to integer in
"conf_gcm_m". Since "day_step" is required to be a multiple of
"iperiod", so is "ncum".

1 guez 3 module inigrads_m
2    
3     implicit none
4    
5     contains
6    
7     subroutine inigrads(i_f, x, fx, xmin, xmax, y, ymin, ymax, fy, z, fz, dt, &
8     file, titlel)
9    
10 guez 56 ! From dyn3d/inigrads.F, version 1.1.1.1 2004/05/19 12:53:07
11 guez 3
12     use gradsdef, only: unit, title, ivar, fichier, firsttime, dtime, iid, &
13     ifd, imd, xd, iid, jid, jfd, jmd, yd, lmd, zd, irec
14    
15     integer, intent(in):: i_f
16     real, intent(in):: x(:), y(:), z(:), fx, fy, fz, dt
17     real, intent(in):: xmin, xmax, ymin, ymax
18     character(len=*), intent(in):: file, titlel
19    
20     ! Variables local to the procedure:
21     integer im, jm, lm
22     integer i, j, l
23     integer:: nf = 0
24    
25     !-------------------------------------
26    
27     print *, 'Call sequence information: inigrads'
28    
29     im = size(x)
30     jm = size(y)
31     lm = size(z)
32    
33     unit(1)=66
34     unit(2)=32
35     unit(3)=34
36     unit(4)=36
37     unit(5)=38
38     unit(6)=40
39     unit(7)=42
40     unit(8)=44
41     unit(9)=46
42    
43     if (i_f.le.nf) stop'verifier les appels a inigrads'
44    
45     nf=i_f
46     title(i_f)=titlel
47     ivar(i_f)=0
48    
49     fichier(i_f)=trim(file)
50    
51     firsttime(i_f)=.true.
52     dtime(i_f)=dt
53    
54     iid(i_f)=1
55     ifd(i_f)=im
56     imd(i_f)=im
57     do i=1, im
58     xd(i, i_f)=x(i)*fx
59     if(xd(i, i_f).lt.xmin) iid(i_f)=i+1
60     if(xd(i, i_f).le.xmax) ifd(i_f)=i
61     enddo
62     print *, 'On stoke du point ', iid(i_f), ' à ', ifd(i_f), ' en x'
63    
64     jid(i_f)=1
65     jfd(i_f)=jm
66     jmd(i_f)=jm
67     do j=1, jm
68     yd(j, i_f)=y(j)*fy
69     if(yd(j, i_f).gt.ymax) jid(i_f)=j+1
70     if(yd(j, i_f).ge.ymin) jfd(i_f)=j
71     enddo
72     print *, 'On stoke du point ', jid(i_f), ' à ', jfd(i_f), ' en y'
73    
74     print *, 'fichier(i_f)=', fichier(i_f)
75     print *, 4 * (ifd(i_f) - iid(i_f)) * (jfd(i_f) - jid(i_f))
76     print *, 'Opening "' // trim(file) // '.dat"...'
77    
78     OPEN(unit=unit(i_f)+1, FILE=trim(file)//'.dat', FORM='unformatted', &
79     ACCESS='direct', RECL=4*(ifd(i_f)-iid(i_f)+1)*(jfd(i_f)-jid(i_f)+1))
80    
81     lmd(i_f)=lm
82     do l=1, lm
83     zd(l, i_f)=z(l)*fz
84     enddo
85    
86     irec(i_f)=0
87     print *, "i_f = ", i_f
88     print *, "imd(i_f) = ", imd(i_f)
89     print *, "jmd(i_f) = ", jmd(i_f)
90     print *, "lmd(i_f) = ", lmd(i_f)
91    
92     end subroutine inigrads
93    
94     end module inigrads_m

  ViewVC Help
Powered by ViewVC 1.1.21