Changeset 5546


Ignore:
Timestamp:
Jul 22, 2008, 11:39:25 AM (11 years ago)
Author:
ole
Message:

Slight update of data_manager (file name in urs2sts)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/data_manager.py

    r5541 r5546  
    50155015    # Check output filename   
    50165016    if basename_out is None:
    5017         msg = 'STS filename must be specified'
     5017        msg = 'STS filename must be specified as basename_out'
     5018        msg += ' in function urs2sts'
    50185019        raise Exception, msg
    5019     stsname = basename_out + '.sts'
     5020   
     5021    if basename_out.endswith('.sts'):
     5022        stsname = basename_out
     5023    else:   
     5024        stsname = basename_out + '.sts'       
    50205025
    50215026    # Create input filenames from basenames and check their existence
     
    51585163    geo_ref = write_NetCDF_georeference(origin, outfile)
    51595164
    5160     z = elevation
     5165
    51615166   
    51625167    #print geo_ref.get_xllcorner()
    51635168    #print geo_ref.get_yllcorner()
    51645169
    5165     z = resize(z,outfile.variables['z'][:].shape)
     5170    elevation = resize(elevation,outfile.variables['elevation'][:].shape)
    51665171    outfile.variables['x'][:] = x - geo_ref.get_xllcorner()
    51675172    outfile.variables['y'][:] = y - geo_ref.get_yllcorner()
    5168     outfile.variables['z'][:] = z             #FIXME HACK for bacwards compat.
    5169     outfile.variables['elevation'][:] = z
     5173    outfile.variables['elevation'][:] = elevation
    51705174
    51715175    stage = outfile.variables['stage']
     
    56805684        outfile.variables[q+Write_sts.RANGE][1] = -max_float # Max
    56815685
    5682         outfile.createVariable('z', sts_precision, ('number_of_points',))
    56835686        # Doing sts_precision instead of Float gives cast errors.
    56845687        outfile.createVariable('time', Float, ('number_of_timesteps',))
Note: See TracChangeset for help on using the changeset viewer.