🌾 SwaNET · Quick Tutorial 2 of 19

Load Observed Weather Data

Replace simulated weather with real observations from NOAA, CFSR, or PRISM databases, or upload your own precipitation, temperature, humidity, solar radiation, and wind speed data.

SwaNET Tutorial 2Prereq: Loaded SwaNET Model8 min read

What You Will Learn

Server Data SourcesNOAA (US, 1900-2013), PRISM (US, 1981-recent), and CFSR (global, 1979-2014) weather databases
Custom UploadUpload your own precipitation, temperature, humidity, solar radiation, and wind speed files
Data FormatsCSV file formats for each weather variable, including multi-station support

0Getting Started

By default, SWAT uses simulated weather data generated from monthly statistics. For more accurate modeling, you can replace this with observed weather data from real gauging stations. This significantly improves model accuracy, especially for calibration.

ℹ️

Why use observed weather? Simulated weather is statistically generated and may not capture actual storm events, droughts, or temperature extremes. Observed data from NOAA, CFSR, or PRISM reflects real conditions and is essential for meaningful calibration and validation.

Click Weather Data on the SwaNET menu to open the weather data interface.

Observed data loading interface
Figure 1. Observed data loading interface

The random number seed cycle code controls SWAT's internal weather generation. Leave it at 0 unless you need reproducible simulated weather results.

1Download from MAGNET4WATER Server

Three observed weather databases are available directly from the server.

💡

Which source to choose: Use CFSR for global coverage with all five variables. Use NOAA for long US records (back to 1900) of temperature and precipitation. Use PRISM for high-quality US gridded data (slower to download but higher spatial resolution).

1a. NOAA and CFSR Data

  1. Click NOAA/CFSR/PRISM. Select NOAA or CFSR from the dropdown.
  2. Set the bounding box: use model bounds (default) or add a buffer in degrees for a wider search area.
  3. Click Load stations. Station locations appear as pushpins on the map.
  4. Select the data type to download (All available or a specific variable). Click Download data.
  5. Click any pushpin to view station info. Select a parameter and click Show to plot downloaded data.
  6. Set the time period and data type to apply. Select stations (all or specific ones).
  7. Click Apply to SWAT. Weather files are created and applied to the model.
PRISM/CFSR/NOAA data download interface
Figure 2. PRISM/CFSR/NOAA data download interface
Weather data loading interface with NOAA data
Figure 3. Weather data loading interface with NOAA data

1b. PRISM Data

PRISM provides continuous raster data extracted to subbasin centroids. It is slower to download but offers higher spatial resolution.

  1. Select PRISM from the dropdown. Select data type and set the time period first (required for PRISM).
  2. Click Download data. Enter subbasin numbers separated by commas. It is recommended to select only a few subbasins to save time.
  3. Select data type and stations to apply, then click Apply to SWAT.
⚠️

Important: After applying weather data from any source, click Save Edits on the weather interface to update the SWAT input files.

2Upload Weather Data from Local Computer

Upload your own observed weather files for each variable independently.

2a. Precipitation

  1. Check Observed next to "Precipitation data." Upload options appear.
  2. Import a new file or select a previously uploaded one.
  3. Set rainfall time step (0 for daily), distribution code (0 for skewed), and number of gauges.
Loading observed precipitation data
Figure 4. Loading observed precipitation data
📄

File format (single station): CSV with header lines for STATION, LATITUDE, LONGITUDE, ELEVATION, followed by date,value rows. Dates in yyyy/mm/dd format. Units in millimeters. Use -99.0 for missing values. Multiple stations repeat the header block.

2b. Temperature

Same process as precipitation. Temperature files use CSV format with Tmax and Tmin columns in degrees Celsius (date,Tmax,Tmin per row).

2c. Humidity, Solar Radiation, and Wind Speed

Follow the same upload process for each variable. Relative humidity is expressed as a fraction (0 to 1). Solar radiation uses MJ/m2. Wind speed uses m/s.

⚠️

Do not forget to click Save Edits after configuring all weather data to update the SWAT input files.

Frequently Asked Questions

Which weather data source should I use?
CFSR for global models (all 5 variables, 1979-2014). NOAA for long US records (precip and temp, 1900-2013). PRISM for high-resolution US gridded data (precip and temp, 1981-recent). You can mix sources for different variables.
What happens if I use simulated weather?
SWAT generates synthetic daily weather from monthly statistics using its built-in weather generator. This is useful for scenario analysis but less accurate than observed data for calibration, since it cannot reproduce specific historical events.
How do I handle missing weather data?
Enter -99.0 for any missing values. SWAT will use the weather generator to fill gaps. Make sure every date has a row, even if the value is -99.0, since SwaNET reads dates sequentially from the first date.
Can I combine server data with my own files?
Yes. For example, you can use NOAA precipitation and temperature from the server, then upload your own relative humidity, solar radiation, and wind speed files from local measurements.