source: LMDZ5/trunk/libf/dyn3dmem/inigrads.F @ 1907

Last change on this file since 1907 was 1907, checked in by lguez, 10 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
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

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • 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
File size: 1.9 KB
Line 
1!
2! $Header$
3!
4      subroutine inigrads(if,im
5     s  ,x,fx,xmin,xmax,jm,y,ymin,ymax,fy,lm,z,fz
6     s  ,dt,file,titlel)
7
8
9      implicit none
10
11      integer if,im,jm,lm,i,j,l
12      real x(im),y(jm),z(lm),fx,fy,fz,dt
13      real xmin,xmax,ymin,ymax
14
15      character(len=*),intent(in) :: file
16      character(len=*),intent(in) :: titlel
17
18#include "gradsdef.h"
19
20c     data unit/66,32,34,36,38,40,42,44,46,48/
21      integer nf
22      save nf
23      data nf/0/
24
25      unit(1)=66
26      unit(2)=32
27      unit(3)=34
28      unit(4)=36
29      unit(5)=38
30      unit(6)=40
31      unit(7)=42
32      unit(8)=44
33      unit(9)=46
34
35      if (if.le.nf) stop'verifier les appels a inigrads'
36
37      print*,'Entree dans inigrads'
38
39      nf=if
40      title(if)=titlel
41      ivar(if)=0
42
43      fichier(if)=trim(file)
44
45      firsttime(if)=.true.
46      dtime(if)=dt
47
48      iid(if)=1
49      ifd(if)=im
50      imd(if)=im
51      do i=1,im
52         xd(i,if)=x(i)*fx
53         if(xd(i,if).lt.xmin) iid(if)=i+1
54         if(xd(i,if).le.xmax) ifd(if)=i
55      enddo
56      print*,'On stoke du point ',iid(if),'  a ',ifd(if),' en x'
57
58      jid(if)=1
59      jfd(if)=jm
60      jmd(if)=jm
61      do j=1,jm
62         yd(j,if)=y(j)*fy
63         if(yd(j,if).gt.ymax) jid(if)=j+1
64         if(yd(j,if).ge.ymin) jfd(if)=j
65      enddo
66      print*,'On stoke du point ',jid(if),'  a ',jfd(if),' en y'
67
68      print*,'Open de dat'
69      print*,'file=',file
70      print*,'fichier(if)=',fichier(if)
71
72      print*,4*(ifd(if)-iid(if))*(jfd(if)-jid(if))
73      print*,trim(file)//'.dat'
74
75      OPEN (unit(if)+1,FILE=trim(file)//'.dat'
76     s   ,FORM='unformatted',
77     s   ACCESS='direct'
78     s  ,RECL=4*(ifd(if)-iid(if)+1)*(jfd(if)-jid(if)+1))
79
80      print*,'Open de dat ok'
81
82      lmd(if)=lm
83      do l=1,lm
84         zd(l,if)=z(l)*fz
85      enddo
86
87      irec(if)=0
88
89      print*,if,imd(if),jmd(if),lmd(if)
90      print*,'if,imd(if),jmd(if),lmd(if)'
91
92      return
93      end
Note: See TracBrowser for help on using the repository browser.