1 | #include "xios_fortran_prefix.hpp" |
---|
2 | |
---|
3 | MODULE IFILE |
---|
4 | USE, INTRINSIC :: ISO_C_BINDING |
---|
5 | USE FILE_INTERFACE |
---|
6 | USE FILEGROUP_INTERFACE |
---|
7 | ! USE IFILE_ATTR |
---|
8 | ! USE IFILEGROUP_ATTR |
---|
9 | USE IDURATION |
---|
10 | |
---|
11 | TYPE txios(file) |
---|
12 | INTEGER(kind = C_INTPTR_T) :: daddr |
---|
13 | END TYPE txios(file) |
---|
14 | |
---|
15 | TYPE txios(filegroup) |
---|
16 | INTEGER(kind = C_INTPTR_T) :: daddr |
---|
17 | END TYPE txios(filegroup) |
---|
18 | |
---|
19 | CONTAINS ! Fonctions disponibles pour les utilisateurs. |
---|
20 | |
---|
21 | SUBROUTINE xios(get_file_handle)( idt, ret) |
---|
22 | IMPLICIT NONE |
---|
23 | CHARACTER(len = *), INTENT(IN) :: idt |
---|
24 | TYPE(txios(file)) , INTENT(OUT):: ret |
---|
25 | |
---|
26 | CALL cxios_file_handle_create(ret%daddr, idt, len(idt)) |
---|
27 | |
---|
28 | END SUBROUTINE xios(get_file_handle) |
---|
29 | |
---|
30 | SUBROUTINE xios(get_filegroup_handle)(idt,ret) |
---|
31 | IMPLICIT NONE |
---|
32 | CHARACTER(len = *) , INTENT(IN) :: idt |
---|
33 | TYPE(txios(filegroup)), INTENT(OUT):: ret |
---|
34 | |
---|
35 | CALL cxios_filegroup_handle_create(ret%daddr, idt, len(idt)) |
---|
36 | |
---|
37 | END SUBROUTINE xios(get_filegroup_handle) |
---|
38 | |
---|
39 | LOGICAL FUNCTION xios(is_valid_file)(idt) |
---|
40 | IMPLICIT NONE |
---|
41 | CHARACTER(len = *) , INTENT(IN) :: idt |
---|
42 | LOGICAL (kind = 1) :: val |
---|
43 | |
---|
44 | CALL cxios_file_valid_id(val, idt, len(idt)); |
---|
45 | xios(is_valid_file) = val |
---|
46 | |
---|
47 | END FUNCTION xios(is_valid_file) |
---|
48 | |
---|
49 | LOGICAL FUNCTION xios(is_valid_filegroup)(idt) |
---|
50 | IMPLICIT NONE |
---|
51 | CHARACTER(len = *) , INTENT(IN) :: idt |
---|
52 | LOGICAL (kind = 1) :: val |
---|
53 | |
---|
54 | CALL cxios_filegroup_valid_id(val, idt, len(idt)); |
---|
55 | xios(is_valid_filegroup) = val |
---|
56 | |
---|
57 | END FUNCTION xios(is_valid_filegroup) |
---|
58 | |
---|
59 | |
---|
60 | END MODULE IFILE |
---|