Skip to content

Add ensemble functionality#17

Open
KristianHMoller wants to merge 6 commits into
dmidk:mainfrom
KristianHMoller:feature/ensemble_support
Open

Add ensemble functionality#17
KristianHMoller wants to merge 6 commits into
dmidk:mainfrom
KristianHMoller:feature/ensemble_support

Conversation

@KristianHMoller

@KristianHMoller KristianHMoller commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

The underlying probabilistic advection method has the option of running an ensemble with noise. However, until now, this option has not been implemented into sunflow.

This PR allows for running as an ensemble by specifying the environment variable ENS_MEMBERS to be different from one. Per default, the output will be the ensemble median, but specifying --full_ensemble when calling sunflow will instead provide the full ensemble as output. The output_mode global attribute in the NetCDF file will specify the type of output: full ensemble, median or deterministic.

The default values of the noise parameters alpha and beta are 0 for deterministic mode and using other values will result in a warning.
For ensemble mode, currently, the default values are taken from Carpentieri et al.: https://www.sciencedirect.com/science/article/pii/S030626192301139X

Dependency: Requires this PR to be merged prior to yielding correct results: dmidk/SolarSTEPS#2

@KristianHMoller

KristianHMoller commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Scientific question 1: Which values to use for alpha and beta?
Currently using optimal values from Carpentieri et al., but these may be country-specific and are presumably derived with the potential error in the implementation (dmidk/SolarSTEPS#2).
Also: @irenelivia , we used slightly different values in our previous code. Do you recall why?

@KristianHMoller

Copy link
Copy Markdown
Contributor Author

Implementation question 1: Do we want warning or failure if running deterministically (only one ensemble member) with noise?

@KristianHMoller

Copy link
Copy Markdown
Contributor Author

Implementation question 2: Do we want the number of ensemble members and noise parameters to be CLI arguments rather than environemnt variables? I.e. parameters called when running sunflow: sunflow --ens_members 10?

@KristianHMoller KristianHMoller marked this pull request as ready for review July 1, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant