GOBLIN Lite
GOBLIN Lite: A National Land Balance Model for Assessment of Climate Mitigation Pathways for Ireland. - Published in JOSS (2024)
Science Score: 93.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in JOSS metadata -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Repository
A goblin tool for the generation of static land balance scenarios and environment
Basic Info
- Host: GitHub
- Owner: GOBLIN-Proj
- License: gpl-3.0
- Language: Python
- Default Branch: main
- Homepage: https://goblin-proj.github.io/goblin_lite/html/index.html
- Size: 40.3 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 6
Topics
Metadata Files
README.md
🧌🏋️ Goblin lite, for the generation of static scenarios using the GOBLIN modelling framework
Based on the GOBLIN (General Overview for a Backcasting approach of Livestock INtensification) Scenario module
The package makes use of several other custom packages that are designed around the original GOBLIN model and the Geo GOBLIN model. It is called "GOBLIN lite" more so for the fact that it does not rely on heavy code base found in previous GOBLIN models. Instead, the GOBLIN lite package coordinates stand alone packages related to herd generation, grassland production, land use, forest carbon sequestration, scenario generation and scenario assessment.
In addition to climate change impact categories, goblin lite also produces eutrophication and air quality impacts as well.
There are specific classes for the retrieval of input and output dataframes, and the production of a limited number of graphics.
GOBLIN lite also has the capacity to rank scenarios based on environmental impacts and the overall change in protein production.
For a full list of custom package documentation that GOBLIN lite relies on, please see the FUSION research website.
Installation
Install from git hub.
```bash pip install "goblinlite@git+https://github.com/GOBLIN-Proj/goblinlite.git@main"
```
Install from PyPI
bash
pip install goblin_lite
Usage
Firstly, the config.json file should look like the following. The example shows a two scenarios.
To add additional scenarios, simply repeat the inputs given here, update the values, including the sceanrio numbers.
In previous versions, each scenario took 4 rows, 1 for each livestock system. This has been reduced to a single row for each scenario with additional prameters.
In addition, a csv file can now be used instead. Simply add the keys as columns and the values in the rows, with a row for every scenario.
Note: Afforest year should be the target year + 1
json
[{
"Scenarios": 0,
"Manure management cattle": "tank liquid",
"Manure management sheep": "solid",
"Dairy pop": 1060000,
"Beef pop":10000,
"Upland sheep pop": 3000,
"Lowland sheep pop": 50000,
"Dairy prod":0,
"Beef prod":0,
"Lowland sheep prod": 0,
"Upland sheep prod": 0,
"Forest area":1,
"Conifer proportion":0.7,
"Broadleaf proportion": 0.3,
"Conifer harvest": 0.05,
"Conifer thinned": 0.1,
"Broadleaf harvest": 0,
"Crop area": 0,
"Wetland area":0,
"Dairy GUE":0,
"Beef GUE":0,
"Dairy Pasture fertilisation": 150,
"Beef Pasture fertilisation": 110,
"Clover proportion": 0.5,
"Clover fertilisation": 0,
"Urea proportion": 0.2,
"Urea abated proportion": 0,
"Afforest year": 2051
},
{
"Scenarios": 1,
"Manure management cattle": "tank liquid",
"Manure management sheep": "solid",
"Dairy pop": 1060000,
"Beef pop":10000,
"Upland sheep pop": 10000,
"Lowland sheep pop": 10000,
"Dairy prod":0,
"Beef prod":0,
"Lowland sheep prod": 0,
"Upland sheep prod": 0,
"Forest area":1,
"Conifer proportion":0.7,
"Broadleaf proportion": 0.3,
"Conifer harvest": 0.05,
"Conifer thinned": 0.8,
"Broadleaf harvest": 0,
"Crop area": 0,
"Wetland area":0,
"Dairy GUE":0,
"Beef GUE":0,
"Dairy Pasture fertilisation": 150,
"Beef Pasture fertilisation": 110,
"Clover proportion": 0.5,
"Clover fertilisation": 0,
"Urea proportion": 0.2,
"Urea abated proportion": 0,
"Afforest year": 2051
}]
The model also requires a yaml file to set specific parameters for the CBM CFS3 model
```yaml DynamicAfforestation: afforestdelay: 5 #delays scenario afforestation by x years annualafforestationratepredelay: 1200 #the default annual afforestation rate before during the delay period species_distribution: #the distribution of species in the landscape during delay period - Sitka: 0.7 - SGB: 0.3
Forest_management: intensity: high
Classifiers: baseline: harvest: clearfell: - conifer: 0.95 - broadleaf: 0.6 thinning: - conifer: 0.5 - broadleaf: 0.9 scenario: harvest: clearfell: - broadleaf: 0.0 thinning: - broadleaf: 0.5
ageclasses: maxage: 100 age_interval: 5
species: - Sitka - SGB
yieldclass: Sitka: - YC1316: 0.37 - YC1720: 0.26 - YC2024: 0.20 - YC24_30: 0.17 SGB: - YC10: 1 ```
Below is an example of the model, which generates scenarios, and the uses the results to generate graphics.
```python from goblinlite.goblin import ScenarioRunner from goblinlite.resourcemanager.goblindatamanager import GoblinDataManager from goblinlite.scenarioanalysis.datagrapher import DataGrapher import shutil import os
def main(): # configuration goblinconfig = "./data/config.json" cbmconfig = "./data/cbmfactory.yaml" efcountry = "ireland" baselineyear = 2020 targetyear = 2050
data_path = "./graph_data"
# remove graph dir
shutil.rmtree(data_path)
# output dir
os.mkdir(data_path)
# create goblin data manager
goblin_data_manger = GoblinDataManager(
ef_country = ef_country,
calibration_year= baseline_year,
target_year= target_year,
configuration_path= goblin_config,
cbm_configuration_path= cbm_config,
)
# class instances
runner_class = ScenarioRunner(goblin_data_manger)
graph_class = DataGrapher()
# run scenarios
runner_class.run_scenarios()
# plot data
graph_class.plot_animal_lca_emissions_by_category(data_path)
graph_class.plot_land_use_emissions(data_path)
graph_class.plot_forest_flux(data_path, detail=True)
graph_class.plot_forest_aggregate(data_path)
graph_class.plot_forest_flux_subplot(data_path)
graph_class.plot_crop_lca_emissions_by_category(data_path)
graph_class.plot_crop_livestock_lca_emissions_by_category(data_path)
# ranking variables
target = 0.01
gas = "CO2E"
# plot ranks
graph_class.rank_chart(target, gas, data_path)
if name == "main": main() ```
License
This project is licensed under the terms of the GPL-3.0-or-later license.
Owner
- Name: GOBLIN
- Login: GOBLIN-Proj
- Kind: organization
- Email: colm.duffy@universityofgalway.ie
- Location: Ireland
- Website: https://fusion-research.eu/
- Twitter: FusionRsrchHub
- Repositories: 1
- Profile: https://github.com/GOBLIN-Proj
The GOBLIN project develops software to assess the environmental impacts of land use change, focusing on transitions between agriculture, forestry, and wetlands
JOSS Publication
GOBLIN Lite: A National Land Balance Model for Assessment of Climate Mitigation Pathways for Ireland.
Authors
Tags
Land use change climate change environmental impactGitHub Events
Total
- Release event: 1
- Delete event: 2
- Push event: 12
- Pull request event: 4
- Fork event: 1
- Create event: 3
Last Year
- Release event: 1
- Delete event: 2
- Push event: 12
- Pull request event: 4
- Fork event: 1
- Create event: 3
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 11
- Total pull requests: 43
- Average time to close issues: about 15 hours
- Average time to close pull requests: about 3 hours
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 0.09
- Average comments per pull request: 0.0
- Merged pull requests: 42
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: about 3 hours
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- colmduff (10)
- mengqi-z (1)
Pull Request Authors
- colmduff (49)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 14 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 6
- Total maintainers: 1
pypi.org: goblin_lite
A goblin tool for the generation of static land balance scenarios and environmental impacts
- Documentation: https://goblin_lite.readthedocs.io/
- License: GPL-3.0
-
Latest release: 0.5.0
published about 1 year ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v4 composite
- actions/upload-artifact v1 composite
- openjournals/openjournals-draft-action master composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
