FV3 Bundle
fv3jedi_traj_interface_mod.F90
Go to the documentation of this file.
1 ! (C) Copyright 2017-2018 UCAR
2 !
3 ! This software is licensed under the terms of the Apache Licence Version 2.0
4 ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5 
7 
8 use iso_c_binding
14 
15 implicit none
16 private
17 
18 public :: fv3jedi_traj_registry
19 
20 !> Linked list interface - defines registry_t type
21 #define LISTED_TYPE fv3jedi_traj
22 #include "linkedList_i.f"
23 type(registry_t) :: fv3jedi_traj_registry
24 
25 ! ------------------------------------------------------------------------------
26 
27 contains
28 
29 ! ------------------------------------------------------------------------------
30 
31 !> Linked list implementation
32 #include "linkedList_c.f"
33 
34 ! ------------------------------------------------------------------------------
35 
36 subroutine c_fv3jedi_traj_prop(c_key_model, c_key_state, c_key_self) bind(c,name='fv3jedi_traj_prop_f90')
37 
38 implicit none
39 integer(c_int), intent(in) :: c_key_model !< Model
40 integer(c_int), intent(in) :: c_key_state !< State
41 integer(c_int), intent(inout) :: c_key_self !< traj
42 
43 type(fv3jedi_model), pointer :: model
44 type(fv3jedi_state), pointer :: state
45 type(fv3jedi_traj), pointer :: self
46 
47 call fv3jedi_model_registry%get(c_key_model,model)
48 call fv3jedi_state_registry%get(c_key_state,state)
49 
50 call fv3jedi_traj_registry%init()
51 call fv3jedi_traj_registry%add(c_key_self)
52 call fv3jedi_traj_registry%get(c_key_self,self)
53 
54 call traj_prop(model, state, self)
55 
56 end subroutine c_fv3jedi_traj_prop
57 
58 ! ------------------------------------------------------------------------------
59 
60 subroutine c_fv3jedi_traj_wipe(c_key_self) bind(c,name='fv3jedi_traj_wipe_f90')
61 
62 implicit none
63 integer(c_int), intent(inout) :: c_key_self !< traj
64 
65 type(fv3jedi_traj), pointer :: self
66 
67 call fv3jedi_traj_registry%get(c_key_self,self)
68 
69 call traj_wipe(self)
70 
71 call fv3jedi_traj_registry%remove(c_key_self)
72 
73 end subroutine c_fv3jedi_traj_wipe
74 
75 ! ------------------------------------------------------------------------------
76 
77 subroutine c_fv3jedi_traj_minmaxrms(c_key_self, pminmax) bind(c,name='fv3jedi_traj_minmaxrms_f90')
78 
79 implicit none
80 integer(c_int), intent(in) :: c_key_self
81 real(c_double), intent(inout) :: pminmax(3,11)
82 
83 type(fv3jedi_traj), pointer :: self
84 
85 call fv3jedi_traj_registry%get(c_key_self,self)
86 
87 call traj_minmaxrms(self,pminmax)
88 
89 end subroutine c_fv3jedi_traj_minmaxrms
90 
91 ! ------------------------------------------------------------------------------
92 
subroutine c_fv3jedi_traj_prop(c_key_model, c_key_state, c_key_self)
Linked list implementation.
Fortran derived type to hold FV3JEDI state.
subroutine, public traj_wipe(self)
subroutine, public traj_prop(model, state, self)
subroutine, public traj_minmaxrms(self, pminmax)
subroutine c_fv3jedi_traj_minmaxrms(c_key_self, pminmax)
Handle state for the FV3JEDI odel.
type(registry_t), public fv3jedi_traj_registry
Linked list interface - defines registry_t type.
Fortran derived type to hold model definition.
type(registry_t), public fv3jedi_state_registry
Linked list interface - defines registry_t type.
type(registry_t), public fv3jedi_model_registry
Linked list interface.
subroutine c_fv3jedi_traj_wipe(c_key_self)