{"id":20227,"name":"PyChEmiss","description":"A Python script to create the wrfchemi file from local emissions needed to run WRF-Chem model.","url":"https://github.com/quishqa/PyChEmiss","last_synced_at":"2026-04-13T17:30:23.936Z","repository":{"id":37661138,"uuid":"265684133","full_name":"quishqa/PyChEmiss","owner":"quishqa","description":"Create WRF-Chem emission file from your local emissions disaggregated in space and time.","archived":false,"fork":false,"pushed_at":"2023-01-05T17:51:58.000Z","size":139059,"stargazers_count":34,"open_issues_count":2,"forks_count":15,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-22T19:49:05.097Z","etag":null,"topics":["emission","wrf-chem","wrf-domain"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quishqa.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-05-20T20:55:39.000Z","updated_at":"2026-01-29T14:24:59.000Z","dependencies_parsed_at":"2023-02-04T09:16:17.800Z","dependency_job_id":null,"html_url":"https://github.com/quishqa/PyChEmiss","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/quishqa/PyChEmiss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quishqa%2FPyChEmiss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quishqa%2FPyChEmiss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quishqa%2FPyChEmiss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quishqa%2FPyChEmiss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quishqa","download_url":"https://codeload.github.com/quishqa/PyChEmiss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quishqa%2FPyChEmiss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29951013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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"}},"owner":{"login":"quishqa","name":"Mario Gavidia Calderón","uuid":"14168009","kind":"user","description":"Postdoctoral researcher at Institute of Astronomy, Geophysics and Atmospheric Sciences, University of Sao Paulo.","email":"","website":"quishqa.github.io","location":"Sao Paulo, Brazil","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/14168009?u=8056485a72fbbdd88eaee3534cda8ef5e077f8e6\u0026v=4","repositories_count":35,"last_synced_at":"2024-06-11T15:38:38.036Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/quishqa","funding_links":[],"total_stars":85,"followers":45,"following":38,"created_at":"2022-11-15T17:35:35.884Z","updated_at":"2024-06-11T15:38:39.306Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quishqa","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quishqa/repositories"},"packages":[],"commits":{"id":1254207,"full_name":"quishqa/PyChEmiss","default_branch":"master","total_commits":64,"total_committers":4,"total_bot_commits":2,"total_bot_committers":1,"mean_commits":16.0,"dds":0.125,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-03-21T06:05:05.601Z","last_synced_commit":"5bb9f95b140c48f7858d993d303813d3f2bb8646","created_at":"2023-03-27T10:59:42.984Z","updated_at":"2026-03-21T06:05:03.604Z","committers":[{"name":"Mario Gavidia-Calderón","email":"mgavidiac@gmail.com","login":"quishqa","count":56},{"name":"Angel Liduvino Vara Vela","email":"angel.vela@iag.usp.br","login":null,"count":5},{"name":"dependabot[bot]","email":"49699333+dependabot[bot]","login":"dependabot[bot]","count":2},{"name":"Carlos M. Gonzalez Duque","email":"69486565+carlosm-5","login":"carlosm-5","count":1}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/quishqa%2FPyChEmiss/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-03-25T00:00:58.194Z","repositories_count":6202926,"commits_count":928501079,"contributors_count":35976853,"owners_count":1144438,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"quishqa/PyChEmiss","html_url":"https://github.com/quishqa/PyChEmiss","last_synced_at":"2025-08-31T13:32:53.500Z","status":null,"issues_count":3,"pull_requests_count":6,"avg_time_to_close_issue":150303.0,"avg_time_to_close_pull_request":366952.1666666667,"issues_closed_count":1,"pull_requests_closed_count":6,"pull_request_authors_count":4,"issue_authors_count":3,"avg_comments_per_issue":2.3333333333333335,"avg_comments_per_pull_request":0.0,"merged_pull_requests_count":5,"bot_issues_count":0,"bot_pull_requests_count":2,"past_year_issues_count":1,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":1,"past_year_avg_comments_per_issue":0.0,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2023-05-09T10:36:06.944Z","updated_at":"2025-08-31T13:32:53.501Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/quishqa%2FPyChEmiss","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/quishqa%2FPyChEmiss/issues","issue_labels_count":{},"pull_request_labels_count":{"dependencies":2},"issue_author_associations_count":{"NONE":3},"pull_request_author_associations_count":{"COLLABORATOR":3,"CONTRIBUTOR":2,"OWNER":1},"issue_authors":{"burhangis":1,"yvsathe14":1,"fipoucat":1},"pull_request_authors":{"dependabot[bot]":2,"alvv1986":2,"quishqa":1,"carlosm-5":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-03-25T00:00:37.747Z","repositories_count":13913724,"issues_count":34726389,"pull_requests_count":113472887,"authors_count":11209353,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[{"login":"alvv1986","count":2,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/alvv1986"},{"login":"quishqa","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/quishqa"},{"login":"carlosm-5","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/carlosm-5"}],"active_maintainers":[]},"events":{"total":{"IssuesEvent":1,"WatchEvent":3,"IssueCommentEvent":5},"last_year":{"WatchEvent":3}},"keywords":["emission","wrf-chem","wrf-domain"],"dependencies":[{"ecosystem":"pypi","filepath":"requirements.txt","sha":null,"kind":"manifest","created_at":"2023-02-04T09:16:17.790Z","updated_at":"2023-02-04T09:16:17.790Z","repository_link":"https://github.com/quishqa/PyChEmiss/blob/master/requirements.txt","dependencies":[{"id":7347946008,"package_name":"xarray","ecosystem":"pypi","requirements":"==0.15.1","direct":true,"kind":"runtime","optional":false},{"id":7347946009,"package_name":"esmpy","ecosystem":"pypi","requirements":"==8.0.0","direct":true,"kind":"runtime","optional":false},{"id":7347946010,"package_name":"xesmf","ecosystem":"pypi","requirements":"==0.3.0","direct":true,"kind":"runtime","optional":false},{"id":7347946011,"package_name":"numpy","ecosystem":"pypi","requirements":"==1.22.0","direct":true,"kind":"runtime","optional":false},{"id":7347946012,"package_name":"pandas","ecosystem":"pypi","requirements":"==1.0.3","direct":true,"kind":"runtime","optional":false},{"id":7347946013,"package_name":"pyyaml","ecosystem":"pypi","requirements":"==5.4","direct":true,"kind":"runtime","optional":false}]}],"score":4.969813299576001,"created_at":"2023-09-11T14:52:10.984Z","updated_at":"2026-04-13T17:30:23.937Z","avatar_url":"https://github.com/quishqa.png","language":"Python","category":"Emissions","sub_category":"Emission Observation and Modeling","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# PyChEmiss\n\n`PyChEmiss` is a Python script to create the `wrfchemi` file from surface local emissions needed to run WRF-Chem model. It's based on his older broder [AAS4WRF.ncl](https://github.com/alvv1986/AAS4WRF).\n\n\n## Installation\n\nYou need to install the packages that `PyChEmiss` needs. We recommend to use\n[miniconda](https://docs.conda.io/en/latest/miniconda.html).\n\nYou can download this repo or clone it by:\n\n```\ngit clone https://github.com/quishqa/PyChEmiss.git\n```\n\nThen add `conda-forge` channel by:\n\n```\nconda config --add channels conda-forge\n```\n\nTo avoid conflicts during the installation, we also recommend create a new environment to run `PyChEmiss`:\n\n```\nconda create --name PyChEmiss\nconda activate PyChEmiss\n```\n\n\n### Option A\n\nNow you can install `espmy`, `xesmf` and `pyyaml`. By doing this, `xarray`,\n`numpy`,  and `pandas`will be also installed:\n\n```\nconda install esmpy\nconda install xesmf\nconda install pyyaml\n```\n\nIt's important to first install `esmpy` to avoid [this issue](https://github.com/JiaweiZhuang/xESMF/issues/47#issuecomment-593322288).\n\n\n### Option B\nOr, you can install the packages located in `requirements.txt` by typing:\n\n```\nconda install --yes --file requirements.txt\n```\n\nIf everything goes well, you are ready to go.\n\n## The input data\nTo run this script you need the `wrfinput_d0x` and your temporal and spatial disaggregated emissions in **mol/km\u003csup\u003e2\u003c/sup\u003e/hr** for gasses and in **ug/m\u003csup\u003e2\u003c/sup\u003e/s** for aerossol species. You can see the needed format by exploring `emissions_3km.txt` file.\n\nTo untar the example files:\n```\ntar -zxvf emissions_3km.tar.gz\ntar -zxvf wrfinput_d02.tar.gz\n```\n\n## Configuration file: `pychemiss.yml`\nThis file controls some parameters to run the script. `\"\"` are required only in `sep`.\n* `wrfinput_file`: the location of wrfinput_d0x.\n* `emission_file`: the location of the local emission file.\n* `nx` and `ny`: the number of longitude and latitude points in which local emission were spatially disaggregated.\n* `cell_area`: cell area in km\u003csup\u003e2\u003c/sup\u003e of input `emission_file`.\n* `start_date` and `end_date`: `emissions_3km.txt` temporal availability in `%Y-%m-%d %H:%M` format.\n* `header`: If your local emission file has a header.\n* `col_names`: Names of emission file column names. **Remember that the three\nfirst columns have to be named \"i\", \"lon\", and \"lat\"**.\n* `sep`: Column delimiter in emission file. Use quotes (`\"\"`)\n* `method`: we implement `nearest_s2d` methods for emissions regridding\n(a conservative method is on the way!).\n\n## Usage\n\nTo run the script, type:\n```\npython src/pychemiss.py pychemiss.yml\n```\n\nTo check that everything is working properly up to this point, we recommend to visualize the content of the output file, for example, by using `ncview`\n```\nncview wrfchemi_d02_2018-06-21_00:00:00\n```\n\n### WRF-Chem namelist configuration\n\nTo use the `wrfchemi` file in a standard WRF-Chem simulation, set some control parameters in the `namelist.input` file as follows\n```\n\u0026time_control\nio_form_auxinput5                   = 2,\nauxinput5_inname                    = 'wrfchemi_d\u003cdomain\u003e',\nauxinput5_interval_m                = 60,\nframes_per_auxinput5                = 240,\n/\n\n\u0026chem\nio_style_emissions                  = 2,\n/\n```\n\n240 is the number of times (hours) in the `wrfchemi` file.\n\nFor 24 hours of emissions data, the preprocessor will automatically build two 12-hour emission files: `wrfchemi_00z_d02` (00 to 11 UTC) and `wrfchemi_12z_d02` (12 to 23 UTC). In this case, set `frame_per_auxinput5` to 12 and `io_style_emissions` to 1.\n\n### Output example\nHere there is a comparison between the local emission of CO (with \u0026Delta;X= 3 Km) and the\noutput after using `pychemiss.py` for a WRF domain of \u0026Delta;X = 3 km.\n\n![Alt text](./pychemiss_example.svg)\n\n### Expected Runtime\n\nFor a WRF domain with 150 x 100 points and for ten days with hourly emissions  (nx =30 and ny=27, like the above figure), in a \"normal\" laptop, it took 30 seconds to run.\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["optimize","transforms","archiving","measur","conversion","observation","animals","compose","projection","generic"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/20227","html_url":"https://ost.ecosyste.ms/projects/20227"}