[472] | 1 | #include "xios_fortran_prefix.hpp" |
---|
| 2 | |
---|
| 3 | MODULE IVARIABLE |
---|
| 4 | USE, INTRINSIC :: ISO_C_BINDING |
---|
| 5 | USE VARIABLE_INTERFACE |
---|
| 6 | USE VARIABLEGROUP_INTERFACE |
---|
| 7 | |
---|
| 8 | TYPE txios(variable) |
---|
| 9 | INTEGER(kind = C_INTPTR_T) :: daddr |
---|
| 10 | END TYPE txios(variable) |
---|
| 11 | |
---|
| 12 | TYPE txios(variablegroup) |
---|
| 13 | INTEGER(kind = C_INTPTR_T) :: daddr |
---|
| 14 | END TYPE txios(variablegroup) |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | CONTAINS ! Fonctions disponibles pour les utilisateurs. |
---|
| 19 | |
---|
| 20 | SUBROUTINE xios(get_variable_handle)(idt,ret) |
---|
| 21 | IMPLICIT NONE |
---|
| 22 | CHARACTER(len = *), INTENT(IN) :: idt |
---|
| 23 | TYPE(txios(variable)) , INTENT(OUT):: ret |
---|
| 24 | CALL cxios_variable_handle_create(ret%daddr, idt, len(idt)) |
---|
| 25 | END SUBROUTINE xios(get_variable_handle) |
---|
| 26 | |
---|
| 27 | SUBROUTINE xios(get_variablegroup_handle)(idt,ret) |
---|
| 28 | IMPLICIT NONE |
---|
| 29 | CHARACTER(len = *) , INTENT(IN) :: idt |
---|
| 30 | TYPE(txios(variablegroup)), INTENT(OUT):: ret |
---|
| 31 | |
---|
| 32 | CALL cxios_variablegroup_handle_create(ret%daddr, idt, len(idt)) |
---|
| 33 | |
---|
| 34 | END SUBROUTINE xios(get_variablegroup_handle) |
---|
| 35 | |
---|
| 36 | LOGICAL FUNCTION xios(is_valid_variable)(idt) |
---|
| 37 | IMPLICIT NONE |
---|
| 38 | CHARACTER(len = *) , INTENT(IN) :: idt |
---|
| 39 | LOGICAL (kind = 1) :: val |
---|
| 40 | |
---|
| 41 | CALL cxios_variable_valid_id(val, idt, len(idt)) |
---|
| 42 | xios(is_valid_variable) = val |
---|
| 43 | |
---|
| 44 | END FUNCTION xios(is_valid_variable) |
---|
| 45 | |
---|
| 46 | LOGICAL FUNCTION xios(is_valid_variablegroup)(idt) |
---|
| 47 | IMPLICIT NONE |
---|
| 48 | CHARACTER(len = *) , INTENT(IN) :: idt |
---|
| 49 | LOGICAL (kind = 1) :: val |
---|
| 50 | |
---|
| 51 | CALL cxios_variablegroup_valid_id(val, idt, len(idt)) |
---|
| 52 | xios(is_valid_variablegroup) = val |
---|
| 53 | |
---|
| 54 | END FUNCTION xios(is_valid_variablegroup) |
---|
| 55 | |
---|
| 56 | END MODULE IVARIABLE |
---|