FV3 Bundle
geos/fv3jedi_model_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 
9 use iso_c_binding
10 use config_mod
11 use duration_mod
12 
15 
16 implicit none
17 private
18 
19 public :: fv3jedi_model
20 public :: model_create
21 public :: model_delete
22 public :: model_initialize
23 public :: model_step
24 public :: model_finalize
25 
26 ! ------------------------------------------------------------------------------
27 
28 !> Fortran derived type to hold model definition
29 type :: fv3jedi_model
30  integer :: geos_geos_here
31 end type fv3jedi_model
32 
33 ! ------------------------------------------------------------------------------
34 
35 contains
36 
37 ! ------------------------------------------------------------------------------
38 
39 subroutine model_create(self, geom, c_conf)
40 
41 implicit none
42 type(fv3jedi_model), intent(inout) :: self !Model type
43 type(fv3jedi_geom) intent(in) :: geom !Geometry
44 type(c_ptr), intent(in) :: c_conf !User configuration
45 
46 !Create the GEOS model
47 
48 end subroutine model_create
49 
50 ! ------------------------------------------------------------------------------
51 
52 subroutine model_delete(self)
53 
54 implicit none
55 type(fv3jedi_model), intent(inout) :: self !Model type
56 
57 !Delete the GEOS model
58 
59 end subroutine model_delete
60 
61 ! ------------------------------------------------------------------------------
62 
63 subroutine model_initialize(self, state)
64 
65 implicit none
66 type(fv3jedi_model), intent(inout) :: self !Model type
67 type(fv3jedi_state), intent(in) :: state !JEDI state fields
68 
69 !Initialize the GEOS model
70 
71 end subroutine model_initialize
72 
73 ! ------------------------------------------------------------------------------
74 
75 subroutine model_step(self, state, vdate)
76 
77 implicit none
78 type(fv3jedi_model), intent(inout) :: self !Model type
79 type(fv3jedi_state), intent(inout) :: state !JEDI state fields
80 type(datetime), intent(in) :: vdate !Current time
81 
82 call state_to_geos(state,self)
83 
84 !Propagate GEOS model by one time step
85 
86 call geos_to_state(state,self)
87 
88 end subroutine model_step
89 
90 ! ------------------------------------------------------------------------------
91 
92 subroutine model_finalize(self, state)
93 
94 implicit none
95 type(fv3jedi_model), intent(inout) :: self !Model type
96 type(fv3jedi_state), intent(in) :: state !JEDI state fields
97 
98 !Finalize GEOS model
99 
100 end subroutine model_finalize
101 
102 ! ------------------------------------------------------------------------------
103 
104 subroutine state_to_geos(state,self)
106 implicit none
107 type(fv3jedi_state), intent(in) :: state
108 type(fv3jedi_model), intent(inout) :: self
109 
110 !Go from JEDI state to GEOS fields
111 
112 end subroutine state_to_geos
113 
114 ! ------------------------------------------------------------------------------
115 
116 subroutine geos_to_state(self,state)
118 implicit none
119 type(fv3jedi_model), intent(in) :: self
120 type(fv3jedi_state), intent(inout) :: state
121 
122 !Go from GEOS fields to JEDI state
123 
124 end subroutine geos_to_state
125 
126 ! ------------------------------------------------------------------------------
127 
128 end module fv3jedi_model_mod
subroutine, public model_initialize(self, state)
Fortran derived type to hold FV3JEDI state.
Fortran derived type to hold geometry data for the FV3JEDI model.
Handle state for the FV3JEDI odel.
Fortran derived type to hold model definition.
subroutine, public model_finalize(self, state)
subroutine, public model_create(self, geom, c_conf)
Fortran module handling geometry for the FV3 model.
subroutine, public model_step(self, state, vdate)
subroutine geos_to_state(self, state)
subroutine state_to_geos(state, self)
subroutine, public model_delete(self)