{"id":51157387,"url":"https://github.com/gisma/migration-fieldclim","last_synced_at":"2026-06-26T11:30:26.572Z","repository":{"id":360814964,"uuid":"1251727856","full_name":"gisma/migration-fieldclim","owner":"gisma","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-04T21:38:36.000Z","size":111846,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-04T23:12:56.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","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/gisma.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-27T21:26:20.000Z","updated_at":"2026-06-04T21:38:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gisma/migration-fieldclim","commit_stats":null,"previous_names":["gisma/migration-fieldclim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gisma/migration-fieldclim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gisma%2Fmigration-fieldclim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gisma%2Fmigration-fieldclim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gisma%2Fmigration-fieldclim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gisma%2Fmigration-fieldclim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gisma","download_url":"https://codeload.github.com/gisma/migration-fieldclim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gisma%2Fmigration-fieldclim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34815669,"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-06-26T02:00:06.560Z","response_time":106,"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":"2026-06-26T11:30:25.332Z","updated_at":"2026-06-26T11:30:26.560Z","avatar_url":"https://github.com/gisma.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fieldClim\n\n`fieldClim` is an R package for weather-station based microclimate and micrometeorological calculations.\n\nIt provides functions for:\n\n- organizing station data in a `weather_station` object\n- calculating short-wave, long-wave and net radiation components\n- estimating atmospheric transmittance and solar-geometry variables\n- calculating soil heat flux and soil thermal parameters\n- estimating sensible and latent heat fluxes from standard station data\n- comparing Priestley-Taylor, Bulk-Residual, Bowen-ratio, Monin-Obukhov/Profile and Penman-type heat-flux paths\n- estimating thermal and mechanical boundary-layer properties\n\nThe package was originally cloned from:\n\n```text\nhttps://gitlab.uni-marburg.de/fb19/ag-bendix/fieldClim.git\n```\n\nThis repository is a private development and migration repository. It is under active consolidation and should not be treated as a stable public release.\n\n## Installation\n\nInstall the current development version with:\n\n```r\npak::pak(\"https://github.com/gisma/migration-fieldclim.git\")\n```\n\nThen load the package with:\n\n```r\nlibrary(fieldClim)\n```\n\nFor private repository access, R must be authenticated against GitHub, for example via a valid `GITHUB_PAT`.\n\n## Current status\n\nThe current workflow is a weather-station based energy-balance and heat-flux workflow. \n\nA small packaged example dataset is included:\n\n```text\ninst/extdata/caldern_wiese_2017-06-30.csv\n```\n\nIt contains one complete 5-minute day with 288 observations. The full Caldern raw dataset is intentionally not included.\n\nHistorical rendered HTML vignettes in the repository may be archived outputs and should not be treated as current numerical references.\n\n## Sign convention\n\nThe consolidated sign convention is:\n\n```text\nRn \u003e 0   radiative energy input at the surface\nG  \u003e 0   heat flux into the soil\nH  \u003e 0   sensible heat flux away from the surface\nLE \u003e 0   latent heat flux away from the surface\n```\n\nThe available turbulent energy is:\n\n```text\nRn - G\n```\n\nFor energy-balance closing methods:\n\n```text\nH + LE = Rn - G\n```\n\nNot all implemented methods are energy-balance closing methods. Priestley-Taylor, finite uncapped Bowen-ratio cases and valid Bulk-Residual cases are interpreted through this balance. Monin-Obukhov/Profile outputs are profile-based estimates and are not forced to close `Rn - G`. Penman is implemented as a latent-heat-only comparison path.\n\n## Main heat-flux workflows\n\nA restricted Priestley-Taylor workflow is available through:\n\n```r\nturb_flux_calc(weather_station, pt_only = TRUE)\n```\n\nThis computes only:\n\n```text\nsensible_priestley_taylor\nlatent_priestley_taylor\n```\n\nThe full workflow is available through:\n\n```r\nturb_flux_calc(weather_station)\n```\n\nIt attempts the available heat-flux paths:\n\n```text\nPriestley-Taylor\nBulk-Residual\nBowen-ratio\nMonin-Obukhov/Profile\nPenman-type latent heat\n```\n\nBulk-Residual can also be calculated explicitly:\n\n```r\nturb_flux_bulk_residual(weather_station)\n```\n\nFor stations with two wind heights, the optional Richardson-number guard can be enabled:\n\n```r\nturb_flux_bulk_residual(\n  weather_station,\n  stability_method = \"ri_guard\"\n)\n```\n\nThe default remains the neutral unguarded bulk estimate:\n\n```r\nstability_method = \"none\"\n```\n\n## Energy-balance closure diagnostics\n\n`fieldClim` provides `energy_balance_closure()` to make the closure behaviour\nof calculated heat-flux outputs explicit. The function does not compute new\nfluxes. It inspects existing fields of a `weather_station` object and compares\nthe available energy, `rad_bal - soil_flux`, with already calculated sensible\nand latent heat fluxes.\n\nFor methods with paired sensible and latent heat outputs, the diagnostic\nresidual is:\n\n```r\nclosure_residual = rad_bal - soil_flux - sensible - latent\n```\n\nand the closure ratio is:\n\n```r\nclosure_ratio = (sensible + latent) / (rad_bal - soil_flux)\n```\n\nFor Penman, `fieldClim` reports an open complement:\n\n```r\nunresolved_complement = rad_bal - soil_flux - latent_penman\n```\n\nThis complement must not be interpreted as sensible heat. Monin-Obukhov/Profile\nresiduals are diagnostic differences between profile-derived turbulent fluxes\nand available energy; they are not automatic errors and are not forced to close.\nFormal closure indicates an algebraic relationship in the package output, not\nphysical validation.\n\nThe companion `plot_energy_balance_closure()` function plots residuals,\nPenman unresolved complements and closure ratios from the diagnostic output.\n\nBulk-Residual is treated on two levels: the sensible-heat estimate can use different exchange-velocity assumptions, while the latent heat flux remains residual closure through `rad_bal - soil_flux - sensible_bulk`.\n\n\n## Missing-data inspection and quality-control boundary\n\n`fieldClim` does not fill, impute, interpolate, model, complete or replace missing meteorological time-series data. The package can inspect `weather_station` objects with `inspect_weather_station_inputs()` to report available variables, missingness, gap runs, variable classes, simple quality-control flags and heat-flux method input availability.\n\nAny treatment of missing data must be performed outside `fieldClim` in a documented external workflow. The package does not create `*_filled` replacement columns and heat-flux methods require their actual input fields.\n\nThe missing-data inspection vignette demonstrates this read-only workflow using a synthetic gap/QC variant of the packaged Caldern teaching dataset.\n\n## Validation status\n\nThe package is now tested for internal consistency. Method equations, helper equations, guard behaviour and `weather_station` wrappers are covered by automated tests.\n\nThe tests verify that the implemented code matches the documented equations. They do not claim empirical validation against independent flux measurements.\n\nSource references and method-family context are documented in the help pages and vignettes. Further validation can be added through benchmark datasets, published numerical examples and explicit table-value audits where needed.\n\n## Main changes in version 1.2.0\n\nThe detailed changelog is maintained in `NEWS.md`. The main functional changes are:\n\n- Added Bulk-Residual workflow with `sensible_bulk()`, `latent_bulk_residual()` and `turb_flux_bulk_residual()`.\n- Added optional Richardson-number guard for Bulk-Residual.\n- Corrected Penman vapour-pressure scaling from hPa to kPa.\n- Corrected `sensible_monin()` to use `z2 - z1` instead of `log(z2 - z1)`.\n- Added guards for invalid or non-finite Bowen, Monin-Obukhov/Profile, Penman, soil, Richardson-number and transmittance states.\n- Improved POSIXct/POSIXlt handling in solar and humidity-related paths.\n- Fixed `hum_precipitable_water()` for POSIXct input in the `rad_sw_in()` -\u003e `trans_vapor()` path.\n- Corrected `soil_attenuation()` argument forwarding.\n- Extended `turb_flux_calc()` with Bulk-Residual output, `pt_only`, and graceful Penman fallback to `NA`.\n- Added `energy_balance_closure()` and `plot_energy_balance_closure()` for diagnostic inspection of formal closure behaviour in existing flux outputs.\n- Updated Roxygen documentation for formulas, units, sign conventions and guard behaviour.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgisma%2Fmigration-fieldclim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgisma%2Fmigration-fieldclim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgisma%2Fmigration-fieldclim/lists"}