dataesr/scientific-paragraphs-categorization huggingface dataset:
3) We performed mitochondrial target enrichment for samples with relatively low DNA quality. Target enrichment was performed two times (double capture) following the methods described in  (Hofmanová et al. , 2016) , with the exception, that PCR purification was performed with QIAquick PCR Purification Kit columns (QIAGEN ® ) according to the companies protocol, eluting in 33µl preheated (65°C) elution buffer for 5 minutes. For 9 samples (Supplementary Data Table  1 ), the supernatants from both nuclear target enrichment steps containing non-target DNA, were used to perform an additional mitochondrial capture experiment (supernatant capture). The supernatants were purified with QIAquick PCR Purification Kit columns prior to the first mitochondrial target enrichment. Samples were pooled equimolarly and sequenced at GENterprise GENOMICS (Mainz) on an Illumina MiSeq sequencing system with 50 cycles single-end or on an Illumina HiSeq sequencing system with 100 cycles paired-end.
Bioinformatic processing The mitochondrial captures were processed as described in  (Hofmanová, 2016; Hofmanová et al. , 2016). Read statistics can be found in Supplementary Data Table  1. For all 134 ancient genomes and neutralomes, alignment, local realignment, PMD and recal estimation were processed with commit 9ec713b of the ATLAS-Pipeline (bitbucket. org/wegmannlab/atlas-pipeline/wiki/Home) with some minor changes depending on how the data were obtained as indicated below and in Supplementary Data Table  1. Reads were trimmed with length filter ≥ 30 (TrimGalore, v0. 6. 4, https://github. com/FelixKrueger/TrimGalore), aligned with bwa-mem (v0. 7. 17,  (Li, 2013) ) to the hs37d5 reference  (Mallick et al. , 2016) , filtered for mapping quality < 30, sorted and indexed (SAMtools, v. 1. 9, (Li et al.
, 2009) ). Read groups were added with picard-tools (v2. 21. 1, http://broadinstitute. github. io/picard/) to keep track of libraries. Unmapped reads, orphans and secondary alignments were removed with SAMtools, and duplicates were marked with picard-tools before and after merging the library BAMfiles per sample. For neutralomes, we merged all BAMfiles into one master BAMfile for further processing. A custom script was run to download data, mark duplicates and filter out reads as above for 20 SGDP BAMfiles  (Mallick et al. , 2016). All samples underwent Local Realignment  (GATK, v. 3. 7; (DePristo et al. , 2011) ) using a union interval set of 30 samples plus the target sample (RealignerTargetCreator), and a guidance set of 12 samples for realigning along the target sample with IndelRealigner (Supplementary Data Table  2 ).
Molecular Sex Determination Using the script by  (Skoglund et al. , 2013)  obtained from https://github. com/pontussk/ry_compute), we determined the molecular sex of individuals by calculating the ratio of reads aligned to the Y chromosome over the total number of reads aligned to X and Y. Ratios of 0. 075 or higher indicate males and ratios below 0. 016 indicate females (Figure  S1C ). It was run with default settings as suggested by Skoglund's documentation.
Kinship analysis We used ATLAS (task = geneticDist) to estimate the euclidean distances between all pairs of ancient samples that passed our quality control filters, using the GLFs created during the estimation of genotype likelihoods. We then used a custom R script (https://bitbucket. org/wegmannlab/atlas/downloads/Relatedness. R) to apply the method of  (Waples, Albrechtsen and Moltke, 2019)  to transform these distances into estimates of genetic relatedness. No relatedness was detected among Danube Gorges samples, but for Dil15 and Bar15 which were filtered out for downstream analysis. See details in Figure  S1D.
Inter population ancestry We used the second model of Entropy  (Shastry et al. , 2021)  that takes into account the combination of ancestry states across all loci in diploid individuals. The benefit of this model is that it allows distinguishing among early generations of admixed individuals (i. e. , F1, BC1) when combined with their global ancestry. We followed the user manual as described in the bitbucket repository (https://bitbucket. org/buerklelab/mixedploidy-entropy/src/master/vignette_entropy. pdf) to format the input genotype likelihood data and run Entropy with the right options. The model was run with five chains simultaneously, where posterior distributions were estimated with 100,000 iterations, sampled every 10th iteration and with 10,000 burn-in.
ROHs We used ATLAS (task=call method=majorityBase) to produce haploid calls on known alleles (1240K sites;  (Mathieson et al. , 2015) ) while taking PMD and recalibration parameters into account for the whole-genome samples. We merged our calls with the 1240K reference panel using a custom script and plink (v1. 9;  (Chang et al. , 2015) ) and converted them into EIGENSTRAT format (convertf -p, https://reich. hms. harvard. edu/software/InputFileFormats). We then used hapROH (v0. 3a4;  (Ringbauer, Novembre and Steinrücken, 2021) ) with default parameters to identify runs of homozygosity (ROHs) in whole-genome modern and ancient samples. The hapROH output files were merged and the ROHs were binned on genetic length ranges (2-5cM, 5-10cM and >10cM) to calculate the total length and number of ROHs for each bin.
Acknowledgements This work was supported by  Swiss National Science Foundation  ( 31003A_173062  and  310030_200420  to DW,  31003A_182577  to MC),  Marie Skłodowska-Curie  actions  ITN ''BEAN''. ZH was further supported by the  European Research Council  ( 856453 ERC-2019-SyG ),  Czech Grant Agency  ( GACR 21-17092X ) and  EMBO Long-Term Fellowship  ( ALTF 445-2017 ). CB was supported by the  Fyssen Foundation (Fondation Fyssen , post-doctoral research grant). We also thank the IBU cluster and sequencing facility of the  University of Bern. GENterprise,  SAPM Munich ,.
Software and algorithms fastqc www. bioinforma tics. babraham. a c. uk/projects/fa stqc/ www. bioinformatics. babraham. ac. uk/projects/fastqc/ Trim Galore! https://www. bioi nformatics. babr aham. ac. uk/proj ects/trim_galore / https://www. bioinformatics. babraham. ac. uk/projects/trim_ galore/ bwa mem -Burrows-Wheeler Alignment Tool Li 2013 https://github. com/lh3/bwa SAMtools (Li et al. , 2009) https://github. com/samtools/samtools Picard-tools http://broadinstit ute. github. io/pic ard/ http://broadinstitute. github. io/picard/ seqtk https://github. co m/lh3/seqtk https://github. com/lh3/seqtk GATK (DePristo et al. , 2011) https://github. com/broadinstitute/gatk/releases Snakemake (Koster and Rahmann, 2012) https://snakemake. readthedocs. io/en/stable/getting_starte d/installation. html ATLAS (Link et al.
, 2017) https://bitbucket. org/wegmannlab/atlas/wiki/Installing%20 and%20Running%20ATLAS ContamMix (Fu et al. , 2014) N/A MIA https://github. co m/mpieva/mapp ing-iterative-ass embler https://github. com/mpieva/mapping-iterative-assembler mafft (Katoh et al. , 2002) https://mafft. cbrc. jp/alignment/software/.
Participatory water resources management requires modeling techniques that are accurate and flexible, yet stakeholder-friendly. While different modeling frameworks offer advantages and disadvantages, System Dynamics (SD) models have seen sustained use as a stakeholder-friendly approach for water resources modelling. In contrast, physically-based models are more appropriate to model the hydrological components of coupled human-water systems. Proposed as a way to combine the relative strengths of both modelling paradigms, model coupling allows researchers to build participatory SD models with stakeholders, while delegating the hydrological components of the overall model to an external hydrological model. Recently developed to facilitate model coupling, the Tinamït Python package presents an extensible outward-facing Application Programming Interface (API).
It allows for the development of extensions (wrappers) that expand compatibility with different physically-based models. However, no watershed hydrological model has yet been connected to this API. In the present study, a socket and JavaScript Object Notation-based communication protocol was developed with the goal of facilitating the coupling of models written in languages such as FORTRAN. This novel protocol served to develop a Tinamïtcompatible wrapper for the hydrological model SWAT+, allowing it to be coupled to human-water SD models. The novel coupling protocol was then applied to a case study of Tanzania's Usa Basin. This approach provides the modeler with the benefits of both physically-based and SD models, thereby allowing the detection of potential far-reaching effects of policy decisions, within a system that remains flexible and easily adaptable to other watersheds.
Inter-process communication in wrapping can be achieved through a pipe-based approach (e. g. , OpenMI;  Gregersen et al. , 2007) ; however, socket-based approaches are another option  (Bulatewicz et al. , 2013). The latter approaches are quite novel for this application and could provide potential benefits, e. g. , shorter execution time (see Sect. 2. ). Most existing wrapping approaches have not been or cannot be used to couple to SD models. However, automatic SD model wrapping with external physically-based models may be achieved through the Tinamït API  (Malard et al. , 2017). In this process, a physically-based model wrapper is developed only once for every physically-based model platform; thereafter, a few lines of code allow any models built upon the same platform to be coupled with any SD model.
Tinamït has been previously applied to the evaluation of policy decisions for salinity management in Pakistan, using a coupled SAHYSMOD and SD model  (Malard et al. , 2017) , as well as for agricultural management in predominantly Indigenous rural communities in Guatemala, coupling SD models and the Python Crop Simulation Environment  (de Wit, 2022; Malard et al. , 2020a, b). However, Tinamït has not yet been applied to coupling an SD model with a hydrological model (e. g. , SWAT+), thereby facilitating the integrated modelling of coupled human-hydrological systems. The concept of using Tinamït to couple SD and hydrological models has been presented, however, details of these earlier conceptualizations were mostly changed in the process of development  (Harms et al. , 2020 (Harms et al. , , 2021)).
The present paper will present: (i) the development of a sockets and JavaScript Object Notation (JSON) based data-exchange Python package and its C/FORTRAN counterpart in SWAT+; (ii) the creation of a SWAT+ wrapper using the functionality of the Tinamït API and the data-exchange Python package, to allow SWAT+ models to be automatically coupled to SD models; and (iii) the coupling and application of a SWAT+ and a human-water SD model, to holistically evaluate policy decisions and their potentially far-reaching effects in the Usa Basin, Tanzania, based on a SWAT+ model provided by  Nkwasa et al. , (2020).
Methodology A Tinamït (2. 0. 3) compatible SWAT+ wrapper was created using the following steps: 1. A python package (labelled 'tinamit-idm') employing socket functionality and including a generic JSON protocol, was developed to serve as the basis for data exchange between Tinamït wrappers and the SWAT+ model engine  (Malard and Harms, 2022). (Python3) 2. The SWAT+ engine was modified by adding C-language sockets allowing communication via the JSONprotocol used by 'tinamit-idm'  (Harms and Malard, 2022a). (Fortran, C).
tinamit-idm A generic socket-based python package was developed to provide basic functions that any models interchanging information during run-time might require  (Malard and Harms, 2022). The functions 'cambiar', 'recibir', 'incrementar', 110 'finalizar' and 'cerrar' define how to provide data, receive data, increment the model by a certain number of time-steps, finalize the model and close the model, respectively. The JSON protocol was of critical importance for these functions. Five distinct types of JSON message types were defined, corresponding mostly to the key functions provided by tinamit-idm. The definition of this JSON-protocol was kept as general as possible to give it the necessary flexibility to be implemented as a standard for all socket-based inter-model communication using tinamit-idm and Tinamït.
Modification of SWAT+ To give SWAT+ the ability to exchange data via sockets, SWAT+ was modified as follows (Harms and Malard, 120 2022a): Argument handling was initially added so that one might specify whether SWAT+ was to be executed alone, or connected to Tinamït. Arguments can be added to the command-line call of the swatplus. exe file; the execution file can be called "swatplus  [port]  [host]" (where port specifies the port to which SWAT+ should connect and host specifies the host IP, usually 127. 0. 0. 1). One may still call "swatplus" to run only the SWAT+ model by itself. 125 Secondly, a FORTRAN module implementing the methods required for communication with the tinamit-idm package was added. This module was named the "tinamit_module" and is called mainly from the "time_control" module that manages SWAT+'s main simulation loop.
The "tinamit_module" gives SWAT+ the ability to pause, receive messages from and send messages to other models coupled via Tinamït. Furthermore, a mechanism is implemented here that allows SWAT+ to run as https://doi. org/10. 5194/hess-2022-306 Preprint. Discussion started: 30 September 2022 c Author(s) 2022. CC BY 4. 0 License. many time-steps as the coupling code specifies before re-communicating with the Tinamït-wrappers. This alleviates the need to unnecessarily pause the simulation of SWAT+ after every time-step to communicate with Tinamït, and allows for a more efficient execution of the simulation depending on the data-exchange interval chosen by the modeler. It also allows Tinamït to balance the varying time-step lengths of the different models. The "tinamit_module" makes use of a C-file ("socket.
4. incrementar(): defines how the model will be advanced during its run and how data exchange with the model may occur after a simulation step. 5. paralelizable(): defines whether SWAT+ is parallelizable in different Python threads, which it is, if run using the wrapper. 6. cerrar(): ends the model run and stops the model engine. In this case it is also responsible for ending the connection between the model and the Tinamït wrapper. 7. instalado(): checks whether a SWAT+. exe or engine is installed and specified. Steps 1-7 must be implemented by any physically-based model wrapper created in Tinamït  (Malard et al. , 2017). The following three are convenience functions that the authors deemed useful for any SWAT+ model in general and more specifically for case-study model execution: 1. imprimir_usos_de_tierra(): prints the land use types defined for the current project so that the user does not necessarily need to read the SWAT+ input files to know which land uses are identified by which numerical value.
Other coupling methods which have employed file and pipe-based approaches  (Gregersen et al. , 2007; Inam et al. , 2017)  or translated the entire model into a single programming language  (Prodanovic and Simonovic, 2010) , based models without major modifications to the client part of the socket code (i. e. , the 'socket. c' file), as the C socket client is as generic as the JSON protocol used by tinamit-idm. The server code in tinamit-idm, especially in conjunction with Tinamït, lays the groundwork for developing wrappers for models written in any language that can interpret JSON, and will simplify the development of other physically-based model wrappers.
Limitations Compared to OpenMI, Tinamït has neither the same status nor history of use and trust and does not yet support a similar range of models. Therefore, the OpenMI standard may currently have an advantage when different physically-based models are to be coupled for a project. However, Tinamït is unique in its ability to create wrappers for SD models, which are some of the most popular tools for integrated WRM models or, more broadly, participatory model building. Additionally, the work presented here is likely to improve the usefulness of Tinamït, not only through the possibility of easily integrating SWAT+ into a participatory WRM model, but also because it provides standards, methodologies and examples that simplify the addition of further models to Tinamït. Currently, the SWAT+ coupling-capable version is only available for Linux systems, although Windows and MacOS versions are in development.
During development, the Windows version of the socket code in the modified SWAT+ version created difficulties during compilation. These difficulties were exacerbated by differences between Windows-sockets and Csockets. The MacOS version is nearing the end of its development but at the time of writing, the Linux version of the modified SWAT+ was the only functional version available. However, all Python packages presented (i. e. , Tinamït and tinamit-idm) are functional on all current major operating systems. A selection of about 190 numerical type SWAT+ variables have been made available for coupling, including some utility functions and variables specific to the case study; however, there are likely functions and variables that other modelers might find useful to couple that have not been included.
In TBMs, soil moisture is determined by soil hydrology submodels which typically rely on soil-textural information and pedotransfer functions. The TBMs use a rather limited number of pedotransfer functions while soil-texture inputs often resume to a few products with different spatial resolutions (horizontally and vertically). The main products used for regional and global simulations are the FAO/UNESCO soil map of the world  (Batjes, 1997) , the Harmonized World Soil Database  (Nachtergaele et al. , 2008) , and the more recent SoilGrids250m products  (Hengl et al. , 2017; Poggio et al. , 2021). Those gridded soil maps are not independent of one another, and often aggregated at lower spatial resolution to match other model forcings (e. g. meteorological drivers) which results in average soil properties that neglect inter-and intra-grid cell heterogeneity.
Since soil is a major carbon pool and a key driver of water and nutrient availability for plants, we expect a large model sensitivity to soil properties, which should propagate into the simulated vegetation and the ecosystem biogeochemical cycles. This assumption especially applies in a tropical region like South America that frequently suffers from drought and is characterised by heavily weathered and poor soils. To test this assumption, we explored the sensitivity of the vegetation carbon dynamics to soil texture in three state-of-the-art TBMs, representative of the main classes of commonly used TBMs: Lund-Potsdam-Jena General Ecosystem Simulator (LPJ-GUESS), ED2, and ORCHIDEE v2. 2. Model sensitivity to soil texture was assessed based on the inter-and intragrid cell variability in clay content as quantified from the SoilGrid250m database.
Study region This study focuses on the South American tropical region, ranging from 90 to 30 • W in longitude and from 15 • N to 20 • S in latitude. The spatial resolution of the simulations was set to 1 •. To drive the model, we used the 6-hourly CRU-NCEP v7 meteorological forcing dataset  (Viovy, 2018). Climate variables include air temperature and humidity, incoming short-wave and long-wave radiation, precipitation rate, surface pressure, and winds. No land-use changes were applied to any simulation but a land-cover mask representative of the current plant functional type (PFT) distribution as derived from the ESA-CCI land-cover map  (Poulter et al. , 2015)  is applied by default to ORCHIDEE simulations. This land-cover map corresponds to the year 2015, which is consistent with remote-sensing products used for model evaluation described below (see Sect.
This was achieved by recycling the initial 10 years of CRU-NCEP until soil and vegetation carbon pools reached an equilibrium. The spin-up runs were continued with historical simulations from 1860 to 2016 for each model using the full CRU-NCEP forcing dataset and varying atmospheric CO 2 concentration according to  Friedlingstein et al. (2020). We did not change any model parameters (with the exception of the soil textural information) compared to the model default parameterisation for the tropics. More detail on each model's parameter sets can be found in the aforementioned references describing the three models. In ED2, we simulated four competing PFTs (grass, early-, mid-, and latesuccessional tropical trees) similarly to  Longo et al. (2019a)  for Amazon regional runs. To facilitate inter-model comparisons, we chose to run multiple ED2 simulations for each polygon rather than simulating multiple sites per polygon.
Evaluation datasets We used three different datasets to assess the model robustness and performance under the three soil scenarios. Firstly, we compared the spatial distribution of aboveground biomass (AGB) as simulated by the models with the integrated biomass map of  Avitabile et al. (2016)  over the study region. This biomass map is one of the reference products used by the International Model Benchmarking system (IL-AMB;  Collier et al. , 2018)  to evaluate TBMs, e. g. in the global carbon budget exercise  (Friedlingstein et al. , 2020). Secondly, we contrasted the model outputs of the average ecosystem gross primary production (GPP) with a moderateresolution dataset of vegetation GPP derived from MODIS satellite data (MOD17A2), see  Running et al. (2015). Finally, we differentiated the soil organic carbon stocks produced by each vegetation model/scenario with those derived from local observations upscaled to the globe in SoilGrids.
Analyses To assess the relative importance of the intra-grid cell variability, we aggregated the topsoil clay fraction in SoilGrids from its finest (250 m) to a much coarser (5 • ) resolution with the R package "raster". For each resolution, we compared the intra-grid cell variability with the inter-grid cell variability. We defined the intra-grid cell variability as the average of the clay fraction standard deviation (SD) within each grid cell, and the inter-grid cell variability as grid-level SD of the average clay fraction of each grid cell. All the results from the vegetation model simulations presented below are either (i) averages of the last 10 years of either the spin-up or the historical period  (2006) (2007) (2008) (2009) (2010) (2011) (2012) (2013) (2014) (2015) (2016)  or (ii) the averages of the very last year of the historical period (2016).
We particularly focused on the inter-model and interscenario comparison of GPP at the ecosystem and the PFT levels, as well as the resulting ecosystem-level AGB and soil carbon. For each simulation of each model, we also computed the normalised soil drought stress index (SDI) from the model outputs whose definition is model-specific (see Sect. S1) but always normalised between 0 (full stress) and 1 (no stress). We related SDI to the ecosystem GPP through quantile regression analyses using the R package "quantreg". We used a quantile regression given the nature of the vegetation productivity response to SDI: for SDI close to 1, the GPP variability is high (other resources can limit GPP) while for SDI to 0, the GPP is necessarily low. To evaluate the model performance, we averaged the model outputs (GPP, AGB, soil carbon) for each grid cell and vegetation model/scenario over the period of observation of the remote-sensing products (see previous section).