New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
oasis_interface.F90 in vendors/XIOS/current/src/interface/fortran – NEMO

source: vendors/XIOS/current/src/interface/fortran/oasis_interface.F90 @ 3428

Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

File size: 2.7 KB
Line 
1SUBROUTINE fxios_oasis_init(server_id,str_len) BIND(C,NAME="fxios_oasis_init")
2  USE, INTRINSIC :: ISO_C_BINDING
3#ifdef USE_OASIS
4  USE mod_prism_proto
5#endif
6    CHARACTER(kind = C_CHAR),DIMENSION(*) :: server_id
7    INTEGER(kind = C_INT),VALUE   :: str_len
8   
9    INTEGER                :: comp_id
10    CHARACTER(len=str_len) :: oasis_server_id
11    INTEGER                :: ierr
12    INTEGER :: i
13   
14    DO i=1,str_len
15      oasis_server_id(i:i)=server_id(i)
16    ENDDO
17
18#ifdef USE_OASIS
19    CALL prism_init_comp_proto (comp_id, oasis_server_id, ierr)
20#endif
21    PRINT *,"---> prism_init",oasis_server_id,ierr
22
23END SUBROUTINE fxios_oasis_init
24
25
26SUBROUTINE fxios_oasis_finalize() BIND(C,NAME="fxios_oasis_finalize")
27  USE, INTRINSIC :: ISO_C_BINDING
28#ifdef USE_OASIS
29  USE mod_prism_proto
30#endif
31  IMPLICIT NONE
32  INTEGER :: ierr
33 
34#ifdef USE_OASIS
35    CALL prism_terminate_proto(ierr)
36#endif
37   
38END SUBROUTINE fxios_oasis_finalize
39
40
41SUBROUTINE fxios_oasis_get_localcomm(f_comm) BIND(C,NAME="fxios_oasis_get_localcomm")
42  USE, INTRINSIC :: ISO_C_BINDING
43#ifdef USE_OASIS
44!  USE mod_prism_get_localcomm_proto
45#endif
46  IMPLICIT NONE
47  INTEGER(kind=C_INT) :: f_comm
48 
49  INTEGER :: comm
50  INTEGER :: ierr
51   
52#ifdef USE_OASIS
53    CALL prism_get_localcomm_proto(comm,ierr)
54#endif
55    f_comm=comm
56
57END SUBROUTINE fxios_oasis_get_localcomm
58
59
60
61
62SUBROUTINE fxios_oasis_get_intracomm(f_comm_client_server,client_id,str_len) BIND(C,NAME="fxios_oasis_get_intracomm")
63  USE, INTRINSIC :: ISO_C_BINDING
64#ifdef USE_OASIS
65  USE mod_prism_get_comm 
66#endif
67  IMPLICIT NONE
68  INTEGER(kind=C_INT) :: f_comm_client_server
69  CHARACTER,DIMENSION(*) :: client_id
70  INTEGER,VALUE          :: str_len
71 
72  INTEGER :: comm_client_server
73  CHARACTER(len=str_len) :: oasis_client_id
74  INTEGER :: ierr
75  INTEGER :: i
76   
77    DO i=1,str_len
78      oasis_client_id(i:i)=client_id(i)
79    ENDDO
80   
81#ifdef USE_OASIS
82    CALL prism_get_intracomm(comm_client_server,oasis_client_id,ierr)
83#endif
84
85    f_comm_client_server=comm_client_server
86
87END SUBROUTINE fxios_oasis_get_intracomm
88
89SUBROUTINE fxios_oasis_get_intercomm(f_comm_client_server,client_id,str_len) BIND(C,NAME="fxios_oasis_get_intercomm")
90  USE, INTRINSIC :: ISO_C_BINDING
91#ifdef USE_OASIS
92  USE mod_prism_get_comm 
93#endif
94  IMPLICIT NONE
95  INTEGER(kind=C_INT) :: f_comm_client_server
96  CHARACTER,DIMENSION(*) :: client_id
97  INTEGER,VALUE          :: str_len
98 
99  INTEGER :: comm_client_server
100  CHARACTER(len=str_len) :: oasis_client_id
101  INTEGER :: ierr
102  INTEGER :: i
103   
104    DO i=1,str_len
105      oasis_client_id(i:i)=client_id(i)
106    ENDDO
107   
108#ifdef USE_OASIS
109    CALL prism_get_intercomm(comm_client_server,oasis_client_id,ierr)
110#endif
111
112    f_comm_client_server=comm_client_server
113
114END SUBROUTINE fxios_oasis_get_intercomm
Note: See TracBrowser for help on using the repository browser.