Skip to content

Commit

Permalink
import directly form pyaerocom in doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisblake committed Aug 8, 2024
1 parent f9e97c4 commit db560b4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyaerocom/aeroval/_processing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class DataImporter(HasColocator):
are / can be specified flexibly for each model and obs entry in an
analysis setup (:class:`EvalSetup`). Proper handling of these reading
constraints and data import settings are handled in the
:class:`pyaerocom.colocation_auto.Colocator` engine, therefore the reading
:class:`pyaerocom.colocation.Colocator` engine, therefore the reading
in this class is done via the :class:`Colocator` engine.
Expand Down
2 changes: 1 addition & 1 deletion pyaerocom/aeroval/experiment_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ExperimentProcessor(ProcessingEngine, HasColocator):
processing engine will perform spatial and temporal co-location and will
store on co-located NetCDF file (e.g. if there are 2 models, 2 observation
networks and 2 variables there will be 4 co-located NetCDF files).
The co-location is done using :class:`pyaerocom.colocation.Colocator`.
The co-location is done using :class:`pyaerocom.Colocator`.
"""

Expand Down
10 changes: 7 additions & 3 deletions pyaerocom/aeroval/setupclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ class StatisticsSetup(BaseModel, extra="allow"):
annual_stats_constrained : bool
if True, then only sites are considered that satisfy a potentially
specified annual resampling constraint (see
:attr:`pyaerocom.colocation_auto.ColocationSetup.min_num_obs`). E.g.
:attr:`pyaerocom.colocation.ColocationSetup.min_num_obs`). E.g.
lets say you want to calculate statistics (bias,
correlation, etc.) for monthly model / obs data for a given site and
year. Lets further say, that there are only 8 valid months of data, and
4 months are missing, so statistics will be calculated for that year
based on 8 vs. 8 values. Now if
:attr:`pyaerocom.colocation_auto.ColocationSetup.min_num_obs` is
:attr:`pyaerocom.colocation.ColocationSetup.min_num_obs` is
specified in way that requires e.g. at least 9 valid months to
represent the whole year, then this station will not be considered in
case `annual_stats_constrained` is True, else it will. Defaults to
Expand Down Expand Up @@ -457,7 +457,11 @@ def colocation_opts(self) -> ColocationSetup:
if key in ColocationSetup.model_fields
}
# need to pass some default values to the ColocationSetup if not provided in config
default_dict = {"save_coldata": True, "keep_data": False, "resample_how": "mean"}
default_dict = {
"save_coldata": True,
"keep_data": False,
"resample_how": "mean",
}
for key in default_dict:
if key not in model_args:
model_args[key] = default_dict[key]
Expand Down
2 changes: 1 addition & 1 deletion pyaerocom/colocation/colocation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ def colocate_gridded_ungridded(
"""Colocate gridded with ungridded data (low level method)
For high-level colocation see :class:`pyaerocom.colocation.Colocator`
and :class:`pyaerocom.colocation.ColocationSetup`
and :class:`pyaerocom.ColocationSetup`
Note
----
Expand Down

0 comments on commit db560b4

Please sign in to comment.