Skip to main content

Remote Graphcast

Run graphcast on a runpod GPU server. Output is saved to s3. Shouldn't cost more than $0.6 USD for a 10 day forcast.

Order of operations

  1. Your input is validated
  2. A secure runpod GPU pod is spun up on your runpod account
  3. Graphcast is installed into that gpu and forecasts of your chosen length are generated for each timestamp, this takes around 10 minutes for a 10 day forcast
  4. These forecasts are saved to your chosen s3 bucket, roughly 6.5GB for 10 days of forecast
  5. The runpod pod is terminated
  6. The program exits

Requirements

  • python 3.8+ and pip
  • cds.climate credentials
  • an AWS s3 bucket, free tier should be fine
  • S3 credentials to go with the bucket
  • Runpod credentials

Installation

pip install remote-graphcast

Example Code

from remote_graphcast import remote_cast

remote_cast(
	aws_access_key_id='YOUR_AWS_ACCESS_KEY_ID',
	aws_secret_access_key='YOUR_AWS_SECRET_ACCESS_KEY',
	aws_bucket='YOUR_AWS_BUCKET_NAME',
	cds_url='https://cds.climate.copernicus.eu/api/v2', # this is probably your CDS URL 
	cds_key='YOUR_CDS_KEY',
	forcast_list="[{'start': '2023122518', 'hours_to_forcast': 48}]", 
	# dates to forcast from, note the weird quasi-JSON format, of this string, use single quotes instead of double quotes
	# select a date in the future and it will raise an error without spinning up anything
	runpod_key='YOUR_RUNPOD_KEY',
	gpu_type_id="NVIDIA A100-SXM4-80GB", # graphcast needs at least 61GB GPU ram (unless you want to quantize)
	container_disk_in_gb=50, # you'll need around 40GB per 10 day forcast + a healthy 10GB buffer
)

# internally this function will keep polling the pod it spins up and the s3 bucket until it sees that all forcasts 
# are complete, then it will return

Warning

In order to make predictions graphcast must request ERA5 reanalysis data from the European Center for Medium Range Weather Forcasts (ECMWF). Usually the download completes in < 2 minutes. However, if their servers are busy your request will be put in a queue. You can view all your open requests here. Until your request is granted is granted, the graphcast runpod server will be waiting idly (costing you money). This process has taken me > 1 hour in the past.

You can also check your progress by viewing the runpod logs.

Metadata

Release files for remote-graphcast-runpod 0.0.23

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

Source distribution (sdist)

Source distribution for remote-graphcast-runpod 0.0.23
File Size Uploaded
remote_graphcast_runpod-0.0.23.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for remote-graphcast-runpod 0.0.23
File Interpreter ABI Platform
remote_graphcast_runpod-0.0.23-py3-none-any.whl Python 3 none any Details

Total release size: 18.8 kB

Release files / remote_graphcast_runpod-0.0.23.tar.gz

Download URL remote_graphcast_runpod-0.0.23.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
637011a7660f32df218425b3eed3105067a107b9af6df2fd2f4c31526c4e6bb7
BLAKE2b-256 checksum
How to use checksums
96304f5f459e61602a1045ce180cf9c690a95ba05b6f66103af191e4941b6bf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.15

Release files / remote_graphcast_runpod-0.0.23-py3-none-any.whl

Download URL remote_graphcast_runpod-0.0.23-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcb6fdd580cc5c29f2c9633caee75089de12ff26a13806a3e099045a1f5fee66
BLAKE2b-256 checksum
How to use checksums
b79a270603d46fceb119f6ab90bcc10d9af1c1ac5039186be52106bf5850f3f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.15

Release history Release notifications | RSS feed

This release

0.0.23 This release

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

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