source: LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/xios_interface.F90 @ 3757

Last change on this file since 3757 was 3754, checked in by adurocher, 4 years ago

Fix conditional compilation to compile without XIOS

File size: 1.7 KB
Line 
1MODULE xios_interface
2  ! This module provides a minimal empty xios implementation for phy_output_write_xios
3  ! when LMDZ is compiled without xios
4#ifdef CPP_XIOS
5  use xios, ONLY : xios_field_is_active, xios_send_field, xios_fieldgroup, xios_field, &
6                   xios_get_handle, xios_add_child, xios_set_attr, xios_update_calendar
7  logical :: CPP_XIOS_defined = .true.
8#else
9  logical :: CPP_XIOS_defined = .false.
10
11  type xios_field
12  end type
13  type xios_fieldgroup
14  end type
15
16  interface xios_send_field
17    subroutine xios_send_field_r0(name, buffer)
18      character(*) :: name
19      real :: buffer
20    end subroutine
21    subroutine xios_send_field_r1(name, buffer)
22      character(*) :: name
23      real :: buffer(:)
24    end subroutine
25    subroutine xios_send_field_r2(name, buffer)
26      character(*) :: name
27      real :: buffer(:,:)
28    end subroutine
29    subroutine xios_send_field_r3(name, buffer)
30      character(*) :: name
31      real :: buffer(:,:,:)
32    end subroutine
33  end interface
34
35  contains
36  function xios_field_is_active(name, at_current_timestep_arg)
37    character(*) :: name
38    logical :: at_current_timestep_arg
39    logical :: xios_field_is_active
40    xios_field_is_active = .false.
41  end function
42
43  subroutine xios_set_attr(hdl, name, unit)
44    TYPE(xios_field) :: hdl
45    character(*) :: name, unit
46  end subroutine
47
48  subroutine xios_get_handle(name, hdl)
49    character(*) :: name
50    TYPE(xios_fieldgroup) :: hdl
51  end subroutine
52
53  subroutine xios_add_child(ghdl, hdl, name)
54    TYPE(xios_fieldgroup) :: ghdl
55    TYPE(xios_field) :: hdl
56    character(*) :: name   
57  end subroutine
58
59  subroutine xios_update_calendar(i)
60    integer :: i
61  end subroutine   
62#endif
63end module
Note: See TracBrowser for help on using the repository browser.