#NEWLINE# def _getResampledTables( dbname , options , res ) : #NEWLINE# #INDENT# 'Find names of resampled raster tables.' #NEWLINE# rtables = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# db = dbio . connect ( dbname ) #NEWLINE# cur = db . cursor ( ) #NEWLINE# for v in [ 'precip' , 'tmax' , 'tmin' , 'wind' ] : #NEWLINE# #INDENT# tname = options [ 'vic' ] [ v ] #NEWLINE# cur . execute ( "select * from raster_resampled where sname='{0}' and tname like '{1}%' and resolution={2}" . format ( v , tname , res ) ) #NEWLINE# rtables [ v ] = cur . fetchone ( ) [ 1 ] #NEWLINE# #UNINDENT# cur . close ( ) #NEWLINE# db . close ( ) #NEWLINE# return rtables