# Path: postproclib/postproc.py
# class PostProc:
# 
#     def __str__(self):
#         string =  ('\nAvailable outputs in ' + self.resultsdir + ' include:\n\n')
#         string += ('\t{0:^24s}\t{1:>10s}\n'.format('field', 'records'))
#         #string += ('\t{0:^24s}\t{1:^10s}\n'.format('-'*24, '-'*10))
#         for key,field in sorted(self.plotlist.items()):
#             line = '\t{0:<24s}=\t{1:>10f},\n'.format(key, field.maxrec)
#             string += line
#         return string 
# 
# Path: postproclib/pplexceptions.py
# class NoResultsInDir(Exception):
#     pass
# 
# class DataMismatch(Exception):
#     pass


import os
import numpy as np
import sys
import math as maths
import glob
from .mdfields import *
from .headerdata import *
from .postproc import PostProc
from .pplexceptions import NoResultsInDir, DataMismatch
        if 'dsurf_mflux' in (self.fieldfiles1):
            flux1 = MD_mfluxField(self.resultsdir,'dsurf_mflux', **kwargs)
            self.plotlist.update({'dsurf_mflux':flux1})

        if 'dsurf_vflux' in (self.fieldfiles1):
            flux1 = MD_pfluxField(self.resultsdir,'dsurf_vflux', **kwargs)
            self.plotlist.update({'dsurf_vflux':flux1})

        if ('ebins' in self.fieldfiles1 and
            'vbins' in self.fieldfiles1):
            try:
                rhoue =  MD_energyadvct_Field(self.resultsdir, **kwargs)
                self.plotlist.update({'rhouE':rhoue})
            except DataMismatch:
                pass

        if ('ebins' in self.fieldfiles1 and
            'Tbins' in self.fieldfiles1):
            try:
                U =  MD_potEnergyField(self.resultsdir, **kwargs)
                self.plotlist.update({'U':U})
            except DataMismatch:
                pass

        if (('ebins' in self.fieldfiles1 and 'Tbins' in self.fieldfiles1) and 
           (('pVA'   in self.fieldfiles1) or 
            ('pVA_k' in self.fieldfiles1 and 'pVA_c' in self.fieldfiles1 ))):
            try:
                h =  MD_enthalpyField(self.resultsdir, **kwargs)
                self.plotlist.update({'h':h})

# Path: postproclib/postproc.py
# class PostProc:
# 
#     def __str__(self):
#         string =  ('\nAvailable outputs in ' + self.resultsdir + ' include:\n\n')
#         string += ('\t{0:^24s}\t{1:>10s}\n'.format('field', 'records'))
#         #string += ('\t{0:^24s}\t{1:^10s}\n'.format('-'*24, '-'*10))
#         for key,field in sorted(self.plotlist.items()):
#             line = '\t{0:<24s}=\t{1:>10f},\n'.format(key, field.maxrec)
#             string += line
#         return string 
# 
# Path: postproclib/pplexceptions.py
# class NoResultsInDir(Exception):
#     pass
# 
# class DataMismatch(Exception):
#     pass


# Path: postproclib/mdpostproc.py
import os
import numpy as np
import sys
import math as maths
import glob
from .mdfields import *
from .headerdata import *
from .postproc import PostProc
from .pplexceptions import NoResultsInDir, DataMismatch

        if 'dsurf_mflux' in (self.fieldfiles1):
            flux1 = MD_mfluxField(self.resultsdir,'dsurf_mflux', **kwargs)
            self.plotlist.update({'dsurf_mflux':flux1})

        if 'dsurf_vflux' in (self.fieldfiles1):
            flux1 = MD_pfluxField(self.resultsdir,'dsurf_vflux', **kwargs)
            self.plotlist.update({'dsurf_vflux':flux1})

        if ('ebins' in self.fieldfiles1 and
            'vbins' in self.fieldfiles1):
            try:
                rhoue =  MD_energyadvct_Field(self.resultsdir, **kwargs)
                self.plotlist.update({'rhouE':rhoue})
            except DataMismatch:
                pass

        if ('ebins' in self.fieldfiles1 and
            'Tbins' in self.fieldfiles1):
            try:
                U =  MD_potEnergyField(self.resultsdir, **kwargs)
                self.plotlist.update({'U':U})
            except DataMismatch:
                pass

        if (('ebins' in self.fieldfiles1 and 'Tbins' in self.fieldfiles1) and 
           (('pVA'   in self.fieldfiles1) or 
            ('pVA_k' in self.fieldfiles1 and 'pVA_c' in self.fieldfiles1 ))):
            try:
                h =  MD_enthalpyField(self.resultsdir, **kwargs)
                self.plotlist.update({'h':h})

            except DataMismatch: