Changeset 4301


Ignore:
Timestamp:
Mar 12, 2007, 5:00:07 PM (18 years ago)
Author:
duncan
Message:

starting to add urs2txt stuff

File:
1 edited

Legend:

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

    r4298 r4301  
    48664866    ymomentum[slice_index] = va*h
    48674867
     4868def URS2txt(basename_in):
     4869    """
     4870    Not finished or tested
     4871    """
     4872    files_in = [basename_in+'-z-mux',
     4873                basename_in+'-e-mux',
     4874                basename_in+'-n-mux']
     4875    quantities = ['HA','UA','VA']
     4876
     4877    # instanciate urs_points of the three mux files.
     4878    mux = {}
     4879    for quantity, file in map(None, quantities, files_in):
     4880        mux[quantity] = Urs_points(file)
    48684881       
     4882    # Could check that the depth is the same. (hashing)
     4883
     4884    # handle to a mux file to do depth stuff
     4885    a_mux = mux[quantities[0]]
     4886   
     4887    # Convert to utm
     4888    lat = a_mux.lonlatdep[:,1]
     4889    long = a_mux.lonlatdep[:,0]
     4890    points_utm, zone = convert_from_latlon_to_utm( \
     4891        latitudes=lat, longitudes=long)
     4892    #print "points_utm", points_utm
     4893    #print "zone", zone
     4894    elevations = a_mux.lonlatdep[:,2] * -1 #
     4895   
     4896    fid = open(basename_in + '.txt', 'w')
     4897
     4898    fid.write("zone" + str(zone) + "\n")
     4899
     4900    for elevation, point_utm in map(None, elevations, points_utm):
     4901        pass
     4902   
    48694903class Urs_points:
    48704904    """
Note: See TracChangeset for help on using the changeset viewer.