{"id":34685101,"url":"https://github.com/simonpf/chimp_smhi","last_synced_at":"2026-05-28T19:01:58.532Z","repository":{"id":246122822,"uuid":"745046655","full_name":"simonpf/chimp_smhi","owner":"simonpf","description":"CHIMP retrievals for SMHI.","archived":false,"fork":false,"pushed_at":"2025-03-25T13:40:48.000Z","size":4940,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-04-18T22:00:07.280Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonpf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-18T14:38:04.000Z","updated_at":"2025-03-25T13:40:51.000Z","dependencies_parsed_at":"2024-06-26T01:43:15.214Z","dependency_job_id":null,"html_url":"https://github.com/simonpf/chimp_smhi","commit_stats":null,"previous_names":["simonpf/chimp_smhi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simonpf/chimp_smhi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonpf%2Fchimp_smhi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonpf%2Fchimp_smhi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonpf%2Fchimp_smhi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonpf%2Fchimp_smhi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonpf","download_url":"https://codeload.github.com/simonpf/chimp_smhi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonpf%2Fchimp_smhi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33622070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"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":[],"created_at":"2025-12-24T21:45:30.254Z","updated_at":"2026-05-28T19:01:58.525Z","avatar_url":"https://github.com/simonpf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CHIMP retrievals for SMHI\n\nThis repository provides preprocessing functionality and instructions for\nrunning a CHIMP retrieval on SEVIRI observations in HRIT format.\n\n## Installation\n\nAll software required for running a specific version of the retrievals is listed in the\n`chimp_smhi_\u003cversion-tag\u003e.yml` file (where \"\u003cversion-tag\u003e\" can be `v0` for instance), which provides a conda environment named\n`chimp_smhi_\u003cversion-tag\u003e`. To install and activate it, run (here for version `v1`):\n\n``` shellsession\nconda env create -f chimp_smhi_v1.yml\nconda activate chimp_smhi_v1\n```\n\n### Downloading the model file\n\nThe retrieval models can be downloaded from:\n - Version 0: [https://rain.atmos.colostate.edu/gprof_nn/chimp/chimp_smhi_v0.pt](https://rain.atmos.colostate.edu/gprof_nn/chimp/chimp_smhi_v0.pt).\n - Version 1: [https://rain.atmos.colostate.edu/gprof_nn/chimp/chimp_smhi_v1.pt](https://rain.atmos.colostate.edu/gprof_nn/chimp/chimp_smhi_v1.pt).\n - Version 2: [https://rain.atmos.colostate.edu/gprof_nn/chimp/chimp_smhi_v2.pt](https://rain.atmos.colostate.edu/gprof_nn/chimp/chimp_smhi_v1.pt).\n - Version 3: [https://huggingface.co/simonpf/chimp_smhi](https://huggingface.co/simonpf/chimp_smhi).\n\n## Running retrievals\n\nRunning CHIMP retrievals on SEVIRI files in HRIT format involves two steps: First the SEVIRI input files must be converted to the input data format expected by CHIMP. Secondly, input files must be processed using the ``chimp`` command.\n\n### Extracting the CHIMP input data\n\nThe ``hrit2chimp.py`` script implements a command line application to convert all SEVIRI files in a given input folder to corresponding CHIMP input files. It can be used as follows.\n\n``` shellsession\npython hrit2chimp.py \u003cpath/to/folder/with/seviri/data\u003e \u003cpath/to/chimp/input\u003e\n```\n\nThe script combines the observations from all SEVIRI channels and writes them into a single CHIMP input file. The seviri input files are written to ``\u003cpath/to/chimp/input\u003e/seviri`` since `chimp` expects the inputs from all sensors to be organized into respective subfolders.\n\n### Running CHIMP\n\nAssuming ``hrit2chimp.py`` has been used to write CHIMP input files to ``\u003cpath/to/chimp/input\u003e``, the retrieval can be run using:\n\n``` shellsession\nchimp process -v \u003cpath/to/model/\u003e seviri \u003cpath/to/chimp/input\u003e \u003cpath/to/chimp/output\u003e --device cpu\n```\nFor the sequence-based model the process command also needs to specify the number of input steps using the ``sequence_length`` option.\n\n``` shellsession\nchimp process -v \u003cpath/to/model/\u003e seviri \u003cpath/to/chimp/input\u003e \u003cpath/to/chimp/output\u003e --device cpu --sequence_length 16\n```\n\n\u003e ***NOTE:*** The conda-environment contains the CPU-only version of PyTorch. Therefore, retrievals can only be run on the CPU. Since the default is running retrievals on the GPU, the ``--device cpu`` flag must be passed when ``chimp`` is invoked.\n\n### Model versions\n\n### ``chimp_smhi_v0``\n\n- ResNeXt architecture with 5M parameters\n- Trained on 1-year of collocations\n- Scene size 128\n\n\n### ``chimp_smhi_v1``\n\n- EfficientNet-V2 architecture with 20M parameters\n- Trained on 1-year of collocations\n- Scene size 256\n\n\u003e **NOTE:** The ``chimp_smhi_v1``  models should be run with a tile size of 256.\n\n### ``chimp_smhi_v2``\n\n- EfficientNet-V2 2p1 architecture with ~40M parameters\n- Trained on 2-year of collocations over Europe and the Nordics\n- Scene size 256\n\n\u003e **NOTE:** The ``chimp_smhi_v2``  models should be run with a tile size of 256 and\na sequence length of 16.\n\n### ``chimp_smhi_v3``\n\nThere are two ``chimp_smhi`` version 3 models. The ``chimp_smhi_v3`` model processes single inputs, while the ``chimp_smhi_v3_seq`` model processes multiple inputs.\n\n\u003e **NOTE:** The ``chimp_smhi_v3``  model should be run with a tile size of 256.\n\n\u003e **NOTE:** The ``chimp_smhi_v3_seq``  model should be run with a tile size of 256 and a sequence length of 16.\n\n## Results\n\nThe results are written as NetCDF4 datasets to the provided output directory.\nCurrently the only retrieved variable is ``dbz_mean``. Since ``chimp``\nretrievals are probabilistic, the ``_mean`` suffix is added to the variable name\nhighlight that it is the expected value of the retrieved posterior distribution.\n\n## Example \n\nThe animation below compares the retrieved radar reflectivity for the different model versions.\n\n![Reference and retrieved radar reflectivity from 2024-05-06](chimp_smhi.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonpf%2Fchimp_smhi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonpf%2Fchimp_smhi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonpf%2Fchimp_smhi/lists"}