Ignore:
Timestamp:
Oct 10, 2005, 11:41:26 AM (18 years ago)
Author:
ole
Message:

Made interpolation_points in file_function absolute UTM coordinates and wrote test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/util.py

    r1859 r1884  
    155155    All times are assumed to be in UTC
    156156
    157     All spatial information is assumed to be in UTM coordinates.
     157    All spatial information is assumed to be in absolute UTM coordinates.
    158158
    159159    See Interpolation function for further documentation
     
    170170    #- domain's georef
    171171    #- sww file's georef
    172     #- interpolation points georef
     172    #- interpolation points as absolute UTM coordinates
    173173
    174174
     
    228228    from config import time_format
    229229    from Scientific.IO.NetCDF import NetCDFFile
    230     from Numeric import array, zeros, Float, alltrue, concatenate, reshape       
     230    from Numeric import array, zeros, Float, alltrue, concatenate, reshape
     231    from util import ensure_numeric   
    231232
    232233    #Open NetCDF file
     
    251252
    252253
     254    if interpolation_points is not None:
     255        interpolation_points = ensure_numeric(interpolation_points)
     256
     257
     258
    253259    #Now assert that requested quantitites (and the independent ones)
    254260    #are present in file
     
    302308        y = reshape(y, (len(y),1))
    303309        vertex_coordinates = concatenate((x,y), axis=1) #m x 2 array
     310
     311        if interpolation_points is not None:
     312            #Adjust for georef
     313            interpolation_points[:,0] -= xllcorner
     314            interpolation_points[:,1] -= yllcorner       
     315       
     316
    304317
    305318
Note: See TracChangeset for help on using the changeset viewer.