Skip to main content

Bris in Forecast-in-a-Box

WIP - this is not yet ready to be used for anything.

This contains the neccessary components to run the bris model in anemoi inference and Forecast-in-a-Box. It consists of several parts:

  • Plugins for anemoi-inference
  • A tool to adapt a checkpoint so it can run in anemoi-inference
  • Later, docs for how to add this to Forecast-in-a-Box will be added

Getting started

In order to get started, you need access to a bris checkpoint, such as Cloudy Skies.

Setting up

uv sync

Running inference

uv run main.py

This works around bugs related to running on a mac, at the cost of a little flexibility.

In the future

uv run anemoi-inference run config.yaml

Checkpoint

In order to run, you need a bris checkpoint, and optionally a geotiff file containing orograpghy data for your target area.

Preparing

The variable definition in the metadata for the original bris checkpoint needs to be update to run on anemoi-inference. Updateing the checkpoint owerwrite the checkpoint so it's a good idea to make a copy of the original checkpoint before running the update command.

ex.

cp cloudy-skies.ckpt  anemoi-cloudy-skies.ckpt
uv run update_metadata.py --checkpoint anemoi-cloudy-skies.ckpt

update_metadata.py find the variable dataset.variables_metadata, and replace with this yaml.

Setting area

You need to modify your checkpoint's graph in order to run for a specific area.

Getting detailed orography information

If you want to do adiabatic correction of the forecast data, you need to add real elevation information to the checkpoint. One way to get that is by adapting data from opentopography.

Note At the moment, you need to download data for an area that is larger than your target area!

To help with downloading the orography you can use this:

uv run download_orography.py --area-latlon -7 29 -23 44 --dest-path hires_topography.tif

For this to work you need an api-key to access the rest api on opentopography

To create an account on opentopography.org go to https://portal.opentopography.org/login. You will find the API key by pressing menu item MyOpenTopo. Save the key in $HOME/..opentopographyrc. This is a json file with format:

{
  "api_key": "THE API KEY"
}

The downloaded high-resolution topography can then be used as input when updating the checkpoint.

Updating checkpoint

Run the following command to generate a new checkpoint:

uv run update_checkpoint.py \
    --area-latlon -8 30 -22 43 0.025 \
    --topography-file hires_topography.tif \
    --original-checkpoint bris-checkpoint.ckpt \
    --create-checkpoint new-checkpoint.ckpt

You can skip the --topography-file option if you will not do orographic corrections of the data.

Metadata

Release files for bris-fiab 0.1.1

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

Source distribution (sdist)

Source distribution for bris-fiab 0.1.1
File Size Uploaded Provenance Actions
bris_fiab-0.1.1.tar.gz 167.0 kB Without provenance Details for bris_fiab-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bris-fiab 0.1.1
File Interpreter ABI Platform Actions
bris_fiab-0.1.1-py3-none-any.whl Python 3 none any Details for bris_fiab-0.1.1-py3-none-any.whl

Total release size: 190.5 kB

Release files / bris_fiab-0.1.1.tar.gz

Download URL bris_fiab-0.1.1.tar.gz
Size 167.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b053a27ee60d6bbdf9cee7c791f5ae5a013f90a90dfd1b0ddc815e069a83cb51
BLAKE2b-256 checksum
How to use checksums
abe297c06acb5cb252894076e54ff565aced7067d5f3fba2137af1c052538c8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.12

Release files / bris_fiab-0.1.1-py3-none-any.whl

Download URL bris_fiab-0.1.1-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbc68acb6d348e563a0b976457e300da7f41699c9b5776f8337667cf3fd27078
BLAKE2b-256 checksum
How to use checksums
37e7a024b87860574920ebd300240c708c430eb4935d461e22b55b48e7a9a657
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.12

Security for bris-fiab 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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