source: CPL/oasis3-mct_5.0/lib/cbindings/fortran_isoc/mod_oasis_var_iso.F90 @ 6328

Last change on this file since 6328 was 6328, checked in by aclsce, 17 months ago

First import of oasis3-mct_5.0 (from oasis git server, branch OASIS3-MCT_5.0)

File size: 1.8 KB
Line 
1! pyOASIS - A Python wrapper for OASIS
2! Authors: Philippe Gambron, Rupert Ford
3! Copyright (C) 2019 UKRI - STFC
4
5! This program is free software: you can redistribute it and/or modify
6! it under the terms of the GNU Lesser General Public License as
7! published by the Free Software Foundation, either version 3 of the
8! License, or any later version.
9
10! This program is distributed in the hope that it will be useful,
11! but WITHOUT ANY WARRANTY; without even the implied warranty of
12! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13! GNU Lesser General Public License for more details.
14
15! A copy of the GNU Lesser General Public License, version 3, is supplied
16! with this program, in the file lgpl-3.0.txt. It is also available at
17! <https://www.gnu.org/licenses/lgpl-3.0.html>.
18
19
20subroutine oasis_def_var_iso(id_nports, cdport, id_part, &
21     bundle_size, kinout, ktype, kinfo) bind(C)
22  use iso_c_binding, only: c_int, c_ptr, c_bool
23  use cbindings
24  use mod_oasis
25  implicit none
26  include "mpif.h"
27  integer (c_int), intent(out) :: id_nports
28  type(c_ptr), intent(in) :: cdport
29  integer (c_int), intent(in) :: id_part
30  integer (c_int), intent(in) :: bundle_size
31  integer (c_int), intent(in) :: kinout
32  integer (c_int), intent(in) :: ktype
33  integer (c_int), intent(out) :: kinfo
34
35  integer :: id_nports_f
36  character(len=:), allocatable :: cdport_f
37  integer :: id_part_f
38  integer :: id_var_nodims_f(2)
39  integer kinout_f
40  integer :: ktype_f
41  integer :: kinfo_f
42
43  integer :: i
44
45  call foasis_string_to_fortran(cdport, cdport_f)
46  id_part_f=id_part
47  id_var_nodims_f(1)=0
48  id_var_nodims_f(2)=bundle_size
49  kinout_f=kinout
50  ktype_f=ktype
51
52  call oasis_def_var(id_nports_f, cdport_f, id_part_f, &
53  id_var_nodims_f, kinout_f, ktype_f, kinfo_f)
54
55  id_nports=id_nports_f
56  kinfo=kinfo_f
57end subroutine oasis_def_var_iso
Note: See TracBrowser for help on using the repository browser.