File: updatelevels.f

package info (click to toggle)
hdf-eos4 2.20v1.00-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, trixie
  • size: 34,028 kB
  • sloc: ansic: 46,955; sh: 23,547; fortran: 15,467; csh: 1,098; makefile: 633
file content (57 lines) | stat: -rw-r--r-- 1,210 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
	program updatelevels

	integer            ptuplev, ptdetach, ptclose, ptgetrecnums
	integer*4          ptfid, ptid1, ptid2
	integer*4          recs(32), inlevel, outlevel
	integer*4          ptopen, ptattach
	integer*4          outrecs(32), outnrec
	real*8             f64
	
	character          datbuf*256, c8*8
	equivalence        (f64,c8)
	
	integer DFACC_RDWR
	parameter (DFACC_RDWR=3)

c
c     Open the HDF point file, "PointFile.hdf".
c

	ptfid = ptopen("PointFile_created_with_hadeos_sample_file_write"//
     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)

	ptid1 = ptattach(ptfid, "Simple Point")
	ptid2 = ptattach(ptfid, "FixedBuoy Point")

	f64 = 43.2
	datbuf(1:8) = c8
	recs(1) = 1
	
	status = ptuplev(ptid2, 0, "Longitude", 1, recs, datbuf)


	datbuf(1:1) = 'F'
	recs(1) = 0
	status = ptuplev(ptid2, 0, "ID", 1, recs, datbuf)
	    
	inlevel = 0
	outlevel = 1
	nrec = 1
	status = ptgetrecnums(ptid2, inlevel, outlevel, nrec, recs, 
     1			      outnrec, outrecs)

	
	do 10 i=1,outnrec
		datbuf(i:i) = 'F'
 10	continue

	status = ptuplev(ptid2, outlevel, "ID", outnrec, outrecs, datbuf)

	status = ptdetach(ptid1)
	status = ptdetach(ptid2)
	
	status = ptclose(ptfid)
	
	stop
	end