swxsoc_reach.util.schema#
REACH-specific schema metadata derivations.
Extends SWXSchema with REACH-specific
global and variable attribute schema layers (YAML) and custom
derivation functions.
This follows the same pattern established by the HERMES mission
in hermes_core.util.schema.HermesDataSchema.
Classes
|
Schema for REACH CDF data requirements and formatting. |
- class swxsoc_reach.util.schema.REACHDataSchema(global_schema_layers: list[Path] | None = None, variable_schema_layers: list[Path] | None = None, use_defaults: bool | None = True)[source]#
Schema for REACH CDF data requirements and formatting.
Layers REACH-specific global and variable attribute YAML schemas on top of the SWxSOC defaults. Overrides derivation functions for
Logical_sourceandLogical_file_idto produce REACH-appropriate values.- Parameters:
global_schema_layers (list[Path] or None, optional) – Additional global attribute schema files layered after the REACH defaults.
variable_schema_layers (list[Path] or None, optional) – Additional variable attribute schema files layered after the REACH defaults.
use_defaults (bool, optional) – Whether to include the SWxSOC/SAMMI base defaults (default True).
- _get_logical_file_id(data)[source]#
Derive the
Logical_file_idglobal attribute for REACH.The attribute stores the name of the CDF File without the file extension (e.g. ‘.cdf’). This attribute is requires to avoid loss of the originial source in case of renaming.
- Parameters:
data (
SWXData) – The assembled SWXData instance.- Returns:
str –
Logical_file_idvalue (CDF filename without extension).