24 module data_override_r4
25 #include "data_override_r4.fh"
26 end module data_override_r4
28 module data_override_r8
29 #include "data_override_r8.fh"
30 end module data_override_r8
52 module data_override_mod
55 use platform_mod,
only: r4_kind, r8_kind
69 module procedure data_override_0d_r4
70 module procedure data_override_0d_r8
71 module procedure data_override_2d_r4
72 module procedure data_override_2d_r8
73 module procedure data_override_3d_r4
74 module procedure data_override_3d_r8
80 module procedure data_override_ug_1d_r4
81 module procedure data_override_ug_1d_r8
82 module procedure data_override_ug_2d_r4
83 module procedure data_override_ug_2d_r8
86 integer :: atm_mode = 0
87 integer :: ocn_mode = 0
88 integer :: lnd_mode = 0
89 integer :: ice_mode = 0
116 subroutine data_override_init(Atm_domain_in, Ocean_domain_in, Ice_domain_in, Land_domain_in, Land_domainUG_in, mode)
117 type (
domain2d),
intent(in),
optional :: atm_domain_in
118 type (
domain2d),
intent(in),
optional :: ocean_domain_in
119 type (
domain2d),
intent(in),
optional :: ice_domain_in
120 type (
domain2d),
intent(in),
optional :: land_domain_in
121 type(
domainug) ,
intent(in),
optional :: land_domainug_in
122 integer,
intent(in),
optional :: mode
124 integer :: mode_selector
126 if (
present(mode))
then
129 mode_selector = r8_kind
132 select case (mode_selector)
134 call data_override_init_r4(atm_domain_in, ocean_domain_in, ice_domain_in, land_domain_in, land_domainug_in)
136 call data_override_init_r8(atm_domain_in, ocean_domain_in, ice_domain_in, land_domain_in, land_domainug_in)
138 call mpp_error(fatal,
"data_override_init: unsupported mode argument")
141 if (
present(atm_domain_in)) atm_mode = mode_selector
142 if (
present(ocean_domain_in)) ocn_mode = mode_selector
143 if (
present(ice_domain_in)) ice_mode = mode_selector
144 if (
present(land_domain_in)) lnd_mode = mode_selector
151 unset_Ice, unset_Land, must_be_set)
152 logical,
intent(in),
optional :: unset_atm, unset_ocean, unset_ice, unset_land
154 logical,
intent(in),
optional :: must_be_set
156 logical :: fail_if_not_set
158 fail_if_not_set = .true. ;
if (
present(must_be_set)) fail_if_not_set = must_be_set
160 if (
present(unset_atm))
then ;
if (unset_atm)
then
161 select case (atm_mode)
163 call data_override_unset_atm_r4
165 call data_override_unset_atm_r8
167 if (fail_if_not_set)
call mpp_error(fatal, &
168 "data_override_unset_domains: attempted to unset an Atm_domain that has not been set.")
172 if (
present(unset_ocean))
then ;
if (unset_ocean)
then
173 select case (ocn_mode)
175 call data_override_unset_ocn_r4
177 call data_override_unset_ocn_r8
179 if (fail_if_not_set)
call mpp_error(fatal, &
180 "data_override_unset_domains: attempted to unset an Ocn_domain that has not been set.")
184 if (
present(unset_land))
then ;
if (unset_land)
then
185 select case (lnd_mode)
187 call data_override_unset_lnd_r4
189 call data_override_unset_lnd_r8
191 if (fail_if_not_set)
call mpp_error(fatal, &
192 "data_override_unset_domains: attempted to unset an Land_domain that has not been set.")
196 if (
present(unset_ice))
then ;
if (unset_ice)
then
197 select case (ice_mode)
199 call data_override_unset_ice_r4
201 call data_override_unset_ice_r8
203 if (fail_if_not_set)
call mpp_error(fatal, &
204 "data_override_unset_domains: attempted to unset an Ice_domain that has not been set.")
210 end module data_override_mod
subroutine, public data_override_init(Atm_domain_in, Ocean_domain_in, Ice_domain_in, Land_domain_in, Land_domainUG_in, mode)
Initialize either data_override_r4 or data_override_r8 Users should call data_override_init before ca...
subroutine, public data_override_unset_domains(unset_Atm, unset_Ocean, unset_Ice, unset_Land, must_be_set)
Unset domains that had previously been set for use by data_override.
Interface for inserting and interpolating data into a file for a model's grid and time....
Version of Data Override for unstructured grids.
The domain2D type contains all the necessary information to define the global, compute and data domai...
Domain information for managing data on unstructured grids.
Type to represent amounts of time. Implemented as seconds and days to allow for larger intervals.