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