source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inigrads.f90 @ 5185

Last change on this file since 5185 was 5158, checked in by abarral, 5 months ago

Add missing klon on strataer_emiss_mod.F90
Correct various missing explicit declarations
Replace tabs by spaces (tabs are not part of the fortran charset)
Continue cleaning modules
Removed unused arguments and variables

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
RevLine 
[524]1! $Header$
[5099]2
[5103]3SUBROUTINE inigrads(if, im &
4        , x, fx, xmin, xmax, jm, y, ymin, ymax, fy, lm, z, fz &
5        , dt, file, titlel)
[5137]6  USE lmdz_gradsdef
[524]7
[5113]8  IMPLICIT NONE
[524]9
[5116]10  INTEGER :: if, im, jm, lm, i, j, l
11  REAL :: x(im), y(jm), z(lm), fx, fy, fz, dt
12  REAL :: xmin, xmax, ymin, ymax
[524]13
[5117]14  CHARACTER(LEN = *), INTENT(IN) :: file
15  CHARACTER(LEN = *), INTENT(IN) :: titlel
[524]16
[5103]17  ! data unit/66,32,34,36,38,40,42,44,46,48/
[5116]18  INTEGER :: nf
[5103]19  save nf
20  data nf/0/
[524]21
[5103]22  unit(1) = 66
23  unit(2) = 32
24  unit(3) = 34
25  unit(4) = 36
26  unit(5) = 38
27  unit(6) = 40
28  unit(7) = 42
29  unit(8) = 44
30  unit(9) = 46
[524]31
[5117]32  IF (if<=nf) stop 'verifier les appels a inigrads'
[524]33
[5103]34  PRINT*, 'Entree dans inigrads'
[524]35
[5103]36  nf = if
37  title(if) = titlel
38  ivar(if) = 0
[524]39
[5103]40  fichier(if) = trim(file)
[524]41
[5103]42  firsttime(if) = .TRUE.
43  dtime(if) = dt
[524]44
[5103]45  iid(if) = 1
46  ifd(if) = im
47  imd(if) = im
[5158]48  DO i = 1, im
[5103]49    xd(i, if) = x(i) * fx
[5116]50    IF(xd(i, if)<xmin) iid(if) = i + 1
51    IF(xd(i, if)<=xmax) ifd(if) = i
[5103]52  enddo
53  PRINT*, 'On stoke du point ', iid(if), '  a ', ifd(if), ' en x'
[524]54
[5103]55  jid(if) = 1
56  jfd(if) = jm
57  jmd(if) = jm
[5158]58  DO j = 1, jm
[5103]59    yd(j, if) = y(j) * fy
[5116]60    IF(yd(j, if)>ymax) jid(if) = j + 1
61    IF(yd(j, if)>=ymin) jfd(if) = j
[5103]62  enddo
63  PRINT*, 'On stoke du point ', jid(if), '  a ', jfd(if), ' en y'
[524]64
[5103]65  PRINT*, 'Open de dat'
66  PRINT*, 'file=', file
67  PRINT*, 'fichier(if)=', fichier(if)
[524]68
[5103]69  PRINT*, 4 * (ifd(if) - iid(if)) * (jfd(if) - jid(if))
70  PRINT*, trim(file) // '.dat'
[524]71
[5103]72  OPEN (unit(if) + 1, FILE = trim(file) // '.dat' &
73          , FORM = 'unformatted', &
74          ACCESS = 'direct' &
75          , RECL = 4 * (ifd(if) - iid(if) + 1) * (jfd(if) - jid(if) + 1))
[524]76
[5103]77  PRINT*, 'Open de dat ok'
[524]78
[5103]79  lmd(if) = lm
[5158]80  DO l = 1, lm
[5103]81    zd(l, if) = z(l) * fz
82  enddo
[524]83
[5103]84  irec(if) = 0
[524]85
[5103]86  PRINT*, if, imd(if), jmd(if), lmd(if)
87  PRINT*, 'if,imd(if),jmd(if),lmd(if)'
[524]88
[5105]89
[5116]90END SUBROUTINE inigrads
Note: See TracBrowser for help on using the repository browser.