Changeset 837


Ignore:
Timestamp:
Feb 7, 2005, 3:07:28 PM (20 years ago)
Author:
ole
Message:

Added attribute name to NetCDF pts file. Should really be a list of length 1

Location:
inundation/ga/storm_surge/pyvolution
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/data_manager.py

    r836 r837  
    857857
    858858    outfile.ncols = ncols
    859     outfile.nrows = nrows   
    860 
     859    outfile.nrows = nrows
     860
     861   
     862    outfile.attribute_names = 'elevation' #This is the attribute always present in DEMs
     863    #FIXME (Ole): We would really like this to be Python list,
     864    #but I am not sure if
     865    #that is possible in NetCDF???
     866   
    861867
    862868    # dimension definitions
     
    868874    # variable definitions
    869875    outfile.createVariable('points', Float, ('number_of_points',
    870                                          'number_of_dimensions'))
     876                                             'number_of_dimensions'))
    871877    outfile.createVariable('attributes', Float, ('number_of_points',
    872                                              'number_of_attributes'))
     878                                                 'number_of_attributes'))
    873879
    874880    # Get handles to the variables
  • inundation/ga/storm_surge/pyvolution/test_data_manager.py

    r836 r837  
    546546        points = fid.variables['points']
    547547        attributes = fid.variables['attributes']
     548        attribute_names = fid.attribute_names
    548549
    549550        #Check values
Note: See TracChangeset for help on using the changeset viewer.