4 #include "wrf_status_codes.h"
6 character (80) FileName
8 character (80) SysDepInfo
20 integer, parameter :: pad = 3
21 integer, parameter :: jds=1 , jde=6 , &
24 integer, parameter :: jms=jds-pad , jme=jde+pad , &
25 ims=ids-pad , ime=ide+pad , &
27 integer, parameter :: jps=jds , jpe=jde , &
31 real u( ims:ime , kms:kme , jms:jme )
32 real v( ims:ime , kms:kme , jms:jme )
33 real rho( ims:ime , kms:kme , jms:jme )
34 real u2( ims:ime , jms:jme )
37 integer int( ims:ime , kms:kme , jms:jme )
38 real*8 r8 ( ims:ime , kms:kme , jms:jme )
42 integer , Dimension(3) :: DomS,DomE,MemS,MemE,PatS,PatE
43 integer , Dimension(2) :: Dom2S,Dom2E,Mem2S,Mem2E,Pat2S,Pat2E
44 integer Dom1S,Dom1E,Mem1S,Mem1E,Pat1S,Pat1E
45 character (19) Time, DateStr
46 character (31) VarName
49 print *, 'Testing wrf read'
50 Date = '2000-09-18_16:42:01'
52 print *,'After call ext_init, Status =',Status
55 SysDepInfo = 'sys info'
56 call ext_open_for_read( FileName, Comm, SysDepInfo, DataHandle, Status)
57 print *, 'Status = ',Status,DataHandle
102 call ext_get_next_time(DataHandle, Time, Status)
103 print *, Time, Status
105 call ext_read_field(DataHandle,Time,'u',u,WRF_REAL,Comm,Dom,MemOrd,DomS,DomE,MemS,MemE,PatS,PatE,Status)
106 print *,'ext_read_field Status = ',Status, ' u(2,3,4) ', u(2,3,4)
107 call ext_read_field(DataHandle,Time,'v',v,WRF_REAL,Comm,Dom,MemOrd,DomS,DomE,MemS,MemE,PatS,PatE,Status)
108 print *,'ext_read_field Status = ',Status, ' v(4,3,2) ', v(4,3,2)
109 call ext_read_field(DataHandle,Time,'rho',rho,WRF_REAL,Comm,Dom,MemOrd,DomS,DomE,MemS,MemE,PatS,PatE,Status)
110 print *,'ext_read_field Status = ',Status, ' rho(3,4,5) ' , rho(3,4,5)
111 call ext_read_field(DataHandle,Date,'u2',u2,WRF_REAL,Comm,Dom,'XY',Dom2S,Dom2E,Mem2S,Mem2E,Pat2S,Pat2E,Status)
112 print *,'ext_read_field Status = ',Status, ' u2(6,5) ', u2(6,5)
113 call ext_read_field(DataHandle,Date,'ud2',u,WRF_REAL,Comm,Dom,"XzY",DomS,DomE,MemS,MemE,PatS,PatE,Status)
114 print *,'ext_read_field Status = ',Status, ' u(2,3,4) ', u(2,3,4)
115 call ext_read_field(DataHandle,Date,'u1',u1,WRF_REAL,Comm,Dom,'Z',Dom1S,Dom1E,Mem1S,Mem1E,Pat1S,Pat1E,Status)
116 print *,'ext_read_field Status = ',Status, ' u1(9) ', u1(9)
118 call ext_read_field(DataHandle,Time,'int',int,WRF_INTEGER,Comm,Dom,MemOrd,DomS,DomE,MemS,MemE,PatS,PatE,Status)
119 print *,'ext_read_field Status = ',Status, ' int(8,5,6) ', int(8,5,6)
120 call ext_read_field(DataHandle,Time,'double',r8,WRF_DOUBLE,Comm,Dom,MemOrd,DomS,DomE,MemS,MemE,PatS,PatE,Status)
121 print *,'ext_read_field Status = ',Status, ' r8(7,4,5) ', r8(7,4,5)
123 call ext_get_next_time(DataHandle, Time, Status)
124 print *, Time, Status
126 call ext_read_field(DataHandle,Time,'u',u,WRF_REAL,Comm,Dom,MemOrd,DomS,DomE,MemS,MemE,PatS,PatE,Status)
127 print *,'> ext_read_field Status = ',Status, ' u(3,3,3) ' ,u(3,3,3)
128 call ext_read_field(DataHandle,Time,'v',v,WRF_REAL,Comm,Dom,MemOrd,DomS,DomE,MemS,MemE,PatS,PatE,Status)
129 print *,'> ext_read_field Status = ',Status, ' v(4,4,4) ' ,v(4,4,4)
130 call ext_read_field(DataHandle,Time,'rho',rho,WRF_REAL,Comm,Dom,MemOrd,DomS,DomE,MemS,MemE,PatS,PatE,Status)
131 print *,'> ext_read_field Status = ',Status, ' rho(3,4,5) ' ,rho(3,4,5)
133 call ext_close( DataHandle, Status)
134 print *, 'After ext_close, Status = ',Status
135 call ext_exit(Status)
136 print *,'End of test program',Status
138 end program testread_john