9 use datetime_mod,
only: datetime, c_f_datetime
10 use duration_mod,
only: duration, duration_seconds,
assignment(=)
11 use fckit_configuration_module,
only: fckit_configuration
24 #define LISTED_TYPE soca_model
27 #include "oops/util/linkedList_i.f"
37 #include "oops/util/linkedList_c.f"
41 subroutine soca_model_setup_c(c_conf, c_key_geom, c_key_model) bind (c,name='soca_model_setup_f90')
42 type(c_ptr),
intent(in) :: c_conf
43 integer(c_int),
intent(in) :: c_key_geom
44 integer(c_int),
intent(inout) :: c_key_model
49 type(duration) :: dtstep
50 real(c_double),
allocatable :: tocn_minmax(:), socn_minmax(:)
51 type(fckit_configuration) :: f_conf
52 character(len=:),
allocatable :: str
54 f_conf = fckit_configuration(c_conf)
62 call f_conf%get_or_die(
"tstep", str)
64 model%dt0 = duration_seconds(dtstep)
67 call f_conf%get_or_die(
"advance_mom6", model%advance_mom6)
70 if ( f_conf%has(
"tocn_minmax") )
then
71 call f_conf%get_or_die(
"tocn_minmax", tocn_minmax)
72 model%tocn_minmax = tocn_minmax
74 model%tocn_minmax=(/-999., -999./)
76 if ( f_conf%has(
"socn_minmax") )
then
77 call f_conf%get_or_die(
"socn_minmax", socn_minmax)
78 model%socn_minmax = socn_minmax
80 model%socn_minmax=(/-999., -999./)
84 call model%setup(geom)
86 if (
allocated(str))
deallocate(str)
93 integer(c_int),
intent(inout) :: c_key_conf
106 & bind(c,name=
'soca_model_init_f90')
107 integer(c_int),
intent(in) :: c_key_model
108 integer(c_int),
intent(in) :: c_key_state
116 call model%init(flds)
124 bind(c,name=
'soca_model_finalize_f90')
125 integer(c_int),
intent(in) :: c_key_model
126 integer(c_int),
intent(in) :: c_key_state
134 call model%finalize(flds)
141 integer(c_int),
intent(in) :: c_key_model
142 integer(c_int),
intent(in) :: c_key_state
143 type(c_ptr),
intent(inout) :: c_key_date
147 type(datetime) :: fldsdate
151 call c_f_datetime(c_key_date, fldsdate)
153 call model%propagate(flds, fldsdate)
C++ interfaces for soca_geom_mod::soca_geom.
type(registry_t), public soca_geom_registry
Linked list interface - defines registry_t type.
C++ interfaces for soca_model_mod::soca_model.
subroutine soca_model_setup_c(c_conf, c_key_geom, c_key_model)
Linked list implementation.
subroutine soca_model_finalize_c(c_key_model, c_key_state)
C++ interface for soca_model_mod::soca_model::finalize()
subroutine soca_model_delete_c(c_key_conf)
C++ interface for soca_model_mod::soca_model::delete()
subroutine soca_model_propagate_c(c_key_model, c_key_state, c_key_date)
C++ interface for soca_model_mod::soca_model::propagate()
subroutine soca_model_init_c(c_key_model, c_key_state)
C++ interface for soca_model_mod::soca_model::init()
type(registry_t), public soca_model_registry
Linked list interface - defines registry_t type.
Structure holding configuration variables for the model.
registry for soca_state_mod::soca_state instances for use in Fortran/C++ interfaces of soca_state_mod...
type(registry_t), public soca_state_registry
Linked list interface - defines registry_t type.
Fortran derived type to hold configuration data for the model.