This project aims to be a handler for input creation and running of multiple RICEWQ simulations.

Overview

What is autoRICEWQ?

This project aims to be a handler for input creation and running of multiple RICEWQ simulations.

What is RICEWQ?

From the description in its website:

RICEWQ 1.92

Rice production presents a unique problem with respect to agrochemical runoff because of the high seasonal rainfall, water management, and proximity of cropland to surface water bodies. Existing pesticide transport models are not configured to simulate the flooding conditions, overflow, and controlled releases of water that are typical under rice >production. RICEWQ was developed to simulate water and chemical mass balance associated with these unique governing processes. Water mass balance takes into account precipitation, evaporation, seepage, overflow, irrigation, and drainage. Pesticide mass balance can accommodate dilution, advection, volatilization, partitioning between water/sediment, decay in water and sediment, burial in sediment, and re-suspension from sediment. The model can simulate up to five chemicals/metabolites.

MODEL REGISTRATION

RIVWQ is an aquatic fate and transport model for evaluating flowing water scenarios. Although our models are distributed as freeware, donations are encouraged to cover costs for model development, distribution, and technical support.

Please contact [email protected] to register to receive a download of this model.

What is the problem?

The problem is the input data for RICEWQ 1.92 lies on an input text file with an absolute format dependence. Tailoring by hand the correct input data to run a simple simulation is very time consuming and tedious. Thus, this project aims to offer a very straight forward way to (1) parse input from Excel files, (2) run the RICEWQ 1.92 model and (3) parse the output back into Excel. This facilitates the process of running hundreds or even thousands of simulations with ease and helps to check the results in a glimpse.

Installation

By git

First, you will need to install git, if you don't have it already.

Next, clone this repository by opening a terminal and typing the following commands:

$ cd $HOME  # or any other development directory you prefer
$ git clone https://github.com/backmind/autoRICEWQ.git
$ cd autoRICEWQ

By hand

If you do not want to install git, you can instead download main.zip, unzip it, rename the resulting directory to autoRICEWQ and move it to your development directory.

Either

If you are familiar with Python and you know how to install Python libraries, go ahead and install the libraries listed in requirements.txt and jump to the Copy RICEWQ engine section. If you need detailed instructions, please read on.

Python

Of course, you obviously need Python. Python 3 is already preinstalled on many systems nowadays. You can check which version you have by typing the following command (you may need to replace python3 with python):

$ python3 --version  # for Python 3

Any Python 3 version should be fine, preferably 3.5 or above. If you don't have Python 3, I recommend installing it. To do so, you have several options: on Windows or MacOSX, you can just download it from python.org. On MacOSX, you can alternatively use MacPorts or Homebrew.

On Linux, unless you know what you are doing, you should use your system's packaging system. For example, on Debian or Ubuntu, type:

$ sudo apt-get update
$ sudo apt-get install python3 python3-pip

Another option is to download and install Anaconda. This is a package that includes both Python and many scientific libraries. You should prefer the Python 3 version.

Required Libraries

These are the commands you need to type in a terminal if you want to use pip to install the required libraries.

First you need to make sure you have the latest version of pip installed:

$ python3 -m pip install --user --upgrade pip

The --user option will install the latest version of pip only for the current user. If you prefer to install it system wide (i.e. for all users), you must have administrator rights (e.g. use sudo python3 instead of python3 on Linux), and you should remove the --user option. The same is true of the command below that uses the --user option.

Next, use pip to install the required python packages. If you are not using virtualenv, you should add the --user option (alternatively you could install the libraries system-wide, but this will probably require administrator rights, e.g. using sudo pip3 instead of pip3 on Linux).

$ python3 -m pip install --upgrade -r requirements.txt

Copy RICEWQ engine

As this project is a handler for input creation and running of multiple RICEWQ 1.92 simulations, thus you need RICEWQ 1.92 binaries. Contact [email protected] to receive a download. RICEWQ 1.92 binaries are freeware but as waterborne-env have no public direct download, this project autoRICEWQ is not sharing it.

Once you have the binaries you should copy RICE192.EXE inside of the folder \autoRICEWQ\bin\

Great! You're all set!

Utilisation

It is very recommended to be familiarized with RICEWQ model or to check the manual that comes with it to understand the meaning of the multiple inputs required.

To run autoRICEWQ you need to have the input files ready and the regarding meteorological data. Then, you can run the simulations just by executing RICE192.bat on Windows or the next command line at \autoRICEWQ\ folder for any system:

$ python3 RICE192.py arg

where arg can be y or n to halt on errors (y) or keep computing the remaining simulations (n) if an exception rises.

Input Files setting up

In order to run simulations, you need to create the input files you want to run. You can find examples of those files inside \autoRICEWQ\input\. autoRICEWQ needs the next three files as input:

  1. inp_sim.xlsx: data related to the dates of the simulation, the area of the crops, etc.
  2. inp_hidro.xlsx: data regarding the water balance of the crops
  3. inp_chem.xlsx: data of the chemicals, metabolites, and its characteristics

Each one of these files can have multiple sheets, and there will be a number of simulations equal to the cartesian multiplication those. Then, if you have four inp_sim sheets, two inp_hidro sheets and seven chemicals sheets you will end running 4×2×7=56 simulations. It is recomended to have a wise selection of input files to just run the simulations you want due the intrisic combinatory with sheets autoRICEWQ has.

Sheetnames matter, only the sheets with a name starting with "+", wherever the file, will be simulated.

Meteorological data

Any RICEWQ simulation needs meteorological data. This data should exist for the range of dates the simulation is running, and it comprehends Date, Mean temperature (ºC), Precipitation (mm) and evapotranspiration. Meteorological data for RICEWQ is very format dependent, i.e., very tedious and time consuming to set the correct meteo file. autoRICEWQ also parses meteorological data from Excel files into RICEWQ formated file automatically, saving your time and eyeballs pain. You can find examples of this excel-files-to-parse at the folder \autoRICEWQ\meteo_data\.

All the filenames in \meteo_data\ are in de form CODE_XXX, where CODE identifies a specific meteo data. This CODE is attached to a simulation through inp_sim D6 cell.

Output files

autoRICEWQ automatically handles the output from RICEWQ and parses it into Excel. Then, a new folder with the results is created inside \autoRICEWQ\results\, the name of the folders is in the form:

"inp_sim sheetname" [("inp_sim custom_label")] + _ + "inp_hidro sheetname" + _ + "inp_chem sheetname"

where the optional part of ("inp_sim custom_label") will be there if and only if cell D2 from inp_sim, which refers to a custom label for de simulation, is different of the current inp_sim sheetname.

Errors and exceptions

In the devious case of an error during the execution occurs, output files will be moved to the same folder indicated in Output files but with a preceding "ERROR-" word in the folder name. Inside the folder will be a file "run.log" with the info of the error. Those errors are registered nevertheless they are coming from autoRICEWQ or from RICEWQ, in order to accurately help to fix them.

Disclaimer

The contributors of autoRICEWQ are not part of the team nor involved with RICEWQ or Waterborne Environmental, Inc. The autor of autoRICEWQ wants to thank Waterborne Environmental, Inc. for the development of the RICEWQ software and model, which is really useful.

You might also like...
code and data for paper "GIANT: Scalable Creation of a Web-scale Ontology"

GIANT Code and data for paper "GIANT: Scalable Creation of a Web-scale Ontology" https://arxiv.org/pdf/2004.02118.pdf Please cite our paper if this pr

Reference implementation of code generation projects from Facebook AI Research. General toolkit to apply machine learning to code, from dataset creation to model training and evaluation. Comes with pretrained models.

This repository is a toolkit to do machine learning for programming languages. It implements tokenization, dataset preprocessing, model training and m

Source code and Dataset creation for the paper "Neural Symbolic Regression That Scales"

NeuralSymbolicRegressionThatScales Pytorch implementation and pretrained models for the paper "Neural Symbolic Regression That Scales", presented at I

Deep Learning Datasets Maker is a QGIS plugin to make datasets creation easier for raster and vector data.
Deep Learning Datasets Maker is a QGIS plugin to make datasets creation easier for raster and vector data.

Deep Learning Dataset Maker Deep Learning Datasets Maker is a QGIS plugin to make datasets creation easier for raster and vector data. How to use Down

Machine Learning From Scratch. Bare bones NumPy implementations of machine learning models and algorithms with a focus on accessibility. Aims to cover everything from linear regression to deep learning.
Machine Learning From Scratch. Bare bones NumPy implementations of machine learning models and algorithms with a focus on accessibility. Aims to cover everything from linear regression to deep learning.

Machine Learning From Scratch About Python implementations of some of the fundamental Machine Learning models and algorithms from scratch. The purpose

Scripts of Machine Learning Algorithms from Scratch. Implementations of machine learning models and algorithms using nothing but NumPy with a focus on accessibility. Aims to cover everything from basic to advance.
Scripts of Machine Learning Algorithms from Scratch. Implementations of machine learning models and algorithms using nothing but NumPy with a focus on accessibility. Aims to cover everything from basic to advance.

Algo-ScriptML Python implementations of some of the fundamental Machine Learning models and algorithms from scratch. The goal of this project is not t

The deployment framework aims to provide a simple, lightweight, fast integrated, pipelined deployment framework that ensures reliability, high concurrency and scalability of services.

savior是一个能够进行快速集成算法模块并支持高性能部署的轻量开发框架。能够帮助将团队进行快速想法验证(PoC),避免重复的去github上找模型然后复现模型;能够帮助团队将功能进行流程拆解,很方便的提高分布式执行效率;能够有效减少代码冗余,减少不必要负担。

torchlm is aims to build a high level pipeline for face landmarks detection, it supports training, evaluating, exporting, inference(Python/C++) and 100+ data augmentations
torchlm is aims to build a high level pipeline for face landmarks detection, it supports training, evaluating, exporting, inference(Python/C++) and 100+ data augmentations

💎A high level pipeline for face landmarks detection, supports training, evaluating, exporting, inference and 100+ data augmentations, compatible with torchvision and albumentations, can easily install with pip.

LaneDet is an open source lane detection toolbox based on PyTorch that aims to pull together a wide variety of state-of-the-art lane detection models
LaneDet is an open source lane detection toolbox based on PyTorch that aims to pull together a wide variety of state-of-the-art lane detection models

LaneDet is an open source lane detection toolbox based on PyTorch that aims to pull together a wide variety of state-of-the-art lane detection models. Developers can reproduce these SOTA methods and build their own methods.

Comments
  • Bump numpy from 1.21.3 to 1.22.0

    Bump numpy from 1.21.3 to 1.22.0

    Bumps numpy from 1.21.3 to 1.22.0.

    Release notes

    Sourced from numpy's releases.

    v1.22.0

    NumPy 1.22.0 Release Notes

    NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. There have been many improvements, highlights are:

    • Annotations of the main namespace are essentially complete. Upstream is a moving target, so there will likely be further improvements, but the major work is done. This is probably the most user visible enhancement in this release.
    • A preliminary version of the proposed Array-API is provided. This is a step in creating a standard collection of functions that can be used across application such as CuPy and JAX.
    • NumPy now has a DLPack backend. DLPack provides a common interchange format for array (tensor) data.
    • New methods for quantile, percentile, and related functions. The new methods provide a complete set of the methods commonly found in the literature.
    • A new configurable allocator for use by downstream projects.

    These are in addition to the ongoing work to provide SIMD support for commonly used functions, improvements to F2PY, and better documentation.

    The Python versions supported in this release are 3.8-3.10, Python 3.7 has been dropped. Note that 32 bit wheels are only provided for Python 3.8 and 3.9 on Windows, all other wheels are 64 bits on account of Ubuntu, Fedora, and other Linux distributions dropping 32 bit support. All 64 bit wheels are also linked with 64 bit integer OpenBLAS, which should fix the occasional problems encountered by folks using truly huge arrays.

    Expired deprecations

    Deprecated numeric style dtype strings have been removed

    Using the strings "Bytes0", "Datetime64", "Str0", "Uint32", and "Uint64" as a dtype will now raise a TypeError.

    (gh-19539)

    Expired deprecations for loads, ndfromtxt, and mafromtxt in npyio

    numpy.loads was deprecated in v1.15, with the recommendation that users use pickle.loads instead. ndfromtxt and mafromtxt were both deprecated in v1.17 - users should use numpy.genfromtxt instead with the appropriate value for the usemask parameter.

    (gh-19615)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v1.0.2)
Owner
Yass Fuentes
I have great passion for translating everyday activities into insights to understand how things work and what can be done about them.
Yass Fuentes
Urban mobility simulations with Python3, RLlib (Deep Reinforcement Learning) and Mesa (Agent-based modeling)

Deep Reinforcement Learning for Smart Cities Documentation RLlib: https://docs.ray.io/en/master/rllib.html Mesa: https://mesa.readthedocs.io/en/stable

null 1 May 15, 2022
This project is based on RIFE and aims to make RIFE more practical for users by adding various features and design new models

This project is based on RIFE and aims to make RIFE more practical for users by adding various features and design new models. Because improving the PSNR index is not compatible with subjective effects, we hope this part of work and our academic research are independent of each other.

hzwer 190 Jan 8, 2023
My published benchmark for a Kaggle Simulations Competition

Lux AI Working Title Bot Please refer to the Kaggle notebook for the comment section. The comment section contains my explanation on my code structure

Tong Hui Kang 29 Aug 22, 2022
TUPÃ was developed to analyze electric field properties in molecular simulations

TUPÃ: Electric field analyses for molecular simulations What is TUPÃ? TUPÃ (pronounced as tu-pan) is a python algorithm that employs MDAnalysis engine

Marcelo D. Polêto 10 Jul 17, 2022
A project which aims to protect your privacy using inexpensive hardware and easily modifiable software

Protecting your privacy using an ESP32, an IR sensor and a python script This project, which I personally call the "never-gonna-catch-me-in-the-act-ev

null 8 Oct 10, 2022
This project aims to explore the deployment of Swin-Transformer based on TensorRT, including the test results of FP16 and INT8.

Swin Transformer This project aims to explore the deployment of SwinTransformer based on TensorRT, including the test results of FP16 and INT8. Introd

maggiez 87 Dec 21, 2022
This project aims to segment 4 common retinal lesions from Fundus Images.

This project aims to segment 4 common retinal lesions from Fundus Images.

Husam Nujaim 1 Oct 10, 2021
Official PyTorch implementation of MX-Font (Multiple Heads are Better than One: Few-shot Font Generation with Multiple Localized Experts)

Introduction Pytorch implementation of Multiple Heads are Better than One: Few-shot Font Generation with Multiple Localized Expert. | paper Song Park1

Clova AI Research 97 Dec 23, 2022
Python project to take sound as input and output as RGB + Brightness values suitable for DMX

sound-to-light Python project to take sound as input and output as RGB + Brightness values suitable for DMX Current goals: Get one pixel working: Vary

Bobby Cox 1 Nov 17, 2021
Project to create an open-source 6 DoF input device

6DInputs A Project to create open-source 3D printed 6 DoF input devices Note the plural ('6DInputs' and 'devices') in the headings. We would like seve

RepRap Ltd 47 Jul 28, 2022