You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow overwriting location of site_specific directory #590
Experiments with lfric_atm show that it is sufficient to just support importing from two different (relative) directories: first try importing Config from apps_specific/..., if that doesn't work, fall back to site_specific/....
This way there is no change to any suites not requiring application specific settings.
LFRic_atm can then be configured using multiple inheritance. Using site_specific the way they are already defined in lfric_core, the lfric_atm apps can use the following:
apps_specific/target/default/config,py:
from site_specific.default.config import Config as DefaultSiteConfig
class Config(DefaultSiteConfig):
def __init__(self):
super().__init__()
apps_specific/target/nci_gadi/config.py:
from site_specific.nci_gadi.config import Config as DefaultSiteConfig
from apps_specific.default.config import Config as DefaultAppsConfig
class Config(DefaultAppsConfig, DefaultSiteConfig):
def __init__(self) -> None:
super().__init__()
For example, setting up compiler-specific flags can be done in SiteConfig-default, then modified by SiteConfig-nci, then AppsConfig-default, finally AppsConfig-nci.
Activity
#590 Don't add 'site_specific' to search path, to better allow applic…
hiker commentedon Aug 6, 2026
Experiments with lfric_atm show that it is sufficient to just support importing from two different (relative) directories: first try importing Config from
apps_specific/..., if that doesn't work, fall back tosite_specific/....This way there is no change to any suites not requiring application specific settings.
LFRic_atm can then be configured using multiple inheritance. Using
site_specificthe way they are already defined in lfric_core, the lfric_atm apps can use the following:apps_specific/target/default/config,py:
apps_specific/target/nci_gadi/config.py:
This then leads to the following execution order:
For example, setting up compiler-specific flags can be done in
SiteConfig-default, then modified bySiteConfig-nci, thenAppsConfig-default, finallyAppsConfig-nci.#590 Updated config files and test documentation.
#590 Added documentation for app_specific setup.
#590 Added more documentation.
#590 Updated contributors.
#590 Fix optional arguments not being optional.
#590 Fixed documentation.
hiker commentedon Aug 25, 2026
Closed in #591.