LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
climateput.h
1/*
2 * SPDX-FileCopyrightText: Karlsruhe Institute of Technology (KIT)
3 * SPDX-License-Identifier: LicenseRef-LandscapeDNDC
4 * This file is part of LandscapeDNDC. See LICENSE.
5 */
14
15#ifndef MBE_CLIMATEPUT_H_
16#define MBE_CLIMATEPUT_H_
17
18#include "mbe_legacymodel.h"
19#include "input/climate/climatetypes.h"
20#ifdef _HAVE_INPUTS_CLIENT_SIDE_SYNTHESIZE_OK
21# include "synthesizers/climate/synth-climate.h"
22#endif
23
24namespace ldndc {
25
26class LDNDC_API ClimateDayBufferUpdate : public MBE_LegacyModel
27{
28 LMOD_EXPORT_MODULE_INFO(ClimateDayBufferUpdate,"sys:climate:copy-to-state","update subday and day climate buffers");
29 public:
30 ClimateDayBufferUpdate(
31 MoBiLE_State *,
32 cbm::io_kcomm_t *,
33 timemode_e);
34
35 ~ClimateDayBufferUpdate();
36
37 lerr_t configure( ldndc::config_file_t const *);
38
39 lerr_t initialize();
40
47 lerr_t solve();
48
49 lerr_t finalize() { return LDNDC_ERR_OK; }
50
51 lerr_t sleep() { return LDNDC_ERR_OK; }
52 lerr_t wake() { return LDNDC_ERR_OK; }
53
54 private:
55 input_class_climate_t const * cl_;
56 substate_microclimate_t & mc_;
57
58#ifdef _HAVE_INPUTS_CLIENT_SIDE_SYNTHESIZE_OK
59 ltime_t cl_time_;
60 bool allow_synthesize_;
61 climate::record::item_type rec_s_buf_[climate::record::RECORD_SIZE];
62 climate::record::item_type * rec_s_;
63 climate::record::item_type rec_d_buf_[climate::record::RECORD_SIZE];
64 climate::record::item_type * rec_d_;
65
66 ldndc::data_synthesizer::climate::lsynth_climate_t cl_synth_;
67#endif
68
69 void array_to_record(
70 double const *, timemode_e);
71
72 lerr_t copy_climate_record_to_buffers_();
73};
74
75}
76
77#endif /* !MBE_CLIMATEPUT_H_ */
78
Spatially explicit groundwater model.
Definition airchemistryput.h:21