Parameter Validation (Detailed)
Catalog-specific parameter validators for climate data queries.
Overview
The climakitae.new_core.param_validation module provides catalog-specific validators that ensure climate data query parameters are valid before execution. Each validator:
- Validates required parameters for its catalog
- Checks parameter compatibility
- Suggests corrections for invalid parameters
- Handles edge cases (e.g., models that don't reach warming levels)
Base Validator
All validators inherit from the abstract base class:
Parameter validation module for climakitae.
This module provides a comprehensive framework for validating query parameters used throughout the climakitae package. It includes:
- Abstract base class for parameter validation (
ParameterValidator) - Registry system for catalog and processor validators
- Validation logic for dataset queries and processing parameters
- Helper functions for finding closest matching options when validation fails
The validation system operates on two levels: 1. Catalog validation: Ensures query parameters match available datasets 2. Processor validation: Validates processing parameters for data transformations
Classes:
| Name | Description |
|---|---|
ParameterValidator |
Abstract base class defining the parameter validation interface.
Subclasses must implement |
Functions:
| Name | Description |
|---|---|
register_catalog_validator |
Decorator for registering catalog validator classes. |
register_processor_validator |
Decorator for registering processor validator classes. |
Module Variables
_CATALOG_VALIDATOR_REGISTRY : dict Registry mapping validator names to catalog validator classes. _PROCESSOR_VALIDATOR_REGISTRY : dict Registry mapping validator names to processor validator classes.
Examples:
>>> @register_catalog_validator("my_catalog")
... class MyCatalogValidator(ParameterValidator):
... def is_valid_query(self, query):
... # Implementation here
... pass
ParameterValidator()
Bases: ABC
Abstract base class for parameter validation in climakitae.
This class provides a framework for validating user queries containing dataset selection parameters and processing parameters. It handles:
- Catalog parameter validation (dataset selection)
- Processor parameter validation (data transformations)
- Error handling and user-friendly suggestions
- Parameter conversion and normalization
The validation process includes: 1. Converting user input to catalog keys 2. Searching for matching datasets in the catalog 3. Providing suggestions for invalid parameters 4. Validating processing parameters
Attributes:
| Name | Type | Description |
|---|---|---|
catalog_path |
str
|
Path to the catalog CSV file. |
catalog |
object
|
Data catalog instance for dataset searching. |
all_catalog_keys |
dict
|
Dictionary of catalog keys populated from user query. |
catalog_df |
DataFrame
|
DataFrame containing catalog information. |
Methods:
| Name | Description |
|---|---|
is_valid_query |
Abstract method to validate query parameters. Must be implemented by subclasses. |
populate_catalog_keys |
Populate catalog keys from user query. |
load_catalog_df |
Load the catalog DataFrame. |
Notes
Subclasses must implement the is_valid_query method to define
specific validation logic for their use case.
Examples:
>>> class MyValidator(ParameterValidator):
... def is_valid_query(self, query):
... # Custom validation logic
... return self._is_valid_query(query)
Initialize the ParameterValidator.
Sets up the validator with default catalog path and initializes catalog-related attributes. Loads the catalog DataFrame upon instantiation.
Attributes initialized: - catalog_path: Path to the catalog CSV file - catalog: Set to UNSET initially, populated by subclasses - all_catalog_keys: Set to UNSET initially, populated during validation - catalog_df: Loaded from DataCatalog
Source code in climakitae/new_core/param_validation/abc_param_validation.py
get_default_processors(query)
Get default processors for this catalog.
This method returns a dictionary of default processor configurations that should be applied if not explicitly set by the user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
Dict[str, Any]
|
The current query containing user parameters |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary mapping processor names to their default configurations |
Notes
Subclasses should override this method to provide catalog-specific defaults. The default implementation returns only the universal defaults that apply to all catalogs.
Source code in climakitae/new_core/param_validation/abc_param_validation.py
is_valid_query(query)
abstractmethod
Validate the query parameters (abstract method).
This method must be implemented by subclasses to define specific validation logic for their use case. It should validate both catalog parameters (for dataset selection) and processing parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
Dict[str, Any]
|
Query parameters to validate. Expected to contain: - Dataset selection parameters (e.g., variable, experiment_id, etc.) - Processing parameters under the 'processes' key - Any other relevant validation parameters |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any] | None
|
Validated and processed query parameters if valid, None if invalid. When returning a dictionary, it should contain the cleaned and validated parameters ready for dataset retrieval. |
Notes
Implementations typically call _is_valid_query() to leverage the
common validation logic provided by the base class.
Examples:
>>> def is_valid_query(self, query):
... # Custom pre-processing
... processed_query = self.preprocess_query(query)
... # Use base class validation
... return self._is_valid_query(processed_query)
Source code in climakitae/new_core/param_validation/abc_param_validation.py
populate_catalog_keys(query)
Populate catalog keys from user query, filtering out unset values.
This method extracts relevant catalog parameters from the user query
and stores them in self.all_catalog_keys. Only parameters that are
actually set (not UNSET) are retained.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
Dict[str, Any]
|
User query containing potential catalog parameters. |
required |
Returns:
| Type | Description |
|---|---|
None
|
Updates |
Notes
This method assumes self.all_catalog_keys already contains the expected
catalog parameter names (typically initialized by subclasses). The method:
1. Maps query values to catalog keys
2. Removes any UNSET values
3. Stores the result in self.all_catalog_keys
Side Effects
Modifies self.all_catalog_keys attribute.
Source code in climakitae/new_core/param_validation/abc_param_validation.py
load_catalog_df()
Load the data catalog DataFrame and assign to instance attribute.
Creates a DataCatalog instance and extracts its catalog DataFrame for use in parameter validation. The DataFrame contains metadata about available datasets.
Returns:
| Type | Description |
|---|---|
None
|
Sets |
Notes
This method is called during initialization and provides access to the catalog data needed for parameter validation and suggestion generation.
Side Effects
Sets self.catalog_df attribute with the loaded catalog DataFrame.
Source code in climakitae/new_core/param_validation/abc_param_validation.py
register_catalog_validator(name)
Decorator to register a catalog validator class in the global registry.
This decorator allows validator classes to be registered for use with specific catalog types. Registered validators can be retrieved and instantiated by name from the global registry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Unique name to register the validator under. This name will be used to look up the validator class in the registry. |
required |
Returns:
| Type | Description |
|---|---|
function
|
Decorator function that registers the class and returns it unchanged. |
Examples:
>>> @register_catalog_validator("my_catalog")
... class MyCatalogValidator(ParameterValidator):
... def is_valid_query(self, query):
... return self._is_valid_query(query)
>>> # Later retrieval:
>>> validator_class = _CATALOG_VALIDATOR_REGISTRY["my_catalog"]
>>> validator = validator_class()
Notes
The registered class is stored in the module-level
_CATALOG_VALIDATOR_REGISTRY dictionary.
Source code in climakitae/new_core/param_validation/abc_param_validation.py
register_processor_validator(name)
Decorator to register a processor validator function in the global registry.
This decorator allows processor validation functions to be registered for use with specific processing parameters. Registered validators can be retrieved and called by name from the global registry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Unique name to register the processor validator under. This should match the processor parameter name that the validator handles. |
required |
Returns:
| Type | Description |
|---|---|
function
|
Decorator function that registers the validator function and returns it unchanged. |
Examples:
>>> @register_processor_validator("spatial_subset")
... def validate_spatial_subset(value, query=None):
... # Validation logic for spatial_subset processor
... return isinstance(value, dict) and 'bounds' in value
>>> # Later retrieval and use:
>>> validator_func = _PROCESSOR_VALIDATOR_REGISTRY["spatial_subset"]
>>> is_valid = validator_func(subset_params, query=user_query)
Notes
- The registered function is stored in the module-level
_PROCESSOR_VALIDATOR_REGISTRYdictionary - Processor validators should accept
valueand optionalqueryparameters - Validators may modify the query in-place for parameter normalization
Source code in climakitae/new_core/param_validation/abc_param_validation.py
Catalog Validators
Validator for data catalog parameters.
DataValidator(catalog)
Bases: ParameterValidator
Validator for data catalog parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
DataCatalog
|
the DataCatalog object to validate against |
required |
Initialize with catalog of renewable energy datasets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
DataCatalog
|
Catalog of datasets |
required |
Source code in climakitae/new_core/param_validation/cadcat_param_validator.py
get_default_processors(query)
Get default processors for CADCAT catalog.
Climate model data gets filter_unadjusted_models and smart concatenation based on experiment_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
Dict[str, Any]
|
The current query containing user parameters |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary mapping processor names to their default configurations |
Source code in climakitae/new_core/param_validation/cadcat_param_validator.py
is_valid_query(query)
Catalog specific validation for the query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
Dict[str, Any]
|
The query to validate. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any] | None
|
The validated query if valid, None otherwise. |
Notes
A list of checks that are performed on the query:
- Check if the query contains the localize processor. Localize is not supported for LOCA2 datasets.
Source code in climakitae/new_core/param_validation/cadcat_param_validator.py
Validator for parameters provided to Warming Level Processor.
validate_time_slice_param(value, **kwargs)
Validate the parameters provided to the time slice Processor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
tuple(date - like, date - like)
|
The value to subset the data by. This should be a tuple of two date-like values. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if all parameters are valid, False otherwise |
Source code in climakitae/new_core/param_validation/time_slice_param_validator.py
Validator for parameters provided to Warming Level Processor.
validate_warming_level_param(value, **kwargs)
Validate the parameters provided to the Warming Level Processor.
This function checks the value provided to the Warming Level Processor and ensures that it meets the expected criteria. Will raise a user warning and return false if the value is not valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Union[str, list, dict[str, Any]]
|
The configuration dictionary to validate. Expected keys: - warming_levels : list[float] List of global warming levels in degrees C (e.g., [1.5, 2.0]) - warming_level_months : list[int], optional List of months to include (1-12). Default: all months - warming_level_window : int, optional Number of years before and after the central year. Default: 15 - add_dummy_time: bool, optional Default: False If True, replace the [hours/days/months]_from_center or time_delta dimension in a DataArray returned from WarmingLevels with a dummy time index for calculations with tools that require a time dimension. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if all parameters are valid, False otherwise |
Source code in climakitae/new_core/param_validation/warming_param_validator.py
Validator for parameters provided to Clip Processor.
validate_clip_param(value, **kwargs)
Validate parameter passed to Clip Processor.
This function validates and normalizes parameters for the Clip processor, addressing common input validation issues:
- Input Validation: Rejects None values and mixed types
- Empty/Whitespace Handling: Filters out empty/whitespace strings
- Case Sensitivity: Provides consistent handling and warnings for case mismatches
- Duplicate Handling: Deduplicates boundary lists while preserving order
- Coordinate Validation: Validates lat/lon coordinate bounds
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
Parameter value to validate. This can be a string, list of strings, or a tuple of coordinate bounds. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the parameter is valid, otherwise raises an exception. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the input is invalid and cannot be corrected |
TypeError
|
If the input type is not supported |
Source code in climakitae/new_core/param_validation/clip_param_validator.py
Validator for parameters provided to Export Processor.
validate_export_param(value, **_kwargs)
Validate parameters passed to Export Processor.
This function validates and normalizes parameters for the Export processor, addressing common input validation issues:
- File Path Validation: Checks if output files already exist
- Parameter Type Validation: Ensures correct types for all parameters
- Format/Mode Compatibility: Validates S3 requires Zarr format
- Template Validation: Validates filename template placeholders
- File Conflict Detection: Warns about existing files with similar names
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
Export configuration parameters (expected to be a dictionary) |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if parameters are valid, False otherwise |
Raises:
| Type | Description |
|---|---|
ValueError
|
If parameters are invalid and cannot be corrected |
TypeError
|
If parameter types are incorrect |
Source code in climakitae/new_core/param_validation/export_param_validator.py
validate_export_output_path(filename, file_format='NetCDF', check_permissions=True)
Comprehensive validation of export output path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Filename for export |
required |
file_format
|
str
|
File format for extension mapping |
'NetCDF'
|
check_permissions
|
bool
|
Whether to check write permissions |
True
|
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Validation results with warnings and recommendations |
Source code in climakitae/new_core/param_validation/export_param_validator.py
suggest_export_alternatives(params)
Suggest alternative export configurations when file conflicts are detected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
Dict[str, Any]
|
Original export parameters |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
Dictionary of suggested alternatives |
Source code in climakitae/new_core/param_validation/export_param_validator.py
Processor Validators
Validator for parameters provided to Concat Processor.
validate_concat_param(value, **kwargs)
Validate the parameters provided to the Concat Processor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
str
|
The dimension name along which to concatenate datasets. Default: "sim" |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if all parameters are valid, False otherwise |
Source code in climakitae/new_core/param_validation/concat_param_validator.py
Validator for parameters provided to MetricCalc Processor.
validate_metric_calc_param(value, **kwargs)
Validate the parameters provided to the MetricCalc Processor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
dict[str, Any]
|
Configuration dictionary with the following supported keys: Basic Metrics: - metric (str, optional): Metric to calculate. Supported values: "min", "max", "mean", "median". Default: "mean" - percentiles (list, optional): List of percentiles to calculate (0-100). Default: None - percentiles_only (bool, optional): If True and percentiles are specified, only calculate percentiles (skip metric). Default: False - dim (str or list, optional): Dimension(s) along which to calculate the metric/percentiles. Default: "time" - skipna (bool, optional): Whether to skip NaN values in calculations. Default: True |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if all parameters are valid, False otherwise |
Source code in climakitae/new_core/param_validation/metric_calc_param_validator.py
Validator for parameters provided to Convert Units Processor.
validate_convert_units_param(value, **kwargs)
Validate the parameters provided to the Convert Units Processor.
This function checks the value provided to the Convert Units Processor and ensures that it meets the expected criteria. Will raise a user warning and return false if the value is not valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
str | Iterable[str]
|
The unit(s) to convert to. Can be a single unit string or an iterable of unit strings. Valid units include temperature units (K, degC, degF), pressure units (Pa, hPa, mb, inHg), wind units (m/s, m s-1, mph, knots), precipitation units (mm, mm/d, mm/h, inches, inches/d, inches/h), moisture units (kg/kg, kg kg-1, g/kg, g kg-1), flux units (kg m-2 s-1), and relative humidity units ([0 to 100], fraction). |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if all parameters are valid, False otherwise |
Source code in climakitae/new_core/param_validation/convert_units_param_validator.py
Parameter validator for StationBiasCorrection processor.
This module provides validation for parameters used with the StationBiasCorrection processor, which applies Quantile Delta Mapping (QDM) bias correction to gridded climate data using historical weather station observations.
The validator ensures: - Valid station selection from available HadISD stations - Proper time slice specification for bias correction - Valid QDM parameters (window, nquantiles, group, kind) - Station metadata availability - Compatibility between selected stations and data variables
Functions:
| Name | Description |
|---|---|
validate_station_bias_correction_param |
Main validation function for station bias correction parameters. |
Examples:
>>> # Valid station bias correction parameters
>>> params = {
... "stations": ["Sacramento (KSAC)", "San Francisco (KSFO)"],
... "time_slice": (2030, 2060),
... "window": 90,
... "nquantiles": 20
... }
>>> validate_station_bias_correction_param(params)
True
>>> # Invalid station name
>>> params = {"stations": ["InvalidStation"], "time_slice": (2030, 2060)}
>>> validate_station_bias_correction_param(params)
False
Notes
- Station observational data is available through 2014-08-31
- Bias correction requires historical period (1980-2014) in input data
- Currently only supports temperature (tas/tasmax/tasmin) bias correction
validate_bias_correction_station_data_param(value, query=None, **kwargs)
Validate parameters for StationBiasCorrection processor.
This function validates all parameters required for station bias correction: - Station selection (must exist in HadISD dataset) - Historical slice (optional, must be valid years if provided) - QDM parameters (window, nquantiles, group, kind) - Variable compatibility (currently only temperature variables supported)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
Dictionary containing station bias correction parameters. Expected keys: - stations: list[str] - Station names or codes (REQUIRED) - historical_slice: tuple[int, int], optional - Historical training period (default: (1980, 2014)) - window: int, optional - Seasonal grouping window (default: 90) - nquantiles: int, optional - Number of quantiles (default: 20) - group: str, optional - Temporal grouping (default: "time.dayofyear") - kind: str, optional - Adjustment kind (default: "+") |
required |
query
|
Dict[str, Any]
|
Full query dictionary for cross-validation with other parameters. Used to check variable compatibility. |
None
|
**kwargs
|
Any
|
Additional keyword arguments (unused, for interface compatibility). |
{}
|
Returns:
| Type | Description |
|---|---|
bool
|
True if parameters are valid, False otherwise. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If parameters are invalid with specific error messages. |
TypeError
|
If parameter types are incorrect. |
Examples:
>>> params = {
... "stations": ["Sacramento (KSAC)"],
... "window": 90
... }
>>> validate_station_bias_correction_param(params)
True
Source code in climakitae/new_core/param_validation/bias_adjust_model_to_station_param_validator.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | |
Validator for parameters provided to FilterunadjustedModels Processor.
validate_filter_unadjusted_models_param(value, **kwargs)
Validate the parameters provided to the FilterUnadjustedModels Processor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
str
|
The value to control filtering behavior. Supported values: "yes" (default): Filter out unadjusted models "no": Include unadjusted models |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if all parameters are valid, False otherwise |
Source code in climakitae/new_core/param_validation/filter_unadjusted_models_param_validator.py
Validator for parameters provided to DropLeapDays Processor.
validate_drop_leap_days_param(value, **kwargs)
Validate the parameters provided to the DropLeapDays Processor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
str
|
The value to control leap day dropping behavior. Supported values: "yes" (default): Drop leap days (February 29) "no": Keep leap days |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if all parameters are valid, False otherwise |
Source code in climakitae/new_core/param_validation/drop_leap_days_param_validator.py
Validator for parameters provided to Convert to Local Time processor.
validate_convert_to_local_time_param(value, **kwargs)
Validate the parameters provided to the ConvertToLocalTime Processor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Union[str, list, dict[str, Any]]
|
The configuration dictionary to validate. Expected keys: - convert : str The value to control leap day dropping behavior. Supported values: "yes": Convert time to local time "no" (default): Keep original timezone - reindex_time_axis : str Set to "yes" to fix time stamps affected by daylight savings time. Default value is "no". |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if all parameters are valid, False otherwise |
Source code in climakitae/new_core/param_validation/convert_to_local_time_param_validator.py
Alternative Catalog Validators
Validator for renewable energy dataset parameters.
RenewablesValidator(catalog)
Bases: ParameterValidator
Validator for renewable energy dataset parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
str
|
path to the renewables dataset catalog |
required |
Initialize with catalog of renewable energy datasets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
DataCatalog
|
Catalog of datasets |
required |
Source code in climakitae/new_core/param_validation/renewables_param_validator.py
get_default_processors(query)
Get default processors for renewables catalog.
Renewables data uses the same defaults as CADCAT since it's also climate model data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
Dict[str, Any]
|
The current query containing user parameters |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary mapping processor names to their default configurations |
Source code in climakitae/new_core/param_validation/renewables_param_validator.py
Validator for historical data platform parameters.
HDPValidator(catalog)
Bases: ParameterValidator
Validator for historical data platform parameters.
This validator enforces that queries must specify a single network_id to prevent mixing data from different weather station networks, which may have different time periods and data characteristics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
DataCatalog
|
Catalog of datasets |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
catalog |
esm_datastore
|
The HDP catalog for validation |
all_catalog_keys |
dict
|
Required query parameters with default values |
Initialize with catalog of historical data platform datasets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
catalog
|
DataCatalog
|
Catalog of datasets |
required |
Source code in climakitae/new_core/param_validation/hdp_param_validator.py
get_default_processors(query)
Get default processors for HDP catalog.
HDP data uses station_id for concatenation since it's station-based data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
Dict[str, Any]
|
The current query containing user parameters |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary mapping processor names to their default configurations |
Source code in climakitae/new_core/param_validation/hdp_param_validator.py
is_valid_query(query)
Validate query parameters for HDP data.
Requires network_id and ensures it's a single value. Station_id is optional.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
dict
|
Query parameters to validate |
required |
Returns:
| Type | Description |
|---|---|
dict or None
|
Validated query if valid, None otherwise |
Notes
Validation checks performed:
- network_id is required and must be a single value (accepts string or single-item list, rejects multi-item lists)
- station_id is optional and can be used to filter within the network
- If station_id is provided, all requested station IDs must exist in the catalog
Multiple network_ids are not allowed to prevent mixing data from different networks with potentially different time periods and data characteristics.