1
c In this example we will (1) open the "grid.he5" HDF-EOS file, (2) attach to
2
c the "PolarGrid" grid, and (3) subset data from the "Temperature" field.
4
program he5_gd_subsetF_64
17
integer he5_gddefboxreg
31
real*4 datbuf(100*100)
36
c Open the HDF-EOS grid file, "grid.he5"
37
c ---------------------------------------
38
gdfid = he5_gdopen("grid.he5",HE5F_ACC_RDWR)
39
write(*,*) 'File ID returned by he5_gdopen(): ',gdfid
41
if (gdfid .NE. FAIL) then
43
c Attach to the POLAR grid
44
c ------------------------
45
gdid = he5_gdattach(gdfid,"PolarGrid")
46
write(*,*) 'Grid ID returned by he5_gdattach(): ',gdid
48
if (gdid .NE. FAIL) then
56
rgid = he5_gddefboxreg(gdid,
57
1 cornerlon,cornerlat)
58
write(*,*) 'Region ID returned by he5_gddefboxreg(): ',
61
c Get region information
62
c ----------------------
63
status = he5_gdreginfo(gdid,rgid,"Temperature",
64
1 nt,rk, dims, size, upleft, lowright)
65
write(*,*) dims(1), dims(2), rk, nt
69
status = he5_gdextreg(gdid,rgid,"Temperature",
71
write(*,*) 'Status returned by he5_gdextreg(): ',status
74
c Detach from the grid
75
c --------------------
76
status = he5_gddetach(gdid)
77
write(*,*) 'Status returned by he5_gddetach(): ',status
81
status = he5_gdclose(gdfid)
82
write(*,*) 'Status returned by he5_gdclose(): ',status