wri / carbon-budget Goto Github PK
View Code? Open in Web Editor NEWCalculate gross GHG emissions, gross carbon removals (sequestration), and net flux from forests globally
License: GNU General Public License v3.0
Calculate gross GHG emissions, gross carbon removals (sequestration), and net flux from forests globally
License: GNU General Public License v3.0
Hi there,
Thanks for making all the code to run your model openly available (including Docker containers, really helpful). I have what I think is a much more basic question: do you have the code to make your supplementary tables in this repository (and if not, would you be willing to add it)? In particular it would be great to see how Table S6 compiles other data sources together.
Thanks!
Running the run_full_model.py
without S3 credentials, doesn't seem to be able to download data.
Most recent clone of the repository with docker compose build, running the container locally.
docker compose build
c++ /usr/local/app/emissions/cpp_util/calc_gross_emissions_generic.cpp -o /usr/local/app/emissions/cpp_util/calc_gross_emissions_generic.exe -lgdal
python run_full_model.py -si -t std -s all -r -d 20220101 -l 30N_090E -ce loss -p biomass_soil -tcd 30 -ln "30N_090E test"
Model should download data (if I read the docs correctly)
Tile fails to download with following errors, I tried a few different options but errors are the same:
root@69f2299626d9:/usr/local/app# python run_full_model.py -si -t std -s all -r -d 20220101 -l 30N_090E -ce loss -p biomass_soil -tcd 30 -ln "30N_090E test"
LOG: s3 credentials not found. Uploading to s3 disabled but downloading enabled.
LOG: Analysis stages to run: ['model_extent', 'forest_age_category_IPCC', 'annual_removals_IPCC', 'annual_removals_all_forest_types', 'gain_year_count', 'gross_removals_all_forest_types', 'carbon_pools', 'gross_emissions', 'net_flux', 'aggregate', 'create_supplementary_outputs']
LOG: Storage used: 0 ; Available storage: 7.8G ; Percent storage used: 0%
LOG: C++ for generic emissions already compiled.
LOG: :::::Creating tiles of model extent
LOG: ['30N_090E']
LOG: There are 1 tiles to process
LOG: Option 1: Checking if 30N_090E_mangrove_agb_t_ha_2000.tif is already on spot machine...
LOG: Option 1 failure: 30N_090E_mangrove_agb_t_ha_2000.tif is not already on spot machine.
LOG: Option 2: Checking for tile s3://gfw2-data/climate/carbon_model/mangrove_biomass/processed/standard/20190220/30N_090E_mangrove_agb_t_ha_2000.tif on s3...
fatal error: Unable to locate credentials
LOG: Option 2 failure: Tile s3://gfw2-data/climate/carbon_model/mangrove_biomass/processed/standard/20190220/30N_090E_mangrove_agb_t_ha_2000.tif not found on s3. Tile not found but it seems it should be. Check file paths and names.
LOG: Option 1: Checking if Hansen_GFC2015_gain_30N_090E.tif is already on spot machine...
LOG: Option 1 failure: Hansen_GFC2015_gain_30N_090E.tif is not already on spot machine.
LOG: Option 2: Checking for tile s3://gfw2-data/forest_change/tree_cover_gain/gaindata_2012/Hansen_GFC2015_gain_30N_090E.tif on s3...
fatal error: Unable to locate credentials
LOG: Option 2 failure: Tile s3://gfw2-data/forest_change/tree_cover_gain/gaindata_2012/Hansen_GFC2015_gain_30N_090E.tif not found on s3. Tile not found but it seems it should be. Check file paths and names.
LOG: Option 1: Checking if 30N_090E_plantation_2000_or_earlier_processed.tif is already on spot machine...
LOG: Option 1 failure: 30N_090E_plantation_2000_or_earlier_processed.tif is not already on spot machine.
LOG: Option 2: Checking for tile s3://gfw2-data/climate/carbon_model/other_emissions_inputs/IDN_MYS_plantation_pre_2000/processed/20200724/30N_090E_plantation_2000_or_earlier_processed.tif on s3...
fatal error: Unable to locate credentials
LOG: Option 2 failure: Tile s3://gfw2-data/climate/carbon_model/other_emissions_inputs/IDN_MYS_plantation_pre_2000/processed/20200724/30N_090E_plantation_2000_or_earlier_processed.tif not found on s3. Tile not found but it seems it should be. Check file paths and names.
LOG: Option 1: Checking if Hansen_GFC2014_treecover2000_30N_090E.tif is already on spot machine...
LOG: Option 1 failure: Hansen_GFC2014_treecover2000_30N_090E.tif is not already on spot machine.
LOG: Option 2: Checking for tile s3://gfw2-data/forest_cover/2000_treecover/Hansen_GFC2014_treecover2000_30N_090E.tif on s3...
fatal error: Unable to locate credentials
LOG: Option 2 failure: Tile s3://gfw2-data/forest_cover/2000_treecover/Hansen_GFC2014_treecover2000_30N_090E.tif not found on s3. Tile not found but it seems it should be. Check file paths and names.
LOG: Option 1: Checking if 30N_090E_t_aboveground_biomass_ha_2000.tif is already on spot machine...
LOG: Option 1 failure: 30N_090E_t_aboveground_biomass_ha_2000.tif is not already on spot machine.
LOG: Option 2: Checking for tile s3://gfw2-data/climate/WHRC_biomass/WHRC_V4/Processed/30N_090E_t_aboveground_biomass_ha_2000.tif on s3...
fatal error: Unable to locate credentials
LOG: Option 2 failure: Tile s3://gfw2-data/climate/WHRC_biomass/WHRC_V4/Processed/30N_090E_t_aboveground_biomass_ha_2000.tif not found on s3. Tile not found but it seems it should be. Check file paths and names.
LOG: Changing output directory date based on date provided with model run-through
LOG: ['s3://gfw2-data/climate/carbon_model/model_extent/standard/20220101/']
LOG: Model extent processors= 3
LOG: Delineating model extent: 30N_090E
LOG: Using Hansen tcd tile 30N_090E for std model run
LOG: Using WHRC biomass tile 30N_090E for std model run
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "rasterio/_base.pyx", line 216, in rasterio._base.DatasetBase.__init__
File "rasterio/_shim.pyx", line 67, in rasterio._shim.open_dataset
File "rasterio/_err.pyx", line 213, in rasterio._err.exc_wrap_pointer
rasterio._err.CPLE_OpenFailedError: Hansen_GFC2014_treecover2000_30N_090E.tif: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/usr/local/app/data_prep/model_extent.py", line 47, in model_extent
with rasterio.open(tcd) as tcd_src:
File "/usr/local/lib/python3.6/dist-packages/rasterio/env.py", line 433, in wrapper
return f(*args, **kwds)
File "/usr/local/lib/python3.6/dist-packages/rasterio/__init__.py", line 221, in open
s = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)
File "rasterio/_base.pyx", line 218, in rasterio._base.DatasetBase.__init__
rasterio.errors.RasterioIOError: Hansen_GFC2014_treecover2000_30N_090E.tif: No such file or directory
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "run_full_model.py", line 634, in <module>
main()
File "run_full_model.py", line 305, in main
mp_model_extent(sensit_type, tile_id_list, run_date=run_date, no_upload=no_upload)
File "/usr/local/app/data_prep/mp_model_extent.py", line 103, in mp_model_extent
pool.map(partial(model_extent.model_extent, pattern=pattern, sensit_type=sensit_type, no_upload=no_upload), tile_id_list)
File "/usr/lib/python3.6/multiprocessing/pool.py", line 266, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
rasterio.errors.RasterioIOError: Hansen_GFC2014_treecover2000_30N_090E.tif: No such file or directory
root@69f2299626d9:/usr/local/app#
Am I doing something wrong?
Any help would be much appreciated!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.