-
-
Notifications
You must be signed in to change notification settings - Fork 5
Nl blend adjuster #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Nl blend adjuster #165
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e11b5e8
renamed forecaster name from blend to nl_blend
PavanRaghavendraKulkarni 8de9294
nl_blend_adjuster
PavanRaghavendraKulkarni 16e2bb8
lint error
PavanRaghavendraKulkarni ffe67b9
fix: add missing trailing newline to config.yaml
PavanRaghavendraKulkarni 8159188
Merge branch 'main' into nl_blend_adjuster
PavanRaghavendraKulkarni 1eeba51
added unit test cases
PavanRaghavendraKulkarni ab439a7
description enhancement
PavanRaghavendraKulkarni 8de06a9
test: update test_run_blend_app_success to verify double execution of…
PavanRaghavendraKulkarni eabf121
suggested changes
PavanRaghavendraKulkarni f4260b0
comment fixes
PavanRaghavendraKulkarni d5281d3
lint fixes
PavanRaghavendraKulkarni 86bb11f
use actual instead of makup removed redududnat tests
PavanRaghavendraKulkarni 9a86a68
lint fixes
PavanRaghavendraKulkarni 4d834cb
refactorting of blend app and test for rename columns
PavanRaghavendraKulkarni e9d316c
suggested fixes
PavanRaghavendraKulkarni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| """Adjuster helpers for the blend pipeline. | ||
|
|
||
| The adjuster blend is identical to the main blend, except it operates on | ||
| adjuster model forecasts ({model_name}_adjust) instead of the main model | ||
| forecasts. | ||
|
|
||
| This module provides a single helper to derive adjuster model names from | ||
| the standard candidate and backup model names. | ||
| """ | ||
| import logging | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| def get_adjuster_model_name(model_name: str) -> str: | ||
| """Returns the adjuster forecaster name for a given model name. | ||
|
|
||
| Args: | ||
| model_name: Standard model name (e.g. "nl_regional_pv_ecmwf_mo_sat"). | ||
|
|
||
| Returns: | ||
| Adjuster model name (e.g. "nl_regional_pv_ecmwf_mo_sat_adjust"). | ||
| """ | ||
| return f"{model_name}_adjust" | ||
|
|
||
|
|
||
| def get_adjuster_model_names( | ||
| backup_model: str, | ||
| candidate_models: list[str], | ||
| ) -> tuple[str, list[str]]: | ||
| """Derives adjuster model names for the backup and all candidates. | ||
|
|
||
| Args: | ||
| backup_model: Standard backup model name. | ||
| candidate_models: Standard candidate model names. | ||
|
|
||
| Returns: | ||
| Tuple of (adjuster_backup_model, adjuster_candidate_models). | ||
| """ | ||
| adjuster_backup = get_adjuster_model_name(backup_model) | ||
| adjuster_candidates = [get_adjuster_model_name(m) for m in candidate_models] | ||
|
|
||
| logger.debug( | ||
| f"Adjuster models derived - backup: '{adjuster_backup}', " | ||
| f"candidates: {adjuster_candidates}", | ||
| ) | ||
|
|
||
| return adjuster_backup, adjuster_candidates | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.