Global Forecast System, as the name implies, is a global weather prediction model produced by the National Centers for Environmental Prediction. Among the many variables available to be used, the most common parameters are temperature, wind speed and direction, precipitation, and relative humidity. GFS provides weather forecast up to 384 hours after the model is run. This model is run 4 times a day, at 00 UTC, 06 UTC, 12 UTC, and 18 UTC. It usually takes around 5 hours for the model to complete.
GFS data can be downloaded directly from the FTP / HTTPS server provided by the National Oceanic and Atmospheric Administration, for free, since it’s funded by American taxpayers. However, manually downloading a whole (global) file just to work with a subset of data is not ideal, this is why I would recommend using one of the two options I will be explaining here, Google Earth Engine or THREDDS Data Server.
Thematic Real-time Environmental Distributed Data Services (THREDDS) Data Server is a way to distribute environmental data for research use. GFS data in its original GRIB-2 format can also be accessed through this THREDDS Data Server (TDS). The data is usually available in the TDS Catalog within 5 hours of the model generation time. TDS has a NetCDF subset service, that allows us to download a specific area of interest (using a rectangular bounding box), variables of interest, and specify the time range (or single time reference).
Both access can be done with Python, using these modules:
- earthengine-api (recommended install: geemap, eemont)
- siphon (TDS Catalog API)
- xarray (ndarray to work with NetCDF)
- netCDF4 (NetCDF backend on Python)
You can use Anaconda to create an environment with all these modules and the Jupyter Lab environment:
$ conda create -n geo python=3.9 $ conda activate geo $ conda install -c conda-forge geemap eemont siphon xarray[complete] netCDF4
Once you’re done, you can use my Notebook example on my GitHub to begin how to access the Global Forecast System on Google Earth Engine: