From ac9f835aaff963e2aaf291150195e523cc214fe4 Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Tue, 9 Apr 2024 06:44:57 +0200 Subject: [PATCH] fix documentation --- README.md | 2 +- cmethods/__init__.py | 18 ++++++++---------- doc/getting_started.rst | 8 +++++--- doc/introduction.rst | 4 ++-- doc/methods.rst | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 878a913..2a37ec9 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Welcome to python-cmethods, a powerful Python package designed for bias correction and adjustment of climate data. Built with a focus on ease of use and efficiency, python-cmethods offers a comprehensive suite of functions tailored for applying bias correction methods to climate model simulations and -observational datasets. +observational datasets via command-line interface and API. Please cite this project as described in https://zenodo.org/doi/10.5281/zenodo.7652755. diff --git a/cmethods/__init__.py b/cmethods/__init__.py index c2fd89e..fb6617c 100644 --- a/cmethods/__init__.py +++ b/cmethods/__init__.py @@ -48,22 +48,20 @@ __all__ = ["adjust"] -formatter_settings = HelpFormatter.settings( - theme=HelpTheme( - invoked_command=Style(fg="bright_yellow"), - heading=Style(fg="bright_white", bold=True), - constraint=Style(fg="magenta"), - col1=Style(fg="bright_yellow"), - ), -) - @command( context_settings={ "auto_envvar_prefix": "CMETHODS", "help_option_names": ["-h", "--help"], }, - formatter_settings=formatter_settings, + formatter_settings=HelpFormatter.settings( + theme=HelpTheme( + invoked_command=Style(fg="bright_yellow"), + heading=Style(fg="bright_white", bold=True), + constraint=Style(fg="magenta"), + col1=Style(fg="bright_yellow"), + ), + ), ) @version_option(message="%version%") @option( diff --git a/doc/getting_started.rst b/doc/getting_started.rst index e56b1c8..f6531cb 100644 --- a/doc/getting_started.rst +++ b/doc/getting_started.rst @@ -11,8 +11,8 @@ The `python-cmethods`_ module can be installed using the package manager pip: python3 -m pip install python-cmethods -Command-Line Interface ----------------------- +Command-Line Interface Usage +---------------------------- The python-cmethods package provides a command-line interface for applying various bias correction methods out of the box. @@ -28,6 +28,7 @@ Applying the cmethods tool on the provided example data using the linear scaling approach is shown below: .. code-block:: bash + cmethods \ --obs examples/input_data/observations.nc \ --simh examples/input_data/control.nc \ @@ -47,6 +48,7 @@ For applying a distribution-based bias correction technique, the following example may help: .. code-block:: bash + cmethods \ --obs examples/input_data/observations.nc \ --simh examples/input_data/control.nc \ @@ -64,7 +66,7 @@ example may help: API Usage and Examples ------------------- +---------------------- The `python-cmethods`_ module can be imported and applied as showing in the following examples. For more detailed description of the methods, please have a diff --git a/doc/introduction.rst b/doc/introduction.rst index da383b3..8369add 100644 --- a/doc/introduction.rst +++ b/doc/introduction.rst @@ -23,7 +23,7 @@ actual climate conditions. This process typically involves statistical methods or empirical relationships to correct for biases caused by factors such as instrument calibration, spatial resolution, or model deficiencies. -.. figure:: ../_static/images/biasCdiagram.png +.. figure:: _static/images/biasCdiagram.png :width: 600 :align: center :alt: Schematic representation of a bias adjustment procedure @@ -41,7 +41,7 @@ and adjusted values, revealing that the delta-adjusted time series (:math:`T^{*DM}_{sim,p}`) is significantly more similar to the observational data (:math:`T_{obs,p}`) than the raw model output (:math:`T_{sim,p}`). -.. figure:: ../_static/images/dm-doy-plot.png +.. figure:: _static/images/dm-doy-plot.png :width: 600 :align: center :alt: Temperature per day of year in modeled, observed and bias-adjusted climate data diff --git a/doc/methods.rst b/doc/methods.rst index b7738d6..45935a4 100644 --- a/doc/methods.rst +++ b/doc/methods.rst @@ -253,7 +253,7 @@ In the following the equations of Alex J. Cannon (2015) are shown and explained: modeled data of the control period The following images show this by using :math:`T` for temperatures. - .. figure:: ../_static/images/qm-cdf-plot-1.png + .. figure:: _static/images/qm-cdf-plot-1.png :width: 600 :align: center :alt: Determination of the quantile value @@ -265,7 +265,7 @@ In the following the equations of Alex J. Cannon (2015) are shown and explained: the control period to determine the bias-corrected value at time step :math:`i`. - .. figure:: ../_static/images/qm-cdf-plot-2.png + .. figure:: _static/images/qm-cdf-plot-2.png :width: 600 :align: center :alt: Determination of the QM bias-corrected value