Skip to content

Have varobsWriters store their output_varbc_predictors value locally. - #304

Open
lewisn-met wants to merge 1 commit into
developfrom
bugfix/varbc-shared-state
Open

lewisn-met wants to merge 1 commit into
developfrom
bugfix/varbc-shared-state

Conversation

@lewisn-met

@lewisn-met lewisn-met commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR adds a local variable to each varobs writer to store the value of the yaml parameter output_varbc_predictors and set the value of the module variable VarBC before reading VarObs fields or writing output. This ensures that the writer gets the correct value of VarBC when executing as part of a task with multiple writers (e.g. malak_engl_cx).

The PR also adds testing of the multi-writer scenario, with one writer having output_varbc_predictors: true, followed by another writer using the default. If working correctly, following the execution of the first writer, BiasPredictors (80) should be found in the fields column. This is validated using the new expectedVarFields VarObsChecker option.

Issue

Resolves #303

Testing

UKMO ctests and KGOs can be found here:
https://cylchub/services/cylc-review/suites?user=lewis.napper&no_fuzzy_time=0&names=*opsinputsBundle*&per_page=&order=time_desc

Merging this PR requires KGO updates to malak_engl_cx only.

@lewisn-met lewisn-met self-assigned this Nov 11, 2026
@lewisn-met lewisn-met added the bug Something isn't working label Nov 11, 2026
@lewisn-met lewisn-met changed the title Each writer stores its VarBCPredictors value. Added testing. Have varobsWriters store their output_varbc_predictors value locally. Nov 11, 2026
@lewisn-met lewisn-met added the KGO update Pull requests that require update to test references label Nov 12, 2026

@ctgh Chris Thomas (ctgh) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good fix. Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working KGO update Pull requests that require update to test references

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VarBC shared state overwritten between construction and execution in multi-writer workflows.

3 participants