web based system, documentation, user guide for organic

12
Operationalising Life Cycle Assessment for Pesticides Page | 1 Web based system, documentation, user guide for organic and inorganic pesticides Project reference: ADEME 17-03-C0025 Project acronym: OLCA-Pest Deliverable number: D5.1 Deliverable name: Web based system, documentation, user guide for organic and inorganic pesticides Version: V4 Working package number: WP5 Work package lead partner: Agroscope Deliverable lead partner: DTU Delivery date: August 2019 Authors: Carlos Melero, Thomas Nemecek, Peter Fantke Comments: Public Version

Upload: others

Post on 10-May-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web based system, documentation, user guide for organic

Operationalising Life Cycle Assessment for Pesticides

Page | 1

Web based system, documentation, user guide for organic and inorganic pesticides

Project reference: ADEME 17-03-C0025

Project acronym: OLCA-Pest

Deliverable number: D5.1

Deliverable name: Web based system, documentation, user guide for organic and

inorganic pesticides

Version: V4

Working package number: WP5

Work package lead partner: Agroscope

Deliverable lead partner: DTU

Delivery date: August 2019

Authors: Carlos Melero, Thomas Nemecek, Peter Fantke

Comments: Public Version

Page 2: Web based system, documentation, user guide for organic

Operationalising Life Cycle Assessment for Pesticides

Page | 2

Contents Contents ............................................................................................................................................... 2

1. Web-based PestLCI consensus emission model .......................................................................... 3

Abstract ............................................................................................................................................ 3

1.2 Definition of web functionalities requirements .................................................................... 4

1.3 Implementation of web-based PestLCI Consensus model .................................................... 5

1.4 Technical implementation ..................................................................................................... 6

Software stack .............................................................................................................................. 6

Software architecture .................................................................................................................. 7

Open-source PHP web framework............................................................................................... 8

Code editor ................................................................................................................................... 8

GitHub .......................................................................................................................................... 8

Web server maintenance (Web hosting) ..................................................................................... 9

2. User guide .................................................................................................................................... 9

2.1 Single Calculation .................................................................................................................. 9

2.2 Batch Calculation ................................................................................................................. 10

Template for Batch calculation .................................................................................................. 10

Id Keys documentation .............................................................................................................. 10

2.3 Add datasets to database .................................................................................................... 10

3. References.................................................................................................................................. 11

ANNEX ................................................................................................................................................ 11

Page 3: Web based system, documentation, user guide for organic

Operationalising Life Cycle Assessment for Pesticides

Page | 3

1. Web-based PestLCI consensus emission model

Abstract

C. Melero1, P. Fantke1

1DTU

The main objective of work package 5 (WP5) is to provide guidance on how to consistently integrating selected existing and newly collected and generated LCI and LCIA data and model results into an operational data platform to support LCA.

Another OLCA-pest project objective is to facilitate the operationalization of aligned emission quantification and toxicity characterization of pesticides in LCA. Case studies conducted by practitioners with different crop archetypes will be conducted to test the applicability of the models. In this context and as a result of the different workshops and meetings with the different project partners, a user-friendly web-based system is highly desired and required by practitioners.

Flexibility and modularity of the interface is essential in order to cover present needs and offer options for further needs emerging during the project evolution. Another important property will be openness, we aim to have an open web-based system where OLCA-Pest partners, external practitioners and research community can use and get a mutual benefit by using it.

In this context, the aim of the deliverable 5.1 (D5.1) is to describe the work being carried out for the development and implementation of a flexible and operational web-based system for data for organic and inorganic pesticides used in LCI and LCIA models. This deliverable contains a description of the web-based system functionalities, an explanation of the technical implementation, together with a user guide on how to use the model.

Page 4: Web based system, documentation, user guide for organic

Operationalising Life Cycle Assessment for Pesticides

Page | 4

1.2 Definition of web functionalities requirements

The web-based PestLCI Consensus model is meant to be used in the case studies to test the operationalized version of the pesticide consensus model. It can also be used by LCA practitioners since it is open and available for everyone. It will also be used to disseminate the research progresses of OLCA-Pest. A description of the desired functionalities can be found in Table 1.

Table 1. Functionalities of the web-based PestLCI Consensus model

Functionalities Needs

1. User Interface Self-explanatory, efficient and enjoyable (user friendly)

2. File Download system (Upload and download)

A FTP (File Transfer Protocol) was created

3. Database Management MySQL

4. Online calculation (single scenario)

Script with Pesticide Consensus emission model

5. Dashboard A dashboard to save and manage the results

6. User management and roles Log in mandatory for online calculation

7. Automatic results report Auto generated .csv file containing the scenarios that have been calculated

Some additional features we implemented in the web-based PestLCI Consensus model:

Batch processing scenarios

Default data available for the users to run the model

Make the results compatible with other databases (export results)

Add information to database (climate and soil data)

PestLCI Consensus model functions documentation available online

Page 5: Web based system, documentation, user guide for organic

Operationalising Life Cycle Assessment for Pesticides

Page | 5

1.3 Implementation of web-based PestLCI Consensus model

In order to have an overview on how the website will look like a first version mock-up was created (Figure 1). It contains the basic features and functionalities desired. The main structure of the website includes the home page, calculation, dashboard and documentation as main menus.

A continuous process in the development of the design and concepts of the PestLCI Consensus model took place, resulting in the already online tool: https://pestlciweb.man.dtu.dk/. A special attention to the easy to use approach was considered.

The home page (Figure 2) contains basic information and a presentation of the model. The main part of the web-based system is the calculation webpage. Here an online version of the PestLCI Consensus model is available in https://pestlciweb.man.dtu.dk/secondaryemissionshttps://pestlciweb.man.dtu.dk/calculation. If the user only want to calculate the initial distribution a tool with less mandatory inputs can be found in https://pestlciweb.man.dtu.dk/initialdistribution. The user has to enter different inputs for running the model, there are some prefilled lists of data where users can choose in accordions. In addition a help window is available for every user input, this is marked with a “?" After the calculations are done, the results are shown and saved into the database. These results are available for the user in the dashboard (https://pestlciweb.man.dtu.dk/dashboard). The website contains a documentation page where all the equations used in the model are available for the user. Additional documentation can be added in this section. This was done in form of “Accordions” that will link to a pdf file to download.

Figure 1. Mock up front page

Page 6: Web based system, documentation, user guide for organic

Operationalising Life Cycle Assessment for Pesticides

Page | 6

Figure 2. Website online available in https://pestlciweb.man.dtu.dk/

1.4 Technical implementation

Software stack

A software stack is a collection of elements that work together to support the execution of an application. In order to implement the web-based PestLCI Consensus model a web development platform was installed locally. WampServer (WAMP), a free web development platform was chosen. It allows creating dynamic Web applications making possible the transitioning from a local test server to a live server. WAMP consist in the following elements: Windows, Apache, MySQL (Maria DB), PHP:

Windows. Operating system

Apache. Free and open-source cross-platform web server software

MySQL. Open-source relational database management system (RDBMS)

PHP (programming language) is an acronym for "PHP: Hypertext Preprocessor"

- a widely-used, open source scripting language

- scripts are executed on the server

- is free to download and use

Page 7: Web based system, documentation, user guide for organic

Operationalising Life Cycle Assessment for Pesticides

Page | 7

The following versions are currently installed in the server:

______________________ Versions used ______________________

WampServer Version 3.1.7 64bit

Apache 2.4.37 PHP 7.2.14

MariaDB 5.5.60

PHP 5.6.40 for CLI (Command-Line Interface)

WAMP will install as well the necessary Microsoft Visual C++ Redistributables.

Software architecture

The software architecture chosen for the web-based PestLCI Consensus model was a Model, View, Controller (MVC) architecture. The idea behind this structure is to maintain separated different sections of the code: the model, the view, and the controller. Some code (the model) is responsible for application data and logic, the view makes the user interface of the application, which displays the data. Finally, the controller handles users’ requests and render appropriate view with model data.

Figure 3. Diagram of interactions within the MVC pattern https://en.wikipedia.org/wiki/Model–view–controller

Page 8: Web based system, documentation, user guide for organic

Operationalising Life Cycle Assessment for Pesticides

Page | 8

Open-source PHP web framework

A PHP framework was used in order to have the basic structure of the MVC architecture. It helps building more stable and secured system. Laravel Framework was chosen because it is free and open source. It also contains a big community of developers with a lot of tutorials and documentation.

As we can read in the documentation (https://laravel.com/docs/5.4/installation), in order to install Laravel we need the following requirements in our server:

PHP >= 5.6.4

OpenSSL PHP Extension

PDO PHP Extension

Mbstring PHP Extension

Tokenizer PHP Extension

XML PHP Extension

These extensions are included in the WampServer software stack described before, so we do not have to download them again.

Laravel utilizes Composer (https://getcomposer.org/) to manage PHP dependencies, so before using laravel we should install it.

Code editor

For code editing, Visual Studio Code (https://code.visualstudio.com/) was chosen. It is a free, extensible and customizable editor optimized for building and debugging web applications. It is available for all operating systems. The version used was Visual Studio Code 1.37.0. Visual studio code comes with a built-in Git. Git is an open source program for tracking changes in text files, and is the core technology used by GitHub.

GitHub

A corresponding private repository with the source code of the web-tool is maintained by ‘DTU-QSA’ on GitHub). There are multiple collaboration possibilities:

- Download the code and install a local server - Modify the code in your local server. - Create a branch. A branch is a parallel version of a repository. It is contained within the

repository, but does not affect the primary or master branch allowing you to work freely without disrupting the "live" version.

- Collaborate and contribute in the “master branch” - Define branch protection rules

Page 9: Web based system, documentation, user guide for organic

Operationalising Life Cycle Assessment for Pesticides

Page | 9

Web server maintenance (Web hosting)

A virtual machine was purchased at IT services in DTU with the following characteristics:

VMName CPU Memory Disk Cost per year

Standard 2 4096MB 40Gb 612 DKK

The domain pestlciweb.man.dtu.dk was purchased as well via IT services in DTU. A digital certificate (via DigiCert) was installed in the server in order to have a HTTPS connection. In HTTPS, the communication protocol is encrypted using Secure Sockets Layer (SSL). The main reason to use HTTPS was security and protection of the privacy of the data while in transit.

Documentation for the directory structure can be found in https://laravel.com/docs/5.4/structure

2. User guide

2.1 Single Calculation

The website has been made with multiple design and implementation iterations. We have tried to construct an easy to use, self-explanatory website. The creation of an account is the first step for using web-based PestLCI Consensus model. Taking into account that the user might not be familiar with the model, we have tried to support the users in order to make their calculations without errors. A number of inputs are requested to run a single calculation in https://pestlciweb.man.dtu.dk/secondaryemissions. There are three categories of inputs, but only the first input category is mandatory, and guidelines to fill in those categories are provided. The rest of the user inputs has some default values given. The three user inputs categories are the following:

Mandatory user inputs (For running the model)

Optional user inputs (Default values given)

Default model parameters (User adjustable)

A description of pesticide emission consensus model user inputs requirements, together with the data format can be found in the ANNEX.

We have also a tool where the user can calculate only the initial (primary) distribution. This tool only contains the minimum user input required to calculate it. It can be found in (https://pestlciweb.man.dtu.dk/initialdistribution).

After the calculation, the results are saved in the database and can be checked in the user dashboard https://pestlciweb.man.dtu.dk/dashboard. The user has the option to delete the results or download them in a .csv file that can be open with all text editors (For example Notepad++). A comma (",") is used as a list separator in the CSV-file. Depending on the regional settings of the computer, the .csv file can be correctly displayed using Microsoft Excel. If not, the user has two options: 1) changing the regional settings of the computer, or 2) using the "Text to Columns" function in EXCEL.

Page 10: Web based system, documentation, user guide for organic

Operationalising Life Cycle Assessment for Pesticides

Page | 10

2.2 Batch Calculation

An additional functionality was created to calculate several scenarios with the same or different user inputs. The goal was to make an efficient mass processing of data. A different script was coded in order to make the batch calculation possible. The same number of user inputs as in the single calculation are required, but in this case there is no user interface to fill it. In the batch calculation, the user is filling a .csv file with the inputs desired. Each row represent one scenario. We have created a key file to help with this process. The user has the option to download the intermediate calculations and the final results or only the final results. The .csv file is uploaded and the script calculates several scenarios. It is important that the user inputs are in the correct format, otherwise the user will get an error and no results will be downloaded. In particular, a comma (",") is needed as a decimal separator. If the regional settings of the computer differ from this, it needs to be changed first, before the .csv file is saved (e.g. from EXCEL). The results of the batch calculations are not saved in the database, due to the great amount of data that our server will need to store.

The full updated instructions to run the batch calculation are in the following website: https://pestlciweb.man.dtu.dk/batchcalculation

Please notice there is a server limit capacity of around 1000 scenarios/rows per upload.

Template for Batch calculation

The most updated template can be found in (https://pestlciweb.man.dtu.dk/batchcalculation). The first row of the .csv document has some information of how to fill the document. Each row is one scenario where the user can fill the different inputs needed to run the model. It is very important to follow the instructions when filing the template. Only .csv files are accepted. The user can change the name file as long as it has .csv extension. A "," (comma) as a separator in the .csv file to upload should be used.

Id Keys documentation

An excel file has been created in order to help filling the template. The sheets contain the IDs that needs to be used in the template file.

The most updated Id Keys can be downloaded in (https://pestlciweb.man.dtu.dk/batchcalculation).

2.3 Add datasets to database

A functionality to support the addition of datasets to the climate and soil databases was done. The forms to add the data can be found in:

https://pestlciweb.man.dtu.dk/addclimate

https://pestlciweb.man.dtu.dk/addsoil

There is an option to keep the data private or share it with the web users when submitting your new data.

Page 11: Web based system, documentation, user guide for organic

Operationalising Life Cycle Assessment for Pesticides

Page | 11

3. References Laravel LLC , Documentation Laravel Framework 5.4.36, viewed 21 May 2018, <https://laravel.com/docs/5.4/>.

Model–View–Controller Wikipedia page, viewed 21 May 2018, <https://en.wikipedia.org/wiki/Model–view–controller/>

WampServer Version 3.1.7 64bit, viewed 21 May 2018, <http://www.wampserver.com/en/#download-wrapper/>.

ANNEX Primary and secondary primary input data (FLOAT is a single precision binary computer number format, i.e. between 6 and 9 significant digits)

Parameter Symbol Unit Type Remarks

Mandatory user inputs

Chemical abstract service registry number

Cas_number_selection - TEXT

Chemical common name Name - TEXT

Crop type selection Crop_type - TEXT

Fraction intercepted by leaf F_intercept_leaf kg/kg FLOAT

Application method Application_method - TEXT

Drift reduction? Drift_reduction - FLOAT No / 50% / 75% / 90%

Climate selection Climate_selection - TEXT Köppen-geiger climate classification

Month selection Month_selection - TEXT

Soli selection Soil_Selection - TEXT

Optional user inputs TEXT

Time assessed TimeAssessed Days FLOAT

Application rate Application_rate kg/ha FLOAT

No-spray buffer zone characteristics

Bufferzone present? Bz - TEXT No / ecosphere / technosphere

If Buffer zone present, Buffer zone width: Bz_width m FLOAT

If Buffer zone present, Pesticide fraction

deposited on leaves in buffer zone:

F_intercept_buffer - FLOAT

Field characteristics

Field width Field_width m FLOAT

Field length Field_length m FLOAT

Slope Slope % FLOAT

Drainage depth Depth_of_drainage_sy m FLOAT

Fraction drained Fraction_drained - FLOAT

Annual irrigation Irrigation mm

Tillage type Tillage_type TEXT

Default model parameters

Page 12: Web based system, documentation, user guide for organic

Operationalising Life Cycle Assessment for Pesticides

Page | 12

Parameter Symbol Unit Type Remarks

Soil material density Solid_material_densi kg/l FLOAT

Fraction macropores Fraction_macropores FLOAT

Reference soil moisture content Reference_soil_moist - FLOAT

Response factor biodegr rate Response_factor1 - FLOAT

Q-value Q_value_ - FLOAT

Air boundary layer Air_boundary_layer m FLOAT

D(lam) D_lam m FLOAT

A(p,ref) A_p_ref kg/m2 FLOAT