src Documentation Release Pierre Humblot



Similar documents
Mastering Advanced GeoNetwork

OpenGeo Suite for Linux Release 3.0

Written by Wirabumi Software Sunday, 30 December :27 - Last Updated Thursday, 03 January :52

Repris de : Version Debian (de base)

Configuring an Alternative Database for SAS Web Infrastructure Platform Services

Net/FSE Installation Guide v1.0.1, 1/21/2008

How to Configure a BYOD Environment with the Unified AP in Standalone Mode

PostGIS Integration Tips

AuShadha Documentation

How to move an IDENTIKEY Authentication Server with embedded PostgreSQL DB to a new machine with new IP address?

CloudBerry Dedup Server

Personnalisez votre intérieur avec les revêtements imprimés ALYOS design

Saruman Documentation

SQL Server Introduction to SQL Server SQL Server 2005 basic tools. SQL Server Configuration Manager. SQL Server services management

Setting up PostgreSQL

Open Object Installation Manuals

IMPLEMENTATION OF CIPA - PUDUCHERRY UT SERVER MANAGEMENT. Client/Server Installation Notes - Prepared by NIC, Puducherry UT.

Installing OCFA on Ubuntu. Practical installation procedures, Installing The Open Computer Forensics Architecture on Ubuntu

Lab 2: PostgreSQL Tutorial II: Command Line

for QSS/OASIS Presented by Bill Genske Session 135

Mise en pratique : installation d'openvpn sur OpenWRT

Installing Dspace 1.8 on Ubuntu 12.04

Extending Remote Desktop for Large Installations. Distributed Package Installs

POB-JAVA Documentation

LifeKeeper for Linux PostgreSQL Recovery Kit. Technical Documentation

LedgerSMB on Mac OS X An Installation Guide

Amira License Manager

Configuration des pré-requis Linux. Référence : Version N : 1 Créé le : 9 Janvier Créé par : Thibault Cuisy Téléphone :

FEI Avizo License Management

Voici votre rapport sur votre service OpenERP en ligne.

2. Boot using the Debian Net Install cd and when prompted to continue type "linux26", this will load the 2.6 kernel

WINGS WEB SERVICE MODULE

SMDR (Phone Switch Call Accounting) Jason Healy, Director of Networks and Systems

depl Documentation Release depl contributors

Installing and Configuring PostgreSQL 8 on WinXP

dbx SN Azure Setup Guide

Installing TeamCall Server on Mac OS X

PRMS.

128 CERT Exercises Toolset Document for students

SQuORE 2011-C Installation and Administration Guide

netflow-indexer Documentation

Introduction au BIM. ESEB Seyssinet-Pariset Economie de la construction contact@eseb.fr

GIGABIT GATEWAY TECHNOTE

CN=Monitor Installation and Configuration v2.0

Creating a DUO MFA Service in AWS

Partek Flow Installation Guide

Liste d'adresses URL

José Carlos Ramalho

Interfaces de programmation pour les composants de la solution LiveCycle ES (juillet 2008)

IUCLID 5 Guidance and support. Installation Guide Distributed Version. Linux - Apache Tomcat - PostgreSQL

CipherMail Gateway Installation Guide

Memo bconsole. Memo bconsole

AVALANCHE MC 5.3 AND DATABASE MANAGEMENT SYSTEMS

Getting Started with Postgres Plus (R) on Windows (R) A Postgres Evaluation Quick Tutorial From EnterpriseDB

JupyterHub Documentation

N1 Grid Service Provisioning System 5.0 User s Guide for the Linux Plug-In

TP1 : Correction. Rappels : Stream, Thread et Socket TCP

Open-Xchange Server Backup Whitepaper

Application Note VAST Network settings

PostgreSQL as an integrated data analysis platform

Dragonframe License Manager User Guide Version 1.2.2

1 Recommended Readings. 2 Resources Required. 3 Compiling and Running on Linux

SunFDDI 6.0 on the Sun Enterprise Server

1 Introduction FrontBase is a high performance, scalable, SQL 92 compliant relational database server created in the for universal deployment.

Step by step guide for installing highly available System Centre 2012 Virtual Machine Manager Management server:

MuL SDN Controller HOWTO for pre-packaged VM

Installing SQL-Ledger on Windows

Tutorial. Reference for more thorough Mininet walkthrough if desired

Upgrade Guide BES12. Version 12.1

A Brief Introduction to MySQL

Building a Python Plugin

for Networks Installation Guide for the application on the server July 2014 (GUIDE 2) Lucid Rapid Version 6.05-N and later

for Networks Installation Guide for the application on the server August 2014 (GUIDE 2) Lucid Exact Version 1.7-N and later

CPE111 COMPUTER EXPLORATION

USER GUIDE. Lightweight Directory Access Protocol (LDAP) Schoolwires Centricity

UPSMON PRO Linux --- User Manual

How to Set Up pgagent for Postgres Plus. A Postgres Evaluation Quick Tutorial From EnterpriseDB

Web Services for Management Perl Library VMware ESX Server 3.5, VMware ESX Server 3i version 3.5, and VMware VirtualCenter 2.5

Archived Content. Contenu archivé

Install BA Server with Your Own BA Repository

LICENSE4J LICENSE ACTIVATION AND VALIDATION PROXY SERVER USER GUIDE

Installation Guide. Copyright (c) 2015 The OpenNMS Group, Inc. OpenNMS SNAPSHOT Last updated :19:20 EDT

WebIOPi. Installation Walk-through Macros

Les fragments. Programmation Mobile Android Master CCI. Une application avec deux fragments. Premier layout : le formulaire

Benchmarking and monitoring tools

14. CUCM 8 - free sftp solution for backup on ubuntu server

Memopol Documentation

Tableau Spark SQL Setup Instructions

Accessing PostgreSQL through JDBC via a Java SSL tunnel

Archived Content. Contenu archivé

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu

Business Interaction Server. Configuration Guide Rev A

Transcription:

src Documentation Release Pierre Humblot June 02, 2014

Contents 1 src Package 3 1.1 src Package............................................... 3 1.2 Subpackages............................................... 3 2 Indices and tables 7 Python Module Index 9 i

ii

src Documentation, Release Contents: Contents 1

src Documentation, Release 2 Contents

CHAPTER 1 src Package 1.1 src Package The package PYSTICS. 1.2 Subpackages 1.2.1 create_input_files Package create_input_files Package The pacakge to generate stics input files. create_climat Module The module to create climate files and write them to the database. TODO : CONNECTION TO THE INTERNET AND CLIMATE ONLINE DATABASE create_itk Module The module to create itk files from the database. create_sol Module The module to create sol files from the database. create_tec Module The module to create tec files from the database. 3

src Documentation, Release 1.2.2 psql Package psql Package The package which deals with the database. psql Module The module to connect to psql database. A priori nous allons utiliser psycopg2 pour gérer postgresql téléchargement http://www.stickpeople.com/projects/python/win-psycopg/ si il ne trouve pas python dans le registre, il faut remplacer le.exe en.zip, dézipper et copier le dossier dans Lib/sitepackages. Aide configuration postgresql : https://help.ubuntu.com/10.04/serverguide/postgresql.html $ sudo apt-get install postgresql listen_addresses = localhost (dans /etc/postgresql/9.1/main/postgresql.conf) $ sudo -u postgres psql postgres (connection postgres sb as postgres user) # ALTER USER postgres with encrypted password your_password ; (set new password, #q to quit) $sudo -u postgres psql -U postgres -d postgres -c alter user postgres with password password ; (idem ci dessus mais en shell) local all postgres md5 (dans /etc/postgresql/9.1/main/pg_hba.conf, mettre mda5 à la place de peer) $ sudo /etc/init.d/postgresql-8.4 restart (restart psql server) ensuite creation de la database : $ sudo psql -U postgres -d postgres # CREATE DATABASE pystics OU, avec le terminal $ cd /usr/share/postgresql/9.1 $ createdb -h localhost -p 5432 -U postgres pystics Ensuite, charger la base de donnees de base $ cd /home/pierre/dropbox/travail/these/artix_python/pystics/database/ $ sudo psql -U postgres -d pystics -a -f template_db.sql class src.psql.psql.connectiondatabase(name_db, user, password, host, port) Mise en place et interfaçage d une base de données psql Constuctor. Creation of the connection and of the cursor Parameters name_db (str) The name of the database to connect to usr (str) user name password (str) Password host (str) The host (ex : localhost) port (int) The port (ex 5430) execute_query(query) Execution of the query, with error detection 4 Chapter 1. src Package

src Documentation, Release Parameters query (str) the sql query to execute query(query) Execution of the query and return result. Parameters query (str) the sql query to execute Returns tup A tuple of tuple result_query() Return the result of the previous query Returns tup A tuple of tuple 1.2.3 simulation Package simulation Package The main package where simulations are defined and launched. run_loop Module The module which performs stics simulations for different nitrogen/water input values. class src.simulation.run_loop.runloop(nitrogen, water, finit, nomsol, fstation, fclim1, fclim2, fplt, ftec, flai, begindate, enddate, culturean) The class to perform the various simulations according to various N and W values Constructor. Parameters nitrogen (list) nitrogen values in a list of integers (in kg/ha) water (list) irrigation percentage values (from 0 to 100%) finit (str) init file nomsol (str) soil name (usually a number) fstation (str) station climate file fclim1 (str) climate file 1 fclim2 (str) climate file 2 fplt (str) plant file ftec (str) tec file flai (str) lai file begindate (str) date of simulation beginning enddate (str) date of simulation ending culturean (int) yearly crop or not (1 or 0) all_simulations() High level functions which performs all required simulations. automatic_irrigation_simulation() The first simulation should determine the amount of water needed for optimal yields 1.2. Subpackages 5

src Documentation, Release save_results() Reads output files and save the results in the database. single_simulation(n, W) Performs a single stics simulation for N and W fixed. Parameters N (int) Nitrogen input (in kg/ha) W (float) Irrigation as a percentage of irrigation optimal amount (in ) set_simulation Module Main module where simulations to performed are defined. 1.2.4 stics Package stics Package The package which prepare stics input files, run stics simulations and get stics output. get_stics_output Module The module which reads stics output files and write useful results to the database. load_stics_input Module The module which loads in the stics simulation workspace all the necessary files to perform the current simulation run_stics Module The module which run the stics program (stics.exe). class src.stics.run_stics.runstics(path_stics) The class for executing the STICS.exe Constructor. Parameters path_stics (str) path to stics directory run_stics() Call the stics executable file through the shell command... note:: Test if stics execution failed 1.2.5 xml Package xml Package The module for xml parsing. process_xml Module The module which deals with xml files. 6 Chapter 1. src Package

CHAPTER 2 Indices and tables genindex modindex search 7

src Documentation, Release 8 Chapter 2. Indices and tables

Python Module Index c create_climat, 3 create_itk, 3 create_sol, 3 create_tec, 3 g get_stics_output, 6 l load_stics_input, 6 p process_xml, 6 psql, 4 r run_loop, 5 run_stics, 6 s set_simulation, 6 src. init, 3 src.create_input_files, 3 src.create_input_files.create_climat, 3 src.create_input_files.create_itk, 3 src.create_input_files.create_sol, 3 src.create_input_files.create_tec, 3 src.psql, 4 src.psql.psql, 4 src.simulation, 5 src.simulation.run_loop, 5 src.simulation.set_simulation, 6 src.stics, 6 src.stics.get_stics_output, 6 src.stics.load_stics_input, 6 src.stics.run_stics, 6 src.xml, 6 src.xml.process_xml, 6 9