LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
airchemistryput.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_AIRCHEMISTRYPUT_H_
16#define MBE_AIRCHEMISTRYPUT_H_
17
18#include "mbe_legacymodel.h"
19#include "ld_shared.h"
20
21namespace ldndc {
22
23class LDNDC_API AirChemistryDayBufferUpdate : public MBE_LegacyModel
24{
25 LMOD_EXPORT_MODULE_INFO(AirChemistryDayBufferUpdate,"sys:airchemistry:copy-to-state","update subday and day air chemistry buffers");
26 public:
27 AirChemistryDayBufferUpdate(
28 MoBiLE_State *,
29 cbm::io_kcomm_t *,
30 timemode_e);
31
32 ~AirChemistryDayBufferUpdate();
33
34 lerr_t configure( ldndc::config_file_t const *);
35
36 lerr_t register_ports( cbm::io_kcomm_t *);
37 lerr_t unregister_ports( cbm::io_kcomm_t *);
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_airchemistry_t const * ad_;
56 substate_airchemistry_t & ac_;
57
58 lerr_t copy_air_chemistry_record_to_buffers_();
59
60 /* 2026-11-26 regional ammonia dispersion kernel "nh3disp" (optional producer):
61 * NHx deposition and NH3 concentration from the emissions of the region are
62 * added to the background given by the airchemistry input */
63 SubscribedField<double> RegionalDepositionNHx; /* accumulated [kg N m-2] */
64 SubscribedField<double> RegionalConcentrationNH3; /* [ppm] */
65 SubscribedField<double> RegionalBackgroundFactorNHx; /* factor on the input NHx deposition [-] */
66 double regional_deposition_old_; /* [kg N m-2] */
67 double regional_deposition_day_; /* [g N m-2 d-1] */
68 double regional_concentration_sum_; /* [ppm] */
69 int regional_concentration_cnt_;
70};
71
72}
73
74#endif /* !MBE_AIRCHEMISTRYPUT_H_ */
75
Spatially explicit groundwater model.
Definition airchemistryput.h:21