{"id":13994010,"url":"https://github.com/aaronpenne/get_noaa_ghcn_data","last_synced_at":"2026-02-26T20:54:26.532Z","repository":{"id":65951022,"uuid":"123350856","full_name":"aaronpenne/get_noaa_ghcn_data","owner":"aaronpenne","description":"A tool to interface with and download Global Historical Climatology Network (GHCN) data into easily readable CSVs.","archived":false,"fork":false,"pushed_at":"2019-05-14T16:02:08.000Z","size":4419,"stargazers_count":100,"open_issues_count":9,"forks_count":19,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-29T15:50:46.295Z","etag":null,"topics":["ftp","government-data","noaa","weather"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aaronpenne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-28T22:38:25.000Z","updated_at":"2024-11-05T06:11:01.000Z","dependencies_parsed_at":"2023-02-18T02:31:03.632Z","dependency_job_id":null,"html_url":"https://github.com/aaronpenne/get_noaa_ghcn_data","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aaronpenne/get_noaa_ghcn_data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronpenne%2Fget_noaa_ghcn_data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronpenne%2Fget_noaa_ghcn_data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronpenne%2Fget_noaa_ghcn_data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronpenne%2Fget_noaa_ghcn_data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronpenne","download_url":"https://codeload.github.com/aaronpenne/get_noaa_ghcn_data/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronpenne%2Fget_noaa_ghcn_data/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266552517,"owners_count":23947174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ftp","government-data","noaa","weather"],"created_at":"2024-08-09T14:02:39.967Z","updated_at":"2026-02-26T20:54:26.482Z","avatar_url":"https://github.com/aaronpenne.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Get NOAA GHCN Data\n==================\n\nThis tool functions as an interface to the extensive weather data in the [NOAA GHCN database](https://www.ncdc.noaa.gov/data-access/land-based-station-data/land-based-datasets/global-historical-climatology-network-ghcn). No manually digging through the FTP server or going through Google Big Query, just directly download your station's weather from the command line.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/aaronpenne/get_noaa_ghcn_data/blob/master/screenshots/usage_mac.gif\" alt=\"Screen capture of program usage.\"\u003e\u003c/p\u003e\n\nget_noaa_ghcn_data.py\n---------------------\nRun this tool from the command line to:\n- Search for a Global Historical Climatology Network (GHCN) station ID using plain text\n- Download a station's daily weather data in raw .dly format\n- Download a station's daily weather data in a reformatted .csv for easy analysis\n\nThe format of each station's daily measurements are fixed width files with one row per month per element, and multiple columns for the days:\n\n```\n    ------------------------------\n    Variable   Columns   Type\n    ------------------------------\n    ID            1-11   Character\n    YEAR         12-15   Integer\n    MONTH        16-17   Integer\n    ELEMENT      18-21   Character\n    VALUE1       22-26   Integer\n    MFLAG1       27-27   Character\n    QFLAG1       28-28   Character\n    SFLAG1       29-29   Character\n    VALUE2       30-34   Integer\n    MFLAG2       35-35   Character\n    QFLAG2       36-36   Character\n    SFLAG2       37-37   Character\n      .           .          .\n      .           .          .\n      .           .          .\n    VALUE31    262-266   Integer\n    MFLAG31    267-267   Character\n    QFLAG31    268-268   Character\n    SFLAG31    269-269   Character\n```\n\nThis tool parses all of the station's available data and outputs it with one row per day, and multiple columns for the elements. This is easier to analyze programattically and read, as seen below: \n\n![Screenshot of reformatted .csv file](https://github.com/aaronpenne/get_noaa_ghcn_data/blob/master/screenshots/csv.png)\n\n\nBackground\n----------\n\n\u003e The Global Historical Climatology Network (GHCN) is an integrated database of climate summaries from land surface stations across the globe that have been subjected to a common suite of quality assurance reviews. The data are obtained from more than 20 sources. Some data are more than 175 years old while others are less than an hour old. GHCN is the official archived dataset, and it serves as a replacement product for older NCEI-maintained datasets that are designated for daily temporal resolution\n\nThe five core elements (measurements) are:\n- PRCP = Precipitation (tenths of mm)\n- SNOW = Snowfall (mm)\n- SNWD = Snow depth (mm)\n- TMAX = Maximum temperature (tenths of degrees C)\n- TMIN = Minimum temperature (tenths of degrees C)\n\nFor a full list of possible elements (measurements) see the [codebook](https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/readme.txt).\n\nThe five core elements which are recorded by most stations are precipitation, snow, snow depth, max temp, and min temp. There are several other attributes that may or may not be recorded in each station's dataset including: average cloudiness, average daily wind direction, average daily wind speed, water evaporation, time of fastest wind, frozen ground layer depth, water depth gauge heights, evaporation pan water temperature, percent of day that is sunshine, soil temp, soil type, ice thickness, direction of fastest winds, weather type, multiday measurements, and number of days included in multiday measurements. There are also flags indicating measurement details, quality details, and the source agency of the measurement.\n\nDependencies\n------------\n- [Python 3](https://www.python.org/)\n- [pandas](https://github.com/pandas-dev/pandas)\n\nDeveloped with Python 3.6 on Windows 10. \n\n\nLicense\n-------\n[MIT License](https://github.com/aaronpenne/get_noaa_ghcn_data/blob/master/LICENSE.md) © Aaron Penne\n\nDisclaimer: This project is not affiliated with NOAA or GHCN in any way.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronpenne%2Fget_noaa_ghcn_data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronpenne%2Fget_noaa_ghcn_data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronpenne%2Fget_noaa_ghcn_data/lists"}