Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* SDPT v2 removal factor refactoring. * adding calc spreadsheet, R script to reformat, and reformated v2 RF spreadsheet * Working on rasterizing SDPT v2. * Working on SDPT postgis preprocessing. * Docker-compose build wasn't working; issue with postgres part. Trying to fix it. * Working through plantation preparation script updates. * Rasterizing 1x1 tiles from postgis essentially works-- minimal test. * Cleaning up script. 1x1 tile creation part still seems to work. * Cleaned up 1x1 tile creation function and it works. Haven't tested 10x10 tile creation function yet. * 1x1 and 10x10 planted forest tile creation works on one test tile locally. * Updated documentation and preprocessing code chunks. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Testing rasterization on SDPT v2 with dummy RF and stdev on ec2. * Various SDPT v2 changes, including paths. * updated: constants_and_names.py - added information for 6 updated SDPTv2 tile datasets found on gfw-data-lake universal_util.py - modifed s3_file_download function to download SDPTv2 tile datasets from gfw-data-lake * updated: refactored all instances of pattern_gain_data_lake to pattern_data_lake universal_util.py - modified s3_folder_download function for gfw-data-lake tile sets mp_prep_other_inputs_one_off - updated code to download SDPTv2 tile datasets * updated: universal_util.py - modified rewindow and mp_warp_to_hansen functions for gfw-data-lake tile sets mp_prep_other_inputs_one_off - updated code to rewindow, gdalwarp, and upload all SDPTv2 datasets to s3 storage. Also, modified to require a process number to run one specific one-off process at a time. Successfully run for one test tile set (AGC removal factor). Currently running for the remaining datasets. * updated: mp_prep_other_inputs_one_off - added TODOs from David's comments and included planted forest establishment year for future runs. Successfully ran (locally) for all tiles in each dataset. * updated: cleaned up the planted_forest_prep folder. * Tier 1 RF Updates for Temperate Forests updated constants_and_names.py: - version changed to 1.2.4 - gain_spreadsheet changed to updated s3 file ending with the date 20230821 the following variables have been changed to updated s3 directories with the date 20230815: model_extent_dir, age_cat_IPCC_dir, annual_gain_AGB_IPCC_defaults_dir, annual_gain_BGB_IPCC_defaults_dir, annual_gain_AGC_all_types_dir, annual_gain_BGC_all_types_dir, annual_gain_AGC_BGC_all_types_dir, gain_year_count_dir, cumul_gain_AGCO2_all_types_dir, cumul_gain_BGCO2_all_types_dir, cumul_gain_AGCO2_BGCO2_all_types_dir, cumul_gain_AGCO2_BGCO2_all_types_forest_extent_dir, emis_pool_run_date, emis_run_date_biomass_soil, emis_run_date_soil_only, net_flux_dir, net_flux_forest_extent_dir, cumul_gain_AGCO2_BGCO2_all_types_per_pixel_full_extent_dir, cumul_gain_AGCO2_BGCO2_all_types_per_pixel_forest_extent_dir, gross_emis_all_gases_all_drivers_biomass_soil_per_pixel_full_extent_dir, gross_emis_all_gases_all_drivers_biomass_soil_per_pixel_forest_extent_dir, net_flux_per_pixel_full_extent_dir, net_flux_per_pixel_forest_extent_dir, output_aggreg_dir, stdev_annual_gain_AGB_IPCC_defaults_dir, stdev_annual_gain_AGC_all_types_dir (cherry picked from commit b7277db) * Tier 1 RF Updates for Temperate Forests updated constants_and_names.py: - removal_forest_type_dir changed to updated s3 directory with the date 20230815 (accidentally missed during previous commit) (cherry picked from commit a392f43) * Need to recreate soil C tiles because I accidentally deleted them. * Need to recreate soil C tiles because I accidentally deleted them. * Going to make new soil carbon folders. * Going to make new soil carbon folders. * Creating mangrove soil C tiles first. * Creating mangrove soil C tiles first. * Creating mangrove soil C tiles first. * Creating mangrove soil C tiles first. * Creating combined soil C now. * Creating combined soil C now. * Creating combined soil C now. * Creating combined soil C now. * Creating combined soil C now. * Creating combined soil C now. * Creating combined soil C now. * Creating new total C in 2000 tiles. * Total C 2000 tiles are too big without bigtiff. * New Develop Branch: - Merged SDPTv2 and IPCC Tier 1 feature branches together to create a new develop branch and successfully ran 4 tiles locally - updated plantation_type in constants.h - updated drivers_processed_dir with terminal /, pattern_annual_gain_AGC_BGC_planted_forest, pattern_stdev_annual_gain_AGC_BGC_planted_forest, and soil_C_full_extent_2000_dir in constants_and_names.py - Updated cn.count threshold from 2 to 12 for local processing in mp_annual_gain_rate_AGC_BGC_all_forest_types.py and mp_gross_removals_all_forest_types.py - Updated out_pattern from '_Mt_per_year' to '_Mt_per_year_' in universal_util.py * the following variables have been changed to updated s3 directories with the date 20231109: model_extent_dir, age_cat_IPCC_dir, annual_gain_AGB_IPCC_defaults_dir, annual_gain_BGB_IPCC_defaults_dir, annual_gain_AGC_all_types_dir, annual_gain_BGC_all_types_dir, annual_gain_AGC_BGC_all_types_dir, removal_forest_type_dir, gain_year_count_dir, cumul_gain_AGCO2_all_types_dir, cumul_gain_BGCO2_all_types_dir, cumul_gain_AGCO2_BGCO2_all_types_dir, cumul_gain_AGCO2_BGCO2_all_types_forest_extent_dir, emis_pool_run_date, emis_run_date_biomass_soil, emis_run_date_soil_only, net_flux_dir, net_flux_forest_extent_dir, cumul_gain_AGCO2_BGCO2_all_types_per_pixel_full_extent_dir, cumul_gain_AGCO2_BGCO2_all_types_per_pixel_forest_extent_dir, gross_emis_all_gases_all_drivers_biomass_soil_per_pixel_full_extent_dir, gross_emis_all_gases_all_drivers_biomass_soil_per_pixel_forest_extent_dir, net_flux_per_pixel_full_extent_dir, net_flux_per_pixel_forest_extent_dir, output_aggreg_dir, stdev_annual_gain_AGB_IPCC_defaults_dir, stdev_annual_gain_AGC_all_types_dir * Changed branch name and version number in constants_and_names.py * Making new soil C uncertainty tiles. * EC2 Select Tile Run Update: - Ran 4 tiles on an EC2 instance and fixed the following issues: - Updated the path for planted forest removal factors from annual_gain_AGC_BGC_planted_forest_dir = os.path.join(s3_base_dir, f'gfw2-data/climate/carbon_model/annual_removal_factor_planted_forest/{planted_forest_version}_AGC_BGC/{planted_forest_output_date}/') to annual_gain_AGC_BGC_planted_forest_dir = os.path.join(s3_base_dir, f'annual_removal_factor_planted_forest/{planted_forest_version}_AGC_BGC/{planted_forest_output_date}/') - Updated soil tile patterns from pattern_soil_C_full_extent_2000_non_mang = 'soil_C_ha_full_extent_2000_non_mangrove_Mg_ha' to pattern_soil_C_full_extent_2000_non_mang = 'soil_C_full_extent_2000_non_mangrove_Mg_C_ha' and pattern_soil_C_full_extent_2000 = 't_soil_C_ha_full_extent_2000' to pattern_soil_C_full_extent_2000 = 'soil_C_full_extent_2000_Mg_C_ha' * EC2 Select Tile Run Update: - Ran 4 tiles on an EC2 instance and fixed the following issues for the create_derivative_outputs stage: - changed dates for input tile sets from 20231109 to 20238888: cumul_gain_AGCO2_all_types_dir, cumul_gain_BGCO2_all_types_dir, cumul_gain_AGCO2_BGCO2_all_types_dir, cumul_gain_AGCO2_BGCO2_all_types_forest_extent_dir, emis_run_date_soil_only, and net_flux_dir. * EC2 Select Tile Run Update: - Ran 4 tiles on an EC2 instance and fixed the following issues for the create_derivative_outputs stage: - changed dates for input tile sets from 20231109 to 20238888: emis_run_date_biomass_soil * EC2 Full Model Run Update: - Ran 4 tiles on an EC2 instance and successfully completed the create_derivative_outputs stage - Updated output dates in constants_and_names.py from 20238888 to 20231114 and from 20231109 to 20231114 * Updates: - Added CarbonFluxQA code in analyses folder to calculate ArcGIS zonal stats for model output - Fixed a comment typo in model_extent.py * Making new soil C uncertainty tiles. * Adding updated CarbonFluxQA folder in analyses folder and removing hidden .git file (copied over from CarbonFluxQA repo) --------- Co-authored-by: dagibbs22 <[email protected]>
- Loading branch information