116 meteo_time_ref_endpoint, &
122 meteo_expect_netrad, &
123 meteo_expect_absvappress, &
124 meteo_expect_windspeed, &
133 integer(i4),
intent(in),
optional :: case
134 integer(i4),
intent(in),
optional :: meteo_timestep
135 logical,
intent(in),
optional :: meteo_time_ref_endpoint
136 logical,
intent(in),
optional :: meteo_expect_pre
137 logical,
intent(in),
optional :: meteo_expect_temp
138 logical,
intent(in),
optional :: meteo_expect_pet
139 logical,
intent(in),
optional :: meteo_expect_tmin
140 logical,
intent(in),
optional :: meteo_expect_tmax
141 logical,
intent(in),
optional :: meteo_expect_netrad
142 logical,
intent(in),
optional :: meteo_expect_absvappress
143 logical,
intent(in),
optional :: meteo_expect_windspeed
144 logical,
intent(in),
optional :: meteo_expect_ssrd
145 logical,
intent(in),
optional :: meteo_expect_strd
146 logical,
intent(in),
optional :: meteo_expect_tann
147 logical,
intent(in),
optional :: read_nml
151 self%meteo_timestep = 0_i4
152 self%meteo_time_ref_endpoint = .false.
153 self%meteo_expect_pre = .false.
154 self%meteo_expect_temp = .false.
155 self%meteo_expect_pet = .false.
156 self%meteo_expect_tmin = .false.
157 self%meteo_expect_tmax = .false.
158 self%meteo_expect_netrad = .false.
159 self%meteo_expect_absvappress = .false.
160 self%meteo_expect_windspeed = .false.
161 self%meteo_expect_ssrd = .false.
162 self%meteo_expect_strd = .false.
163 self%meteo_expect_tann = .false.
166 self%read_nml = .false.
168 if (
present(case)) self%case =
case
169 if (
present(meteo_timestep)) self%meteo_timestep = meteo_timestep
170 if (
present(meteo_time_ref_endpoint)) self%meteo_time_ref_endpoint = meteo_time_ref_endpoint
171 if (
present(meteo_expect_pre)) self%meteo_expect_pre = meteo_expect_pre
172 if (
present(meteo_expect_temp)) self%meteo_expect_temp = meteo_expect_temp
173 if (
present(meteo_expect_pet)) self%meteo_expect_pet = meteo_expect_pet
174 if (
present(meteo_expect_tmin)) self%meteo_expect_tmin = meteo_expect_tmin
175 if (
present(meteo_expect_tmax)) self%meteo_expect_tmax = meteo_expect_tmax
176 if (
present(meteo_expect_netrad)) self%meteo_expect_netrad = meteo_expect_netrad
177 if (
present(meteo_expect_absvappress)) self%meteo_expect_absvappress = meteo_expect_absvappress
178 if (
present(meteo_expect_windspeed)) self%meteo_expect_windspeed = meteo_expect_windspeed
179 if (
present(meteo_expect_ssrd)) self%meteo_expect_ssrd = meteo_expect_ssrd
180 if (
present(meteo_expect_strd)) self%meteo_expect_strd = meteo_expect_strd
181 if (
present(meteo_expect_tann)) self%meteo_expect_tann = meteo_expect_tann
182 if (
present(read_nml)) self%read_nml = read_nml
194 self%meteo_expect_pre .or. &
195 self%meteo_expect_temp .or. &
196 self%meteo_expect_pet .or. &
197 self%meteo_expect_tmin .or. &
198 self%meteo_expect_tmax .or. &
199 self%meteo_expect_netrad .or. &
200 self%meteo_expect_absvappress .or. &
201 self%meteo_expect_windspeed .or. &
202 self%meteo_expect_ssrd .or. &
203 self%meteo_expect_strd .or. &
204 self%meteo_expect_tann
209 subroutine check(self, domainMeta, optimize)
210 use mo_message,
only : error_message
211 use mo_string_utils,
only : num2str
217 logical,
intent(in) :: optimize
219 if (.not. any(self%case == [0, 1])) &
220 call error_message(
"Coupling: case needs to be 0 or 1. Got: ", num2str(self%case))
223 if (self%case == 1 .and. domainmeta%nDomains > 1) &
224 call error_message(
"Coupling: Only one domain allowed when coupling.")
227 if (self%case /= 0 .and. optimize) &
228 call error_message(
"Coupling: no internal optimization allowed when coupling.")
231 if (self%case /= 0 .and. self%any_meteo_expected() .and. .not. any(self%meteo_timestep == [1, 24])) &
232 call error_message(
"Coupling: meteo data expected but no valid time-step (1 or 24) given for it.")
subroutine set_config(self, case, meteo_timestep, meteo_time_ref_endpoint, meteo_expect_pre, meteo_expect_temp, meteo_expect_pet, meteo_expect_tmin, meteo_expect_tmax, meteo_expect_netrad, meteo_expect_absvappress, meteo_expect_windspeed, meteo_expect_ssrd, meteo_expect_strd, meteo_expect_tann, read_nml)
set configuration for the couple_cfg_type class