Changeset a55ac71 in flex_extract.git for source


Ignore:
Timestamp:
Dec 7, 2018, 10:51:12 PM (5 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
702cbb7
Parents:
e5884c9
Message:

added docstrings for all check functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/python/mods/checks.py

    r4d3b052 ra55ac71  
    3333
    3434def check_grid(grid):
     35    '''Convert grid into correct Lat/Lon format. E.g. '0.5/0.5'
     36
     37    Checks on format of original grid. Wether it is in the order of 1000 or 1.
     38    Convert to correct grid format and substitute into "Lat/Lon" format string.
     39
     40    Parameters
     41    ----------
     42    grid : :obj:`string`
     43        Contains grid information
     44
     45    Return
     46    ------
     47    grid : :obj:``string`
     48        Contains grid in format Lat/lon. E.g. 0.1/0.1
     49    '''
    3550
    3651    if 'N' in grid:
     
    5570
    5671def check_area(grid, area, upper, lower, left , right):
    57     '''
    58 
    59 
     72    '''Defines the correct area string.
     73
     74    Checks on the format of the four area components. Wether it is of
     75    the order of 1000 or 1. Also checks wether area was already set by command
     76    line, then the four components are overwritten.
     77    Convert to correct format of the order of magnitude "1" and sets the
     78    area parameter (North/West/South/East).
     79    E.g.: -5./20./10./10.
     80
     81    Parameters
     82    ----------
     83    grid : :obj:`string`
     84        Contains grid information
     85
     86    Return
     87    ------
     88    grid : :obj:``string`
     89        Contains grid in format Lat/lon. E.g. 0.1/0.1
    6090    '''
    6191    if 'N' in grid:  # Gaussian output grid
     
    96126
    97127def check_levels(levelist, level):
    98     '''
    99 
    100     Parameters
    101     ----------
    102     par : :obj:``
    103         ...
    104 
    105     Return
    106     ------
     128    '''Defines correct level list and guarantees that the maximum level is
     129    one of the available maximum levels.
     130
     131    Parameters
     132    ----------
     133    levelist : :obj:`string`
     134        Specifies the level list.
     135        Examples: model level: 1/to/137, pressure levels: 500/to/1000
     136
     137    level : :obj:`string`
     138        Specifies the maximum level.
     139
     140    Return
     141    ------
     142    levelist : :obj:`string`
     143        Specifies the required levels. It has to have a valid
     144        correspondence to the selected levtype.
     145        Examples: model level: 1/to/137, pressure levels: 500/to/1000
     146
     147    level : :obj:`string`
     148        Specifies the maximum level. It has to be one of the
     149        available maximum level number as contained in the variable
     150        MAX_LEVEL_LIST in "_config". E.g. [16, 19, 31, 40, 50, 60, 62, 91, 137]
    107151
    108152    '''
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG