Skip to main content

FastFuels-Python

Python client library for the FastFuels API

Install

You can install FastFuels through the Python Package Index.

pip install fastfuels

Quickstart

Connecting to a .fio resource

A .fio resource is a directory-in-file object where important metadata and fuel arrays are stored. Start by importing the FastFuels module and open a .fio resource. If you have one locally, specify the path and file name.

>>> import fastfuels
>>> fio = fastfuels.open('./demo.fio', ftype='local')

If you have the appropriate credentials, you can connect to the remote resource stored in AWS S3.

>>> fio = fastfuels.open('./ca.fio', ftype='s3', username='username', password='password')

Explore the metadata

Let's take a look at some metadata. You can get the extent of the data in geographic coordinates (longitude and latitude) or in projected coordinates by changing the mode argument.

>>> print(fio.get_extent(mode='geographic'))
(-120.73665218037868, 38.93933418427242, -120.6511979123941, 38.90135366961076)
>>> print(fio.get_extent(mode='projected'))
(-2100315.0, 2043015.0, -2094315.0, 2037015.0)

And the projection system is stored in the proj attribute.

>>> print(fio.proj)

You can also view metadata for resolution and units

>>> print(fio.res)
(1,1,1)
>>> print(fio.units)
'meters'

Spatial queries

You can perform spatial queries by specifying geographic coordinates in decimal degrees and a radius in meters. The radius parameter defines the size of the bounding square in which fuels are queried.

# this command will return a square kilometer of fuels (radius=500 meters)
roi = fio.query(-122.191, 41.208, 500)

Viewing fuels in 3D

Fuel parameter arrays can be viewed interactively in 3D. To see the available parameters run

print(roi.get_properties())

Then specify one of the properties in the view() method on the roi object.

roi.view('sav')

FastFuels SAV

Writing fire model input files

With the roi object, you can write input files for various fire models. Here, you may also decrease the resolution to save computation.

roi.write('./outputs', model='quicfire', res_xyz=[2,2,1])

Metadata

Release files for fastfuels 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastfuels 1.0.7
File Size Uploaded
fastfuels-1.0.7.tar.gz 26.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastfuels 1.0.7
File Interpreter ABI Platform
fastfuels-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 54.2 kB

Release files / fastfuels-1.0.7.tar.gz

Download URL fastfuels-1.0.7.tar.gz
Size 26.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4e89a4b7d80ef8b163b77733fa171d96bc1592ad55d1ce21360764b1376e76b1
BLAKE2b-256 checksum
How to use checksums
099eabae204073173028fb2135a01268895b69751642b078ab997199e54ee3d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.0

Release files / fastfuels-1.0.7-py3-none-any.whl

Download URL fastfuels-1.0.7-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b8d9581401f5286903ac6d3565de28cdedee9d727eb96a3e99d5ca2b2d8c972
BLAKE2b-256 checksum
How to use checksums
df715058503de7ce3f88bd5e5c9c0dead906b29eea0a2c6499c89adbc2a63767
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page