summaryrefslogtreecommitdiffstats
path: root/doc/html/fortran/h5d_FORTRAN.html
blob: 93713b67ac163fe56ce8fdf72984750a3924fc00 (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
<html>
<head><title>
FORTRAN Dataset API -- h5d
</title>

<!-- #BeginLibraryItem "/ed_libs/styles_RM.lbi" --><link href="../ed_styles/RMelect.css" rel="stylesheet" type="text/css"><!-- #EndLibraryItem --></head>

<body bgcolor="#FFFFFF">



<center>
<h1>The FORTRAN 90 API to HDF5<br>h5d: Datasets</h1>
</center>


<dl>


<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dclose_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dclose_f</strong>
<pre>
          SUBROUTINE h5dclose_f(dset_id, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier  
            INTEGER, INTENT(OUT) :: hdferr       ! Error code  
                                                 ! 0 on success and -1 on failure
          END SUBROUTINE h5dclose_f
</pre>


<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dcreate_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dcreate_f</strong>
<pre>
          SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, & 
                                 hdferr, creation_prp) 
            IMPLICIT NONE 
            INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
            CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset 
            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier 
            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier
            INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier
            INTEGER, INTENT(OUT) :: hdferr       ! Error code 
                                                 ! 0 on success and -1 on failure
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp
                                                   ! Dataset creation propertly 
                                                   ! list identifier , default
                                                   ! value is H5P_DEFAULT_F (6) 
          END SUBROUTINE h5dcreate_f  
</pre> 


<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dextend_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dextend_f</strong>
<pre>
          SUBROUTINE h5dextend_f(dataset_id, size, hdferr) 
            IMPLICIT NONE 
            INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
            INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN)  :: size
                                                          ! Array containing 
                                                          ! dimensions' sizes 
            INTEGER, INTENT(OUT) :: hdferr       ! Error code 
                                                 ! 0 on success and -1 on failure
          END SUBROUTINE h5dextend_f  
</pre> 


<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dget_create_plist_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dget_create_plist_f</strong>
<pre>
          SUBROUTINE h5dget_create_plist_f(dataset_id, creation_prp, hdferr) 
            IMPLICIT NONE 
            INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
            INTEGER(HID_T), INTENT(OUT) :: creation_id    ! Dataset creation
                                                          ! property list identifier
            INTEGER, INTENT(OUT) :: hdferr       ! Error code 
                                                 ! 0 on success and -1 on failure
          END SUBROUTINE h5dget_create_plist_f  
</pre> 


<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dget_space_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dget_space_f</strong>
<pre>
          SUBROUTINE h5dget_space_f(dataset_id, dataspace_id, hdferr) 
            IMPLICIT NONE 
            INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
            INTEGER(HID_T), INTENT(OUT) :: dataspace_id   ! Dataspace identifier
            INTEGER, INTENT(OUT) :: hdferr       ! Error code 
                                                 ! 0 on success and -1 on failure
          END SUBROUTINE h5dget_space_f  
</pre> 


<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dget_type_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dget_type_f</strong>
<pre>
          SUBROUTINE h5dget_type_f(dataset_id, datatype_id, hdferr) 
            IMPLICIT NONE 
            INTEGER(HID_T), INTENT(IN) :: dataset_id      ! Dataset identifier
            INTEGER(HID_T), INTENT(OUT) :: datatype_id    ! Datatype identifier
            INTEGER, INTENT(OUT) :: hdferr       ! Error code 
                                                 ! 0 on success and -1 on failure
          END SUBROUTINE h5dget_type_f  
</pre> 


<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dopen_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dopen_f</strong>
<pre>
          SUBROUTINE h5dopen_f(loc_id, name, dset_id, hdferr) 
            IMPLICIT NONE 
            INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
            CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the dataset 
            INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier
            INTEGER, INTENT(OUT) :: hdferr       ! Error code 
                                                 ! 0 on success and -1 on failure
          END SUBROUTINE h5dopen_f  
</pre> 


<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dread_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dread_f</strong>
    (for all datatypes except object and dataset region references)
<pre>

          SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, dims, hdferr, &
                               mem_space_id, file_space_id, xfer_prp)

            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: dset_id   ! Dataset identifier
            INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
            TYPE, INTENT(INOUT) :: buf          ! Data buffer; may be a scalar or an array
            DIMENSION(*), INTEGER(HSIZE_T), INTENT(IN)  :: dims 
                                                ! Array to hold corresponding dimension 
                                                ! sizes of data buffer buf; dim(k) has 
                                                ! value of the k-th dimension of buffer buf;
                                                ! values are ignored if buf is a scalar
                                                ! 
                                                ! Deprecated type, will be removed in 
                                                ! Release 1.6:
                                                ! INTEGER, INTENT(IN)  :: dims(7)     
            INTEGER, INTENT(OUT) :: hdferr      ! Error code 
                                                ! 0 on success and -1 on failure
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id 
                                                ! Memory dataspace identfier 
                                                ! Default value is H5S_ALL_F 
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id 
                                                ! File dataspace identfier 
                                                ! Default value is H5S_ALL_F
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp 
                                                ! Transfer property list identifier 
                                                ! Default value is H5P_DEFAULT_F 
            
          END SUBROUTINE h5dread_f
</pre>


<p>&nbsp;


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dread_f</strong>
    (for object reference and dataset region reference datatypes)
<pre>

          SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, n, hdferr, &
                               mem_space_id, file_space_id, xfer_prp)

            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: dset_id   ! Dataset identifier
            INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
            DIMENSION(*), INTEGER(HSIZE_T), INTENT(IN)  :: dims 
                                                ! Array to hold corresponding dimension 
                                                ! sizes of data buffer buf; dim(k) has 
                                                ! value of the k-th dimension of buffer buf;
                                                ! values are ignored if buf is a scalar
                                                ! 
                                                ! Deprecated type, will be removed in 
                                                ! Release 1.6:
                                                ! INTEGER, DIMENSION(7), INTENT(IN) :: dims
            TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(INOUT) :: buf
                                                ! Data buffer of rank 1
            INTEGER, INTENT(OUT) :: hdferr      ! Error code 
                                                ! 0 on success and -1 on failure
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id 
                                                ! Memory dataspace identfier 
                                                ! Default value is H5S_ALL_F 
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id 
                                                ! File dataspace identfier 
                                                ! Default value is H5S_ALL_F
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp 
                                                ! Transfer property list identifier 
                                                ! Default value is H5P_DEFAULT_F 
            
          END SUBROUTINE h5dread_f
</pre>


<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dwrite_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dwrite_f</strong>
    (for all datatypes except object and dataset region references)
<pre>

          SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, dims, hdferr, &
                                mem_space_id, file_space_id, xfer_prp)

            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: dset_id   ! Dataset identifier
            INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
            TYPE, INTENT(IN) :: buf             ! Data buffer; may be a scalar or an array
            DIMENSION(*), INTEGER(HSIZE_T), INTENT(IN)  :: dims 
                                                ! Array to hold corresponding dimension 
                                                ! sizes of data buffer buf; dim(k) has 
                                                ! value of the k-th dimension of buffer buf;
                                                ! values are ignored if buf is a scalar
                                                ! 
                                                ! Deprecated type, will be removed in 
                                                ! Release 1.6:
                                                ! INTEGER, INTENT(IN)  :: dims(7)     
            INTEGER, INTENT(OUT) :: hdferr      ! Error code 
                                                ! 0 on success and -1 on failure
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id 
                                                ! Memory dataspace identfier 
                                                ! Default value is H5S_ALL_F
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id 
                                                ! File dataspace identfier 
                                                ! Default value is H5S_ALL_F
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp 
                                                ! Transfer property list identifier 
                                                ! Default value is H5P_DEFAULT_F 
            
          END SUBROUTINE h5dwrite_f
</pre>


<p>&nbsp;


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dwrite_f</strong>
    (for object reference and dataset region reference datatypes)
<pre>

          SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, n, hdferr, &
                                mem_space_id, file_space_id, xfer_prp)

            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: dset_id   ! Dataset identifier
            INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
            DIMENSION(*), INTEGER(HSIZE_T), INTENT(IN)  :: dims 
                                                ! Array to hold corresponding dimension 
                                                ! sizes of data buffer buf; dim(k) has 
                                                ! value of the k-th dimension of buffer buf;
                                                ! values are ignored if buf is a scalar
                                                ! 
                                                ! Deprecated type, will be removed in 
                                                ! Release 1.6:
                                                ! INTEGER, DIMENSION(7), INTENT(IN) :: dims
            TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(INOUT) :: buf
                                                ! Data buffer of rank 1
            INTEGER, INTENT(OUT) :: hdferr      ! Error code 
                                                ! 0 on success and -1 on failure
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id 
                                                ! Memory dataspace identfier 
                                                ! Default value is H5S_ALL_F
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id 
                                                ! File dataspace identfier 
                                                ! Default value is H5S_ALL_F
            INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp 
                                                ! Transfer property list identifier 
                                                ! Default value is H5P_DEFAULT_F 
            
          END SUBROUTINE h5dwrite_f
</pre>



<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dget_storage_size_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dget_storage_size_f</strong>
<pre>
          SUBROUTINE h5dget_storage_size_f(dset_id, size, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: dset_id  ! Dataset identifier  
            INTEGER(HSIZE_T), INTENT(OUT)  :: size ! Amount of storage required for dataset
            INTEGER, INTENT(OUT) :: hdferr         ! Error code  
                                                   ! 0 on success and -1 on failure
          END SUBROUTINE h5dget_storage_size_f
</pre>


<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dvlen_get_max_len_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dvlen_get_max_len_f</strong>
<pre>
          SUBROUTINE h5dvlen_get_max_len_f(dset_id, size, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: dset_id  ! Dataset identifier  
            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier  
            INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier  
            
            INTEGER(SIZE_T), INTENT(OUT)  :: elem_len ! Maximum length of the element
            INTEGER, INTENT(OUT) :: hdferr         ! Error code  
                                                   ! 0 on success and -1 on failure
          END SUBROUTINE h5dvlen_get_max_len_f
</pre>



<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dfill_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dfill_f</strong>
<pre>
          SUBROUTINE h5dfill_f(fill_value, space_id, buf, hdferr)
            IMPLICIT NONE
            TYPE, INTENET(IN) :: fill_value        ! Fill value; may be have one of the
                                                   ! following types:
                                                   ! INTEGER, REAL, DOUBLE PRECISION, CHARACTER
            INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier 
            TYPE, DIMENSION(*) :: buf              ! Memory buffer to fill in; must have
                                                   ! the same datatype as fill value
            INTEGER, INTENT(OUT) :: hdferr         ! Error code  
                                                   ! 0 on success and -1 on failure
          END SUBROUTINE h5dfill_f
</pre>


<p>&nbsp;
<p>&nbsp;
<hr>
<p>&nbsp;
<a name="h5dget_space_status_f">
<p>&nbsp;
</a>


<dt><strong>FORTRAN interface:</strong> &nbsp <strong>h5dget_space_status_f</strong>
<pre>
          SUBROUTINE h5dget_space_status_f(dset_id, flag, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: dset_id  ! Dataset identifier 
            INTEGER, INTENET(OUT)      :: flag     ! Status flag ; possible values:
                                                   ! H5D_SPACE_STS_ERROR_F
                                                   ! H5D_SPACE_STS_NOT_ALLOCATED_F
                                                   ! H5D_SPACE_STS_PART_ALLOCATED_F
                                                   ! H5D_SPACE_STS_ALLOCATED_F
            INTEGER, INTENT(OUT) :: hdferr         ! Error code  
                                                   ! 0 on success and -1 on failure
          END SUBROUTINE h5dget_space_status_f
</pre>


</dl>

<p>&nbsp;
<p>&nbsp;
<hr>


<!-- #BeginLibraryItem "/ed_libs/Footer.lbi" --><address>
<a href="mailto:hdfhelp@ncsa.uiuc.edu">HDF Help Desk</a> 

<br>
Describes HDF5 Release 1.5, Unreleased Development Branch
</address><!-- #EndLibraryItem -->

Last modified:  19 March 2003

</body>
</html>