Ignore:
Timestamp:
Sep 23, 2018, 11:40:28 AM (6 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
4971f63
Parents:
5d42acd
Message:

changed whole tree structure of flex_extract to have better overview

File:
1 moved

Legend:

Unmodified
Added
Removed
  • source/pythontest/TestInstallTar/flex_extract_v7.1_ecgate/source/python/classes/MarsRetrieval.py

    r2fb99de r25b14be  
    311311        '''
    312312        @Description:
    313             Prints all class attributes and their values.
     313            Prints all class attributes and their values to the
     314            standard output.
    314315
    315316        @Input:
     
    329330                pass
    330331            else:
    331                 print item[0] + ': ' + str(item[1])
     332                print(item[0] + ': ' + str(item[1]))
    332333
    333334        return
    334335
    335336
    336     def print_info(self):
    337         '''
     337    def print_info(self, inputdir):
     338        '''
     339        @Description:
     340            Prints all mars requests to an extra file for debugging and
     341            information.
     342
     343        @Input:
     344            self: instance of MarsRetrieval
     345                For description see class documentation.
     346
     347            inputdir: string
     348                The path where all data from the retrievals are stored.
     349
     350        @Return:
     351            <nothing>
    338352        '''
    339353        # Get all class attributes and their values as a dictionary
     
    341355
    342356        # open a file to store all requests to
    343         with open(os.path.join(_config.PATH_RUN_DIR + os.path.sep +
     357        with open(os.path.join(inputdir,
    344358                               _config.FILE_MARS_REQUESTS), 'a') as f:
    345359            f.write('mars\n')
     
    394408                self.server.execute(s, target)
    395409            except:
    396                 print('MARS Request failed, '
    397                       'have you already registered at apps.ecmwf.int?')
     410                print('MARS Request failed, \
     411                      have you already registered at apps.ecmwf.int?')
    398412                raise IOError
    399413            if os.stat(target).st_size == 0:
     
    407421                                 stderr=subprocess.PIPE, bufsize=1)
    408422            pout = p.communicate(input=s)[0]
    409             print pout.decode()
     423            print(pout.decode())
    410424
    411425            if 'Some errors reported' in pout.decode():
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG