source: XIOS/xios_training/hands-on-2/TP_src/test_tp2.f90 @ 2046

Last change on this file since 2046 was 2046, checked in by ymipsl, 3 years ago
File size: 725 bytes
Line 
1PROGRAM test_tp2
2
3  USE XIOS
4  IMPLICIT NONE
5  INCLUDE "mpif.h"
6  INTEGER :: rank
7  INTEGER :: size
8  INTEGER :: ierr
9
10  CHARACTER(len=*),PARAMETER :: id="client"
11  INTEGER :: comm
12  TYPE(xios_duration) :: dtime
13
14  CALL MPI_INIT(ierr)
15
16  CALL xios_initialize(id,return_comm=comm)
17
18  CALL MPI_COMM_RANK(comm,rank,ierr)
19  CALL MPI_COMM_SIZE(comm,size,ierr)
20 
21  print*, "Hello XIOS from proc", rank
22 
23  CALL xios_context_initialize("test",comm)
24
25  CALL xios_define_calendar(type="Gregorian")
26  dtime%second = 3600
27  CALL xios_set_timestep(dtime)
28
29  CALL xios_close_context_definition()
30
31  CALL xios_context_finalize()
32
33  CALL MPI_COMM_FREE(comm, ierr)
34
35  CALL xios_finalize()
36
37  CALL MPI_FINALIZE(ierr)
38
39END PROGRAM test_tp2
40
Note: See TracBrowser for help on using the repository browser.