
NVIDIA
fourcastnet
DownloadableFourCastNet predicts global atmospheric dynamics of various weather / climate variables.
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
Bash
$ docker login nvcr.io
Username: $oauthtoken
Password: <PASTE_API_KEY_HERE>
Pull and run the NVIDIA Earth-2 FourCastNet NIM with the command below.
Bash
docker pull nvcr.io/nim/nvidia/fourcastnet:latest
This will download the optimized model for your infrastructure.
Bash
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:latest
Test the NIM
Check the health of the NIM with the following curl command:
Bash
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:
Python
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:
Bash
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.