source: XIOS/trunk/src/interface/fortran/ifile.F90 @ 538

Last change on this file since 538 was 538, checked in by rlacroix, 10 years ago

Convert more attributes to use the new duration type:

  • field: freq_op and freq_offset
  • file: output_freq, sync_freq and split_freq.

Remember that you now have to use the "xios_duration" type instead of strings to get/set those attributes through the Fortran interface.

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 1.6 KB
Line 
1#include "xios_fortran_prefix.hpp"
2
3MODULE 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 IDATE
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   
60END MODULE IFILE
Note: See TracBrowser for help on using the repository browser.