116subroutine 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.")
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.
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...
The domain2D type contains all the necessary information to define the global, compute and data domai...
Domain information for managing data on unstructured grids.