nvidia

fourcastnet

Run Anywhere

FourCastNet predicts global atmospheric dynamics of various weather / climate variables.

Deploying your application in production? Get started with a 90-day evaluation of NVIDIA AI Enterprise

Follow the steps below to download and run the NVIDIA NIM inference microservice for this model on your infrastructure of choice.

Generate API Key

Pull and Run the NIM

Pull and run the NVIDIA Earth-2 FourCastNet NIM with the command below.

docker pull nvcr.io/nim/nvidia/fourcastnet:1.0.0

This will download the optimized model for your infrastructure.

export NGC_API_KEY=<NGC API Key> docker run --rm --runtime=nvidia --gpus all --shm-size 4g \ -p 8000:8000 \ -e NGC_API_KEY \ nvcr.io/nim/nvidia/fourcastnet:1.0.0

Test the NIM

Check the health of the NIM with the following curl command:

curl -X 'GET' \ 'http://localhost:8000/v1/health/ready' \ -H 'accept: application/json'

Generate an input numpy array for the model using the following Python script with Earth2Studio:

import numpy as np from datetime import datetime from earth2studio.data import ARCO from earth2studio.models.px.sfno import VARIABLES ds = ARCO() da = ds(time=datetime(2023, 1, 1), variable=VARIABLES) np.save("fcn_inputs.npy", da.to_numpy()[None].astype('float32'))

You can now make a local API call using this curl command:

curl -X POST \ -F "input_array=@fcn_inputs.npy" \ -F "input_time=2023-01-01T00:00:00Z" \ -F "simulation_length=4" \ -o output.tar \ http://localhost:8000/v1/infer

For more details on getting started with this NIM, visit the NVIDIA NIM Docs. For more details on the model and its input / output tensors see the FourCastNet SFNO Model Card.