dataesr/scientific-paragraphs-categorization huggingface dataset:
Multiple interacting widgets may be combined to build dashboards, and the underlying notebook may be hosted on the platform as a stand-alone web page, providing a low-cost solution to prototype graphical application interfaces. JupyterLab and the use of Jupyter Notebooks were found to provide excellent properties for complex use cases and power-users, as they can build upon existing codes and be customized as needed, while they allow users to also perform batch calculations for larger-scale studies. Some examples of this flexibility are given in the Jupyter Notebook "Managing_Jupyter_-Environments. ipynb" on the platform and summarized here: • Containerized JupyterLab environments means users can install Python packages in their instance by pip/mamba, including other hydrological models coded in Python; • Deleting/shutting down your server instance will reset the environment but preserve all files, such that breaking the environment is not permanent; • The exact environment setup can be exported to a file such that it is possible to replicate it exactly if there are ever upgrades, updates or other modifications that break user code.
General hydrological modeling General hydrological modeling requires the extraction of hydroclimatic data, geographical catchment properties (latitude, longitude, area, mean altitude, land use, etc. ) and catchment boundaries before setting-up a hydrological model. All this information can be obtained using remote services through PAVICS-Hydro. These services connect to a digital elevation model (DEM) and a land-use dataset to extract relevant information for the studied catchment. The DEM used is the EarthEnv-DEM90  (Robinson et al. , 2014)  while the land-use dataset is the North American Land Change Monitoring System  (Latifovic et al. , 2016). Other data sources could also be used depending on their availability as the platform allows the use of other packages or databases according to user specifications, as long as these are accessible online.
Catchments whose boundaries are to be defined make use of the worldwide and most detailed level of the HydroSHEDS database to provide drainage basin contours  (Lehner et al. , 2008) , using the closest subbasin to the pour point as the basin outlet. A GeoJSON file with the catchment boundaries is then made available for download and useable for other modeling steps, such as extracting meteorological input data. This meteorological dataset can be extracted within the catchment's boundaries or in the surrounding region after specifying the required spatial and temporal extents. The implementation of the hydrological model is done through the Raven modeling framework. Eight hydrological models are available in a lumped or distributed mode: GR4J  (Perrin et al. , 2003) , HBV  (Bergström, 1995) , HMETS  (Martel et al.
, 2017) , HYPR  (Ahmed et al. , 2020) , MOHYSE  (Fortin and Turcotte, 2007) , SAC-SMA  (Burnash et al. , 1973) , Canadian Shield (an in-house model that represents the Canadian Shield hydrology particularly well), and the Blended Model  (Mai et al. , 2020a). While Raven does not explicitly "contain" these models, it includes processes that allow it to emulate them either perfectly or almost perfectly. Therefore, running a Raven implementation of HMETS or GR4J is essentially the same thing as running the original source code for those models. One drawback, however, is that our implementations makes some assumptions (GR4JCN implements the CemaNeige snow module automatically with a single altitude band for example). The model parameters can be calibrated using spotpy  (Houska et al. , 2015). Ravenpy sets defaults for the lower and upper boundaries of the parameter search space, the optimization methods (using the default option of the Dynamically Dimensioned Search algorithm;  Tolson and Shoemaker, 2007)  and the maximum number of model evaluations.
At the end of the model calibration step, the best parameter set as well as the score of the objective Nash-Sutcliffe Efficiency (or other user-defined functions) are provided, and users can analyze the calibration results. General statistics of the streamflow time-series can be computed in addition to flow indicators (e. g. , base flow index) and specific analyses of times series (e. g. , frequency analysis). A regionalization package in RavenPy is available to provide estimated streamflow (best estimate and ensemble) at an ungauged site using three pre-calibrated hydrological models (GR4JCN, HMETS, and MOHYSE) and a large hydrometeorological database with catchment attributes and observed streamflow (Extended CANOPEX;  Arsenault et al. , 2016). Multiple regionalization strategies are proposed to estimate flows at the ungauged sites, as described in Table 6  (Arsenault et al.
e. , the state variables to be assimilated), the distribution and shape of random perturbations, the number of members, the assimilation period and frequency. Assimilated states can be used as a starting point for hydrological forecasts, and performance can be validated using a hindcasting dataset. A climatological Extended Streamflow Prediction (ESP;  Day, 1985)  forecast can also be performed by using historical weather as a proxy for future weather. The general idea is to initialize the state of the hydrological model to represent current conditions, but instead of using weather forecasts to predict future flows, the hydrological model is run with observed historical weather series from past years. For instance, 30 years of weather observations give 30 different forecasts. The accuracy and reliability of the forecast ensemble are then evaluated by different probabilistic metrics, such as the CRPS and the rank histogram metric using the climpred package  (Brady and Spring 2021).
Spatial proximity with inverse distance weighting and regression-based augmentation The ungauged hydrograph is an average of the n closest catchments' hydrographs, and the average is weighted using inverse distance weighting. The method uses the Extended CANOPEX dataset to estimate model parameters using multiple linear regression. Parameters whose regression r 2 is higher than 0. 5 are replaced by the multiple linear regression estimated value  (Arsenault and Brissette, 2014).
Physical similarity with inverse distance weighting and regression-based augmentation The ungauged hydrograph is an average of the n most similar catchments' hydrographs, and the average is weighted using inverse distance weighting. The method uses the CANOPEX dataset to estimate model parameters using multiple linear regression, as for the spatial proximity variation. R. Arsenault et al. bias correction of climate model simulations that will be fed as inputs to the hydrological model in order to perform climate change impact studies on hydrology. PAVICS-Hydro supports various methods to biascorrect CMIP6 climate simulations, such as quantile mapping, detrended quantile mapping, multivariate quantile mapping bias correction algorithm (MBCn;  Cannon, 2018)  and a bias-adjustment method based on the principles of Principal Components Analysis (PCA;  Hnilica et al.
, 2017). The bias correction methods are proposed through the "xclim" Python package  (Smith et al. , 2023) , which provides tools and utilities for hydro-climate indicator calculations and bias-adjustment algorithms. Users need to extract the historical period and future period data of the climate model to perform the bias correction method using the provided templates. The reference data used as the baseline for the bias correction is the ERA5 reanalysis, but users can easily substitute their own dataset. Then, correction relationships between the reference dataset (ERA5) and historical dataset (climate model simulations for the same time period) are found. The correction relationships obtained are then applied to both reference and future climate simulations to correct them. Finally, the hydrological model can be run with the bias-corrected climate data for both user-defined reference and future periods to generate streamflows and evaluate the impacts of climate change on the hydrology of the catchment of interest.
Adaptability, customization and performance While PAVICS-Hydro provides a set of tools that are ready-to-use for many use-cases and applications, it also allows users to modify codes and processes for custom workflows. This requires users to install Rav-enPy locally using the developer installation method. Installing the software in developer mode can be done by following the instructions available on the RavenPy readthedocs documentation  (Huard et al. , 2023). This allows users to modify the RavenPy package and add, modify and customize codes that can be useful, such as defining new emulators, implementing specific algorithms for optimization or data assimilation, adding new forecasting datasets with particular features, regionalization options, and so forth. Such changes can also be submitted on the project GitHub for possible integration into a future RavenPy release, which would then be available on the RavenPy installation on the server.
Furthermore, users can install other Python packages (as demonstrated in the "Managing_Jupyter_Envrionments. ipynb" notebook), including other Python-based models, which can be integrated into workflows for data processing and output analysis. As long as these packages are available on the Python Package Index (PyPI) or Conda, they are also accessible to the server and to users. Finally, another method for adding hydrological models is to modify the Raven source code directly as described in  Craig et al. (2020). In terms of performance, results will depend on the hardware running Raven and on the server load when running on the online portal. Nonetheless, the platform can handle distributed hydrological modelling well, even for medium to large size catchments. One limitation is that of basin size when invoking the land-use properties WPS service.
Due to the resolution of the underlying dataset, catchments with sizes above 100,000 km 2 will display an error message if attempting to submit such a WPS request. Another limitation to be aware of is that of model calibration, which sees some small performance hits due to all of the overhead related to file I/O required by Raven, but that is usually negligible for larger models and/or longer simulations, where I/O becomes less significant. We provide an analysis of simulation times for some common examples in Table  7. We can see that the runtime is affected by two components: the I/O process and the actual model runtime. These examples are for a daily timestep and would scale linearly according to the timestep. For single model simulations, the I/O can be a significant portion of the runtime.
2. All data were taken from the HYSETS database  (Arsenault et al. , 2020). The notebook first presents the geographical extraction tools and applies them to the Mistassini catchment. The code returns catchment properties, such as land-use fractions, area, slope, elevation, aspect, and other characteristics. These can be used to set up the hydrological model or for any other research use. The platform lets users download the extracted datasets in raster format, but only the basin-averaged values are computed in this example for simplicity. The required weather data to drive the model are then extracted using a call to the ERA5 reanalysis dataset we store on Wasabi, a data hosting service running on Amazon S3. Data is spatially averaged over the catchment and saved to the NetCDF format for the Raven hydrological modeling framework to be able to access it.
This means the data is also downloadable locally for users that only want to extract data quickly for their projects. Data for climate change impact assessments are then extracted. To do so, the ERA5 dataset is used as the reference dataset, and the MIROC6 climate model using the SSP5-8. 5 scenario is selected for the climate change aspect. The notebook presents a boilerplate code to extract the climate model data from the Pangeo catalog on Google Cloud which can be easily adapted to use another climate model. Data for the reference   (1981) (1982) (1983) (1984) (1985) (1986) (1987) (1988) (1989) (1990)  and future period (2081-2090) are extracted and spatially averaged over the catchment using the "clisops" subsetting tools. These shorter periods were used purely for demonstration purposes and to keep computation times low.
Actual research should use more years, ideally 30-year windows to capture climatology  (Navarro-Racines et al. , 2020). All data are processed to convert units to those used by Raven. The "xclim" post-processing package is used to bias-correct the climate model data with a detrended quantile mapping approach. This is one of many available methods in "xclim" that is also integrated into PAVICS-Hydro; therefore, users can adapt the code to their use-case. Finally, processed datasets are saved to the NetCDF format for both the reference and future periods. The next step is to set-up the hydrological model. RavenPy allows emulating eight hydrological models, and for this case study, the GR4J hydrological model coupled with the CemaNeige snow routine  (Valéry et al. , 2014) , henceforth called GR4JCN, is selected.
GR4JCN is calibrated on half of the reference period using the spotpy calibration package and ERA5 data as observations, and validated on the other half of available data. The results for the validation period are presented in Fig. 3. The model underestimates the flow during the onset of spring snowmelt but overestimates the winter low flow. The timing of all peak flows is adequately captured, returning an overall Nash-Sutcliffe efficiency score of 0. 49. However, some aspects, such as the representation of the peak flow magnitude, could be improved. In this application, a limited number of model evaluations (200) was used in the calibration to keep computing times short for demonstration purposes. Increasing the number of model evaluations will help improve the models' skill. The final calibrated model parameters and catchment properties are extracted and can be saved by the user for future tasks.
In this example, the next steps after the model creation and calibration are to run the model with both the bias-corrected reference and future climate model datasets to evaluate changes in future hydrographs. The resulting hydrographs can be compared for both periods in terms of peak, median or low-flow indicators, for example. The mean annual hydrograph for both periods are presented in Fig. 4 , along with the validation period and observed flows. It can be seen that the future period hydrograph has an earlier melt season, a dryer spring season, and a wetter fall season compared to the reference period, but that the reference and validation flows are similar to the observations, as expected. Users can download the generated streamflow files and figures, or they can simply analyze the data directly on the PAVICS-Hydro platform by using one of the many available statistical analysis tools made available to users.
Discussion and conclusion The PAVICS-Hydro platform is an open-source, user-friendly, flexible, and powerful research tool for hydrology and hydroclimatology that is free to use for anyone, and operational at https://pavics. ouranos. ca. It allows users to simplify many aspects of their research and to develop training materials that can be easily shared and replicated. One of its advantages is to grant professionals access to a programming environment that is continually updated with the latest version of scientific libraries. This is especially useful when office policies and IT staff control which pieces of software can and cannot be installed on individual computers. The complexities involved in developing and maintaining an active platform are, however, not to be underestimated. One early mistake was to package hydrological services behind a WPS API while they were still in heavy development.
For one, client-server interactions bring their own set of bugs, independent from the service logic. Also, debugging and testing the services through all the different software layers adds friction and complexity that slows the development of the actual scientific content. For example, for security reasons, servers typically do not display the full stack traceback when failures occur, making bugs more difficult to diagnose. We eventually decided to focus our WPS interface efforts on simple operations that absolutely required server interactions, such as extracting watershed properties from databases hosted on the server. Complex operations, such as hydrological model calibration, simulations, and analyses, would run directly in the Jupyter Notebook engine, instead of being offered through the WPS API as initially envisaged.
Conversely, one early decision that proved beneficial was to insist on using netCDF as the standard data format, and the CF-Convention as the metadata standard. Although this required conversion efforts, enforcing data and metadata standards allows for greater interoperability, and reduces the amount of boilerplate code needed to write complex scientific workflows, as suggested by  Miles (2014)  and  Knoben et al. (2022). This paper attempts to shed some light on the decision choices and challenges faced during the platform development and provides guidance for the next generation of scientific research platforms. This, hopefully, will help other developers in the design and implementation of similar platforms, as more and more online research portals come online. One of the most important decisions that shaped the platform into its current form was the selection of an interaction mechanism.
Acknowledgements This work was supported by  CANARIE inc. , a  Canadian  funding agency that funded the development and maintenance of  PAVICS-Hydro. The authors would also like to thank the developers of the original PAVICS platform at Ouranos for making the platform possible and for sharing the computing infrastructure. Many thanks to the  Pangeo  project team for making the CMIP6 data efficiently accessible, as well as the climate modeling centers that made their data available in the CMIP6 project. We would also like to thank all the contributors to the platform that provided feature requests, updates, suggestions and packages on the project GitHub and that were eventually integrated into PAVICS-Hydro. Finally, the ERA5 and data were initially downloaded from the  Copernicus Climate Data Store , available at: https://climate.
Streamflow Test forecasting 12_Performing_hindcasting_experiments hindcasting methods and techniques on historical forecast data, using an archived ECCC database (CaSPAr). Forecast Evaluate the skill of 11_Climatological_ESP_forecasting verification forecasts using multiple common forecast verification metrics over the hindcasting period; compute statistics on the real-time forecasts. Flood risk Predict the probability Assess_probabilistic_flood_risk analysis of flooding based on an ensemble streamflow forecast and a threshold flood value.
Recent advances in thermodynamic modelling now allow phase equilibrium studies of partial melting in mafic and ultramafic sources under upper mantle conditions. This potentially offers several advantages over experimental investigations, including the fact that capsule-sample interactions are avoided, there is no uncertainty over the volatile content of the charge, the process is much faster, and open system behaviour can be investigated with relative ease. Two different thermodynamic datasets are in common use for phase equilibrium investigations of mantle rocks, compiled alongside a range of constantly evolving phase solution models. This study compares the results of published experimental studies on partial melting in the upper mantle with phase equilibrium modelling results from the popular pMELTS software  (Ghiorso et al.
, 2002) , which uses an embedded dataset from  Berman (1988) , and with results from the Rcrust software  (Mayne et al. , 2016) , which uses the dataset of  Holland & Powell (2011). The aim of this comparative study is to investigate the suitability of each combination of software specific calculation routines, thermodynamic datasets and phase solution models to provide a viable alternative to conventional experimental techniques when studying magma genesis from the upper mantle. The main points of interest are how the phase assemblages, proportions, and compositions predicted by the modelling compare with those produced in the experiments. The set of experimental results used for comparison includes both peridotitic and eclogitic compositions, investigated over a pressure range of 1. 0-3.
Consequently, capsules consisting of platinum group elements must be used and these all alloy with iron (e. g. Brugier et al. , 2015; Merrill and Wyllie, 1973) , resulting in the common usage of graphite inner capsules or liners (e. g. Falloon et al. , 1988; Wang et al. , 2020). The result is that the effective bulk composition in such experiments may be different from the intended composition, particularly with regards to volatile content, fugacity (f) of volatile content, Fe content and Mg# (e. g. Médard et al. , 2008; Merrill and Wyllie, 1973). Thermodynamic modelling does not have these problems, but does have problems with the availability of suitable experimental data on the thermodynamic properties of minerals. This may result in imperfect and incomplete thermodynamic datasets and activity-composition (a-x) models for solid and liquid solution phases, which are thus inadequate to express the complexity of solid solution behaviour in minerals, particularly at mantle pressures where a range of pressure sensitive substitutions become important in micas, pyroxenes, and amphiboles (e.
g. Holland et al. , 2018). Recently, thermodynamic modelling has been expanded to enable phase equilibrium studies of partial melting in mafic and ultramafic sources  (Ghiorso et al. , 2002; Holland et al. , 2018; Tomlinson and Holland, 2021)  under upper mantle pressure-temperature (P-T) conditions using a variety of different software (e. g. Connolly and Kerrick, 1987; de Capitani and Petrakakis, 2010; Ghiorso et al. , 2002; Powell and Holland, 1988; Riel et al. , 2022 ) that utilise at least two different thermodynamic datasets i. e. Berman (1988)  and  Holland and Powell (2011). Additionally, methodologies and software have also been developed to investigate open system behaviour, such as melt loss (e. g. Mayne et al. , 2016; Xiang and Connolly, 2022)  or magma movements  (Bohrson et al.
, 2014). These developments have evolved phase equilibrium modelling into a useful and powerful tool for igneous rock studies, providing several crucial advantages over experimental studies, such as the ability to conduct investigations much faster with greater P-T resolution on any composition of the investigators choice (within the limits of modelling capabilities), and the ability to simulate open system processes. These techniques could be very beneficial to advancing understanding of mantle melting, if phase equilibrium approaches can be shown to be sufficiently accurate. Underpinning all thermodynamic modelling applications are thermodynamic datasets of liquid and solid species, including databases of standard-state properties as well as sets of a-x models that define the variation in thermodynamic properties of liquid and solid solution phases.