# 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)


import numpy as np
import os
from topoflow.components import evap_base
from topoflow.utils import model_input
        #-----------------------------------------------------
        'land_surface__elevation' :                       'm',
        'soil__reference_depth_temperature' :             'deg_C',
        # 'soil_surface__temperature' :                   'deg_C',
        'soil__temperature_reference_depth':              'm',
        'soil__thermal_conductivity' :                    'W m-1 K-1]' }
        #----------------------------------------------
        # These are no longer needed here. (9/25/14)
        #---------------------------------------------- 
#         'channel_water_x-section__mean_depth' :           'm',
#         'soil_top-layer__porosity':                       '1',
#         'soil_top-layer__saturated_thickness' :           'm',
#         'soil_water_sat-zone_top_surface__elevation' :    'm' }                
            
    #------------------------------------------------    
    # Return NumPy string arrays vs. Python lists ?
    #------------------------------------------------
    ## _input_var_names  = np.array( _input_var_names )
    ## _output_var_names = np.array( _output_var_names )
 
    #-------------------------------------------------------------------
    def get_component_name(self):
  
        return 'TopoFlow_Evaporation_Energy_Balance'

    #   get_component_name()    
    #-------------------------------------------------------------------
    def get_attribute(self, att_name):

        try:

# 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/components/evap_energy_balance.py
import numpy as np
import os
from topoflow.components import evap_base
from topoflow.utils import model_input

        #-----------------------------------------------------
        'land_surface__elevation' :                       'm',
        'soil__reference_depth_temperature' :             'deg_C',
        # 'soil_surface__temperature' :                   'deg_C',
        'soil__temperature_reference_depth':              'm',
        'soil__thermal_conductivity' :                    'W m-1 K-1]' }
        #----------------------------------------------
        # These are no longer needed here. (9/25/14)
        #---------------------------------------------- 
#         'channel_water_x-section__mean_depth' :           'm',
#         'soil_top-layer__porosity':                       '1',
#         'soil_top-layer__saturated_thickness' :           'm',
#         'soil_water_sat-zone_top_surface__elevation' :    'm' }                
            
    #------------------------------------------------    
    # Return NumPy string arrays vs. Python lists ?
    #------------------------------------------------
    ## _input_var_names  = np.array( _input_var_names )
    ## _output_var_names = np.array( _output_var_names )
 
    #-------------------------------------------------------------------
    def get_component_name(self):
  
        return 'TopoFlow_Evaporation_Energy_Balance'

    #   get_component_name()    
    #-------------------------------------------------------------------
    def get_attribute(self, att_name):

        try:

            return self._att_map[ att_name.lower() ]