source: XIOS/xios_training/hands-on-1/answer/test_tp1.f90 @ 2080

Last change on this file since 2080 was 2046, checked in by ymipsl, 3 years ago
File size: 691 bytes
Line 
1PROGRAM test_tp1
2
3  USE XIOS
4  IMPLICIT NONE
5  INCLUDE "mpif.h"
6  INTEGER :: rank
7  INTEGER :: size
8  INTEGER :: ierr
9
10  INTEGER :: comm
11  TYPE(xios_duration) :: dtime
12
13
14  CALL MPI_INIT(ierr)
15
16  CALL xios_initialize("client",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
30  CALL xios_close_context_definition()
31
32
33  CALL xios_context_finalize()
34
35
36  CALL MPI_COMM_FREE(comm, ierr)
37
38  CALL xios_finalize()
39
40  CALL MPI_FINALIZE(ierr)
41
42END PROGRAM test_tp1
43
Note: See TracBrowser for help on using the repository browser.