Skip to content

Typhoon Impact forecasting model This tool was developed as trigger mechanism for the typhoon Early action protocol of the philipiness resdcross FbF project. The model will predict the potential damage of a typhoon before landfall, the prediction will be percentage of completely damaged houses per manuciplaity.

License

Notifications You must be signed in to change notification settings

rodekruis/Typhoon-Impact-based-forecasting-model

Repository files navigation

Table of contents

Table of Contents
  1. Typhoon Impact forecasting model
  2. Installation
  3. Running pipeline Without Docker
  4. Running pipeline With Docker
  5. Tutorial on Buidling Model
  6. Acknowledgments

Typhoon Impact forecasting model

This tool was developed as a trigger mechanism for the typhoon Early action protocol of the Philippines Red Cross FbF project. The model will predict the potential damage of a typhoon before landfall, and the prediction will be percentage of completely damaged houses per municipality. The tool is available under the GPL license

To run the operational pipeline, you need access to an Data.zip, and credentiials for 510 Datalake and FTP server. If you or your organization is interested in using the pipeline, please contact 510 Global to obtain the credentials. update the file secrets_template based on the credentials and save it assecrets.

Installation

  1. Clone the repo
  2. Change /IBF-Typhoon-model/src/settings.py.template to settings.py and fill in the necessary username/passwords.
  3. Download data.zip from sharepoint and unzip in under /IBF-Typhoon-model
  4. Install Docker-compose follow this link
  5. Start Docker and make sure WSL 2 based engine is enabled in docker. check “Use the WSL 2 based engine” under Settings--> “General” and did “Apply & Restart”

Running With Docker

You will need to have docker and docker-compose installed. You need to create an environment variable called TYPHOONMODEL_OUTPUT that contains the path to where you would like the model run output data to go.

Build Container

To build and run the image, ensure you are in the top-level directory and execute:

docker-compose up --build


When you are finished, runing run the following command to stop containers and remove containers, networks, volumes, and images created by 'up' .

docker-compose down

you can also define how you want to run the model in docker-compose.yml file by passing options to the command run-typhoon-model [OPTIONS]

Options:
  --path TEXT             main directory defult 
  --remote_directory TEXT                  remote directory 
  --typhoonname TEXT               name for active typhoon
```
if you don define an option the defult run will be if there is an active typhoon in the PAR polygon the model will run for the active typhoons,
unless you specify a remote directory and typhoon name under options. 

Tutorial

Here you can find a guideline, a Jupyter Notebook Tutorial. Folow the step in this page to understand the workflow used to build the model

Run Tutorial

This will be running inside the docker container

Excute:

docker run -it -p 8888:8888 rodekruis510/typhoonmodel

Pressing Ctrl-C twice shuts down the notebook server

yyou can stop the not

Acknowledgments

Running Without Docker

The main code for the pipeline is IBF-Typhoon-model/src/, which can in principle be run locally, however we do recommend using Docker if you can. To run locally:

  1. Enter the IBF-Typhoon-model directory and install the required Python packages, as well as the typhoonmodel package:
    pip install -r requirements.pip
    pip install .
    
  2. Install all packages listed at the top of the R script run_model_v2.R.
  3. Ensure that all the parameters from the secrets file have been exported as environment variables
  4. Execute:
    run-typhoon-model [OPTIONS]
    
    Options:
      --path TEXT             main directory defult 
      --remote_directory TEXT                  remote directory 
      --typhoonname TEXT               name for active typhoon
    
    When there is an active typhoon in the PAR polygon the model will run for the active typhoons, unless you specify a remote directory and typhoon name.

About

Typhoon Impact forecasting model This tool was developed as trigger mechanism for the typhoon Early action protocol of the philipiness resdcross FbF project. The model will predict the potential damage of a typhoon before landfall, the prediction will be percentage of completely damaged houses per manuciplaity.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •