- Timestamp:
- Dec 13, 2018, 11:57:00 PM (5 years ago)
- Branches:
- master, ctbto, dev
- Children:
- 5cb0eaa
- Parents:
- 5c0a578
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/python/classes/MarsRetrieval.py
r274f9ef rbc1720f 343 343 else: 344 344 print(item[0] + ': ' + str(item[1])) 345 346 return347 348 349 def print_info(self, inputdir, request_number):350 '''Prints all mars requests to an extra file for debugging and351 information.352 353 Parameters354 ----------355 inputdir : :obj:`string`356 The path where all data from the retrievals are stored.357 358 request_number : :obj:`integer`359 Number of mars requests for flux and non-flux data.360 361 Return362 ------363 364 '''365 # Get all class attributes and their values as a dictionary366 attrs = vars(self).copy()367 368 # open a file to store all requests to369 with open(os.path.join(inputdir,370 _config.FILE_MARS_REQUESTS), 'a') as f:371 f.write('mars_request #' + str(request_number) + '\n')372 # iterate through all attributes and print them373 # with their corresponding values374 for item in attrs.items():375 if item[0] in ['server', 'public']:376 pass377 else:378 f.write(item[0] + ': ' + str(item[1]) + '\n')379 f.write('\n\n')380 345 381 346 return
Note: See TracChangeset
for help on using the changeset viewer.