# Path: topoflow/framework/time_interpolation.py
# class time_interp_data():
# class time_interpolator():
#     def __init__( self, v1=None, t1=None, long_var_name=None ):
#     def update( self, v2=None, t2=None ):
#     def __init__( self, comp_set, comp_names, vars_provided,
#                   method='Linear' ):
#     def initialize( self ):
#     def update2( self, comp_name ):
#     def update_all( self, time ):
#     def get_values( self, long_var_name, comp_name, time ):
#     def convert_time_units( self, in_time, in_units ):
#         DEBUG = False


import numpy as np
import os
import time
import xml.dom.minidom
import sys    #### for testing
from topoflow.framework import time_interpolation    # (time_interpolator class)
            # Storing scale factors and offsets may be faster.
			#---------------------------------------------------
#             p_units = p_bmi.get_var_units( long_var_name )
#             u_units = u_bmi.get_var_units( long_var_name )
#             if (u_units != p_units):
# 			    #---------------------------------------------
#                 # Note: conform fails if units are the same.
# 			    #---------------------------------------------
# 				values = Units.conform( values, Units(p_units), Units(u_units) )

            #-------------------------------------------
            # Call Regridder to regrid values from the
            # provider's grid to this user's grid.
            #    regridder -> grid_mapper ??
            #-------------------------------------------
            # values = self.regridder.regrid( values, user_bmi, provider_bmi)
            
            #---------------------------------------------------
            # Embed a reference to long_var_name from the
            # provider into the (BMI level of) user component.
            #---------------------------------------------------
            self.set_values( long_var_name, values, user_name )

            #------------------        
            # Optional report
            #------------------
            REPORT = False
            if (REPORT):
                print 'user: ' + user_name
                print '    just obtained var:  ' + long_var_name

# Path: topoflow/framework/time_interpolation.py
# class time_interp_data():
# class time_interpolator():
#     def __init__( self, v1=None, t1=None, long_var_name=None ):
#     def update( self, v2=None, t2=None ):
#     def __init__( self, comp_set, comp_names, vars_provided,
#                   method='Linear' ):
#     def initialize( self ):
#     def update2( self, comp_name ):
#     def update_all( self, time ):
#     def get_values( self, long_var_name, comp_name, time ):
#     def convert_time_units( self, in_time, in_units ):
#         DEBUG = False


# Path: topoflow/framework/emeli.py
import numpy as np
import os
import time
import xml.dom.minidom
import sys    #### for testing
from topoflow.framework import time_interpolation    # (time_interpolator class)

            # Storing scale factors and offsets may be faster.
			#---------------------------------------------------
#             p_units = p_bmi.get_var_units( long_var_name )
#             u_units = u_bmi.get_var_units( long_var_name )
#             if (u_units != p_units):
# 			    #---------------------------------------------
#                 # Note: conform fails if units are the same.
# 			    #---------------------------------------------
# 				values = Units.conform( values, Units(p_units), Units(u_units) )

            #-------------------------------------------
            # Call Regridder to regrid values from the
            # provider's grid to this user's grid.
            #    regridder -> grid_mapper ??
            #-------------------------------------------
            # values = self.regridder.regrid( values, user_bmi, provider_bmi)
            
            #---------------------------------------------------
            # Embed a reference to long_var_name from the
            # provider into the (BMI level of) user component.
            #---------------------------------------------------
            self.set_values( long_var_name, values, user_name )

            #------------------        
            # Optional report
            #------------------
            REPORT = False
            if (REPORT):
                print 'user: ' + user_name
                print '    just obtained var:  ' + long_var_name

                print '    from provider: ' + provider_name