Recycling Improves Soil Fertility Management in Smallholdings in Tanzania

: Residues from bioenergy and ecological sanitation (EcoSan) can be utilized to sustain soil fertility and productivity. With regard to certain cooking and sanitation technologies used in smallholder households (hh), we systematically analyzed how utilization of the respective potentials to recover residues for farming affects (i) soil nutrient balances, (ii) the potential for subsistence production of composts, and (iii) environmental emissions. On the example of an intercropping farming system in Karagwe, Tanzania, we studied speciﬁc farming practices including (1) current practices of using standard compost only; (2) a combination of using biogas slurry, urine, and standard compost; (3) a combination of using so-called “CaSa-compost” (containing biochar and sanitized human excreta, Project “Carbonization and Sanitation”), urine, and standard compost. The system analysis combines a soil nutrient balance (SNB) with material ﬂow analysis (MFA). Currently, nitrogen (N) and phosphorus (P) are depleted by − 54 ± 3 and − 8 ± 1 kg · ha − 1 · year − 1 , respectively. Our analysis shows, however, a clear potential to reduce depletion rates of N, and to reverse the SNB of P, to bring about a positive outcome. Composts and biogas slurry supply sufﬁcient P to crops, while urine effectively supplements N. By using resources recovered from cooking and sanitation, sufﬁcient compost for subsistence farming may be produced. Human excreta contribute especially to total N and total P in CaSa-compost, whilst biochar recovered from cooking with microgasiﬁer stoves adds to total carbon (C) and total P. We conclude that the combined recycling of household residues from cooking and from sanitation, and CaSa-compost in particular, is especially suitable for sustainable soil management, as it mitigates existing P-deﬁciency and soil acidity, and also restores soil organic matter.


The Challenge of Closing the Loop
Managing soil appropriately requires replacing those nutrients which have been taken from the soil during cultivation [1]. The International Assessment of Agricultural Knowledge, Science and Technology for Development (IAASTD) sees "Agriculture at a crossroads", and calls for focusing on efficient, small-scale agroecosystems with material cycles that are as closed as practicably possible [2]. Agroecology, nutrient recycling within the agroecosystem, and the use of locally available resources represent, therefore, agreed prerequisites for soil conservation and amelioration, and also, as a consequence, for long-term food production [3][4][5][6][7][8][9]. As a holistic farming approach to jointly manage soil, nutrients, water, crops, and vegetation in the context of sub-Saharan Africa (SSA), the IAASTD and the Food and Agricultural Organisation of the United Nations (FAO) further promote integrated plant nutrient management (IPNM) [10,11]. When tailored to a particular cropping system, IPNM aims to provide a solution to the triple challenge of (i) sustaining soil fertility, (ii) improving land productivity, and (iii) reducing environmental degradation [11].
Applied IPNM combines the use of organic inputs, such compost, farmyard manure, mulch, etc., with mineral inputs, such as synthetic fertilizers, alongside practices including intercropping, agroforestry, liming, low-tillage, crop rotation, etc. [12]. Composting is a widespread and common method, whereby various organic residues, mixed with mineral components, are aerobically and biochemically decomposed by macro-and microorganisms. The composting process, e.g., [13][14][15], as well as the combined use of compost with inorganic nutrient sources, cf. [16], has been well studied in the context of SSA. Regular input of organic matter to agricultural soils is needed to restore soil organic matter (SOM) and maintain soil humus. Pursuant to [17], however, on-farm availability of organic matter is often restricted in the case of many farmers in SSA, due to poor land productivity. As a consequence, SSA has been identified as a hotspot for the depletion of SOM [18]. Moreover, existing organic materials tend to be characterized by comparatively low contents of phosphorus (P) [19]. Pig and poultry manure, which constitute a possible P-rich resource, however, are not sufficiently available, especially to structurally poor farming households [20]. For these reasons, a lack of P is a very common factor in limiting plant growth in SSA [17]. Consequently, many smallholders face being locked into a vicious circle of low soil P, resulting in low production of food crops, and then a limited supply of organic material for soil fertility management [17].

Monitoring and Assessing Soil Fertility Management Practices
To effectively enhance soil fertility, the FAO recommends the development of IPNM approaches alongside the identification of existing soil nutrient balances [21,22]. The concept of soil nutrient balance (SNB) was introduced by [23], in order to analyze and monitor changes in soil fertility, particularly in SSA. The methodology aims at measuring, calculating, and balancing various input and output flows of nutrients to and from agricultural land.
For the wider Lake Victoria region (East Africa), however, existing annual rates of soil nutrient mining and replenishing remain mostly unknown [24]. As an exception, [25] identified existing annual nutrient depletion rates on arable land in Eastern Uganda with 33 kg·ha −1 ·year −1 and 6 kg·ha −1 ·year −1 for nitrogen (N) and P, respectively. For Tanzania (TZ), estimated average annual losses of N and P range from 20 to 40 kg·ha −1 ·year −1 , and 3.5 to 6.6 kg·ha −1 ·year −1 , respectively [26]. Furthermore, [27] estimated SNBs for N and P of banana-based farming in Northwest TZ as ranging from −30 to +11 kg·ha −1 ·year −1 , and −3 to +9 kg·ha −1 ·year −1 , respectively. According to [27], nutrients are increasingly exported out of farmland in the region, since the market economy has intensified sales and trading of food products, and since the use of pit latrines has increased, which act as sinks for nutrients. The most significant nutrient inputs to home gardens derive from imports of fodder grasses from off-farm grassland, or bought bananas and brewing grasses, respectively [17]. The worst depletion rates were, therefore, identified for structurally poor households without livestock. As a countermeasure, [27] recommend the rigorous recycling of all household refuse, including human excreta, alongside an increased application of composting.

Intersectional Resource Management for Subsistence Fertilizer Production
Hence, the recovery of resources from the farming household could effectively promote on-farm nutrient cycling. Especially the use of residues from cooking with bioenergy and from ecological sanitation (EcoSan) provides a viable option to increase subsistence production of soil amenders for IPNM. Residues available after cooking depend on the technology applied, and include (i) ash from three-stone fires, charcoal stoves, or rocket stoves; (ii) biochar from microgasifier stoves; or (iii) biogas slurry from anaerobic fermentation of organic wastes to produce biogas. The latter is particularly rich in nutrients, and is well known for its suitability as a fertilizer for organic farming [28]. The term "biochar" refers specifically to carbonised organic matter-i.e., (powdery) charcoal with significant carbon (C) content-that is used for soil amelioration [29,30]. Biochar has attracted significant interest from scientists and practitioners within the last decade, largely due to the findings of Terra Preta, an Anthrosol in the Amazon basin with exceptional soil fertility [31,32]. Using biochar as a compost additive is the most promising approach for maximising the positive effects of biochar applications, as demonstrated by [33].
Residues available from EcoSan facilities include urine and faeces that can be collected separately in a urine-diverting dry toilet (UDDT). In order to prevent the transmission of disease, additional treatment of human excreta is vital in order to inactivate pathogens [34,35]. Treatment should be carried out at as early a stage as possible during the process [36]. Urine must simply be stored for a period of at least two months after collection in the UDDT [36,37]. After this period, stored urine is a fast-acting and rapidly available N-fertilizer [38]. Urine is often diluted with water in a ratio of from 1:3, to up to 1:5 parts urine to water, in order to avoid over-application and to reduce odour [38]. For balancing nutrient doses, urine should be complemented with either mineral P and potassium (K) additives, or an organic amendment, such as compost. Sanitation of human faeces is possible by different means [36,39]. In this study, we focus on thermal sanitation of faeces, which is based on an appropriate combination of time and temperature [40]. As an example, pasteurization can take place at temperatures between 65 to 75 • C, over periods ranging from 30 to 120 min. Here, pasteurization is realized before composting and takes place in a loam oven, whereby a microgasifier stove provides the heat required [39]. The use of a microgasifier means that additional biochar is potentially available as an output of this sanitation process [41]. For the subsequent composting, it is recommended to mix human faces with other organic residues, such as kitchen wastes, harvest residues, ashes, or biochar [42]. This mixing of various types of waste aims to create a well-balanced content of C and other nutrients, as well as of dry and wet matter, which in turn sustains a well-functioning composting process [43].

Research Objectives and Questions
To the best of our knowledge, analytical studies focusing on IPNM potentials around the nexus energy-sanitation-agriculture, and based on SNB, have not yet been scientifically targeted for smallholder systems in SSA in general, or in East Africa in particular. Moreover, the SNB has, to date, in the vast majority of studies, been applied for ex-post analyses of existing depletion or replenishment of soil nutrients. Nonetheless, SNB could also be used as analytical ex-ante evaluation or assessment method, considering potential effects of technology-related changes in farming systems on soil fertility.
Against this background, it is the objective of the present work to develop a model that enables an ex-ante assessment of integrating residues from cooking and EcoSan into soil fertility management in the context of smallholder farming in SSA. In prior studies focusing on a household level, we already introduced [39], demonstrated [61], and analyzed, in detail, the recycling potentials of an intersectional resource management for the example of smallholdings in Karagwe, TZ [41]. In the present work focusing on a farm level, we systematically compare specific approaches to recover residues as resources for IPNM, such as biogas slurry, urine, or co-composted human faeces, and biochar. Therefore, the following research question has been formulated: How do identified modifications in the farming system (i.e., technology use and residue recovery) affect (i) soil nutrient balances; (ii) availability of resources for subsistence production of compost; and (iii) environmental emissions assessed with global warming potential (GWP) and eutrophication potential (EP)? In addition, we estimate the potential for counteracting existing soil degradation, and sustain soil fertility and food production through recycling of nutrient and restoration of SOM.

Materials and Methods
In this section, we firstly introduce the study area (Section 2.1) and the research methodologies (Section 2.2). Then, we describe how we define the system analyzed (Section 2.3), and the tailored modelling approach (Section 2.4). The appendix of the present article presents further details of (i) those IPNM alternatives analyzed, including descriptions and pictures of the substrates in question (Supplementary 1); (ii) the modelling, including equations and assumptions made regarding to specific metabolisms and processes; and (iii) a summary of all data collected (Supplementary 5). Further information on the study area, the case study projects, and the technologies studied is presented in [39,41], and in the supplements to this article.

Study Area & Case Studies
The study area of this work is Karagwe, one of eight districts in Kagera region, Northwest TZ, part of the Lake Victoria basin, and located near to the volcanic areas of the East African Rift zone (lat 01 • 33 S; long. 31 • 07 E; alt. 1500-1600 m.a.s.l.). Rainfall is bi-modal (March to May and October to November), and varies between 500 and 2000 mm year −1 ; the mean temperature ranges from 20 to 28 • C [50]. Hence, local climate conditions allow harvesting twice a year for most annual crops. Households in Karagwe consist, on average, of six people, including adults and children [62].
The regional economy is dominated by smallholder agriculture, and about 90% of households sell agricultural products grown on their farms [17]. Banana is the most prominent perennial crop and staple food in Kagera, while beans and maize dominate annual cropping; Karagwe is also an important producer of onions and cabbage within Kagera (cf. Supplementary Table S1). Approximately 40% of agricultural land in Karagwe is occupied by banana-based home gardens surrounding farmers' houses [17], named shamba in Swahili (Supplementary Figure S1). The shamba (Supplementary 6) is a mixed cultivation system of perennial crops such as bananas, coffee, etc., annual crops such as beans, cassava, etc., and fruit trees including mango, orange, etc. [27]. Fields used for intercropping of annual crops are called msiri in Swahili [27] (Supplementary Figure S2) and cover approximately 20% of the planted land in Karagwe [62]. Other types of land use comprise mono-cropping of annual crops, tree planting, fallow land, and animal husbandry. Cattle are kept by one sixth of the households, mostly in herds of less than five animals [17].
As for many smallholders in SSA, farmers in Karagwe are challenged by soil constraints including nutrient deficiencies and soil acidity with pH < 4.0 [39]. (In addition, unusual rainfall patterns indicate the approaching effects of climate change, and increasingly threaten the predominantly rain-fed agriculture in Karagwe). Andosols, the predominant soil type in Karagwe [61], typically suffer from P deficiency [17], as P retention potential is relatively high [63]. Crop productivity and sustainable land use therefore requires constant replenishment of P. Unbalanced inputs of N with organic and/or mineral fertilizers and uptake of N by crops often contribute to the problem [64,65]. As an initiative towards soil improvement, and as a countermeasure against deforestation, two Karagwe farmer's organisations recently initiated a set of projects that deal with the development of "sustainable" cooking (cf. Supplementary Table S2) and sanitation technologies (cf. Supplementary Table S3), as well as with the promotion of the use of residues in agriculture [39]. The three projects and respective technologies act as case studies for our work. Assessing the use of residues for IPNM and potential effects on local SNBs are subjects of the present system analysis.

Research Methods: MFA & SNB
In order to answer our research questions, we applied SNB methodology in combination with material flow analysis (MFA). This paragraph introduces the conceptual background of these two methods, with fundamental terms given in italics.
According to the definition of the MFA [66,67], a system is a group of interacting processes that cause either a chemical or a physical transformation, transportation, or storage of materials. A material flow ( . m) is a mass flow of a good (economic entity) or substance (chemical element or compound) per unit of time (e.g., kg·year −1 ). The systems in question are generally open systems, as . m are exchanged between the anthroposphere and the ecosystem. Material stocks describe the accumulation, storage, or depletion of materials within the anthroposphere. Likewise, following the SNB, one calculates and then balances five input flows (IN) and five output flows (OUT) to and from agricultural land [23]. Both methods follow the same mathematical law, known as "the principle of mass conservation" (Equation (1)), and assume a linear function between . m I N and . m OUT , to simplify calculations.
. m OUT, j are the total mass of k input and j output material flows and . m stock causes ±∆ stock.
To effectively support local soil fertility interventions, [68] emphasize downscaling SNB to site-specific balances, and recommend focusing on a specific cropping system. When applying SNB to the farm level, [69] further suggest splitting the analysis into a natural balance (NB) and a partial balance (PB). The NB comprises all inputs and emissions from and to the environment. The PB reflects the "way of farming", and solely consists of organic and mineral fertilizer inputs and nutrient removals through food products and crop residues. The combination of the NB and the PB results in the full SNB.
A negative result of the SNB indicates nutrient depletion and declining soil fertility. A positive net balance can be interpreted positively, for example, when P in surplus replenishes P-stocks in P-deficient soils, or negatively, when, for example, heavy metals accumulate in the soil. Apart from specific cases in which soils are deficient in certain essential nutrients, it is most preferable that IN and OUT are balanced.

Systems Defined & Scenarios Studied
For our analyses, we divided the anthroposphere of an integrated farming system into (i) the farming household, and (ii) the agro-ecosystem (AES) (Figure 1). The former consists of the micro energy system for cooking (MES) and the micro sanitation system (MSS) (referring to a micro-perspective, respectively a focus on smallholder households). Both are systematically studied in [41] by comparing selected technologies, that are available to smallholders in Karagwe (cf. Supplementary Tables S2 and S3), with respect to relevant material flows. The latter represents the farmland, composting, and the disposal of residues through burning. Composting constitutes the central process linking smallholder households to farmland. In our model, we consider two ways of composting: (i) Karagwe-standard composting (Figure 2a), and (ii) CaSa-composting ( Figure 2b) (cf. Supplementary 2.6). The composition of Karagwe-standard compost follows local practices [39]. The so-called "CaSa-compost" is based on the approach of the local project "Carbonization and Sanitation" (CaSa) to jointly exploit biochar, stored urine, sanitized faeces, and harvest and kitchen residues.
The functional unit of the system analysis is "to cultivate nutritious and market relevant annual food crops for subsistence farming on a total of 0.125 ha of msiri-land (spatial system boundary), over one year with two cropping seasons (temporal system boundary)". The crops chosen include maize as a staple food, beans as a source of protein, and onion and cabbage as vegetables. These crops are inter-cropped following local practices. Indicator elements of the analysis are C, and the macronutrients N and P. The atmosphere, the pedosphere, and the hydrosphere are all located outside the spatial system boundaries.
To identify the contribution of residues from cooking and sanitation to managing soil fertility on the farmland, two scenarios are compared: (i) the most common current practices for smallholder farming in Karagwe, and (ii) alternative farming practices based on IPNM, utilizing resources captured from different technologies that are potentially used for cooking and sanitation (Table 1). In total, the analysis comprises five alternatives for msiri cultivation (AM) that mainly differ from one another in respect to their organic and mineral IN to maize and beans: when compared to the current state of affairs (AM1), the further scenarios represent a shift of technologies used in the household towards either using a biogas system for cooking and a UDDT for sanitation (AM2), or using a microgasifier for cooking and as sanitation system a combination of the UDDT with thermal treatment of faeces on a loam oven, following the approach of the CaSa-project (AM3-5). In AM2, we only considered the use of urine as mineral IN; not the use of faeces. We reason that in the case of simply using a UDDT, faeces are not thermally sanitized and thus not "safe" to be used in crop production. In accordance with omushote practice, faeces could rather be used in the shamba, which is, however, out of the scope of the present model. (Omushote was a common practice in Karagwe before pit latrines were implemented, and entails adding faecal matter on a rotation basis into the planting holes for trees or cuttings of banana plants [70].) Cabbage and onion receive nutrient inputs through application of standard compost in all scenarios. This is also because application of composts that contain human faeces, such as the CaSa-compost, should, in general, not be used for crops growing underground [38]. We further followed [17], who recommended that, in order to restore soil P stocks efficiently, there are two principal types of organic fertilizer application: either (i) seasonal moderate applications (AM1-4), or (ii) a one-off large application that is repeated every three years (AM5). In all alternatives studied, biogas slurry (AM2) and urine (AM2-5) are used with seasonal applications. The annual recovery potentials of biogas slurry, biochar, urine, and sanitized faeces derive from an earlier MFA presented in [41]. Table 2 summarizes the quantities identified to be available annually, as well as the respective C and nutrient contents estimated. Figure 1. The integrated farming system analyzed comprises the farming household (white) and the agro-ecosystem (AES; green). Processes are indicated with boxes, material flows with arrows; the dotted line represents the system boundaries. Material flows in green were part of the present work; red and blue flows/arrows were part of [41]; grey flows/arrows were not considered in the system analysis. AM: Abbreviation part of the scenarios indicating the agroecosystem of a msiri. Figure 1. The integrated farming system analyzed comprises the farming household (white) and the agro-ecosystem (AES; green). Processes are indicated with boxes, material flows with arrows; the dotted line represents the system boundaries. Material flows in green were part of the present work; red and blue flows/arrows were part of [41]; grey flows/arrows were not considered in the system analysis. AM: Abbreviation part of the scenarios indicating the agroecosystem of a msiri.
Note: Data for the recovery potentials of biogas slurry, biochar, stored urine, and sanitized faeces stem from [41]. The potential for subsistence production of Karagwe standard compost and CaSa-compost are estimated in the present study. Values represent the mean percentage calculated for all scenarios. Water contents are 95.6 ± 0.5, 33.6 ± 5.3, and 32.5 ± 1.9 g·kg −1 in FM (Fresh matter) of biogas slurry, standard compost, and CaSa-compost, respectively.

Specific Modelling Approach & Equations Applied
In the present study, we combined SNB with MFA in order to (i) estimate the potential for C recovery available for restoration of SOM; (ii) model the potentials for subsistence production of composts by using household and farming residues; and (iii) assess environmental emissions. The following paragraph describes the manner in which we applied the two methods (cf. Supplementary Figure S3 with plot data in Table S17). The SNB largely follows the basic concepts laid down by [23], with modifications pursuant to [26,68,69,71]. At the outset of this study, we carried out an intensive literature review in order to collect data (cf. Supplementary 5), and to plan and design the system to be analyzed (cf. Supplementary Table S4). In reference to [67], we collected data for determining flows and stocks from various sources, including (i) primary data from case study projects, our own experiments, and previous studies, including household surveys, field tests, laboratory analysis, material flow modelling, etc.; (ii) secondary data, including literature review, statistics from private and public organizations, etc.; and (iii) estimations/judgements of experts. The latter was specifically used if no sufficient data was available or, not available for the specific context. Finally, those IN and OUT that are most relevant and quantifiable to the specific context were selected (Table 3). Table 3. Selected flows considered in soil nutrient balance.

OUT1a
Food products for self-consumption OUT1b Food products sold to market OUT2 Crop residues Output flows of natural balance OUT3 Leaching OUT4a Gaseous losses (from denitrification) Abbreviations: BNF: biological nitrogen fixation.
Calculations were made through a series of steps (cf. Supplementary 2). The first step was to calculate total biomass production, including crop yields and plant residues, and the respective total nutrient uptake by plants (OUT crops ). Grass carpeting and mulching with residues are considered local standard practices, and are therefore included as organic IN into "PB I without fertilization" (Equation (2)). It follows, therefore, that PB I reflects the "net nutrient requirements" of crops. Application of organic (i.e., Karagwe standard compost and CaSa-compost), organo-mineral (i.e., biogas slurry), and mineral (i.e., urine) fertilizers are considered in "PB II with organic fertilization" (Equation (3)), and "PB III with organic and mineral fertilization" (Equation (4)), respectively. Organic and mineral INs are quantified based on PB I. As suggested by [17,72], if the ratio of N/P of the crops' nutrient requirement is higher than the N/P ratio found in organic amendments-which is the case in our model (Supplementary Table S26)-then organic matter should be used first to balance the P uptake of crops. In this way, the underlying fertilization approach aims to avoid over-fertilization with P and under-fertilization with N, whilst optimizing P-use efficiency. Mineral fertilizer can also be used to meet crops' N requirements. As part of the NB, biological nitrogen fixation (BNF) is estimated from the N uptake determined for beans. Values of other IN and OUT for the NB derive from literature (Supplementary Table S27). Finally, the "full SNB I with organic fertilization" (Equation (5)) and "full SNB II with organic and mineral fertilization" (Equation (6)) are calculated.
where IN is the nutrient input flows, OUT is the nutrient output flows, PB is the partial balance, NB is the natural balance, and SNB is the full soil nutrient balance. Furthermore, several gaseous and liquid emissions are considered in the analysis (Figure 1), which originate from covering soil with carpeting grasses and mulching material, from applying urine or biogas slurry, from burning agricultural residues, and from composting processes. We assessed the climate-relevant gas emissions with those GWP-factors provided by [73] (Supplementary Table S30). Emissions with eutrophying effects were assessed with EP-equivalence factors suggested by [74,75] (Supplementary 3, Supplementary Table S31).
In aggregating the data, we assumed that all parameters were normally distributed and independent of variables [76]. We also applied Gauss's law of error propagation (FAU physics, n.d.) [77]. The resulting uncertainty of data is expressed by presenting the statistical variance of the collected data set with its arithmetic mean value (x), the standard error (∆x), and the relative uncertainty (RU), defined as ∆x in % of x [67]. Further information on data collected is summarized in Supplementary 4. Data collection, the equation-based model, and all auxiliary calculations were combined in one Excel spreadsheet.

Results and Discussion
The following chapter contains (i) a presentation of selected results, checked for plausibility and briefly discussed in relation to relevant factors; (ii) a synthesis of results from a sustainability perspective; and (iii) a brief discussion of the applied methodology.

Soil Nutrient Balances
Currently, the intercropping system analyzed for Karagwe results in nutrient depletion of the soil (Figure 3). This Table 4 refers to the full SNB with organic input and not including (SNB I), but with (SNB II) additional mineral fertilization. The results identified for the SNB II in the current situation reflect the state-of-knowledge on SNBs in the region very well [25][26][27]. Means of AM1, however, significantly differ from means of AM2-5 for both N and P, as overlapping error bars for the SNB II in Figure 3a,b indicate, respectively [78]. Hence, integrating resources recovered from cooking and sanitation into agriculture has the potential to clearly improve the net SNBs.
(a) (b)  Table 1; the IN and OUT flows are in Table 3. Plot data is provided in Supplementary Table S12.  Table 1; the IN and OUT flows are in Table 3. Plot data is provided in Supplementary Table S12.
As shown for the example of Karagwe, IPNM strategies that utilize residues from the farming household can reverse results of net P balance to positive figures, and mitigate, but not completely avoid, depletion rates of N. When compared to the current state (AM1 = 100%), the total N deficit (i.e., referring to SNB II) is only one fifth that of the biogas-scenario (AM2 ≈ 20%), and less than half that of the CaSa-scenarios (AM3-5 ≈ 30-45%). Differences identified between analyzed IPNM alternatives (AM2-5) are, however, not significant, because error bars (Figure 3) do not overlap [78].
Nutrient requirements of crops (PB I) vary according to the yield assumptions for each alternative. They are lowest for the scenario, reflecting the current state of affairs (AM1) and highest for AM3 and AM5. Note that, as yield assumptions are equivalent in AM3 and AM5, we further refer to these alternatives jointly as AM3/5 for results depending on this shared equal parameter.
The balances of organic and mineral INs and OUTs relevant for the PB vary across IPNM alternatives for both N and P (Figure 3). For example, nutrient inputs with mulching (In2b) correspond to the availability of harvest residues (Supplementary Tables S10 and S23), and thus, also to underlying yield assumptions. After carpeting and mulching, the limited use of organic IN (because compost is used only for cabbage) and the exclusion of mineral IN results in a deficient supply of nutrients in the current state. Specifically in AM1, N and P requirements are, in total, compensated by only 10% and 15% of their demand, respectively.
Organic soil amendments, such as biogas slurry, standard compost, and CaSa-compost, completely meet the P demand of crops (i.e., PB II of AM2-5), while N demand of crops is met by 55-65% of requirements. After organic and mineral fertilization, the total compensation of P in PB III of AM2-5 is approximately 105% to 145% of requirements. The use of urine ultimately satisfies crop N demand in PB III of AM2 by approximately 100%, while N requirements are only partially compensated in PB III of AM3-5 by 75-95% of requirements. Despite biogas slurry and urine fully balancing N demand of crops in AM2, SNB II for N is negative, due to additional N losses through natural flows. Finally, we emphasize the need to consider the fact that nutrients contained in biogas slurry were previously recycled to banana-based homegardens, together with the feeding material of the biogas digester itself [41]. Thus, when switching to a biogas system and using the slurry for fertilizing crops cultivated on msiri fields, compensation or replacement of nutrients in the shamba is required to avoid amplifying existing nutrient deficits there [27].
The balance of natural IN and OUT, relevant for the NB for N, differs between the alternatives analyzed, due to varying BNF. In our model, BNF is 12 ± 3 kg·N·ha −1 ·year −1 in AM1, compared to 17 ± 4, 29 ± 7, and 85 ± 17 kg·N·ha −1 ·year −1 in AM2, AM4, and AM3/5, respectively. The BNF estimated for the current state is therefore appropriate, compared to a typical value of approximately 12-16 kg·N·ha −1 ·year −1 for East African farming systems [25][26][27]68,79,80]. The amount of N fixed by leguminous beans, meanwhile, depends on assumed crop yields. Only in AM3/5, where we assume the highest level of bean productivity, does the NB estimated for N reveal a positive result. A regression analysis comparing results of NB and the BNF of AM1-5 shows that at least 55 kg·N·ha −1 ·year −1 are required in order to reverse the net balance of all natural N flows from a negative to a positive result (Supplementary Figure S5). Given that this BNF value falls between the estimated BNF for scenarios AM4 and AM3/5, we deduce that a seasonal biomass growth of beans of at least 30 ton·ha −1 in FM is needed to reach the break-even threshold, where the NB turns from a net negative to a net positive result. This corresponds to a crop yield of about 3.8 ton·ha −1 air-dry beans. The NB for P is positive in all scenarios, as its quantification was based on data collected from literature only. This data was equivalent for all alternatives.

Potential for Subsistence Production of Compost
The total amount of CaSa-compost produced is comparable in AM3-5, while quantities of standard compost prepared vary over scenarios (Supplementary Table S10). (Note that results are presented in terms of fresh matter (FM). We consider this to be the more practice-oriented unit, as it refers to the material that farmers actually need to transport when performing agricultural activities.) Annual compost production is projected to be equivalent to about 0.3-0.9 m 3 for standard compost, and 2.6-2.8 m 3 for CaSa-compost (Table 2), which is, overall, an adequate and feasible amount for annual applications [81]. The variation regarding standard compost depend (i) on the general availability of harvest residues (and thus on yield assumption, as discussed above), and (ii) whether or not the CaSa-compost is additionally produced, because then residues are divided between the two composting processes (cf. Supplementary 2.6). The average compositions of both composts in terms of relative volumes (Figure 4) fit well with local practices [39].
Recovering residues from cooking and sanitation can contribute clearly to C and nutrient contents in composts. By way of an example, P in ashes recovered from three-stone fires contributes >60% of total P in standard compost for AM1 (Figure 4a). However, in AM2-5, where a switch in cooking technology has been assumed, the use of three-stone fires and the subsequent recovery of ashes for standard composting are no longer considered in the calculation. Instead, biogas slurry from small-scale biogas digesters, and biochar recovered from microgasifier stoves are available as direct organic fertilizer in AM2, or as additive to CaSa-composting in AM3-5, respectively. Taking a closer look at the CaSa-compost (Figure 4b), it reveals that approximately 38% of total C, and 14% of the total P content originate from biochar recovered after cooking. In addition, stored urine, sanitized faeces (also referred to as "sanitized solids" (Figure 4b), as a mix of materials collected from the UDDT, which include human faeces and some sort of dry material, such as dry soil, sawdust, ash, etc., that is added after defecation to enhance the drying of faeces and to reduce smelling), and biochar recovered from sanitation, add approximately 52% and 38% of total N and of total P in CaSa-compost, respectively.
Furthermore, the total amount of biochar recovered from cooking and from sanitation, and sanitized faeces are both available in comparable amounts in terms of volume (i.e., about 1.2 and 1.0 m 3 ·year −1 of FM of biochar and sanitized faeces, respectively). This fits very well with the typical composition of CaSa-compost in the CaSa pilot project, which includes approximately 0.17 m 3 ·m −3 biochar and 0.15 m 3 ·m −3 sanitized faeces [39]. In addition, about 0.8 m 3 ·year −1 , or approximately 60% of stored urine, is used for CaSa-composting. This means that the total amount of urine available as mineral IN is higher in AM2 (without CaSa-composting) as compared to AM3-5 (with CaSa-composting) (Supplementary Table S10).
Yearly application rates for standard compost are estimated at 2.0 ± 0.5 in AM4, and 4.4 ± 1.4 kg·m −2 ·year −1 of FM in AM1; those for the CaSa-compost are within the range of 1.7-1.8 kg·m −2 ·year −1 in AM3 and AM4 (Supplementary Table S5). Overall, annual application rates estimated for both composts are consistent with relevant literature [82,83]. The triennial application rates calculated in AM5, however, are significantly higher, with 11.3 ± 1.8 and 5.5 ± 0.5 kg·m −2 ·year −1 of the standard and the CaSa-compost, respectively, a figure also appropriate according to [17]. Seasonal application rates of urine vary over each of the scenarios, and range from 0.1 to 0.3 dm 3 ·m −2 year −1 for maize, and from 0.5 to 2.0 dm 3 ·m −2 ·year −1 for vegetables, which is also fully consistent with common recommendations for urine fertilization [38]. Furthermore, urine application rates estimated for maize, in particular, are appropriate for one-dose fertilization per cultivation period, which ensures workloads are manageable. The appropriate timing for urine fertilization would be at week five after sowing, when crops demand most N for growing [82].
Finally, we acknowledge that not all potentials of input materials available are exhausted (Supplementary Table S11), even though nutrient deficits remain in the full SNB for N (Table 4). For example, standard compost remains available after fertilizing vegetables in most scenarios. This leftover compost could be used, therefore, to improve PB for maize and beans.   Table 1. Plot data provided in Supplementary Tables S18 (for Figure 4a) and S19 (for Figure 4b).  Table 1. Plot data provided in Supplementary Table S18 (for Figure 4a) and Table S19 (for Figure 4b).

Environmental Emissions
Environmental emissions of greenhouse gases (GHG) increase in all IPNM strategies analyzed, when compared to current state practices (Figure 5a). GWPs in alternatives AM2-5 are around four to five times higher than the GWP of the current state, while the overall results of analyzed IPNM alternatives are generally comparable. The most significant contributions to GWP in AM2 can be traced back to N 2 O emissions from biogas slurry application (≈60% of the total GWP assessed in AM2). In the CaSa-scenarios AM3-5, CO 2 , and N 2 O emissions from CaSa-composting bring about, respectively, approximately 65% and 13% of the total GWP assessed for these alternatives.
Similarly, environmental emissions with eutrophying effects potentially increase through IPNM (Figure 5b). Numerically, EP assessed in AM2, AM4, and AM3/5 is approximately 160%, 430%, and 500% of the current EP in AM1, respectively. Overall, EPs of AM1-5 correspond closely to NH 3 emissions from composting, and thus, to the intensity of the total compost production. The comparatively higher EPs estimated for AM3-5 are mainly attributable to NH 3 emissions and P leaching from CaSa-composting, contributing, on average, about 60% and 20% to the EPs in AM3-5, respectively. In AM2, those emissions assessed with EP that exceed those estimated for AM1 mainly stem from N leaching after applying biogas slurry and urine, and comprise, in total, approximately 15% of the total EP in AM2. The contribution of NH 3 emissions after slurry application to the EP assessed for AM2, meanwhile, is negligible.
Finally, we add some practical recommendations to reduce environmental emissions. For example, applying biogas slurry preferably to dry soil, and incorporating biogas slurry into soil within the first few minutes after application, can avoid nutrient leaching and N 2 O and NH 3 emissions, as advised by [44,84]. Farmers may do so using a simple hand hoe. Also, [85] emphasize the importance of biogas slurry entering soil as rapidly as possible after application, and therefore, recommend a high water content in the slurry, or additional dilution of slurry with water. According to prior research presented in [39], water content of biogas slurry studied stands at approximately 95% of FM, and should thus be adequate for rapid infiltration. Likewise, [38] recommend applying urine into a furrow or hole, and closing the furrow/hole with soil afterwards, in order to reduce N 2 O and NH 3 emissions after urine application. In addition, biochar additions to composting can potentially decrease N 2 O and CH 4 emissions, e.g., [86][87][88][89], whilst NH 3 emissions potentially increase (e.g., [87]). Other studies [33,90] showed that biochar captures nitrate and phosphate during composting, which is promising, in order to reduce nutrient leaching. However, such potentially beneficial effects of co-composting biochar have not yet been included in our model (Section 3.5).
Before synthesizing our results, we want to shortly comment on the certainty/uncertainty of (i) data that have been collected from literature and used for the modelling, and (ii) values that have been presented as results. According to [91], a relative uncertainty (RU) of <30%, ±50%, or >90% indicates "low", "average", or "high" uncertainty, respectively. The uncertainty of most flows considered in, and calculated by our model, can be classified as low. Nevertheless, there are some flows that show average or high uncertainty, such as, respectively, atmospheric deposition, total N and P in rainfall, N in cabbage or onion (for both, food product and harvest residue), total C in kitchen waste, P in stored urine collected from UDDT, and density of (generic) organic waste or emission factor for CO from burning agricultural residues (Supplementary Table S32). Also, with respect to the results of SNB (Supplementary Table S24), the uncertainty of most flows calculated can be classified as low. Especially values estimated for the PB, i.e., nutrient requirements and nutrient supplies, show an RU of <20%. For the NB, the uncertainty is low for N in AM1-3 and AM5, and average for N in AM4 and for P in all alternatives. The uncertainty of results estimated for the full SNB in AM1 is low. For the IPNM alternatives, the uncertainties range from average (for N in AM3/5 and P in AM2/4) to high (for N in AM2/4 and P in AM3/5), which is also indicated with grey error bars for the standard errors of the means in Figure 3.  Table 1. Plot data provided in Supplementary Tables S13 (Figure 5a) and S14 (Figure 5b). comp.: composting; EP: eutrophication potential; GWP: gobal warming potential; hh: household; leach.: leaching; min. fert.: mineral fertilization.  Table 1. Plot data provided in Supplementary Table S13 (Figure 5a) and Table S14 (Figure 5b). comp.: composting; EP: eutrophication potential; GWP: gobal warming potential; hh: household; leach.: leaching; min. fert.: mineral fertilization.

Sustainability Aspects of Intersectional Resource Management
When evaluating our results, our main focus is on the potential for sustainable soil fertility management. In particular, we aim at taking the specific vulnerability of smallholders into consideration, and the importance of the soil as a basis of existence and subsistence. Hence, in order to be considered "sustainable", soil management should, among other factors, maintain or improve crop productivity and mitigate existing soil constraints, such as nutrient depletion and soil acidity (Section 2.1). In the contemporary context, it should also promote resilience in farming in the face of climate change as a local and global threat. Therefore, SOM, which contributes to the soil's water holding capacity and erosion resistance, and the restoration of SOM, are of utmost importance as climate adaptation measures. Furthermore, adequate soil P levels support climate mitigation and adaptation, due to the fact that a sufficient supply of soil P supports plants to root more deeply, which, in turn, makes crops less vulnerable to drought [92]. To sum up, the focus of our final evaluation is on the potential of IPNM practices to (i) replenish soil P, (ii) combat soil acidification, (iii) restore SOM, and (iv) sequester C. In addition, (v) we briefly discuss, integrated environmental emissions accumulated for smallholder household and farmland. (Effects on crop productivity, as a consequence to improved soil fertility, is not further discussed here. Estimated figures of food products for self-consumption (OUT1a) and food products sold to market (OUT1b) are displayed in Supplementary Tables S20-S22.)

Replenishing Soil P
In AM1-4, phosphate is applied with annual rates of around 20-60 kg·P·ha −1 ·year −1 (Supplementary Table S6). Within this range, per hectare P applications estimated for CaSa-compost as applied to maize and beans, and those for standard compost as applied to vegetables, are very similar. When considering amendments to soil cultivated with maize and beans, CaSa-compost used in AM3-5 accounts for about 175% of total P provided in the form of biogas slurry in AM2. Compared to our results, [17] consider 10-20 kg·P·ha −1 as a sufficient seasonal P application to degraded soils in East Africa that are characterized by strong P-fixation, as is the case for Karagwe Andosols. In addition, [93] found that application rates of >25 kg·P·ha −1 ·season −1 over the course of four seasons were capable of replenishing levels of P in a P deficient soil in Western Kenya. In contrast, the application of 40 or 70 kg·P·ha −1 in the form of biogas slurry or standard compost, respectively, was not sufficient to increase extractable soil P, as demonstrated in a short-term field trial on the local Andosol [61]. Adding about 140 kg·P·ha −1 with CaSa-compost, however, significantly increased levels of available P in the soil after the experiment, and thus, immediately contributed to mitigating P deficiency [17]. The latter P amendment is comparable to our present results in AM5, where P is supplied triennially in the range of around 100-200 kg·P·ha −1 ·year −1 for both composts analyzed. In comparison, [17] suggests 100-500 kg·P·ha −1 for one large application repeated "every few years".
When considering application frequency and subsequent plant response, [94] emphasize that a seasonal and moderate application of P is more effective in increasing crop yields than a large, one-off application. This contradicts [17], who recommends both strategies. In addition, [94] reason that a lower input of P is preferable, as the residual effect of a single fertilization dose is far lower than the initial and direct effect of the seasonal fertilizer application. In other words, P-use efficiency of fertilizers is higher at comparatively lower inputs of P [17]. By contrast, a model-based simulation of [95] supports an appropriate supply of plant available P to crops originating in residual soil P pools. The authors promote substantial efforts to build up soil P, whilst being patient with respect to the known hysteric response of plants to fertilizer application [17]. The specific hysteric characteristics of local Karagwe Andosol have not, to the best of our knowledge, yet been studied. Finally, [94] argue against large P applications, as farmers often lack the capital, as well as the machinery, to apply the large quantities required for appropriate fertilization. In the present work, we have demonstrated the potential to provide P-rich inputs to agriculture on-farm, at no additional cost, and in such quantities that are feasible to apply with standard tools, such as a wheelbarrow and hand hoe.

Combating Soil Acidification
In order to strengthen nutrient cycling processes, acidity management through liming is an important practice [92]. Nutrient availability in the soil is, among other factors, a function of soil pH [96]. This means that an increase in soil pH through liming promotes plant uptake of P and N from organic and mineral fertilizers, and thus renders on-farm nutrient recycling more efficient. Organic material has an equivalent potential to neutralize soil acidity levels as lime (CaO) [97,98].
In an earlier study, we quantified the potential liming effect of the substrates analyzed [39]. We have integrated this data into the present study to deduce the following results: In AM1-4, the liming effects of annual organic INs are equivalent to around 200-650 kg·CaO·ha −1 ·year −1 (Supplementary Table S7). All treatments studied, therefore, meet the minimum requirements of 50 kg·CaO·ha −1 ·year −1 to avoid Al toxicity, and to neutralize acid deposition from the atmosphere onto agricultural soils [96]. Within the ranges presented, however, amendments with biogas slurry and standard compost have significantly lower liming potentials (≈ 200-400 kg·CaO·ha −1 ·year −1 ) as compared to the CaSa-compost (<600 kg·CaO·ha −1 ·year −1 ). In AM5, the liming effect is estimated in the range of around 1000-2300 kg·CaO·ha −1 , and refers to the same soil amended every three years. This treatment is, therefore, adequate to maintain, or even improve, soil pH in accordance with [82], who recommends a triennial application of 1250-2250 kg·CaO·ha −1 . Empirically, an immediate rise of soil pH within one cropping season was only possible with CaSa-compost, not with standard compost or biogas slurry, and at an application rate of about 2000 kg·CaO·ha −1 [61].

Restoring SOM
The capacity to restore SOM generally depends on the form in which C is recovered and applied to soil. Compost and biogas slurry typically provide, respectively, about 50% and 25% of total organic C content for reproducing SOM [83]. For this reason, amendments of total C with standard compost (Supplementary Table S8) correspond to SOM reproduction potentials on soil cultivated with vegetables, varying approximately 1.4-1.9 ton·SOM-C·ha− 1 ·year −1 in AM1-4 (Supplementary Table S9). In comparison, cabbage and onion consume approximately 2.1 and 0.7 ton·SOM-C·ha −1 ·year −1 , respectively. Moreover, on soil cultivated with maize and beans, the amendment of total C with CaSa-compost is about two and a half times higher than compared to biogas slurry. Hence, inputs of biogas slurry and CaSa-compost consequently correspond to SOM reproduction potentials of about 0.3 and 1.2-1.3 ton·SOM-C·ha −1 ·year −1 , respectively. Maize meanwhile consumes approximately 1.4 ton·SOM-C·ha −1 ·year −1 , while beans replenish SOM-C at the rate of about 0.4 ton·SOM-C·ha −1 ·year −1 [99]. In scenario AM5, the SOM reproduction potentials of standard compost and CaSa-compost are approximately 9.1 and 3.9 ton·SOM-C·ha −1 ·year −1 , respectively, which then has to serve for three years of continuous cropping. To sum up, the potential for reproducing SOM for large applications of standard compost in AM5, or for general applications of CaSa-compost in AM3-5, is estimated at slightly higher than the accumulated C consumption of crops. This finding indicates a potential for replenishing SOM, and even for sequestering it.

Sequestering C
Carbon sequestration refers to long-term storage of CO 2 in the form of SOM, in order to mitigate global warming, and also, in principle, to an increase of SOM. Furthermore, the addition of phosphate and lime promotes a stable increase in SOM in deeply weathered tropical soils [76], such as the local soil. For this reason, sequestering C is possible in the present system analysis through the use of compost and, particularly, the CaSa-compost, which simultaneously promotes restoring SOM, replenishing soil P, and liming. The context of the present analysis further promotes C sequestration, as local soil is known for its outstanding capacity to accumulate organic C. Andosols tend to protect organic matter from degradation by forming either metal-humus (i.e., often Al-Fe), or allophane-organo complexes [100]. Thus, Andosols can act as a CO 2 sink [101].
Furthermore, CaSa-compost contains biochar recovered from cooking and sanitation. Biochar potentially renders C sequestration possible, because (i) it originates from renewable biomasses [102], and (ii) it is characterized by relatively recalcitrant organic compounds, which promise the long-term "stability" of biochar in the soil [29]. In regard to the latter, [103] recently criticised the traditional model of "labile and stable organic compounds" and their role in the genesis of long-term "stable" SOM. The degradation of SOM and other organic matter in the soil is rather a continuum, and depends on many factors, including accessibility of matter, microbial ecology, energy transportation processes, prevailing temperatures affecting enzymes, etc. [17]. To the best of our knowledge, however, long-term studies observing the effect of compost amendments-with and without biochar-on SOM in tropical Andosols do not exist. We are, therefore, unable to quantify the general potential for C sequestration with existing data, and any further discussion would enter into the realms of speculation.
Nonetheless, we may at least compare our modelling results for CaSa-scenarios with data available from empiric studies in the region on biochar applications and effects. According to our model, biochar is applied at rates of approximately 2.7 ton·ha −1 ·year −1 in AM3 or AM4, and of about 8.0 ton·ha −1 ·year −1 in AM5, which is presumably equivalent to rates of 2.0 ton·C·ha −1 ·year −1 and 6.0 ton·C·ha −1 ·year −1 , respectively. In comparison, [50] generally identified a minimum application rate of biochar, leading to a significant increase in SOM, and thus to C sequestration, of 50 ton·ha −1 . On highly degraded soil in Kenya, [58] empirically demonstrated that biochar amendments equivalent to 6 ton·C·ha −1 , applied in three consecutive seasons, increased SOM by 45%, as compared to the unamended control soil.

Integrated Environmental Emissions
Finally, we estimate the overall environmental impact of the intersectional resource management analyzed. We have, therefore, aggregated environmental emissions of the entire smallholder farming system, including MES, MSS, and AES. With respect to overall climate balance (Supplementary Figure  S4a with plot data in Tables S15 and S18), integrated GWP in AM2, when shifting to a biogas system and an UDDT, and while utilizing biogas slurry and stored urine as inputs to the farm land, is more than 250% of the integrated GWP in AM1. This is caused by (i) extremely high levels of GWP identified for operating biogas systems [41] propagating into the integrated perspective, and (ii) comparatively higher levels of GWP identified for the AES (Figure 5a). By contrast, [104] estimated that overall GHG emissions decrease when integrating biogas digestion to organic farming systems through a lifecycle assessment methodology. However, the net reduction originates from offsetting fossil fuels consumed for producing electrical energy, which lie outside the scope of the present analysis [17]. The total GWPs of CaSa-scenarios are generally comparable to the current state. In AM3-5, GWP assessed for the MES decreased when shifting from three-stone fires to microgasifier stoves [41]. This is offset, however, by increased GWP assessed for the AES (Figure 5a). With respect to emissions with eutrophying effects (Supplementary Figure S4b with plot data in Tables S16 and S19), the integrated EPs for all IPNM strategies studied in AM2-5 is only about half of the total EP in AM1. This general decrease of integrated EP is attributable mainly to lower EP levels assessed for using an UDDT instead of a pit latrine [17]. In AM2 and AM3-5, a proportion of the EP reduced in the MSS are, however, offset by higher EP analyzed for biogas production, or for CaSa-compost production, respectively.
Results of the synthesis above refer to our case study in Karagwe, and are summarized in Table 5.

Discussion of Methodology
Overall, we consider the combination of MFA and SNB as a highly appropriate methodology for conducting a holistic ex-ante assessment of soil management practices in SSA smallholdings. Both methods generally aim at a structured analysis of certain substances flowing in an arbitrary complex system, and therefore, follow comparable principles and procedures. Selecting certain IN and OUT, which are generally considered in SNB, allowed us to describe the real farming system in as simple a manner as possible, yet also in as complex a manner as necessary, for the scope of this study. MFA supplemented our analysis by providing a framework, (i) to expand our investigations, by incorporating both private households and the environment into a single system analysis, (ii) to compute our analyses with uncertainties incorporated into it, and (iii) to illustrate the results of composting processes into flow diagrams. The first point, in particular, allowed us to derive additional information, such as C content or liming potentials of the substrates analyzed, composition of composts, emissions from composting, etc.
Despite obvious strengths, we identify the following limitations in the applied methodology: (I) Data used to assume biomass production and crop yields in AM2-5 derive from a field trial conducted in Karagwe [61]. The experiment was well adapted to local practices, but only lasted for one cropping season. The results still need, therefore, to be replicated for validation. Nevertheless, practical experiences from the case study underline existing scientific results so far.
(II) The time needed for mineralization, the form of applied nutrients (i.e., organic versus mineral N or P), and the transfer of the applied nutrients to the various nutrient pools in the soil (e.g., labile and stable pools of P) is not taken into account in our model. This simplification is accounted for by the fact that our model is a static one, and it was not possible to include dynamic effects. Instead, we simply assumed that the treatments analyzed would be applied repeatedly, and thus constantly release nutrients to various pools. The total nutrient uptake of plants in one season is rather the sum of contributions from different previous cultivation periods. Our model, however, suggests that plant uptake is equivalent to the contributions applied over one single season.
(III) Soil and nutrient losses through wind and water erosion are not considered in our model. We reason that (i) [27] also neglected soil erosion as a natural OUT when conducting SNB for shamba systems in Karagwe; (ii) available data on slopes and erosion sensitivity of the local soil are not sufficient; and (iii) many farmers in Karagwe apply erosion control measures, such as contour planting, catching water in trenches, mulching, intercropping with cover-crops, and agroforestry, to control soil erosion. According to local expert judgment, efforts to implement countermeasures are widely adopted by farmers in Karagwe. However, [69] report a possible range of 0-28 kg·ha −1 ·year −1 for erosion induced N-losses from arable land in East Africa. Other SNB studies conducted for Uganda, estimated N-and P-losses with 5-14 and 1.5-10.0 kg·ha −1 ·year −1 , respectively [25,79,80].
(IV) Sequestered C could have been subtracted from total GWP according to the Kyoto Protocol. However, C sequestration rates of local soils are, to the best of our knowledge, largely unknown. Hence, we excluded C sequestration in GWP accounting, which, according to [102], is valid if biogenic CO 2 emissions are included in the assessment, which is the case in our model for CO 2 emissions from composting.
(V) Environmental emissions with EP are likely to be over-estimated. We assessed the EP after [74], and consequently included both total P, and total N contained in liquid emissions. Given that high levels of P fixation can be expected for the local soil [101], and given that P is relatively immobile in the soil [94], we presume that phosphate would most likely remain in the soil surrounding pit latrines. By contrast, pollution of underground water resources is more likely from ammonium emissions. If we were to exclude P leaching from our assessment, our EP estimations could possibly be reduced to about 70-90% of the EP (Figure 5b).
(VI) Possible biochar-related effects are not considered when quantifying GHG emissions, or nutrient leaching from the composting process. We rather assumed equal processes and emission factors for standard compost and biochar-containing CaSa-compost. We reason that existing scientific data on using biochar as a soil amendment are contradictory, cf. [105,106]. Overall, available data expose existing uncertainties in various areas, knowledge gaps in underlying principles and mechanisms, and the admission that possible effects of biochar amendments are highly site-specific [105]. For these reasons, we judge that it is not yet possible to depict biochar effects in a model such as the present one.
(VII) The model developed in this study does not yet depict soil dynamics, such as nutrient dynamics or SOM transformations. Further empiric studies are therefore required to study, for example, in situ interactions of biochar, soil nutrient pools, and SOM in long-term field experiments, and the effects of amending selected treatments, such as biochar-compost to tropical Andosols. Empiric data collected would help quantify the relationship between compost applications and replenishment rates of soil nutrients, turnover rates of SOM, and accumulation rates of SOM for C sequestration. Analytical work, such as dynamic modelling, could then follow, in order to estimate the timeframes associated with soil effects.
Despite all limitations discussed, we consider the present model to be complex enough, and therefore adequate to sufficiently answer our research questions.

Conclusions
By adopting an integrated perspective on farming and households, we draw the following conclusions with respect to the research objectives, and for the example, of smallholdings in Karagwe, TZ:

•
The IPNM strategies analyzed, i.e., utilizing resources recovered from cooking and sanitation, show a clear potential to decrease currently existing soil nutrient deficits. Specifically, net P balance is reversed, giving a positive result. This means that P depletion is avoided, while depletion rates of N are mitigated, but not avoided completely. • Biogas slurry, standard compost, or CaSa-compost, are all feasible for completely meeting P demand of crops. All organic inputs analyzed require application in combination with a mineral fertilizer, such as urine, to compensate crop N-demand.

•
Recovering and utilizing residues from households for composting allows for the production of adequate quantities of compost on-farm. Biochar recovered from cooking and/or sanitation specifically contributes to C contained in CaSa-compost, while residues from EcoSan significantly contribute to nutrient content of CaSa-compost.

•
Environmental emissions greatly increase with the production and use of organic fertilizers, whereby the climate balance declines for all IPNM scenarios analyzed. The EP also demonstrates an increase in association with intensive subsistence production of composts.
When considering the analyzed IPNM practices with respect to certain relevant sustainability aspects, we emphasise that

•
Using the CaSa-compost is a suitable method for sustainable soil fertility management, due to the following factors: (i) applied P amendments are appropriate to replenish P in exhausted soils, (ii) estimated liming effects are suitable for mitigating existing soil acidification, (iii) C inputs contribute to restoring the SOM, and (iv) potentially also to C sequestration, while (v) the overall GWP is maintained, and total EP is reduced.

•
Regarding the aforementioned benefits identified for compost amendments, the potential of the CaSa-compost is superior to the standard compost, especially with respect to liming and SOM restoration. By contrast, the use of biogas slurry is inferior in all aspects when compared to compost amendments, especially for liming, SOM restoration, and emissions with GWP.
Conceptually, combining SNB with MFA was beneficial because it enabled us to: • Conduct an analysis from a system perspective around the nexus of energy-sanitation-agriculture, instead of focusing only on farming products and processes. • Create a functional link between smallholder households, farming practices, soil nutrient stocks, and the environment.

•
Shed light on how IPNM strategies that combine use of residues from cooking and sanitation affect local soil nutrient budgeting in comparison to the current state.
To sum up, we found that switching household technologies to locally adopted alternatives, such as biogas digesters, microgasifiers, and UDDTs, combined with the consequent recovery and use of residues, has a strong potential to improve SNBs in farming. Moreover, both of the prevailing challenges for the agricultural production in Karagwe-P-scarcity and soil acidity-can be mitigated through the use of biochar-faecal-compost. We judge that our results are transferable to comparable smallholder systems in other regions of SSA, where similar technologies are available. Moreover, estimated results from this study, which focus at the farm level, may serve as a starting point for upscaling analyses from the farm level to the community or district level. In addition, they help estimate potential positive environmental and agronomic impacts, which in turn support local initiatives aimed at sustainable farming and soil improvement. We maintain that a socio-economic assessment should follow up on this study.
Overall, we conclude that integrating residues from farming households into agricultural practices is a promising path for subsistence farmers wishing to escape the vicious circle of insufficient production of food crops, and therefore, residual matter, leading to poor soil fertility. Nevertheless, efficient recycling of all available domestic refuses is required to offset those local soil nutrient deficits identified in this study. Exploiting the potentials of the analyzed recycling practices therefore requires a considerable effort on the part of local farmers, affecting processes including transportation of materials, making compost, collecting and using urine (or other mineral fertilizer), etc. Smallholders need to pursue multiple practical aims, including optimizing nutrient recovery efficiency, maintaining sound composting processes, minimizing workload, reducing GHG emissions, etc. For these reasons, various (objective) criteria and subjective preferences need to be considered jointly from an intersectional and transdisciplinary perspective. We must, therefore, consider the possibility that a single "optimum solution" may not exist, but rather pursue a "best option" that measures the delicate balance of all these different objectives against one another. For example, the multi-disciplinary approach of a multi-criteria analysis (MCA) can be applied for selecting and considering the objectives of the evaluation, identifying the preferences of all the people involved, and ensuring transparency within the group of decision makers.
Supplementary Materials: The following are available online at www.mdpi.com/xxx/s1, Figure S1: Example of a shamba, the agricultural land surrounding farming houses, also called "banana-based home garden", used for inter-cropping of perennial crops like fruit, banana, and coffee trees, and annual crops including beans, cassava, African eggplant, etc., Figure S2: Example of a msiri, former grassland used for the cultivation of annual crops including maize, beans, millet, and vegetables, like tomatoes, cabbage, onion, etc., Figure S3: Proceeding of the applied system analysis combining the material flow analysis (MFA) with the soil nutrient balance (SNB) for an annual intercropping system in Karagwe, TZ, Figure S4: Integrated environmental impacts of the micro energy systems (MES/red), the micro sanitation system (MSS/blue), and the agroecosystem AES/green) for the global warming potential (a) and the eutrophication potential (b), Figure S5: Regression analysis for estimating the relationships between the N flows in the natural balance (NB) and the biological nitrogen fixation (BNF) for all of the five analyzed scenarios; values are displayed in kg of N per hectare and year, Table S1: Production of main crops in Kagera region and Karagwe district based on the national sample census of agriculture 2007/2008, Table S2: Pictures and short description of the analyzed cooking alternatives that are locally available in Karagwe, TZ, Table S3: Pictures and short description of the analyzed sanitation alternatives that are locally available in Karagwe, TZ, Table S4: Definition of the system analyzed, Table S5: Estimated application rates of the organic and mineral inputs studied in scenarios AM1-AM5 in kg of FM per household and year, Table S6: Estimated P-inputs with organic and mineral inputs studied in scenarios AM1-AM5 in kg of P per hectare and year, Table S7: Estimated liming effects of the organic material expressed in equivalent application in kg of CaO per hectare and year calculated with liming potentials presented in Krause et al. (2015), Table S8: Estimated C inputs with organic and mineral inputs studied in scenarios AM1-AM5 in kg of C per hectare and year, Table S9: Estimated SOM reproduction potentials with organic and mineral inputs studied in scenarios AM1-AM5 in kg of C in SOM per hectare and year, Table S10: Available materials for organic and mineral fertilization in kg year −1 of FM, Table S11: Utilization of the matter as input material in % of available FM, Table S12: Estimated SNB for N and P comprising natural input (IN3a, 4a, 4b) and natural output (OUT3, 4a) flows; organic (IN2a-2e) and mineral (IN1c) input flows; and output flows (Out1a, 1b, 2) with agricultural products; in kg of N and P per household and year; plot data for Figure 3, Table S13: Estimated environmental impacts of the analyzed IPNM strategies: the global warming potential in kg of CO 2 equivalents per household and year; plot data for Figure 5a, Table S14: Estimated environmental impacts of the analyzed IPNM strategies: the eutrophication potential in kg of PO 4 equivalents per household and year; plot data for Figure 5b, Table S15: Integrated environmental impacts with GWP of the MES, the MSS, and the AES in kg of CO 2 equivalents per household and year; plot data for Supplementary Figure S4a, Table S16: Integrated environmental impacts with EP of the MES, the MSS, and the AES in kg of PO 4 equivalents per household and year; plot data for Supplementary Figure S4b, Table S17: Evaluation SNB-regression analysis: estimated biological N fixation and estimated natural balance in kg of N per household and year; plot data for Supplementary Figure S3, Table S18: Relative contribution of the different resources used for standard composting and for CaSa-composting to the total input flow in terms of volume and content of C, N, and P prior to the composting process in %; plot data for Figure 4a, Table S19: Relative contribution of the different resources used for standard composting and for CaSa-composting to the total input flow in terms of volume and content of C, N, and P prior to the composting process in %; plot data for Figure 4b, Table S20: Material output flows of food products (i.e., maize and beans grains, cabbage heads, and onion bulbs) in kg of FM (after air-drying for maize, beans, and onion) per household and year, Table S21: Material output flows of food products for self-consumption in kg of FM (after air-drying for maize, beans, and onion) per household and year, Table S22: Material output flows of food products sold to market in kg of FM (after air-drying for maize, beans, and onion) per household and year, Table S23