{"id":28411134,"url":"https://github.com/climlab/climlab-rrtmg","last_synced_at":"2025-10-19T06:04:29.091Z","repository":{"id":42009448,"uuid":"462095137","full_name":"climlab/climlab-rrtmg","owner":"climlab","description":"A stand-along Python wrapper for the RRTMG radiation modules","archived":false,"fork":false,"pushed_at":"2025-02-26T23:04:46.000Z","size":1992,"stargazers_count":8,"open_issues_count":9,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T08:42:27.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Fortran","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/climlab.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-22T01:39:50.000Z","updated_at":"2025-02-26T22:59:07.000Z","dependencies_parsed_at":"2023-12-25T01:06:18.559Z","dependency_job_id":"b2b46f55-5154-4dad-94b7-c57da6db3536","html_url":"https://github.com/climlab/climlab-rrtmg","commit_stats":{"total_commits":35,"total_committers":2,"mean_commits":17.5,"dds":0.05714285714285716,"last_synced_commit":"3db6e66b1c735c694ca2f37fd259d73bb26868e9"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/climlab/climlab-rrtmg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/climlab%2Fclimlab-rrtmg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/climlab%2Fclimlab-rrtmg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/climlab%2Fclimlab-rrtmg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/climlab%2Fclimlab-rrtmg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/climlab","download_url":"https://codeload.github.com/climlab/climlab-rrtmg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/climlab%2Fclimlab-rrtmg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268393900,"owners_count":24243315,"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-08-02T02:00:12.353Z","response_time":74,"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-06-02T13:39:57.579Z","updated_at":"2025-10-19T06:04:24.053Z","avatar_url":"https://github.com/climlab.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# climlab-rrtmg\n\n[![Build and test](https://github.com/climlab/climlab-rrtmg/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/climlab/climlab-rrtmg/actions/workflows/build-and-test.yml)\n\nBrian Rose, University at Albany\n\n## About\n\nThis is a stand-alone Python wrapper for the [RRTMG](http://rtweb.aer.com/rrtm_frame.html) radiation modules.\n\nThe primary use-case is to drive the RRTMG radiation processes in [climlab](https://climlab.readthedocs.io/),\nbut it can be used as a stand-alone radiation model if you are familiar with the\nRRTMG Fortran interface. This is a lightweight wrapper that emulates the Fortran\ninterface as closely as possible.\n\nCurrently we are wrapping RRTMG_LW v4.85 and RRTMG_SW v4.0. The Fortran source code\nis included in this repository. The latest versions 5.0 of the RRTMG source code\nare available on GitHub [here](https://github.com/AER-RC)\n\nThis wrapper includes the following modifications:\n\n- RRTMG_LW is modified to allow reporting of OLR components in spectral bands,\n as illustrated using climlab\n[here](https://climlab.readthedocs.io/en/latest/courseware/Spectral_OLR_with_RRTMG.html).\nThis modification is strictly diagnostic does not change any other behavior of RRTMG_LW.\n- RRTMG_SW is modified to allow gridpoint-specific values of the input parameter `adjes` \nwhich is the adjustment to total solar irradiance. \n\nThe parameter `adjes` is used within RRTMG_SW to account for time-of-year adjustments \nto Earth-Sun distance. Latest versions of climlab compute non-uniform values of \n`irradiance_factor` to compensate for [different diurnal averages of the solar zenith angle](https://climlab.readthedocs.io/en/latest/api/climlab.radiation.insolation.html). \nclimlab's `irradiance_factor` is mapped to `adjes` when this RRTMG driver is called from climlab.\n\n\n## Installation\n\nPre-built binaries for many platforms are available from [conda-forge](https://conda-forge.org).\n\nTo install in the current environment:\n```\nconda install climlab-rrtmg --channel conda-forge\n```\nor create a self-contained environment:\n```\nconda create --name my_env python=3.13 climlab-rrtmg --channel conda-forge\nconda activate my_env\n```\n\nSee below for instructions on how to build from source.\n\n## Example usage\n\nYou can import the modules into a Python session with\n```\nfrom climlab_rrtmg import rrtmg_lw, rrtmg_sw\n```\n\nThe main RRTMG drivers are exposed through\n```\nrrtmg_lw.climlab_rrtmg_lw()\n```\nand\n```\nrrtmg_sw.climlab_rrtmg_sw()\n```\n\nPlease see the directory `climlab_rrtmg/tests/` directory in this repository\nfor working examples that set up all the necessary input arrays and call the drivers.\n\n## Building from source\n\nHere are instructions to create a build environment (including Fortran compiler)\nwith conda and build using f2py.\n\nTo build:\n```\nconda env create --file ./ci/requirements.yml\nconda activate rrtmg_build_env\npython -m pip install . --no-deps -vv\n```\n\nTo run tests, do this from any directory other than the climlab-rrtmg repo:\n```\npytest -v --pyargs climlab_rrtmg\n```\n\n## Version history\n\n- Version 0.4.1 (late Feburary 2025) is a bug fix, now properly exposing some constants defined in the Fortran code to the Python wrapper.\n- Version 0.4 (released February 2025) is a major refactor of the build system so this package can run on Python 3.12 and above. The build now uses [meson](https://mesonbuild.com/).\n- Version 0.3 (released January 2025) includes the modification for grid-variable `adjes` described above. It is designed to work with climlab v0.9 and higher.\n- Version 0.2 is the first public release (April 2022).\nThe Python wrapper code has been extracted from\n[climlab v0.7.13](https://github.com/brian-rose/climlab/releases/tag/v0.7.13).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclimlab%2Fclimlab-rrtmg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclimlab%2Fclimlab-rrtmg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclimlab%2Fclimlab-rrtmg/lists"}