# Path: topoflow/components/evap_base.py
# class evap_component( BMI_base.BMI_component):
#     def set_constants(self):
#     def latent_heat_of_evaporation(self):
#     def initialize(self, cfg_file=None, mode="nondriver",
#                    SILENT=False):
#     def update(self, dt=-1.0):
#     def finalize(self):
#     def set_computed_input_vars(self):
#     def check_input_types(self):
#     def initialize_computed_vars(self):
#     def update_Qc(self):
#     def update_ET_rate(self):
#     def update_ET_integral(self):
#     def open_input_files(self):
#     def read_input_files(self):
#     def close_input_files(self):
#     def update_outfile_names(self):
#     def open_output_files(self):
#     def write_output_files(self, time_seconds=None):
#     def close_output_files(self):
#     def save_grids(self):
#     def save_pixel_values(self):
#         T = self.T_air
# 
# Path: topoflow/utils/model_input.py
# def open_file(var_type, input_file):
# def read_next2(self, var_name, rti, dtype='Float32', factor=1.0):
# def read_next(file_unit, var_type, rti, \
#               dtype='Float32', factor=1.0):
# def read_scalar(file_unit, dtype='Float32'):
# def read_grid(file_unit, rti, dtype='Float32'):
# def close_file(file_unit):
#     END_OF_FILE = (file_pos == file_size)
# 
# Path: topoflow/utils/tf_utils.py
# def TF_Use_CCA():
# def TF_Set_Test_Info(self):
# def TF_Test_Directory():
# def TF_Test_Site_Prefix():
# def TF_Test_Case_Prefix():
# def TF_Build_Date():
# def TF_Version_Number():
# def TF_Version():
# def TF_Print(string):
# def TF_String(number, FORMAT=None):
# def file_exists(filename):
# def Count_Lines(filename, SILENT=False):
# def Current_Directory():
# def Resize(array, factor, REDUCE, new_ncols, new_nrows, SAMP_TYPE=None):
# def Make_Savefile():
# def Get_Site_Prefix(filepath):
# def Get_Case_Prefix():
# def Not_Same_Byte_Order(byte_order):
# def Courant_Condition_OK(dx, dt, vmax):
# def Stable_Timestep(dx, vmax):
# def TF_Tan(angle):
# def Convert_Flow_Grid(infile, outfile, itype, otype, byte_order, \
#                       icodes=None, ocodes=None, REPORT=False):
#         SAMP_TYPE = int16(0)
#     NOT_SAME = (machine_byte_order != byte_order)
#     OK = ((vmax * dt * factor) <= dx)
#     SWAP_ENDIAN = Not_Same_Byte_Order(byte_order)


import numpy as np
import os
    import glob
    import os.path
    import numpy
    import rti_files
from topoflow.components import evap_base
from topoflow.utils import model_input
from topoflow.utils import tf_utils
    #-------------------------------------------------------------------  
    def open_input_files(self):

        self.ET_file = self.in_directory + self.ET_file

        self.ET_unit = model_input.open_file(self.ET_type, \
                                             self.ET_file)
        print 'self.ET_type =', self.ET_type
        print 'self.ET_file =', self.ET_file
        
##        self.duration_unit  = model_input.open_file(self.duration_type,  \
##                                                    self.duration_file)
##        print 'self.duration_type (ET) =', self.duration_type
##        print 'self.duration_file (ET) =', self.duration_file

    #   open_input_files()
    #-------------------------------------------------------------------  
    def read_input_files(self):

        #--------------
        # For testing
        #--------------
        ## print 'self.ET_type =', self.ET_type
        ## print 'self.ET_file =', self.ET_file
        
        rti = self.rti
        
        #-------------------------------------------------------
        # All grids are assumed to have a data type of Float32.
        #-------------------------------------------------------

# Path: topoflow/components/evap_base.py
# class evap_component( BMI_base.BMI_component):
#     def set_constants(self):
#     def latent_heat_of_evaporation(self):
#     def initialize(self, cfg_file=None, mode="nondriver",
#                    SILENT=False):
#     def update(self, dt=-1.0):
#     def finalize(self):
#     def set_computed_input_vars(self):
#     def check_input_types(self):
#     def initialize_computed_vars(self):
#     def update_Qc(self):
#     def update_ET_rate(self):
#     def update_ET_integral(self):
#     def open_input_files(self):
#     def read_input_files(self):
#     def close_input_files(self):
#     def update_outfile_names(self):
#     def open_output_files(self):
#     def write_output_files(self, time_seconds=None):
#     def close_output_files(self):
#     def save_grids(self):
#     def save_pixel_values(self):
#         T = self.T_air
# 
# Path: topoflow/utils/model_input.py
# def open_file(var_type, input_file):
# def read_next2(self, var_name, rti, dtype='Float32', factor=1.0):
# def read_next(file_unit, var_type, rti, \
#               dtype='Float32', factor=1.0):
# def read_scalar(file_unit, dtype='Float32'):
# def read_grid(file_unit, rti, dtype='Float32'):
# def close_file(file_unit):
#     END_OF_FILE = (file_pos == file_size)
# 
# Path: topoflow/utils/tf_utils.py
# def TF_Use_CCA():
# def TF_Set_Test_Info(self):
# def TF_Test_Directory():
# def TF_Test_Site_Prefix():
# def TF_Test_Case_Prefix():
# def TF_Build_Date():
# def TF_Version_Number():
# def TF_Version():
# def TF_Print(string):
# def TF_String(number, FORMAT=None):
# def file_exists(filename):
# def Count_Lines(filename, SILENT=False):
# def Current_Directory():
# def Resize(array, factor, REDUCE, new_ncols, new_nrows, SAMP_TYPE=None):
# def Make_Savefile():
# def Get_Site_Prefix(filepath):
# def Get_Case_Prefix():
# def Not_Same_Byte_Order(byte_order):
# def Courant_Condition_OK(dx, dt, vmax):
# def Stable_Timestep(dx, vmax):
# def TF_Tan(angle):
# def Convert_Flow_Grid(infile, outfile, itype, otype, byte_order, \
#                       icodes=None, ocodes=None, REPORT=False):
#         SAMP_TYPE = int16(0)
#     NOT_SAME = (machine_byte_order != byte_order)
#     OK = ((vmax * dt * factor) <= dx)
#     SWAP_ENDIAN = Not_Same_Byte_Order(byte_order)


# Path: topoflow/components/evap_read_file.py
import numpy as np
import os
    import glob
    import os.path
    import numpy
    import rti_files
from topoflow.components import evap_base
from topoflow.utils import model_input
from topoflow.utils import tf_utils

    #-------------------------------------------------------------------  
    def open_input_files(self):

        self.ET_file = self.in_directory + self.ET_file

        self.ET_unit = model_input.open_file(self.ET_type, \
                                             self.ET_file)
        print 'self.ET_type =', self.ET_type
        print 'self.ET_file =', self.ET_file
        
##        self.duration_unit  = model_input.open_file(self.duration_type,  \
##                                                    self.duration_file)
##        print 'self.duration_type (ET) =', self.duration_type
##        print 'self.duration_file (ET) =', self.duration_file

    #   open_input_files()
    #-------------------------------------------------------------------  
    def read_input_files(self):

        #--------------
        # For testing
        #--------------
        ## print 'self.ET_type =', self.ET_type
        ## print 'self.ET_file =', self.ET_file
        
        rti = self.rti
        
        #-------------------------------------------------------
        # All grids are assumed to have a data type of Float32.
        #-------------------------------------------------------

        ET = model_input.read_next(self.ET_unit, self.ET_type, rti,