From 2a54d785c69993b631d90f153eb5faa0a9161318 Mon Sep 17 00:00:00 2001 From: santiagoC Date: Fri, 21 Jun 2024 10:56:47 -0500 Subject: [PATCH] readme --- readme.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..2f651dd --- /dev/null +++ b/readme.md @@ -0,0 +1,66 @@ +# WRF Postprocessing Module + +![GitHub release (latest by date)](https://img.shields.io/github/v/release/CIAT-DAPA/agrilac_wrf_postprocessing) ![](https://img.shields.io/github/v/tag/CIAT-DAPA/agrilac_wrf_postprocessing) + +This repository contains a Python package designed for postprocessing outputs from the WRF model within the context of the Agrilac project. + +## Features + +- Extract variables from WRF model outputs in NetCDF format. +- Convert extracted variables into daily raster images. +- Generate PNG images from the transformed raster data for visualization and analysis. + +## Prerequisites + +- Python >=3.9 +- Dependencies listed in requirements.txt + +## Configure DEV Enviroment + +You should create a env to run the code and install the requeriments. Run the following commands in the prompt + +```bash +pip install virtualenv +venv env +pip install -r requirements.txt +``` + +## Installation + +To use this package as a library in your Python projects, install it via pip: + +```bash +pip install git+https://github.com/CIAT-DAPA/agrilac_wrf_postprocessing +``` + +## Configuration + +Configure input and output paths before running the script: + +- -i, --inputs: Path to directory containing WRF model output NetCDF files. Within the path you should have 3 folders **wrf/** where the NedCDF files will be, **shapefile/** where the shapefiles will be to divide the map and **data/** where the logo will be and the folder **ranges/** with the color ranges of each variable. + +- -o, --outputs: Path where processed raster and PNG files will be saved. + +> [!NOTE] +> You can copy the content of the **data** folder found in this repository into the input path that you will pass as a parameter to follow the folder format and add the **wrf** folder with the NedCDF files. + +## Usage + +Run the script wrf_postprocessing with the following parameters: + +```bash +wrf_postprocessing -i "/path/to/input/" -o "/path/to/output/" +``` + +## Parameters + +-i, --inputs: Path to directory containing WRF model output NetCDF files. +-o, --outputs: Path where processed raster and PNG files will be saved. + +## Example + +```bash +python wrf_postprocessing.py -i "/home/user/data/WRF_outputs" -o "/home/user/data/processed_outputs" +``` + +This command processes NetCDF files from /home/user/data/WRF_outputs, converts them into daily raster images, and saves the resulting PNG files in /home/user/data/processed_outputs.