Skip to content

Refactor Settings handling in soilgrids_ic_process() #3706

@divine7022

Description

@divine7022

Description

soilgrids_ic_process() in modules/data.land/R/IC_SOILGRID_Utilities.R currently uses ad-hoc logic to handle Settings vs MultiSettings inputs.

  • it relies on checking element structure instead of proper type validation
  • inconsistent with PEcAn conventions (doesn't use is.Settings() / is.MultiSettings())

Proposed Refactor

  • normalize settings using proper type checking
  • extract site info from normalized settings
  • use PEcAn.settings::papply() for per-site IC generation

Tasks

  • update settings normalization to use is.Settings() / is.MultiSettings()
  • use papply() for per-site IC generation
  • update function documentation
  • update tests

Reference

See PEcAn XML Settings documentation for Settings/MultiSettings structure details.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions