IEM Database Schema + Testing Data

June 23, 2026 ยท View on GitHub

This repo serves three purposes.

  1. Document the database schema used by most of akrherz's projects.
  2. Provide testing data to load into that schema to support CIs.
  3. Generate docker images used within these same project repos CIs.

pre-commit.ci status

Docker Images

See GHCR

ImagePurpose
akrherz/iem_database:no_test_dataSchema, but no test data loaded
akrherz/iem_database:test_dataSchema and Test Data

Schema Versioning

Eh, I am sure there are much better ways to manage database schema than this, but alas, here it is. Fundamentally, we support the following scenarios.

  1. A newly setup PostgreSQL database.
  2. An upgrade path from previously deployed databases
  3. A means to bootstrap a database schema and some initial data to support CI testing.

The init folder contains the initial schema plus incremental changes that are also tracked in sequential upgrade files. A recent change was to update the files in init with any schema updates made. The magic happens with a dedicated table in each database known as iem_schema_manager_version, which tracks a integer value representing the most recent schema update made.

Simply running:

python schema_manager.py

and things should take care of themselves. The bootstrap.sh exists for initial deployments, like on CI.

Bundled test data

To support integration tests, some real data is bundled here for loading into the database via store_test_data.py. Some terse details on these files in the data folder:

FilenameContains
afos_products.sql.gzAFDDMX from 10-16 Jul 2024
asos__000taf.sqlTAF reference table for 21 Aug 2024 UTC
asos__31_Dec_2024.sqlASOS data for DSM, AMW, BNW for 31 Dec 2024
asos__AMW_01_10_Aug_2024.sqlAmes data for 1-10 Aug 2024
asos__MCW_12_25_Dec_2022.sql.gzMason City for 21-24 Dec 2022 (Blizzard)
asos__taf2024.sql.gzTAF data for 21 Aug 2024 UTC
asos_alldata.sql.gz~2020 data for AMW and DSM
asos1min_DSMAMW.sql.gzOne Minute ASOS 10-12 July 2024 DSM+AMW
coop__IA0000_IATAME_2000_2024.sql.gzclimodat IA0000,IATAME,IA0200 for 2000-2024(aug 25)
coop__IAC005_2000_2024.sqlclimodat IAC005 (Central Iowa) 2000-2024
coop__alldata_IATDSM.sql.gzclimodat IATDSM, IA2203 for 2000-2024(aug 15)
coop__climate51.sqlclimate51 data for IATAME,IATDSM,IA0000
coop__climate71.sqlclimate71 data for IATAME,IATDSM,IA0000
coop__climate81.sqlclimate81 data for IATAME,IATDSM,IA0000
coop__cocorahs_241231.sqlCoCoRaHS Iowa data for 31 Dec 2024
coop__elnino.sqlEl Nino data till Aug 2024
coop__nass_quickstats.sql.gzNASS Quickstats 2007-Aug 2024
coop__ncei_climdiv_IA0000.sqlNCEI Climdiv data for Iowa Statewide
coop_ncei_climate71_ames.sqlNCEI 71 Climatology for Ames
coop_ncei_climate81_ames.sqlNCEI 81 Climatology for Ames
coop_ncei_climate91_ames.sqlNCEI 91 Climatology for Ames
dep_china__pydeptesting.sqlpydep test entry for climate_file
hads_aesi4_sep2025.sqlAESI4 obs for 1-2 Sep 2025
hads_alldata.sql.gz2024 weather variables for EOKI4
hads_snowfall.sql10 Nov 2023 12 UTC fake entries for DNKI4
hml__000hml_forecast.sqlGuttenburg GTTI4 20-23 Aug 2024
hml__hml_forecast_data.sqlGuttenburg GTTI4 20-23 Aug 2024
hml__hml_observed_data.sqlGuttenburg GTTI4 20-23 Aug 2024
id3b__product_log_nob.sql.gzldm_product_log of N0B that gets updated to RT
dep__00?DEP scenario=-1 test data for 070801050902
iembot__testdata.sqlStuff to iembot to use in CI testing.
iem__hourly.sql.gzDSM,AMW hourly precip 2024 precip till 4 Sept
iem__AMWDSM.sql.gzIEM current,current_log,summary_2024 (14 Aug) for AMW+DSM
iem__cf6data.sqlCF6 Data for DSM 2024 till 26 Jul
iem__clidata.sqlCLI Data for DSM 2024 till 26 Jul
iem__summary_iacoop_241022.sqlIowa COOP summary data for 22 Oct 2024
iem__summary2020.sql.gzAmes, Des Moines summary data for 2020
iem__summary_iacoop_241231.sqlIA COOP summary data for 31 Dec 2024
iemre__20170102.sqlIEMRE entry for 2 Jan 2017 for pydep
iemre_china__20250721.sqlIEMRE entry for 21 Jul 2025 for pydep
isuag_daily.sql.gzISU Ag Climate station A130209 (Ames)
isuag__hourly.sqlISU Ag Climate station A130209 (Ames) 2,000 hourly
isuag_sm_minute.sql.gzISU Soil Moisture minute data 21-25 July 2024
isuag_sm_hourly.sql.gzISU Soil Moisture hourly data 21-25 July 2024
isuag__sm_hourly.sql.gzMore AEEI4 hourly data
isuag_sm_daily.sqlISU Soil Moisture daily data 21-25 July 2024
isuag_sm_inversion.sql.gzISU Soil Moisture inversion data 21-25 July 2024
mesosite__camera_log_2020.sqlWebcam metadata around 17z 10 Aug 2020
mesosite__feature.sqlRandom IEM Feature content
mesosite__iemrasters.sqlIEM RASTERs lookup and N0R table
mesosite__networks.sqlA few IEM networks for Iowa and WFO
mesosite_products.sqlArchived products metadata
mesosite_tzworld_chicago.sql.gzLargest geometry for America/Chicago for tz_world
mesosite_webcams.sqlSome example webcam entries
mesosite_zz_station_attrs.sqlStation attributes for
mos_20240802.sqlKDSM MOS for 2 Aug 2024 0z
other__feel_data.sqlISU FEEL data for 14 Apr 2025
other__purpleair.sqlpurpleair data for 10 Aug 2024
other__ss_bubbler.sqldata for 13 Aug 2012
other__ss_logger_data.sql2012-2014 random data
other__t2025.sqlWMO BUFR SRF data for 0-756-1-456700 on 17 Sep 2025
postgis__00ugcs.sql.gzNWS UGC database as of 30 Jul 2025, with hard coded 1980 start date
postgis_00ugcs.sqlA faked UGC entry to match warnings below
postgis_mcd.sql.gzMCDs for much of July 2024
postgis_pireps.sqlA few PIREPs on 31 July 2024
postgis__000spc_outlook.sqlSPC/WPC Outlook 1-8 Aug 2024 and May 2024
postgis__airmets.sqlSome AIRMETs from 10 Aug 2024
postgis__cwa.sql.gzNWS CWA Borders Simplified circa 2026
postgis__cwas.sqlSome Center Weather Advisories from 10 Aug 2024
postgis__fema_regions.sql.gzSimplified FEMA Regions
postgis__mpd.sqlWPC MPDs from March 2026
postgis__sigmets_archive.sqlSome SIGMETs from 10 Aug 2024
postgis__spc_outlook_geometries.sql.gzSPC/WPC Outlooks 1-8 Aug 2024 and May 2024
postgis__sps2024.sql.gzSPSs from Aug 2024
postgis_lsrs.sqlDMX LSRs from 2018-06-20,2018-06-21,2024-05-21, One BGM LSR from 2023
postgis_sbw.sqlDMX,OAX 21 May 2024 polygons, some 2018 stuff, DMX 2024 FF.W
postgis_states.sqlSimplified 0.01 us states
postgis__text_products_oct24.sql.gzNWS misc polygons for Oct 2024
postgis__usdm.sql.gzUS Drought Monitor for 2024 till 8 Aug
postgis_warnings.sqlDMX select warnings from 2018 and 2024, OAX Emergencies 2024
postgis_warnings2020.sqlDMX selected for 2020
postgis_watches_current.sqlwatches_current snapshot 5 Aug 2024
postgis_watches2024.sql.gzwatches for 2024 till 5 Aug 2024
radar__nexrad_attributes_2024.sql.gzsampled attributes from 10 Aug 2024
radar__nexrad_attributes.sql.gznexrad attributes current (set to loadtime)
raob_240719.sql.gzAll soundings from 19 July 2024 12 UTC
rwis_atmos.sql.gzIowa RWIS met data for 1 July 2024
rwis_soil.sqlIowa RWIS soil data for 1 July 2024
rwis_traffic.sqlIowa RWIS traffic data for 1 July 2024
sustainablecorn__*Sustainablecorn data
talltowers_20160915.sqlTalltowers data from 15 Sep 2016