{"id":18847871,"url":"https://github.com/zmoon/clm-ml-mb","last_synced_at":"2026-03-19T06:41:53.975Z","repository":{"id":114822095,"uuid":"333207399","full_name":"zmoon/CLM-ml-mb","owner":"zmoon","description":"Gordon Bonan's CLM-ml with sub-band canopy RT calculations","archived":false,"fork":false,"pushed_at":"2021-06-10T21:09:18.000Z","size":704,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-23T00:40:09.068Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zmoon.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":"2021-01-26T20:23:41.000Z","updated_at":"2023-12-12T15:52:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"47e2bc84-6474-4806-a7d4-f0cdc6b2bedb","html_url":"https://github.com/zmoon/CLM-ml-mb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zmoon/CLM-ml-mb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmoon%2FCLM-ml-mb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmoon%2FCLM-ml-mb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmoon%2FCLM-ml-mb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmoon%2FCLM-ml-mb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zmoon","download_url":"https://codeload.github.com/zmoon/CLM-ml-mb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmoon%2FCLM-ml-mb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28784093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: 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"}},"keywords":[],"created_at":"2024-11-08T03:09:56.754Z","updated_at":"2026-01-26T18:01:53.710Z","avatar_url":"https://github.com/zmoon.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLM-ml-mb\nRunning Gordon Bonan's CLM-ml, with\n* more options\n* Python\n* multiple sub-bands per waveband in the solar RT (hence `-mb`)\n\nNote\n* Bonan has the source code for the multilayer canopy part (here in [`f/src/canopy`](f/src/canopy)) at [gbonan/CLM-ml_v0](https://github.com/gbonan/CLM-ml_v0),\n  which goes with a 2018 GMD paper: doi:[10.5194/gmd-11-1467-2018](https://doi.org/10.5194/gmd-11-1467-2018)\n\n\n## Dependencies\n\n* Cloning the repo\n  - [Git LFS](https://git-lfs.github.com/) (to download the `.nc` files)\n* Build/compile\n  - build system: [Meson](https://mesonbuild.com/) + [Ninja](https://ninja-build.org/)\n  - compiler: Fortran compiler (currently only GNU `gfortran` is supported in [the `meson.build`](f/src/meson.build))\n  - libraries: NetCDF-Fortran, LAPACK, BLAS\n* Running with Python\n  - see [the CI Python requirements](.github/workflows/ci_requirements.txt)\n\n### Ubuntu\n\n(or other Linux with `apt`)\n\n```bash\nsudo apt install gfortran libnetcdf-dev libnetcdff-dev libblas-dev liblapack-dev meson ninja-build\n```\n\n### Windows (MSYS2)\n\nThe `meson.build` assumes that `C:/msys64` is the location of the [MSYS2](https://www.msys2.org/) installation.\n\n1. To get `gfortran`(`.exe`) and most of the Fortran dependencies, open MSYS2 and:\n   ```bash\n   pacman -S mingw64/mingw-w64-x86_64-gcc-fortran mingw64/mingw-w64-x86_64-netcdf mingw64/mingw-w64-x86_64-lapack\n   ```\n   That LAPACK includes `libblas`.\n\n2. [Download](https://www.unidata.ucar.edu/downloads/netcdf/) NetCDF-Fortran and [build from source](https://www.unidata.ucar.edu/software/netcdf/docs/building_netcdf_fortran.html) with `NCDIR=/mingw64`, `FC=gfortran`, `NFDIR=$NCDIR`.\n\n3. Install Meson and Ninja to Windows. For example, into the Conda env.\n\nFor me, the model runs faster on [WSL](https://docs.microsoft.com/en-us/windows/wsl/about), though.\n\n\n\u003c!-- TODO: Conda, Brew  --\u003e\n\n\n## Building the model\n\n1. Navigate into `f/src` and invoke `meson setup build`\n2. Enter `build` and invoke `meson compile` or `ninja`\n\nOr, without leaving the repo root:\n```bash\nmeson setup f/src/build f/src \u0026\u0026 meson compile -C f/src/build\n```\n\n\n## Original Bonan notes\n\n*Provided by Bonan in a Word document along with the driver code, modified slightly by me.*\n\nThe code is configured to run for one particular tower site (US-UMB) for one year (2006) and one month (July) and has the necessary meteorological forcing and CLM datasets needed to run the model. The directory `output` contains model output for this simulation. These files can be used to verify the model is running correctly.\n\nThe model is compiled and run from the directory `exe`.\n\nExecuting `make` within directory `exe` creates the executable `prgm.exe`. The code is run using:\n```bash\n./prgm.exe \u003c namelists/nl.US-UMB.2006\n```\n\nNote that the directory `tower-fluxes` is not required. This is just an example of tower fluxes (derived from measurements) used to test the model.\n\n`driver/CLMml_driver.F90` – This is the main time-stepping driver for the model. The model processes one tower site for a specified month and for a specified year.\n\n`driver/controlMod.F90` – This routine sets run-time options used with the model. Model options are controlled by a namelist file (required). **However, the namelist is not up-to-date. This routine overwrites and hardwires model options.** There are multiple options related to solar radiation, stomatal conductance, photosynthesis, and other things. These were used during model development and testing. The default values are set in this routine. Other options should only be used after verifying they work. This routine also sets three directories for input/output:\n\n1. tower meteorological forcing: `diratm = '../tower-forcing/'`\n2. CLM4.5 forcing: `dirclm = '../clm4_5/'`\n3. Model ouput: `dirout = '../output/'`\n\nFour important variables set in the namelist file that control the tower data are:\n\n1. Tower site: `tower = 'US-UMB'`\n2. Tower year: `tower_yrbeg = 2006`\n3. Tower year: `tower_yrend = 2006`\n4. Tower month: `tower_month = 7`\n\n`driver/TowerDataMod.F90` – This sets parameters associated with each tower site.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmoon%2Fclm-ml-mb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmoon%2Fclm-ml-mb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmoon%2Fclm-ml-mb/lists"}