LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
soilchemistry-metrx.h
1
2#ifndef LM_SOILCHEMISTRYMETRX_H_
3#define LM_SOILCHEMISTRYMETRX_H_
4
5#include "mbe_legacymodel.h"
6#include "state/mbe_state.h"
7#include "ld_shared.h"
8
9#include "models/soilchemistry/metrx/output-soilchemistry-metrx.h"
10#include "models/soilchemistry/metrx/soilchemistry-metrx.h.inc"
11#include "models/soilchemistry/ld_transport.h"
12#include "models/soilchemistry/ld_enhanced_efficiency_nitrogen_fertilizers.h"
13
14#include "eventhandler/fertilize/fertilize.h"
15#include "eventhandler/till/till.h"
16
17#include <math/lmath-tdma.h>
18#include <logging/cbm_logging.h>
19
20namespace ldndc {
21
22extern cbm::logger_t * SoilChemistryMeTrXLogger;
23
28class LDNDC_API SoilChemistryMeTrX : public MBE_LegacyModel
29{
31 static const double TNORM;
32
34 static const double C_SATURATION;
35
36 LMOD_EXPORT_MODULE_INFO(SoilChemistryMeTrX,"soilchemistry:metrx","Soilchemistry MeTrX");
37public:
38 SoilChemistryMeTrX(
39 MoBiLE_State *,
40 cbm::io_kcomm_t *,
41 timemode_e);
42
43 ~SoilChemistryMeTrX();
44
45 lerr_t configure( ldndc::config_file_t const *);
46 lerr_t register_ports( cbm::io_kcomm_t *);
47 lerr_t initialize();
48
49 lerr_t solve();
50 lerr_t integrate();
51
52 lerr_t unregister_ports( cbm::io_kcomm_t *);
53 lerr_t finalize();
54
55 lerr_t sleep() { return LDNDC_ERR_OK; }
56 lerr_t wake() { return LDNDC_ERR_OK; }
57
58private:
59 cbm::io_kcomm_t * io_kcomm;
60
61 input_class_groundwater_t const * gw_;
62 input_class_siteparameters_t const & sipar_;
63 input_class_soillayers_t const & sl_;
64 input_class_setup_t const & se_;
65
66 substate_surfacebulk_t & sb_;
67 substate_airchemistry_t & ac_;
68
69 substate_microclimate_t const & mc_;
70 substate_physiology_t & ph_;
71 substate_soilchemistry_t & sc_;
72 substate_watercycle_t & wc_;
73
74 MoBiLE_PlantVegetation * m_veg;
75
76 SubscribedEvent<LD_EventHandlerQueue> m_FertilizeEvents;
77 SubscribedEvent<LD_EventHandlerQueue> m_IrrigationEvents;
78 SubscribedEvent<LD_EventHandlerQueue> m_ManureEvents;
79 SubscribedEvent<LD_EventHandlerQueue> m_PlantEvents;
80 SubscribedEvent<LD_EventHandlerQueue> m_TillEvents;
81
82 Transport transport_;
83 ControlledReleaseNitrogenFertilizer crnf_;
84
85 timemode_e const timemode_;
86
87 OutputSoilchemistryMeTrX output_writer_;
88 ldndc_flt64_t * output_data_;
89
90 int const TOTAL_TIME_STEPS;
91 int const INTERNAL_TIME_STEPS;
92 double const FTS_TOT_;
93
94 /* Molar weights scaled from [g mol-1] to [kg mol-1] */
95
96 double const M_C_SCALE; // Molar weigth of C [kg mol-1]
97 double const M_2C_SCALE; // Molar weigth of C [kg mol-1]
98 double const M_N_SCALE; // Molar weigth of N [kg mol-1]
99 double const M_2H_SCALE; // Molar weigth of H2 [kg mol-1]
100 double const M_2N_SCALE; // Molar weigth of N2 [kg mol-1]
101 double const M_O_SCALE; // Molar weigth of O2 [kg mol-1]
102 double const M_2O_SCALE; // Molar weight of SO4 in [kg mol-1]
103 double const M_FE_SCALE; // Molar weight of Fe in [kg mol-1]
104
105 double const N_O2_RATIO_NITRIFICATION;
106 double const ACETATE_RATIO_FERM_SYN; // Ratio of acetate production from glucose via fermentative/syntrophic pathway. [-]
107
108 double const H2_MOL_CH4_KG_CONVERSION; // Converts from mol H2 consumed for CH4 production to kg CO2 needed
109 double const H2_KG_CH4_KG_CONVERSION; // Converts from kg H2 consumed for CH4 production to kg CO2 needed
110 double const H2_KG_CH4_MOL_CONVERSION; // Converts from kg H2 consumed for CH4 production to mol CO2 needed
111
112 double const FE3_ACETATE_REDUCTION_RATIO; // CHCOO(-) + 8Fe(3+) + 4 H2O -> 2 HCO3(-) + 8 Fe(2+) + 9 H(+) (Brock Biology of Microorganisms)
113 double const FE3_HYDROGEN_REDUCTION_RATIO; // H2 + 2 Fe(3+) + 4 H+ -> 2 Fe2+ + 6 H2O
114
115 double const O2_CONVERSION_FOR_CH4_OX;
116
117 double const NO3_MOLAR_MAX_FE_RED; // NO3-threshold concentration. No Fe3-reduction possible for no3 > NO3_MOLAR_MAX_FE_RED. [mol m-3]
118 double const FE3_MOLAR_MAX_CH4_PROD; // Fe3-threshold concentration. No CH4-production possible for fe3 > FE3_MOLAR_MAX_CH4_PROD. [mol m-3]
119 double const O2_FE2_RATIO; // 2 Fe(2+) + 0.5 O2 + 2 H(+) -> 2 Fe(3+) + H2O
120
121 double const MICRO_C_MIN;
122
123 double const MC_MO2_RATIO; // Factor that transforms O2-consumption to CO2-production
124 double const RGAS_M_O2_BAR_PA; // Conversion factor for anaerobic volume calculation.
125
126 double const K_HU_DOC;
127
128 double const K_DC_AORG;
129 double const K_HU_AORG_HUM1;
130 double const K_HU_AORG_HUM2;
131
132 double const K_DC_SOL;
133 double const K_HU_SOL;
134
135 double const K_DC_CEL;
136 double const K_HU_CEL;
137
138 double const K_DC_LIG;
139 double const K_HU_LIG;
140
141 double const K_DC_HUM1;
142 double const K_HU_HUM1;
143
144 double const K_DC_HUM2;
145 double const K_HU_HUM2;
146
147 double const K_DC_HUM3;
148 double const KR_DENIT_CHEMO;
149
150 double const K_FRAG_STUBBLE;
151 double const K_FRAG_ALGAE;
152 double const K_FRAG_RAW_LITTER;
153 double const K_FRAG_WOOD;
154
155 double const KMM_O2_ROOT_RESPIRATION;
156
157 double const MUE_MAX_C_MICRO_1; // Maximal microbial growth rate for mic_1. [kg C timestep-1]
158 double const MUE_MAX_C_MICRO_2; // Maximal microbial growth rate for mic_2. [kg C timestep-1]
159 double const MUE_MAX_C_MICRO_3; // Maximal microbial growth rate for mic_3. [kg C timestep-1]
160
161 double const METRX_MUEMAX_C_CH4_PROD;
162 double const METRX_MUEMAX_H2_CH4_PROD;
163 double const METRX_MUEMAX_C_CH4_OX_HA;
164 double const METRX_MUEMAX_C_CH4_OX_LA;
165
166 double const METRX_MUEMAX_C_FE_RED;
167 double const METRX_KR_OX_FE;
168
169 double const MUE_MAX_N_ASSI;
170
171 double const PH_SURFACE_WATER;
172 double const PH_MAX;
173
174 double const A_MAX_ALGAE;
175 double const A_MAX_MICRO_1;
176 double const A_MAX_MICRO_2;
177 double const A_MAX_MICRO_3;
178
179 double const METRX_F_DENIT_N2_MIN;
180 double const METRX_F_DENIT_N2_DELTA;
181
182 double const D_NO_WATER_SCALE;
183 double const D_N2O_WATER_SCALE;
184 double const D_O2_WATER_SCALE;
185 double const D_CO2_WATER_SCALE;
186 double const D_CH4_WATER_SCALE;
187 double const D_NH3_WATER_SCALE;
188 double const D_NH4_WATER_SCALE;
189 double const D_NO3_WATER_SCALE;
190 double const D_NO2_WATER_SCALE;
191 double const D_DOC_WATER_SCALE;
192
193 double const D_O2_AIR_SCALE;
194 double const D_N2_AIR_SCALE;
195 double const D_N2O_AIR_SCALE;
196 double const D_NO_AIR_SCALE;
197 double const D_CH4_AIR_SCALE;
198 double const D_CO2_AIR_SCALE;
199 double const D_NH3_AIR_SCALE;
200 double const D_RADON_AIR_SCALE;
201
202 double const METRX_V_EBULLITION;
203 double const GROUNDWATER_NUTRIENT_ACCESS_RATE;
204
205 size_t SL_SURFACE_DISTRIBUTION; // number of soil layers for surface matter allocation to soil domaine
206 double SL_SURFACE_DISTRIBUTION_INVERSE; // inverse of SL_SURFACE_DISTRIBUTION
207
208 //wind speed
209 double const *mc_wind;
210
211 // soil temperature
212 double const *mc_temp_atm;
213 lvector_t< double > const &mc_temp_sl;
214
215 // water flux
216 double *waterflux_sl;
217 double *accumulated_waterflux_old_sl;
218
219 // infiltration flux
220 double infiltration;
221 double accumulated_infiltration_old;
222
223private:
224
225 PublishedField<double> StubbleCarbon;
226
227 /*****/
228 /* */
229 /*****/
230
231 bool peat_dev;
232 bool have_algae;
233 bool have_dry_wet;
234 cbm::string_t freeze_thaw_method;
235 bool have_surface_bulk;
236 bool have_canopy_transport;
237 bool have_river_connection;
238 bool have_litter_height_change;
239 cbm::string_t d_eff_method;
240 bool have_radon_diffusion;
241 double spinup_delta_c;
242 double spinup_delta_c_depth;
243
244 cbm::string_t anvf_method;
245
246 bool have_plant_diffusion;
247 bool have_water_table; // True for timespan with surface water
248
249 double h_wl; // heigth of each watertable layer [m]
250
251 double c_algae;
252 double c_dead_algae;
253 double n_algae;
254 double n_dead_algae;
255
256 double *o2_concentration;
257 lvector_t< double > ts_co2_concentration_fl;
258 lvector_t< double > ts_ch4_concentration_fl;
259 lvector_t< double > ts_no_concentration_fl;
260 lvector_t< double > ts_radon_concentration_fl;
261 lvector_t< double > nh3_fl;
262
263 /*********************/
264 /* balance variables */
265 /*********************/
266
267 double tot_c_balance_1;
268 double tot_n_balance_1;
269
270 /************************/
271 /* daily rate variables */
272 /************************/
273
274 // Groundwater access
275 double day_no3_groundwater_access;
276
277 // Mineralisation
278 double day_min_n_decomp;
279 double day_min_n_aorg;
280 double day_min_n_mic_1;
281 double day_min_n_mic_2;
282 double day_min_n_mic_3;
283
284 // Assimilation
285 double day_assi_n_mic_1;
286 double day_assi_n_mic_2;
287 double day_assi_n_mic_3;
288 double day_assi_c_mic_1;
289 double day_assi_c_mic_2;
290 double day_assi_c_mic_3;
291
292 // Nitrification
293 double day_nit_nh4_no2;
294 double day_nit_no2_no;
295 double day_nit_no2_n2o;
296
297 // Denitrification
298 double day_denit_no3_no2;
299 double day_denit_no2_no;
300 double day_denit_no2_n2o;
301 double day_denit_no2_n2;
302 double day_denit_no_n2o;
303 double day_denit_no_n2;
304 double day_denit_n2o_n2;
305 double day_chemodenit_no2_no;
306
307 // Respiration / Fermentation / Methanogenesis
308 double day_co2_prod_mic_1_growth;
309 double day_co2_prod_mic_1_maintenance;
310 double day_co2_prod_mic_2;
311 double day_co2_prod_mic_3_acetate_prod;
312 double day_co2_prod_mic_3_acetate_cons;
313 double day_co2_prod_ch4_prod;
314 double day_co2_prod_ch4_cons;
315
316 // Leaching
317 double day_leach_o2;
318 double day_leach_n2o;
319 double day_leach_n2;
320 double day_leach_no;
321 double day_leach_nh3;
322 double day_leach_urea;
323 double day_leach_radon;
324
325 // litter and algae
326 double accumulated_c_litter_above_old;
327 double accumulated_c_litter_below_old;
328
329 double dC_root_exsudates;
330 double dC_litter_algae;
331
332 // Decomposition
333 double day_decomp_c_lit_1;
334 double day_decomp_c_lit_2;
335 double day_decomp_c_lit_3;
336 double day_decomp_n_lit_1;
337 double day_decomp_n_lit_2;
338 double day_decomp_n_lit_3;
339 lvector_t< double > day_decomp_c_hum_1_sl;
340 lvector_t< double > day_decomp_c_hum_2_sl;
341 lvector_t< double > day_decomp_c_hum_3_sl;
342 lvector_t< double > day_decay_c_mic_sl;
343 double day_decomp_n_hum_1;
344 double day_decomp_n_hum_2;
345 double day_decomp_n_hum_3;
346
347 // Humification
348 lvector_t< double > day_c_humify_doc_hum_2_sl;
349 lvector_t< double > day_c_humify_sol_hum_1_sl;
350 lvector_t< double > day_c_humify_cel_hum_1_sl;
351 lvector_t< double > day_c_humify_lig_hum_1_sl;
352 lvector_t< double > day_c_humify_lig_hum_2_sl;
353 lvector_t< double > day_c_humify_mic_hum_1_sl;
354 lvector_t< double > day_c_humify_mic_hum_2_sl;
355 lvector_t< double > day_c_humify_hum_1_hum_2_sl;
356 lvector_t< double > day_c_humify_hum_2_hum_3_sl;
357
358 // Algae
359 double day_n_fix_algae;
360 double day_c_fix_algae;
361
362 // DOC production
363 double day_doc_prod_decomp_litter; // daily doc production by litter decomposition
364 double day_doc_prod_decomp_humus; // daily doc production by humus decomposition
365 double day_doc_prod_decomp_aorg; // daily doc production by active organic material decomposition
366
367
368 /*****************************/
369 /* Litter C- and N-fractions */
370 /*****************************/
371
372 enum atm_eq_liq{ nh3_atm_eq_liq, o2_atm_eq_liq, co2_atm_eq_liq, ch4_atm_eq_liq, n2o_atm_eq_liq, no_atm_eq_liq, radon_atm_eq_liq };
373
374 size_t subdaily_time_step_;
375
376 // Respiration
377 lvector_t< double > co2_auto_sl;
378 lvector_t< double > co2_hetero_sl;
379
380 lvector< double > cn_hum_1_sl;
381 lvector< double > cn_hum_2_sl;
382 lvector< double > cn_hum_3_sl;
383
384 lvector< double > freeze_thaw_fact_sl;
385 lvector< double > litter_type_fact_sl;
386
387 // Iron, sulfate, ...
388 lvector_t< double > day_acetate_cons_fe3_sl;
389 lvector_t< double > day_h2_c_eq_cons_fe3_sl;
390 lvector_t< double > day_fe2_oxidation_sl;
391
392 // Nitrification
393 lvector_t< double > day_nitrify_n2o_sl;
394 lvector_t< double > day_nit_no2_no3_sl;
395
396 // Microbes
397 lvector_t< double > cn_opt_mic_sl;
398
399 // Pool variables
400 lvector_t< double > h2_sl;
401
402 lvector_t< double > o2_liq_sl;
403 lvector_t< double > o2_gas_sl;
404 lvector_t< double > o2_consumption_sl;
405
406 lvector_t< double > ae_acetate_sl;
407 lvector_t< double > an_acetate_sl;
408
409 lvector_t< double > ch4_liq_sl;
410 lvector_t< double > ch4_gas_sl;
411 lvector_t< double > co2_liq_sl;
412 lvector_t< double > co2_gas_sl;
413
414 lvector_t< double > nh4_ae_sl;
415 lvector_t< double > nh4_an_sl;
416
417 lvector_t< double > don_ae_sl;
418 lvector_t< double > don_an_sl;
419
420 lvector_t< double > no3_ae_sl;
421 lvector_t< double > no3_an_sl;
422
423 lvector_t< double > doc_ice_sl;
424 lvector_t< double > acetate_ice_sl;
425 lvector_t< double > no3_ice_sl;
426 lvector_t< double > nh4_ice_sl;
427 lvector_t< double > don_ice_sl;
428
429 lvector_t< double > n2o_liq_sl;
430 lvector_t< double > n2o_gas_sl;
431 lvector_t< double > an_n2o_liq_sl;
432 lvector_t< double > an_n2o_gas_sl;
433 lvector_t< double > n2_gas_sl;
434
435 lvector_t< double > no_liq_sl;
436 lvector_t< double > no_gas_sl;
437 lvector_t< double > an_no_liq_sl;
438 lvector_t< double > an_no_gas_sl;
439
440 lvector_t< double > radon_liq_sl;
441 lvector_t< double > radon_gas_sl;
442
443 lvector_t< double > c_microbial_necromass_sl; // carbon content of microbial necromass
444 lvector_t< double > n_microbial_necromass_sl; // nitrogen content of microbial necromass
445
446 lvector_t< double > c_humus_1_sl; // carbon content of humus_0 pool
447 lvector_t< double > c_humus_2_sl; // carbon content of humus_1 pool
448 lvector_t< double > c_humus_3_sl; // carbon content of humus_2 pool
449
450 lvector_t< double > n_humus_1_sl; // nitrogen content of humus_0 pool
451 lvector_t< double > n_humus_2_sl; // nitrogen content of humus_1 pool
452 lvector_t< double > n_humus_3_sl; // nitrogen content of humus_2 pool
453
454 lvector_t< double > n_micro_1_sl; // nitrogen content of micro_1 pool
455 lvector_t< double > n_micro_2_sl; // nitrogen content of micro_2 pool
456 lvector_t< double > n_micro_3_sl; // nitrogen content of micro_3 pool
457
458
459 // Diffusion
460 lvector_t< double > D_eff_air_fl; // Effective gas diffusion coefficient in atmosphere.
461 lvector_t< double > D_eff_air_sl; // Effective gas diffusion coefficient in soils after WARRICK.
462 lvector_t< double > D_eff_water_sl;
463 lvector_t< double > D_eff_dailyturbation_sl;
464 lvector_t< double > D_eff_plant_sl; // Effective O2 diffusion coefficient in plants
465
466 lvector_t< double > interface_air_sl; // interface of air content between two soil layers
467 lvector_t< double > interface_delta_x_air_sl; // interface of air content between two soil layers divided by distance
468 lvector_t< double > interface_delta_x_water_sl; // interface of water content between two soil layers divided by distance
469 lvector_t< double > interface_delta_x_soil_sl;
470
471 lvector_t< double > delta_x; // interface of water content between two soil layers
472 lvector_t< double > pore_connectivity_sl; // connectivity of pores
473
474 // Soil environment
475 double ph_delta_pab_wl;
476 double ph_delta_urea_wl;
477
478 lvector_t< double > ph_delta_urea_sl;
479
480 lvector_t< double > soil_gas_advection_sl; // soil gas advection [m:s-1]
481 lvector_t< double > v_water_sl; // water volume of soillayer [m3]
482 lvector_t< double > v_air_sl; // air volume of soillayer [m3]
483 lvector_t< double > v_ice_sl; // ice volume of soillayer [m3]
484
485 lvector_t< double > communicate_sl;
486 lvector_t< double > communicate_fsl;
487 lvector_t< double > day_denit_factor_c_sl;
488 lvector_t< double > day_denit_factor_n_sl;
489
490 // Methanogenesis
491 lvector_t< double > day_ch4_production_hydrogen_sl;
492 lvector_t< double > day_ch4_production_acetate_sl;
493 lvector_t< double > day_ch4_oxidation_sl; // Layerspecific daily CH4-Oxidation in soil. [kg C-CH4 day-1]
494 double day_ch4_oxidation_la; // CH4-Oxidation in soil. [kg C-CH4 day-1]
495 double day_ch4_oxidation_ha; // CH4-Oxidation in soil. [kg C-CH4 day-1]
496
497 lvector< double > subdaily_ch4_bubbling; // Subdaily CH4 emission rate via bubbling. [kg C m-2 timestep-1]
498 lvector< double > subdaily_ch4_plant; // Subdaily CH4 emission rate via plant diffusion. [kg C m-2 timestep-1]
499 lvector< double > subdaily_ch4_soil; // Subdaily CH4 emission rate via soil diffusion. [kg C m-2 timestep-1]
500 lvector< double > subdaily_ch4_water; // Subdaily CH4 emission rate via water table diffusion. [kg C m-2 timestep-1]
501
502 lvector< double > subdaily_ch4_leach; // Subdaily CH4 leaching rate. [kg C m-2 timestep-1]
503 lvector< double > subdaily_ch4_prod; // Subdaily CH4 production rate. [kg C m-2 timestep-1]
504 lvector< double > subdaily_ch4_ox; // Subdaily CH4 oxidation rate. [kg C m-2 timestep-1]
505 lvector< double > subdaily_ch4_content; // Subdaily CH4 oxidation rate. [kg C m-2 timestep-1]
506
507 lvector< double > subdaily_co2_bubbling; // Subdaily CH4 emission rate via bubbling. [kg C m-2 timestep-1]
508 lvector< double > subdaily_co2_plant; // Subdaily CH4 emission rate via plant diffusion. [kg C m-2 timestep-1]
509 lvector< double > subdaily_co2_soil; // Subdaily CH4 emission rate via soil diffusion. [kg C m-2 timestep-1]
510 lvector< double > subdaily_co2_water; // Subdaily CH4 emission rate via water table diffusion. [kg C m-2 timestep-1]
511 lvector< double > subdaily_co2_leach; // Subdaily CH4 leaching rate. [kg C m-2 timestep-1]
512
513 // Others
514 lvector< double > subdaily_acetate_prod;
515 lvector< double > subdaily_doc_prod;
516
517 lvector< double > subdaily_o2_bubbling;
518 lvector< double > subdaily_o2_plant;
519 lvector< double > subdaily_o2_soil;
520 lvector< double > subdaily_o2_water;
521
522 lvector< double > subdaily_n2o_bubbling;
523 lvector< double > subdaily_n2o_plant;
524 lvector< double > subdaily_n2o_soil;
525 lvector< double > subdaily_n2o_water;
526
527 lvector< double > subdaily_no_bubbling;
528 lvector< double > subdaily_no_plant;
529 lvector< double > subdaily_no_soil;
530 lvector< double > subdaily_no_water;
531
532 lvector< double > subdaily_nh3_bubbling;
533 lvector< double > subdaily_nh3_plant;
534 lvector< double > subdaily_nh3_soil;
535 lvector< double > subdaily_nh3_water;
536
537 lvector< double > subdaily_plant_o2_cons;
538 lvector< double > subdaily_flood_o2_conc;
539 lvector< double > subdaily_algae_o2_prod;
540
541 lvector< double > subdaily_radon_soil;
542 lvector< double > subdaily_radon_plant;
543 lvector< double > subdaily_radon_water;
544
545 lvector< double > day_doc_prod_sl;
546 lvector< double > day_acetate_prod_sl;
547 lvector< double > day_h2_c_eq_prod_sl;
548
549 lvector< double > plant_o2_consumption_sl; // O2 consumption of oxygen per time step. [kg O2 m-2]
550
551 lvector< double > accumulated_n_nh4_throughfall_sl;
552 lvector< double > accumulated_n_no3_throughfall_sl;
553 lvector< double > accumulated_n_nh4_throughfall_sbl;
554 lvector< double > accumulated_n_no3_throughfall_sbl;
555 double accumulated_n_nh4_throughfall_old;
556 double accumulated_n_no3_throughfall_old;
557
558 // N by planting and fixation
559 lvector< double > accumulated_n_to_living_plant_and_algae_from_extern_sl;
560
561 lvector< double > accumulated_n_algae_nh4_uptake_sbl;
562 lvector< double > accumulated_n_algae_no3_uptake_sbl;
563 lvector< double > accumulated_n_algae_nh3_uptake_sbl;
564
565 lvector< double > accumulated_n_litter_from_plants_below_rawlitter_sl;
566 lvector< double > accumulated_n_litter_from_plants_below_wood_sl;
567 double accumulated_n_litter_from_plants_above_rawlitter;
568 double accumulated_n_litter_from_plants_above_wood;
569 double accumulated_n_litter_from_plants_above_stubble;
570 lvector< double > accumulated_n_aboveground_raw_litter_fragmentation_sl;
571 lvector< double > accumulated_n_belowground_raw_litter_fragmentation_sl;
572 lvector< double > accumulated_n_litter_from_algae_sl;
573 lvector< double > accumulated_n_litter_from_dung_sl;
574 lvector< double > accumulated_n_urea_from_dung_sl;
575
576 double accumulated_n_export_harvest_cutting_grazing;
577 double accumulated_n_export_harvest_old;
578 double accumulated_c_litter_wood_above_old;
579
580 lvector< double > accumulated_n_nh4_fertilization_sl;
581 lvector< double > accumulated_n_no3_fertilization_sl;
582 lvector< double > accumulated_n_nh3_fertilization_sl;
583 lvector< double > accumulated_n_don_fertilization_sl;
584 lvector< double > accumulated_n_urea_fertilization_sl;
585 lvector< double > accumulated_n_litter_fertilization_sl;
586 lvector< double > accumulated_n_aorg_fertilization_sl;
587 lvector< double > accumulated_n_nh4_fertilization_sbl;
588 lvector< double > accumulated_n_no3_fertilization_sbl;
589 lvector< double > accumulated_n_nh3_fertilization_sbl;
590 lvector< double > accumulated_n_urea_fertilization_sbl;
591
592 lvector< double > accumulated_n_surface_litter_incorporation_via_tilling_sl;
593 lvector< double > accumulated_n_litter_tilling_sl;
594 lvector< double > accumulated_n_aorg_tilling_sl;
595 lvector< double > accumulated_n_humus_1_tilling_sl;
596 lvector< double > accumulated_n_humus_2_tilling_sl;
597 lvector< double > accumulated_n_humus_3_tilling_sl;
598 lvector< double > accumulated_n_no3_tilling_sl;
599 lvector< double > accumulated_n_no2_tilling_sl;
600 lvector< double > accumulated_n_no_tilling_sl;
601 lvector< double > accumulated_n_n2o_tilling_sl;
602 lvector< double > accumulated_n_urea_tilling_sl;
603 lvector< double > accumulated_n_don_tilling_sl;
604 lvector< double > accumulated_n_nh4_tilling_sl;
605 lvector< double > accumulated_n_nh3_tilling_sl;
606 lvector< double > accumulated_n_microbes_tilling_sl;
607
608 lvector< double > accumulated_n_humus_1_spinup_sl;
609 lvector< double > accumulated_n_humus_2_spinup_sl;
610 lvector< double > accumulated_n_humus_3_spinup_sl;
611 lvector< double > accumulated_n_surface_litter_spinup_sl;
612 lvector< double > accumulated_n_litter_spinup_sl;
613
614 lvector< double > accumulated_n_urea_nh4_hydrolysis_sl;
615 lvector< double > accumulated_n_urea_nh4_hydrolysis_sbl;
616
617 lvector< double > accumulated_n_nh4_assimilation_sl;
618 lvector< double > accumulated_n_no3_assimilation_sl;
619 lvector< double > accumulated_n_don_assimilation_sl;
620
621 lvector< double > accumulated_n_nh4_nh3_conversion_sl;
622 lvector< double > accumulated_n_nh3_nh4_conversion_sl;
623 lvector< double > accumulated_n_nh4_nh3_conversion_sbl;
624 lvector< double > accumulated_n_nh3_nh4_conversion_sbl;
625
626 lvector< double > accumulated_n_micro_leaching_sl;
627 lvector< double > accumulated_n_aorg_leaching_sl;
628 lvector< double > accumulated_n_litter_leaching_sl;
629 lvector< double > accumulated_n_humus_1_leaching_sl;
630 lvector< double > accumulated_n_humus_2_leaching_sl;
631 lvector< double > accumulated_n_humus_3_leaching_sl;
632 lvector< double > accumulated_n_nh4_leaching_sl;
633 lvector< double > accumulated_n_nh3_leaching_sl;
634 lvector< double > accumulated_n_don_leaching_sl;
635 lvector< double > accumulated_n_urea_leaching_sl;
636 lvector< double > accumulated_n_no_leaching_sl;
637 lvector< double > accumulated_n_n2o_leaching_sl;
638
639 lvector< double > accumulated_n_urea_liq_diffusion_sl;
640 lvector< double > accumulated_n_nh3_liq_diffusion_sl;
641 lvector< double > accumulated_n_nh4_liq_diffusion_sl;
642 lvector< double > accumulated_n_no3_liq_diffusion_sl;
643
644 lvector< double > accumulated_n_nh4_infiltration_phys_sl;
645 lvector< double > accumulated_n_nh3_infiltration_phys_sl;
646 lvector< double > accumulated_n_urea_infiltration_phys_sl;
647 lvector< double > accumulated_n_no3_infiltration_phys_sl;
648 lvector< double > accumulated_n_don_infiltration_phys_sl;
649 lvector< double > accumulated_n_aorg_infiltration_phys_sl;
650
651 lvector< double > accumulated_n_nh4_infiltration_leach_sl;
652 lvector< double > accumulated_n_nh3_infiltration_leach_sl;
653 lvector< double > accumulated_n_urea_infiltration_leach_sl;
654 lvector< double > accumulated_n_no3_infiltration_leach_sl;
655 lvector< double > accumulated_n_don_infiltration_leach_sl;
656 lvector< double > accumulated_n_no_infiltration_leach_sl;
657 lvector< double > accumulated_n_n2o_infiltration_leach_sl;
658
659 lvector< double > accumulated_n_nh4_infiltration_liqdif_sl;
660 lvector< double > accumulated_n_nh3_infiltration_liqdif_sl;
661 lvector< double > accumulated_n_urea_infiltration_liqdif_sl;
662 lvector< double > accumulated_n_no3_infiltration_liqdif_sl;
663
664 lvector< double > accumulated_c_ch4_bubbling_sl;
665 lvector< double > accumulated_c_ch4_bubbling_sbl;
666
667 lvector< double > accumulated_n_nh3_bubbling_sl;
668 lvector< double > accumulated_n_no_bubbling_sl;
669 lvector< double > accumulated_n_n2o_bubbling_sl;
670 lvector< double > accumulated_n_nh3_bubbling_sbl;
671 lvector< double > accumulated_n_no_bubbling_sbl;
672 lvector< double > accumulated_n_n2o_bubbling_sbl;
673
674 lvector< double > accumulated_n_nh3_dissolution_sbl;
675 lvector< double > accumulated_n_no_dissolution_sbl;
676 lvector< double > accumulated_n_n2o_dissolution_sbl;
677
678 lvector< double > accumulated_n_nh3_phys_diffusion_sl;
679 lvector< double > accumulated_n_no_phys_diffusion_sl;
680 lvector< double > accumulated_n_n2o_phys_diffusion_sl;
681 lvector< double > accumulated_n_nh3_gas_diffusion_sl;
682 lvector< double > accumulated_n_no_gas_diffusion_sl;
683 lvector< double > accumulated_n_n2o_gas_diffusion_sl;
684
685 lvector< double > accumulated_n_micro_perturbation_sl;
686 lvector< double > accumulated_n_aorg_perturbation_sl;
687 lvector< double > accumulated_n_litter_perturbation_sl;
688 lvector< double > accumulated_n_humus_1_perturbation_sl;
689 lvector< double > accumulated_n_humus_2_perturbation_sl;
690 lvector< double > accumulated_n_humus_3_perturbation_sl;
691
692 lvector< double > accumulated_n_nh4_no2_nitrification_sl;
693 lvector< double > accumulated_n_nh4_no_nitrification_sl;
694 lvector< double > accumulated_n_nh4_n2o_nitrification_sl;
695 lvector< double > accumulated_n_no2_no3_nitrification_sl;
696
697 lvector< double > accumulated_n_no3_no2_denitrification_sl;
698 lvector< double > accumulated_n_no3_no_denitrification_sl;
699 lvector< double > accumulated_n_no3_n2o_denitrification_sl;
700 lvector< double > accumulated_n_no3_n2_denitrification_sl;
701 lvector< double > accumulated_n_no2_no_denitrification_sl;
702 lvector< double > accumulated_n_no2_n2o_denitrification_sl;
703 lvector< double > accumulated_n_no2_n2_denitrification_sl;
704 lvector< double > accumulated_n_no_n2o_denitrification_sl;
705 lvector< double > accumulated_n_no_n2_denitrification_sl;
706 lvector< double > accumulated_n_n2o_n2_denitrification_sl;
707
708 lvector< double > accumulated_n_no2_chemodenitrification_sl;
709
710 lvector< double > accumulated_n_mic_naorg_decay_sl;
711 lvector< double > accumulated_n_mic_nh4_mineral_sl;
712 lvector< double > accumulated_n_mic_don_dissolve_sl;
713
714 lvector< double > accumulated_n_aorg_nh4_mineral_sl;
715 lvector< double > accumulated_n_aorg_don_dissolve_sl;
716
717 lvector< double > accumulated_n_humus_1_don_dissolve_sl;
718 lvector< double > accumulated_n_humus_1_nh4_mineral_sl;
719 lvector< double > accumulated_n_humus_2_don_dissolve_sl;
720 lvector< double > accumulated_n_humus_2_nh4_mineral_sl;
721 lvector< double > accumulated_n_humus_3_don_dissolve_sl;
722 lvector< double > accumulated_n_humus_3_nh4_mineral_sl;
723
724 lvector< double > accumulated_n_litter_don_dissolve_sl;
725 lvector< double > accumulated_n_litter_nh4_mineral_sl;
726
727 lvector< double > accumulated_n_don_humus_1_humify_sl;
728 lvector< double > accumulated_n_don_humus_2_humify_sl;
729 lvector< double > accumulated_n_don_humus_3_humify_sl;
730 lvector< double > accumulated_n_litter_humus_1_humify_sl;
731
732 lvector< double > accumulated_c_root_exsudates_old_sl;
733
734 lvector_t< double > ranvf_sl;
735 lvector_t< double > cumulative_freezing_degree_days_sl;
736 lvector_t< double > cfdd_turnover_sl;
737
738#ifdef METRX_ANVF_TYPES
739 lvector_t< double > anvf_pnet_sl;
740 lvector_t< double > anvf_dndccan_sl;
741 lvector_t< double > anvf_nloss_sl;
742#endif
743
744 class SpinUp
745 {
746 public:
747
748 SpinUp( size_t _y, size_t _sl_cnt) : spinup_type_( 0),
749 spinup_years_( 0),
750 executed_months_( 0),
751 execute_( false),
752 c_to_humus_1_sl( _sl_cnt, 0.0),
753 c_to_humus_2_sl( _sl_cnt, 0.0),
754 c_to_humus_3_sl( _sl_cnt, 0.0),
755 humify_humus_1_to_humus_2_sl( _sl_cnt, 0.0),
756 humify_humus_2_to_humus_3_sl( _sl_cnt, 0.0),
757 decompose_hum_1( _sl_cnt, 0.0),
758 decompose_hum_2( _sl_cnt, 0.0),
759 decompose_hum_3( _sl_cnt, 0.0),
760
761 loose_lit_1( _sl_cnt, 0.0),
762 loose_lit_2( _sl_cnt, 0.0),
763 loose_lit_3( _sl_cnt, 0.0),
764
765 c_to_lit_1( _sl_cnt, 0.0),
766 c_to_lit_2( _sl_cnt, 0.0),
767 c_to_lit_3( _sl_cnt, 0.0),
768
769 loose_aorg( _sl_cnt, 0.0),
770 c_to_aorg( _sl_cnt, 0.0),
771
772 c_humus_1_temp_sl( _sl_cnt, 0.0),
773 c_humus_2_temp_sl( _sl_cnt, 0.0),
774 c_humus_3_temp_sl( _sl_cnt, 0.0),
775
776 c_litter_1_temp_sl( _sl_cnt, 0.0),
777 c_litter_2_temp_sl( _sl_cnt, 0.0),
778 c_litter_3_temp_sl( _sl_cnt, 0.0),
779
780 n_litter_1_temp_sl( _sl_cnt, 0.0),
781 n_litter_2_temp_sl( _sl_cnt, 0.0),
782 n_litter_3_temp_sl( _sl_cnt, 0.0),
783
784 c_aorg_temp_sl( _sl_cnt, 0.0),
785 n_aorg_temp_sl( _sl_cnt, 0.0),
786
787 cn_humus_2_temp_sl( _sl_cnt, 0.0),
788 cn_humus_3_temp_sl( _sl_cnt, 0.0),
789
790 exit_wood( 0.0),
791 enter_wood( 0.0)
792 {
793 this->set_spinup_years( _y);
794 }
795
796 ~SpinUp()
797 {}
798
799 public:
800
801 void reset( bool _reset_litter = true)
802 {
803 c_to_humus_1_sl = 0.0;
804 c_to_humus_2_sl = 0.0;
805 c_to_humus_3_sl = 0.0;
806 humify_humus_1_to_humus_2_sl = 0.0;
807 humify_humus_2_to_humus_3_sl = 0.0;
808 decompose_hum_1 = 0.0;
809 decompose_hum_2 = 0.0;
810 decompose_hum_3 = 0.0;
811
812 if ( _reset_litter)
813 {
814 loose_lit_1 = 0.0;
815 loose_lit_2 = 0.0;
816 loose_lit_3 = 0.0;
817
818 c_to_lit_1 = 0.0;
819 c_to_lit_2 = 0.0;
820 c_to_lit_3 = 0.0;
821
822 loose_aorg = 0.0;
823 c_to_aorg = 0.0;
824 }
825 exit_wood = 0.0;
826 enter_wood = 0.0;
827 }
828
829 inline size_t spinup_type() const
830 {
831 return this->spinup_type_;
832 }
833
834 inline size_t spinup_months() const
835 {
836 return this->spinup_years_ * 12;
837 }
838
839 inline size_t spinup_years() const
840 {
841 return this->spinup_years_;
842 }
843
844 lerr_t stop_spinup()
845 {
846 execute_ = false;
847 return LDNDC_ERR_OK;
848 }
849
850 void set_spinup_type( size_t _t)
851 {
852 this->spinup_type_ = _t;
853 }
854
855 void set_spinup_years( size_t _y)
856 {
857 this->spinup_years_ = _y;
858 if ( this->spinup_years_ > 0)
859 {
860 this->execute_ = true;
861 }
862 }
863
864 size_t simulated_years( cbm::sclock_t const *) const;
865
866 bool spinup_stage( cbm::sclock_t const *) const;
867
868 bool execute_spinup( cbm::sclock_t const *);
869
870 size_t spinup_type_;
871 size_t spinup_years_;
872 size_t executed_months_;
873
874 private:
875
876 bool execute_;
877
878 public:
879
880 lvector< double > c_to_humus_1_sl;
881 lvector< double > c_to_humus_2_sl;
882 lvector< double > c_to_humus_3_sl;
883
884 lvector< double > humify_humus_1_to_humus_2_sl;
885 lvector< double > humify_humus_2_to_humus_3_sl;
886
887 lvector< double > decompose_hum_1;
888 lvector< double > decompose_hum_2;
889 lvector< double > decompose_hum_3;
890
891 lvector< double > loose_lit_1;
892 lvector< double > loose_lit_2;
893 lvector< double > loose_lit_3;
894
895 lvector< double > c_to_lit_1;
896 lvector< double > c_to_lit_2;
897 lvector< double > c_to_lit_3;
898
899 lvector< double > loose_aorg;
900 lvector< double > c_to_aorg;
901
902 lvector< double > c_humus_1_temp_sl;
903 lvector< double > c_humus_2_temp_sl;
904 lvector< double > c_humus_3_temp_sl;
905
906 lvector< double > c_litter_1_temp_sl;
907 lvector< double > c_litter_2_temp_sl;
908 lvector< double > c_litter_3_temp_sl;
909
910 lvector< double > n_litter_1_temp_sl;
911 lvector< double > n_litter_2_temp_sl;
912 lvector< double > n_litter_3_temp_sl;
913
914 lvector< double > c_aorg_temp_sl;
915 lvector< double > n_aorg_temp_sl;
916
917 lvector< double > cn_humus_2_temp_sl;
918 lvector< double > cn_humus_3_temp_sl;
919
920 double exit_wood;
921 double enter_wood;
922 };
923
924 SpinUp spinup_;
925
926
927 /*****************/
928 /*** methods ***/
929 /*****************/
930
936 lerr_t
937 MeTrX_write_output();
938
944 lerr_t
945 MeTrX_write_output_daily();
946
952 lerr_t
953 MeTrX_write_output_yearly();
954
960 lerr_t
961 MeTrX_write_output_layer_daily();
962
968 lerr_t
969 MeTrX_write_output_layer_yearly();
970
976 lerr_t
977 MeTrX_write_output_fluxes();
978
984 lerr_t
985 MeTrX_write_output_pools();
986
992 lerr_t
993 MeTrX_write_output_subdaily();
994
1000 lerr_t
1001 MeTrX_write_rates();
1002
1008 lerr_t
1009 MeTrX_fertilize();
1010
1011 lerr_t
1012 MeTrX_irrigate();
1013
1019 lerr_t
1020 MeTrX_manure();
1021
1027 lerr_t
1028 MeTrX_till();
1029
1035 lerr_t
1036 MeTrX_reset();
1037
1043 lerr_t
1044 MeTrX_reset_subdaily();
1045
1051 lerr_t
1052 MeTrX_reset_daily();
1053
1059 lerr_t
1060 MeTrX_update();
1061
1067 lerr_t
1068 MeTrX_check_for_negative_value(
1069 char const * /*name*/);
1070
1076 lerr_t
1077 MeTrX_spinup();
1078
1082 lerr_t
1083 MeTrX_balance_check(
1084 unsigned int);
1085
1091 lerr_t
1093
1094 lerr_t
1095 MeTrX_advection();
1096
1102 void
1104
1110 void
1112
1116 lerr_t
1117 MeTrX_plant_respiration( int /* time step */);
1118
1119 double
1120 MeTrX_get_wfps(
1121 size_t /* soil layer */);
1122
1126 double
1127 MeTrX_get_wfps_eff(
1128 size_t,
1129 double const &);
1130
1136 lerr_t
1138
1144 lerr_t
1146
1150 double
1151 radon_emanation_coeff(
1152 unsigned int,
1153 const double &,
1154 const double &,
1155 const double &,
1156 const double &);
1157
1163 lerr_t
1165
1169 void
1171 double const &,
1172 double const &,
1173 double const &,
1174 double const &,
1175 double const &,
1176 double const &,
1177 lvector< double > &accumulated_litter_sl);
1178
1184 lerr_t
1186
1187 void
1188 MeTrX_liq_diffusion_scale( double &_out, lvector_t< double > &_scale);
1189
1195 void
1197
1203 lerr_t
1205
1211 lerr_t
1213
1219 lerr_t
1221
1222 void
1223 MeTrX_ebullition_transfer(
1224 double &,
1225 double &,
1226 double ,
1227 double );
1228
1234 void
1236
1242 void
1244
1250 void
1252
1258 void
1260
1266 void
1268
1274 void
1276
1282 void
1284
1290 void
1292
1298 lerr_t
1300
1304 double
1305 MeTrX_get_mineral_efficiency(
1306 double,
1307 double);
1308
1312 double
1313 MeTrX_get_micro_c_decay_max(
1314 double &,
1315 size_t const &);
1316
1320 double
1321 MeTrX_get_micro_n_decay_max(
1322 double &,
1323 size_t const &);
1324
1328 void
1329 MeTrX_dead_microbial_biomass_allocation(
1330 size_t /* soil layer */,
1331 double const & /* carbon transfer amount*/,
1332 double const & /* nitrogen transfer amount*/,
1333 double &,
1334 double &);
1335
1339 void
1340 MeTrX_execute_c_growth(
1341 size_t const &,
1342 double ,
1343 double const &,
1344 double &,
1345 double &);
1346
1350 void
1351 MeTrX_execute_co2_prod(
1352 size_t const &,
1353 double const &,
1354 double &,
1355 double &);
1356
1360 void
1361 MeTrX_execute_n_assimilation(
1362 double const &,
1363 size_t const &,
1364 bool const &,
1365 double &,
1366 double &,
1367 double &);
1368
1372 double
1373 MeTrX_get_n_growth(
1374 double const &,
1375 double const &,
1376 double const &,
1377 double const &,
1378 double const &);
1379
1385 void
1387
1393 void
1395
1403 lerr_t
1405
1411 void
1413
1419 void
1421
1427 void
1429
1435 void
1437
1443 void
1445
1451 void
1453
1457 double
1459 size_t /* soil layer */);
1460
1466 double
1468
1469 double
1470 MeTrX_get_fact_ph_som_turnover( size_t const &);
1471
1477 double
1478 MeTrX_get_fact_tm_decomp( size_t const &);
1479 double
1480 MeTrX_get_fact_clay_decomp( size_t const &);
1481 double
1482 MeTrX_get_fact_clay_humify( size_t const &);
1483 double
1484 MeTrX_get_fact_t_mic( size_t const &);
1485 double
1486 MeTrX_get_fact_m_mic( size_t const &);
1487 double
1488 MeTrX_get_fact_tm_mic( size_t const &);
1489
1490 double
1491 MeTrX_get_fact_t_denit( size_t const &);
1492 double
1493 MeTrX_get_fact_m_denit( size_t const &);
1494 double
1495 MeTrX_get_fact_tm_denit( size_t const &);
1496
1500 inline double MeTrX_get_fact_mm(
1501 double const &_conc,
1502 double const &_k)
1503 {
1504 return (_conc / (_k + _conc));
1505 };
1506
1511 inline double MeTrX_get_k_mm_x_sl(
1512 size_t const &_sl,
1513 double const &_k_mm)
1514 {
1515 return (_k_mm * sc_.h_sl[_sl]);
1516 };
1517
1518
1524 double
1525 MeTrX_get_c_tot();
1526
1532 double
1533 MeTrX_get_n_tot();
1534
1538 double
1539 MeTrX_get_atm_eq_liq(
1540 atm_eq_liq const &,
1541 double const &);
1542
1548 lerr_t
1549 MeTrX_receive_state();
1550
1556 lerr_t
1557 MeTrX_send_state();
1558
1565 lerr_t
1566 MeTrX_dissolution_soil( double const &,
1567 double &,
1568 double &);
1569
1575 lerr_t
1576 MeTrX_update_soil_discretization( bool);
1577
1578 bool
1579 MeTrX_forest_ecosytem();
1580};
1581
1582} /*namespace ldndc*/
1583
1584#endif /* LM_SOILCHEMISTRYMETRX_H_ */
void MeTrX_litter_distribution(double const &, double const &, double const &, double const &, double const &, double const &, lvector< double > &accumulated_litter_sl)
Adds carbon and nitrogen litter to soil litter pools.
Definition soilchemistry-metrx-fragmentation.cpp:245
lerr_t MeTrX_radon_source_sink()
Definition soilchemistry-metrx-physics-chemistry.cpp:470
static const double C_SATURATION
Definition soilchemistry-metrx.h:34
lerr_t MeTrX_pertubation()
Definition soilchemistry-metrx-transport.cpp:1638
void MeTrX_pH_calculation()
Definition soilchemistry-metrx-physics-chemistry.cpp:621
void MeTrX_leaching()
Downwards transport of solutes, litter and humus with percolation water.
Definition soilchemistry-metrx-transport.cpp:25
double MeTrX_get_fact_tm_denit(size_t const &)
The temperature and moisture dependency of denitrifying microbes is given by the harmonic mean of a s...
Definition soilchemistry-metrx-denitrification.cpp:562
lerr_t MeTrX_plant_respiration(int)
Updates o2 and co2 concentrations in soil layers. There is no o2 mass conservation guaranteed because...
Definition soilchemistry-metrx-management.cpp:1093
double MeTrX_get_fact_m_denit(size_t const &)
The soil moisture response of denitrificstion is given by:
Definition soilchemistry-metrx-denitrification.cpp:539
lerr_t MeTrX_freeze_thaw()
Definition soilchemistry-metrx-physics-chemistry.cpp:409
void MeTrX_clay_nh4_equilibrium()
Definition soilchemistry-metrx-physics-chemistry.cpp:95
double MeTrX_get_ph_wl()
Definition soilchemistry-metrx-physics-chemistry.cpp:607
lerr_t MeTrX_metabolism()
Definition soilchemistry-metrx-microbial-dynamics.cpp:215
void MeTrX_soil_organic_matter_turnover()
static const double TNORM
Definition soilchemistry-metrx.h:31
double MeTrX_get_k_mm_x_sl(size_t const &_sl, double const &_k_mm)
Scales Michaelis-Menten constant according to spatial discretization.
Definition soilchemistry-metrx.h:1511
double MeTrX_get_fact_tm_decomp(size_t const &)
Response function for decomposition of organic matter depeding on temperature and moisture.
Definition soilchemistry-metrx-decomposition.cpp:689
lerr_t MeTrX_nitrogen_fertilizer_release()
Transforms nitrogen from slow release nitrogen fertilizer to nh4.
Definition soilchemistry-metrx-management.cpp:1000
double MeTrX_get_ph_sl(size_t)
Returns dynamic pH-value of given soil layer.
Definition soilchemistry-metrx-physics-chemistry.cpp:599
void MeTrX_nh3_nh4_equilibrium()
Definition soilchemistry-metrx-physics-chemistry.cpp:32
double MeTrX_get_fact_t_denit(size_t const &)
The soil temperature response of denitrification is given by the same temperature dependency as for ...
Definition soilchemistry-metrx-denitrification.cpp:507
lerr_t solve()
Definition soilchemistry-metrx-solve.cpp:19
lerr_t MeTrX_fragmentation()
Definition soilchemistry-metrx-fragmentation.cpp:24
void MeTrX_urea_hydrolysis()
Definition soilchemistry-metrx-management.cpp:933
void MeTrX_groundwater_access()
Definition soilchemistry-metrx-transport.cpp:768
Spatially explicit groundwater model.
Definition airchemistryput.h:15