source: LMDZ.3.3/branches/rel-1-0-patch/libf/dyn3d/read_dstoke.F @ 346

Last change on this file since 346 was 253, checked in by (none), 23 years ago

This commit was manufactured by cvs2svn to create branch
'rel-1-0-patch'.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1c $Header$
2            subroutine read_dstoke(irec,zdtvr,ziadvtrac,ziadvtrac2)
3
4
5            IMPLICIT NONE
6
7#include "netcdf.inc"
8#include "dimensions.h"
9#include "paramet.h"
10#include "comgeom.h"
11#include "comvert.h"
12
13       
14        integer ncidfd
15        save ncidfd
16        integer variddt,varididvt,varididvp
17        save variddt,varididvt,varididvp
18        real*4 dtv(1,1,1),adv2(1,1,1),adv(1,1,1)
19        real zdtvr,ziadvtrac,ziadvtrac2
20        integer status,irec
21        real rcode
22        INTEGER epais(2), debut(2)
23       
24        if (irec .eq. 0) then
25       
26        ncidfd=NCOPN('defstoke.nc',NCNOWRIT,rcode)
27
28        variddt=NCVID(ncidfd,'dtvr',rcode)
29        print*,'ncidfd,variddt',ncidfd,variddt
30
31        varididvt=NCVID(ncidfd,'istdyn',rcode)
32        print*,'ncidfd,varididvt',ncidfd,varididvt
33       
34        varididvp=NCVID(ncidfd,'istphy',rcode)
35        print*,'ncidfd,varididvp',ncidfd,varididvp
36
37c lecture de zdtvr et ziadvtrac
38       
39        epais(1) = 1
40        epais(2) = 1
41        debut(1) = 1
42        debut(2) = 1
43
44#ifdef NC_DOUBLE
45        status=NF_GET_VARA_DOUBLE(ncidfd,variddt,debut,epais,dtv)
46#else
47        status=NF_GET_VARA_REAL(ncidfd,variddt,debut,epais,dtv)
48#endif
49        zdtvr=dtv(1,1,1)
50
51#ifdef NC_DOUBLE
52        status=NF_GET_VARA_DOUBLE(ncidfd,varididvt,debut,epais,adv)
53#else
54        status=NF_GET_VARA_REAL(ncidfd,varididvt,debut,epais,adv)
55#endif
56        ziadvtrac= adv(1,1,1)
57       
58#ifdef NC_DOUBLE
59        status=NF_GET_VARA_DOUBLE(ncidfd,varididvp,debut,epais,adv2)
60#else
61        status=NF_GET_VARA_REAL(ncidfd,varididvp,debut,epais,adv2)
62#endif
63        ziadvtrac2= adv2(1,1,1)
64
65        write(*,*) 'ds read_dstoke zdtvr = ', zdtvr
66        write(*,*) 'ds read_dstoke ziadvtrac = ', ziadvtrac
67        write(*,*) 'ds read_dstoke ziadvtrac2 = ', ziadvtrac2
68       
69c           status=NF_CLOSE(ncidfd)
70
71        else
72            stop'Pas bon irec ne 0'
73        endif
74       
75        return
76
77        end
78
Note: See TracBrowser for help on using the repository browser.