nvidia/fourcastnet
FourCastNet predicts global atmospheric dynamics of various weather / climate variables.
By running the below commands, you accept the NVIDIA AI Enterprise Terms of Use and the NVIDIA Community Models License.
Pull and run nvidia/fourcastnet
using Docker (this will download the full model and run it in your local environment)
$ docker login nvcr.io Username: $oauthtoken Password: <PASTE_API_KEY_HERE>
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
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.