Ignore:
Timestamp:
Aug 24, 2005, 1:49:47 PM (19 years ago)
Author:
ole
Message:

Embedded caching functionality within quantity.set_values and modified validation example lwru2.py to illustrate the advantages that can be gained from supervised caching.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/data_manager.py

    r1740 r1753  
    963963
    964964    import os
    965     from Scientific.IO.NetCDF import NetCDFFile
     965    #from Scientific.IO.NetCDF import NetCDFFile
    966966    from Numeric import Float, arrayrange, concatenate
    967967
     
    10101010
    10111011    if verbose: print 'Store to NetCDF file %s' %ptsname
     1012    write_ptsfile(ptsname, points, attribute, attribute_name)
     1013
     1014
     1015def write_ptsfile(ptsname, points, attribute, attribute_name = None):
     1016    """Write points and associated attribute to pts (NetCDF) format
     1017    """
     1018
     1019    from Numeric import Float
     1020   
     1021    if attribute_name is None:
     1022        attribute_name = 'attribute'       
     1023   
     1024
     1025    from Scientific.IO.NetCDF import NetCDFFile
     1026   
    10121027    # NetCDF file definition
    10131028    outfile = NetCDFFile(ptsname, 'w')
     1029
    10141030
    10151031    #Create new file
     
    10401056    nc_attribute[:] = attribute
    10411057
    1042     infile.close()
    10431058    outfile.close()
    10441059   
     1060
    10451061def dem2pts(basename_in, basename_out=None, verbose=False,
    10461062            easting_min=None, easting_max=None,
     
    10631079    elevation: N Float array
    10641080    """
     1081
     1082    #FIXME: Can this be written feasibly using write_pts?
    10651083
    10661084    import os
Note: See TracChangeset for help on using the changeset viewer.