source: trunk/WRF.COMMON/WRFV2/external/io_grib1/test_io_grib1.F @ 2756

Last change on this file since 2756 was 11, checked in by aslmd, 14 years ago

spiga@svn-planeto:ajoute le modele meso-echelle martien

File size: 1.6 KB
Line 
1PROGRAM test_io_grib2
2  IMPLICIT NONE
3#include "wrf_io_flags.h"
4
5  integer            :: Status
6  character(len=80)  :: SysDepInfo
7  character(len=80)  :: FileName = 'test.gr2'
8  integer            :: Comm
9  integer            :: IOComm
10  integer            :: DataHandle
11  integer            :: FileStat
12  real, DIMENSION( 1:1, 1:4, 1:4, 1:4) :: Field
13  integer            :: DomainDesc
14  character(len=3)   :: MemoryOrder = 'XZY'
15  character(len=3)   :: Stagger = ''
16  character(len=100) :: DimNames = ''
17  integer, dimension(3) :: DomainStart, DomainEnd, MemoryStart, &
18       MemoryEnd, PatchStart, PatchEnd
19
20  DomainStart(1) = 1
21  DomainStart(2) = 1
22  DomainStart(3) = 1
23  DomainEnd(1) = 4
24  DomainEnd(2) = 4
25  DomainEnd(3) = 4
26
27  MemoryStart(1) = 1
28  MemoryStart(2) = 1
29  MemoryStart(3) = 1
30  MemoryEnd(1) = 4
31  MemoryEnd(2) = 4
32  MemoryEnd(3) = 4
33
34  PatchStart(1) = 1
35  PatchStart(2) = 1
36  PatchStart(3) = 1
37  PatchEnd(1) = 4
38  PatchEnd(2) = 4
39  PatchEnd(3) = 4
40
41  call ext_gr1_ioinit(SysDepInfo,Status)
42
43  call ext_gr1_ioexit(Status)
44
45  call ext_gr1_open_for_write_begin(FileName, Comm, IOComm, SysDepInfo, &
46     DataHandle, Status)
47
48  call ext_gr1_open_for_write_commit( DataHandle , Status )
49
50  call ext_gr1_inquire_opened ( DataHandle, FileName , FileStat, Status )
51
52  Field(1,1,1,1) = 2.1
53  call ext_gr1_write_field ( DataHandle, "2005-07-27_12:00:00","POT",Field, &
54       WRF_REAL, Comm, IOComm, DomainDesc, MemoryOrder, Stagger, &
55       DimNames, DomainStart, DomainEnd, MemoryStart, MemoryEnd, &
56       PatchStart, PatchEnd, Status)
57
58
59  call ext_gr1_ioclose ( DataHandle, Status )
60
61END PROGRAM
Note: See TracBrowser for help on using the repository browser.