# Path: polyadcirc/pyADCIRC/basic.py
# class pickleable(object):
#     """
#     Class that makes objects easily pickleable via a dict
#     """
#     def __init__(self):
#         super(pickleable, self).__init__()
# 
#     def __getstate__(self):
#         """
#         :rtype: dict
#         :returns: ``self.__dict__.copy()``
#         """
#         odict = self.__dict__.copy()
#         return odict
# 
#     def __setstate__(self, dict):
#         """
#         :param dict: dict to update
# 
#         ``self.__dict__.update(dict)``
#         """
#         self.__dict__.update(dict)
# 
# Path: polyadcirc/pyADCIRC/basic.py
# class comm_for_no_mpi4py(object):
# class MPI_for_no_mpi4py(object):
# class pickleable(object):
# class location(pickleable):
# class node(location):
# class time(pickleable):
#     def __init__(self):
#     def Get_size(self):
#     def Get_rank(self):
#     def allgather(self, val):
#     def allreduce(self, val1, op=None):
#     def bcast(self, val, root=0):
#     def __init__(self):
#     def __init__(self):
#     def __getstate__(self):
#     def __setstate__(self, dict):
#     def __init__(self, x, y):
#     def __init__(self, x, y, bathymetry):
#     def __init__(self, dt, statim, rnday, dramp):
#     MPI = MPI_for_no_mpi4py()


import os, stat, glob, sys, re, subprocess
import numpy as np
import polyadcirc.pyADCIRC.convert_fort14_to_fort13 as c13
import polyadcirc.pyADCIRC.fort14_management as f14
import polyadcirc.pyADCIRC.fort13_management as f13
import polyadcirc.pyADCIRC.plotADCIRC as plt
import polyadcirc.pyGriddata.table_management as tm
import polyadcirc.pyGriddata.table_to_mesh_map as tmm
import polyadcirc.pyGriddata.file_management as fm
import polyadcirc.run_framework.domain as dom
from polyadcirc.pyADCIRC.basic import pickleable
from polyadcirc.pyADCIRC.basic import comm
                compiled_prog = None
                for p in executable_dir:
                    locations1 = glob.glob(os.path.join(p, "*Griddata_*.out"))
                    locations2 = glob.glob(os.path.join(p, "polyadcirc",
                                                        "pyGriddata", 
                                                        "Griddata_*.out"))
                    if locations1:
                        compiled_prog = locations1[0]
                    elif locations2:
                        compiled_prog = locations2[0]
                    else:
                        compiled_prog = None
                    break
                # put link to Griddata here
                if compiled_prog:
                    fm.symlink(compiled_prog,
                               os.path.join(basis_dir,
                                            os.path.basename(compiled_prog)))
                else:
                    print """Compile a copy of Griddata_v1.32.F90 and specify
                    it's location using executable_dir"""
            # Create links to gap files (*.asc) using gap_list of gapInfo
            # objects
            for gap in self.gap_data_files:
                local_file_name = os.path.basename(gap.file_name)
                fm.symlink(gap.file_name, os.path.join(basis_dir,
                                                       local_file_name))
                if os.path.exists(gap.file_name+'.binary'):
                    fm.symlink(gap.file_name+'.binary',
                               os.path.join(basis_dir, 

# Path: polyadcirc/pyADCIRC/basic.py
# class pickleable(object):
#     """
#     Class that makes objects easily pickleable via a dict
#     """
#     def __init__(self):
#         super(pickleable, self).__init__()
# 
#     def __getstate__(self):
#         """
#         :rtype: dict
#         :returns: ``self.__dict__.copy()``
#         """
#         odict = self.__dict__.copy()
#         return odict
# 
#     def __setstate__(self, dict):
#         """
#         :param dict: dict to update
# 
#         ``self.__dict__.update(dict)``
#         """
#         self.__dict__.update(dict)
# 
# Path: polyadcirc/pyADCIRC/basic.py
# class comm_for_no_mpi4py(object):
# class MPI_for_no_mpi4py(object):
# class pickleable(object):
# class location(pickleable):
# class node(location):
# class time(pickleable):
#     def __init__(self):
#     def Get_size(self):
#     def Get_rank(self):
#     def allgather(self, val):
#     def allreduce(self, val1, op=None):
#     def bcast(self, val, root=0):
#     def __init__(self):
#     def __init__(self):
#     def __getstate__(self):
#     def __setstate__(self, dict):
#     def __init__(self, x, y):
#     def __init__(self, x, y, bathymetry):
#     def __init__(self, dt, statim, rnday, dramp):
#     MPI = MPI_for_no_mpi4py()


# Path: polyadcirc/pyGriddata/grid_management.py
import os, stat, glob, sys, re, subprocess
import numpy as np
import polyadcirc.pyADCIRC.convert_fort14_to_fort13 as c13
import polyadcirc.pyADCIRC.fort14_management as f14
import polyadcirc.pyADCIRC.fort13_management as f13
import polyadcirc.pyADCIRC.plotADCIRC as plt
import polyadcirc.pyGriddata.table_management as tm
import polyadcirc.pyGriddata.table_to_mesh_map as tmm
import polyadcirc.pyGriddata.file_management as fm
import polyadcirc.run_framework.domain as dom
from polyadcirc.pyADCIRC.basic import pickleable
from polyadcirc.pyADCIRC.basic import comm

                compiled_prog = None
                for p in executable_dir:
                    locations1 = glob.glob(os.path.join(p, "*Griddata_*.out"))
                    locations2 = glob.glob(os.path.join(p, "polyadcirc",
                                                        "pyGriddata", 
                                                        "Griddata_*.out"))
                    if locations1:
                        compiled_prog = locations1[0]
                    elif locations2:
                        compiled_prog = locations2[0]
                    else:
                        compiled_prog = None
                    break
                # put link to Griddata here
                if compiled_prog:
                    fm.symlink(compiled_prog,
                               os.path.join(basis_dir,
                                            os.path.basename(compiled_prog)))
                else:
                    print """Compile a copy of Griddata_v1.32.F90 and specify
                    it's location using executable_dir"""
            # Create links to gap files (*.asc) using gap_list of gapInfo
            # objects
            for gap in self.gap_data_files:
                local_file_name = os.path.basename(gap.file_name)
                fm.symlink(gap.file_name, os.path.join(basis_dir,
                                                       local_file_name))
                if os.path.exists(gap.file_name+'.binary'):
                    fm.symlink(gap.file_name+'.binary',
                               os.path.join(basis_dir, 

                                            local_file_name+'.binary'))