Coder Social home page Coder Social logo

ororatech / firefront Goto Github PK

View Code? Open in Web Editor NEW

This project forked from forefireapi/firefront

0.0 0.0 0.0 8.69 MB

ForeFire is an open-source code for wildland fire spread models

License: GNU General Public License v2.0

Shell 0.74% C++ 60.51% Python 17.69% C 1.93% TypeScript 0.01% Makefile 16.42% CMake 2.67% Dockerfile 0.03%

firefront's Introduction

ForeFire

logo

Refer to the Wiki for a more detailed guide on using ForeFire.

ForeFire is an open-source code for wildland fire spread models, developed and maintained by Université de Corse Pascal Paoli.

Access the demo simulator here.

demo

It has been designed and runs on Unix systems. Three modules can be built with the source code.

The main binaries are

  • An interpreter (executable)
  • A shared library (with C/C++/Java and Fortran bindings)

1. Requirements

The requirements and ForeFire can be installed by running install-forefire.sh (Ubuntu or Debian distributions)

cd forefire

sudo sh install-forefire.sh

The program will be built in: ./bin/forefire

OR run the commands:

apt-get update

apt install build-essential -y

apt install libnetcdf-dev libnetcdf-cxx-legacy-dev -y

apt install cmake -y

To install

2. Build

2.1 Cmake

To build with cmake run the script

sh cmake-build.sh

To make the program executable from eveywhere (during the session) Add the bin folder to path

export PATH=$PATH:`pwd`/bin

If you want to change it permanently, paste

export PATH="</path/to/file>:$PATH"

at the end of your ~/.bashrc file. The file can be edited with

nano ~/.bashrc

for example

export PATH="/mnt/c/gitrepos/forefire/bin:$PATH"

2.2 Scons and Other build systems

More information on other build systems are available here

3. Running an example

An example for the region of aullene in south France is provided. The example contains 3 files

  • fuels.ff
  • aullene.ff
  • landscape.nc:

Run the example with

cd firefront/examples/aullene/

../../bin/forefire -i aullene.ff

The simulation result will be outputed in JSON format

4. Running with python

Installing requirements

cd py3_tools
pip install -r requirements.txt

You can use the script coord_to_ff.py to run the simulation in a default location

python coord_to_ff.py

For running in a chosen location, the script accepts latitude and longitude in epsg:4326 projection as inputs. It reprojects the coordinates into epsg:32632 projection, used in aullene's landscape.

python coord_to_ff.py --lat 41.6 --lon 9.1

The GeoJSON of geometry type Polygon will be saved in the /examples/aullene folder

4. Building python Lib

The /swig folder contains and Sconstruct file for python bindings.

Requires numpy (and numpy.i), swig, and matplotlib for testing.

5. Building with Docker

A sample Dockerfile can allow to build a Docker image with

docker build . -t forefire

To run this image and interactively acces the continer use

docker run -it forefire bash

firefront's People

Contributors

antonio-leblanc avatar filippi avatar forefire avatar ludobegins avatar 3dfirelab avatar allairef avatar baggiocolpir avatar jdurand974 avatar damiengrandi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.