{"id":13299433,"url":"https://github.com/earthobservations/gribmagic","last_synced_at":"2025-09-03T01:37:06.344Z","repository":{"id":46367404,"uuid":"322561172","full_name":"earthobservations/gribmagic","owner":"earthobservations","description":"Generic weather forecast downloader","archived":false,"fork":false,"pushed_at":"2021-10-24T20:11:02.000Z","size":414,"stargazers_count":24,"open_issues_count":6,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-29T13:52:32.724Z","etag":null,"topics":["area-of-interest","bbox","deutscher-wetterdienst","dwd","grib","grib2","numerical-weather-prediction","nwp","regrid","regridding","scraper","transformer","weather","weather-data","weather-forecast"],"latest_commit_sha":null,"homepage":"https://community.panodata.org/t/developing-gribmagic/233","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/earthobservations.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-18T10:22:39.000Z","updated_at":"2025-08-27T12:25:41.000Z","dependencies_parsed_at":"2022-09-01T13:50:39.610Z","dependency_job_id":null,"html_url":"https://github.com/earthobservations/gribmagic","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/earthobservations/gribmagic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/earthobservations%2Fgribmagic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/earthobservations%2Fgribmagic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/earthobservations%2Fgribmagic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/earthobservations%2Fgribmagic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/earthobservations","download_url":"https://codeload.github.com/earthobservations/gribmagic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/earthobservations%2Fgribmagic/sbom","scorecard":{"id":363879,"data":{"date":"2025-08-11","repo":{"name":"github.com/earthobservations/gribmagic","commit":"59c647d3ca3ecaf2d720837ba0cec9cc2aa2546e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/earthobservations/gribmagic/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/earthobservations/gribmagic/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/earthobservations/gribmagic/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/earthobservations/gribmagic/tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/earthobservations/gribmagic/tests.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating python:3.9-slim to python:3.9-slim@sha256:369a16fc95ce13e4e1e1c76a5eaa88bd16e955dc82a55c2a69c3c25bb61dd590","Warn: pipCommand not pinned by hash: Dockerfile:32","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2019-182 / GHSA-8867-vpm3-g98g","Warn: Project is vulnerable to: PYSEC-2012-8 / GHSA-p3h7-3c45-qj4v","Warn: Project is vulnerable to: PYSEC-2019-181 / GHSA-p86x-652p-6385","Warn: Project is vulnerable to: PYSEC-2021-387 / GHSA-j8fq-86c5-5v2r","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T11:25:52.702Z","repository_id":46367404,"created_at":"2025-08-18T11:25:52.702Z","updated_at":"2025-08-18T11:25:52.702Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273377145,"owners_count":25094525,"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-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["area-of-interest","bbox","deutscher-wetterdienst","dwd","grib","grib2","numerical-weather-prediction","nwp","regrid","regridding","scraper","transformer","weather","weather-data","weather-forecast"],"created_at":"2024-07-29T17:37:27.711Z","updated_at":"2025-09-03T01:37:06.319Z","avatar_url":"https://github.com/earthobservations.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# GribMagic - generic weather forecast downloader\n\n![CI](https://github.com/earthobservations/gribmagic/workflows/Tests/badge.svg?branch=main)\n[![codecov](https://codecov.io/gh/earthobservations/gribmagic/branch/main/graph/badge.svg)](https://codecov.io/gh/earthobservations/gribmagic)\n![python](https://img.shields.io/pypi/pyversions/gribmagic.svg)\n![version](https://img.shields.io/pypi/v/gribmagic.svg)\n![license](https://img.shields.io/pypi/l/gribmagic.svg)\n![status](https://img.shields.io/pypi/status/gribmagic.svg)\n![downloads](https://img.shields.io/pypi/dm/gribmagic.svg)\n\n\n![image](https://user-images.githubusercontent.com/453543/102729922-fb641c80-4332-11eb-835d-b022fc5290d9.png)\n\n\u003cdiv align=\"right\" style=\"width: 350px\"\u003e\n\n_Simulations are believed by no one except those \nwho conducted them._\n\n_Experimental results are believed by everyone except\nthose who conducted them._\n\nANONYMOUS\n\n\u003c/div\u003e\n\n\u003c/div\u003e\n\n## About\nThe goal of the GribMagic project is to unify the download process of\npublic GRIB1/GRIB2 and netCDF data from numerical weather prediction \nmodels originating from different organizations and data providers.\n\nThis is a work in progress, as such GribMagic is currently considered to\nbe beta software. As this is an early-stage project, contributions are\nhighly appreciated.\n\n## Details\nThe software package includes different code bases. Both provide their features\nby means of a `gribmagic` subcommand.\n\n- GribMagic Unity program: `gribmagic unity --help`\n- DWD GRIB Downloader program: `gribmagic dwd --help`\n\nYou can find corresponding invocation examples later in this document.\n\n\n## Setup\n\nInstall the [ecCodes package by ECMWF](https://confluence.ecmwf.int/display/ECC).\n```\n# Debian Linux\napt-get install --yes libeccodes0 cdo\n\n# macOS/Homebrew\nbrew install eccodes cdo\n```\n\nInstall GribMagic Python package.\n```\npip install gribmagic --upgrade\n```\n\n\n## Run GribMagic Unity program\n\n### Ad hoc usage\n```\n# List labels of available models.\ngribmagic unity list\n\n# Acquire data.\ngribmagic unity acquire --model=dwd-icon-eu --timestamp=2021-10-03T00:00:00Z --target=.gribmagic-data\n```\n\n### Configuration\nTo optionally adjust configuration settings, you can define the following environment variables:\n```\nGM_DATA_PATH={PATH_TO_PROJECT}/data\n\nGM_MODEL_CONFIG={PATH_TO_PROJECT}/config/model_config.yml\"\nGM_MODEL_VARIABLES_MAPPING={PATH_TO_PROJECT}/config/model_variables_mapping.yml\"\nGM_MODEL_VARIABLES_LEVELS_MAPPING={PATH_TO_PROJECT}/config/model_variables_levels_mapping.yml\"\n\nECCODES_DEFINITION_PATH=/usr/share/eccodes/definitions:/usr/local/opt/eccodes/share/eccodes/definitions\n```\n\n\n## Run DWD GRIB Downloader program\n```\n# Install DWD GRIB Downloader program.\ngribmagic install dwd-grib-downloader\n\n# Acquire wind-specific parameters from ICON-D2.\nwget https://raw.githubusercontent.com/earthobservations/gribmagic/98da3fd4f/examples/dwd/recipe_d2_wind.py\ngribmagic dwd acquire --recipe=recipe_d2_wind.py --timestamp=\"2021101800\" --output=.gribmagic-data/raw\n\n# Acquire assorted parameters from ICON-GLOBAL.\nwget https://raw.githubusercontent.com/earthobservations/gribmagic/98da3fd4f/examples/dwd/recipe_global_assorted.py\ngribmagic dwd acquire --recipe=recipe_global_assorted.py --timestamp=\"2021101800\" --output=.gribmagic-data/raw\n```\n\nWhen omitting the `--timestamp` parameter, the most recent modelrun is automatically selected.\nWhen omitting the `--output` parameter, it can be supplied using the `GM_DATA_PATH` environment variable.\n\nIn this manner, the most compact form to invoke `gribmagic dwd` would be something like:\n```\nexport GM_DATA_PATH=.gribmagic-data/raw\ngribmagic dwd acquire --recipe=recipe_d2_wind.py\n```\n\n## Run bbox tool\nExtract area of interest from GRIB files using a bounding box.\n\nExtract subset by coordinates, a space-separated list of `lat_min lat_max lon_min lon_max`.\n```\ngribmagic smith bbox \\\n  \".gribmagic-data/raw/icon-d2/**/*regular-lat-lon*.grib2\" \\\n  --output=.gribmagic-data/subgrid/icon-d2 \\\n  --bbox=46.0 47.5 14.5 16.8\n```\n\nExtract subset by 2-letter country name.\n```\ngribmagic smith bbox \\\n  \".gribmagic-data/raw/icon-d2/**/*regular-lat-lon*.grib2\" \\\n  --output=.gribmagic-data/subgrid/icon-d2 \\\n  --country=AT\n```\n\nFor plotting the result on a map, install `Magics`:\n```\n# Linux\napt-get install --yes libmagplus3v5\n\n# macOS\nmake magics-install\nmake magics-info\nexport MAGPLUS_HOME=/usr/local/opt/magics-4.9.3\n\n# Install GribMagic with Magics bindings\npip install gribmagic[plotting]\n```\n\nand use the `--plot` option:\n```\ngribmagic smith bbox \\\n  \".gribmagic-data/raw/icon-d2/**/*regular-lat-lon*.grib2\" \\\n  --output=.gribmagic-data/subgrid \\\n  --country=AT \\\n  --plot\n```\n\n\n## Run regridding tool\n\nAcquire grid information files.\n```\ngribmagic install dwd-grid-information\n```\n\nProcess regridding on a single file. The default is to assume ICON GLOBAL files and the\nregridding will take place with 0.250° resolution.\n```\ngribmagic smith regrid \\\n  \".gribmagic-data/raw/icon/**/*icon_global_icosahedral*.grib2\" \\\n  --output=.gribmagic-data/regridded/icon-global\n```\n\nWhen aiming to regrid with 0.125° resolution, please specify the `--resolution=0.125` argument, like:\n```\ngribmagic smith regrid \\\n  \".gribmagic-data/raw/icon/**/*icon_global_icosahedral*.grib2\" \\\n  --output=.gribmagic-data/regridded/icon-global \\\n  --resolution=0.125\n```\n\n\n\n## Run program in Docker\n\nTo use GribMagic in a Docker container, you have to build the Docker image like\n```\ndocker build --tag gribmagic .\n```\n\nand then invoke it like\n```\ndocker run -it --volume=$PWD/.gribmagic-data:/var/spool/gribmagic gribmagic:latest gribmagic unity acquire --model=dwd-icon-eu --timestamp=2021-10-03T00:00:00Z\n```\n\n## Development\n\n### Acquire source code\n```\ngit clone https://github.com/earthobservations/gribmagic\ncd gribmagic\n```\n\n### Run software tests\n```\n# Run all tests.\nmake test\n\n# All tests, with code coverage report.\nmake test-coverage\n\n# Run specific tests, with coverage report.\n.venv/bin/pytest -vvv --cov-report=term-missing --cov=gribmagic.smith.regrid -k test_regrid\n\n# Run tests in parallel.\nmake test-parallel\nmake test-coverage-parallel\n```\n\n---\n\n#### Content attributions\nThe copyright of data sets, images and pictograms are held by their respective owners, unless otherwise noted. \n\n##### Banner image\n- 2 metre temperature from ECMWF, rendered using Magics.\n  - Source: MARS labelling or ensemble forecast data (2013-03-25)\n  - URL:    http://download.ecmwf.int/test-data/magics/2m_temperature.grib\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fearthobservations%2Fgribmagic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fearthobservations%2Fgribmagic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fearthobservations%2Fgribmagic/lists"}