Changeset 02c8c50 in flex_extract.git for python/GribTools.py


Ignore:
Timestamp:
Mar 18, 2018, 6:27:28 PM (6 years ago)
Author:
Anne Philipp <bscannephilipp@…>
Branches:
master, ctbto, dev
Children:
efdb01a
Parents:
64cf353
Message:

more changes in PEP8 style and slight modifications in coding style and naming. More documentation of functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/GribTools.py

    r64cf353 r02c8c50  
    8686                List of keynames.
    8787
    88             wherekeynames: list of ???
     88            wherekeynames: list of ???, optional
    8989                Default value is an empty list.
    9090
    91             wherekeyvalues: list of ???
     91            wherekeyvalues: list of ???, optional
    9292                Default value is an empty list.
    9393
     
    154154                List of keynames. Default is an empty list.
    155155
    156             wherekeynames: list of ???
     156            wherekeynames: list of ???, optional
    157157                Default value is an empty list.
    158158
    159             wherekeyvalues: list of ???
     159            wherekeyvalues: list of ???, optional
    160160                Default value is an empty list.
    161161
    162             strict: boolean
     162            strict: boolean, optional
    163163                Decides if everything from keynames and keyvalues
    164164                is written out the grib file (False) or only those
    165165                meeting the where statement (True). Default is False.
    166166
    167             filemode:
     167            filemode: string, optional
    168168                Sets the mode for the output file. Default is "w".
    169169
     
    231231                Filename of the input file to read the grib messages from.
    232232
    233             selectWhere: boolean
     233            selectWhere: boolean, optional
    234234                Decides if to copy the keynames and values equal to (True) or
    235235                different to (False) the keynames/keyvalues list passed to the
    236236                function. Default is True.
    237237
    238             keynames: list of ???
     238            keynames: list of ???, optional
    239239                List of keynames. Default is an empty list.
    240240
    241             keyvalues: list of ???
     241            keyvalues: list of ???, optional
    242242                List of keynames. Default is an empty list.
    243243
    244             filemode:
     244            filemode: string, optional
    245245                Sets the mode for the output file. Default is "w".
    246246
     
    288288        '''
    289289        @Description:
    290             Create index from a list of files if it does not exist or
     290            Create index file from a list of files if it does not exist or
    291291            read an index file.
    292292
    293293        @Input:
    294             index_keys: list of ???
     294            index_keys: list of strings, optional
     295                Contains the list of key parameter names from
     296                which the index is to be created.
    295297                Default is a list with a single entry string "mars".
    296298
    297             index_file: string
     299            index_file: string, optional
    298300                Filename where the indices are stored.
    299301                Default is "my.idx".
     
    310312            print("Use existing index file: %s " % (index_file))
    311313        else:
    312 #AP does the for loop overwrite the iid all the time?
    313314            for file in self.filename:
    314315                print("Inputfile: %s " % (file))
     
    317318                else:
    318319                    grib_index_add_file(self.iid, file)
    319 #AP or does the if has to be in the for loop?
    320 #AP would make more sense?
     320
    321321            if self.iid is not None:
    322322                grib_index_write(self.iid, index_file)
    323323
     324        print('... index done')
     325
    324326        return self.iid
    325327
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG