Skip to content

Commit 7c50adc

Browse files
authored
Merge pull request #3508 from divine7022/ic-generation
Add IC_SOILGRID_Utilities for SoilGrids Data Processing
2 parents 46bb179 + 9ad1921 commit 7c50adc

File tree

9 files changed

+481
-5
lines changed

9 files changed

+481
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ section for the next release.
3030
- The ERA5 NC extraction function can now handle multi-site instead of one.
3131
- Added function for merging images from the same tiling system (MODIS, GLANCE, ICESat-2, HLS, etc.).
3232
- Added function for converting images towards the GDAL-supported formats (H5, NetCDF, HDF4, GeoTIFF, etc .).
33+
- New utility script `IC_SOILGRID_Utilities.R` for processing SoilGrids data to generate soil carbon initial condition (IC) files. This includes (#3508):
34+
- **`soilgrids_ic_process`**: A function to extract, process, and generate ensemble members from SoilGrids250m data.
35+
- **`preprocess_soilgrids_data`**: A helper function to handle missing values and ensure data integrity during preprocessing.
36+
- **`generate_soilgrids_ensemble`**: A function to create ensemble members for a site based on processed soil carbon data.
3337
- `extract.nc.ERA5()` and `met2CF.ERA5` now supports both ensemble and reanalysis data processing .
3438

3539
- Initial Quarto notebook `run_pecan.qmd` to run PEcAn Demo 1 workflow from a pre-configured `pecan.xml` file, enabling notebook-based model runs, analysis, and visualization.[#3531](https://github.com/PecanProject/pecan/pull/3531)

docker/depends/pecan_package_dependencies.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@
187187
"MASS","*","base/utils","Suggests",FALSE
188188
"MASS","*","modules/assim.batch","Imports",FALSE
189189
"MASS","*","modules/data.atmosphere","Imports",FALSE
190+
"MASS","*","modules/data.land","Suggests",FALSE
190191
"MASS","*","modules/meta.analysis","Imports",FALSE
191192
"MASS","*","modules/priors","Imports",FALSE
192193
"MASS","*","modules/rtm","Imports",FALSE

modules/data.land/DESCRIPTION

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Description: The Predictive Ecosystem Carbon Analyzer (PEcAn) is a scientific
2323
efficacy of scientific investigation.
2424
URL: https://pecanproject.github.io
2525
BugReports: https://github.com/PecanProject/pecan/issues
26-
Depends: R (>= 3.5.0)
26+
Depends: R (>= 4.1.0)
2727
Imports:
2828
coda,
2929
curl,
@@ -59,7 +59,7 @@ Imports:
5959
tidyr,
6060
tidyselect,
6161
traits,
62-
XML (>= 3.98-1.4)
62+
XML (>= 3.98-1.4)
6363
Suggests:
6464
dataone,
6565
datapack,
@@ -70,7 +70,8 @@ Suggests:
7070
raster,
7171
reticulate,
7272
testthat (>= 1.0.2),
73-
withr
73+
withr,
74+
MASS
7475
Remotes:
7576
github::ropensci/traits
7677
License: BSD_3_clause + file LICENSE

modules/data.land/NAMESPACE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export(format_identifier)
2828
export(from.Tag)
2929
export(from.TreeCode)
3030
export(gSSURGO.Query)
31+
export(generate_soilgrids_ensemble)
3132
export(get.attributes)
3233
export(get.soil)
3334
export(get_resource_map)
@@ -47,6 +48,7 @@ export(plot2AGB)
4748
export(pool_ic_list2netcdf)
4849
export(pool_ic_netcdf2list)
4950
export(prepare_pools)
51+
export(preprocess_soilgrids_data)
5052
export(put_veg_module)
5153
export(sample_ic)
5254
export(sclass)
@@ -56,6 +58,7 @@ export(soil2netcdf)
5658
export(soil_params)
5759
export(soil_params_ensemble_soilgrids)
5860
export(soil_process)
61+
export(soilgrids_ic_process)
5962
export(soilgrids_soilC_extract)
6063
export(soilgrids_texture_extraction)
6164
export(subset_layer)

modules/data.land/NEWS.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Unreleased
22

33
* Add function `clip_and_save_raster_file()` for subsetting rasters to match a polygon of interest (#3537).
4-
4+
* New utility script `IC_SOILGRID_Utilities.R` for processing SoilGrids data to generate soil carbon initial condition (IC) files. This includes (#3508):
5+
- **`soilgrids_ic_process`**: A function to extract, process, and generate ensemble members from SoilGrids250m data.
6+
- **`preprocess_soilgrids_data`**: A helper function to handle missing values and ensure data integrity during preprocessing.
7+
- **`generate_soilgrids_ensemble`**: A function to create ensemble members for a site based on processed soil carbon data.
58

69
# PEcAn.data.land 1.8.2
710
- Removed unused parameter `machine` from put_veg_module()
@@ -23,7 +26,7 @@
2326
* Included all relevant carbon pools (`ROOT_BIOMASS`, `AG_BIOMASS`, `SOIL_STOCK`, `LIT_BIOMASS`) in BADM-based IC extraction; excluded non-pool variables like `SOIL_CHEM`.
2427
* Added explicit support for `LIT_BIOMASS` to fully utilize **BADM** biomass capabilities.
2528
* Added `test-IC_BADM_Utilities.R` to validate BADM initial condition extraction and processing
26-
29+
2730
## Fixed
2831

2932
* `gSSURGO.Query()` now always returns all the columns requested, even ones that are all NA. It also now always requires `mukeys` to be specified.

0 commit comments

Comments
 (0)