Skip to content
Snippets Groups Projects
Select Git revision
  • testing
  • main default protected
  • 23-pypi-release-and-extended-documentation
  • dev
  • wip_tests_and_notebooks
  • cicd
  • v0.4.8
  • 0.4.7
  • v0.4.7
  • v0.4.6
  • v0.4.5
11 results

toargridding

  • Clone with SSH
  • Clone with HTTPS
  • Carsten Hinz's avatar
    Carsten Hinz authored
    - added info to statistics applied during request to TOAR-DB
    
    metadata:
    - first round of documentation
    ebe8ef24
    History
    Name Last commit Last update
    tests
    toargridding
    .gitignore
    README.md
    pyproject.toml

    TOAR Gridding Tool

    About

    The TOARgridding projects data from the TOAD database (https://toar-data.fz-juelich.de/) onto a grid. The request to the database also allows a statistical analysis of the requested value. The mean and standard deviation of all stations within a cell are computed.

    The tool handles the request to the database over the REST API and the subsequent processing. The results are provided as xarray objects for subsequent processing by the user.

    This project is in beta with the intended basic functionalities. The documentation is work in progress.

    Requirements

    TBD, see pyproject.toml

    Installation

    Move to the folder you want to create download this project to.

    Clone the project from its git repository

    git clone https://gitlab.jsc.fz-juelich.de/esde/toar-public/toargridding.git 

    The handling of required packages is done with poetry. For installing them go to the new created directory and run poetry

    cd toargridding
    poetry install

    Example

    There are at the moment three example provided as jupyter notebooks:

    High level function

    tests/produce_data.ipynb 

    Provides an example on how to download data, apply gridding and save the results as netCDF files.

    Retrieving data

    get_sample_data.ipynb Downloads data from the TOAR database.

    Retriving data and visualization

    quality_controll.ipynb

    Notebook for downloading and visualization of data. The data are downloaded and reused for subsequent executions of this notebook.

    Supported Grids

    The first supported grid is the Cartesian grid.

    Supported Variables

    At the moment only a limited number of variables from the TOAR database is supported.

    Documentation of Source Code:

    At the moment Carsten Hinz is working on a documentation of the source code, while getting familiar with it. The aim is a brief overview on the functionalities and the arguments. As he personally does not like repetitions, the documentations might not match other style guides. It will definitely be possible to extend the documentation:-)

    class example:
        """An example class
    
        A more detailed explanation of the purpose of this example class.
        """
    
        def __init__(self, varA : int, varB : str):
            """Constructor
    
            Attributes:
            varA:
                brief details and more context
            varB:
                same here.
            """
            [implementation]    
        
        def func1(self, att1, att2):
            """Brief
    
            details
    
            Attributes:
            -----------
            att1:
                brief/details
            att2:
                brief/details
            """
    
            [implementation]
            
    @dataclass
    class dataClass:
        """Brief description
    
        optional details
    
        Parameters
        ----------
        anInt:
            brief description
        anStr:
            brief description
        secStr:
            brief description (explanation of default value, if this seems necessary)
        """
        anInt : int
        anStr : str
        secStr : str = "Default value"