if value is None:
                exec("%s = %s" % (key, value))
            else:
                exec("%s = '%s'" % (key, value))
else:
    print ""
    print "Plot Horizontal Slice - UCVM %s" % VERSION
    print ""
    print "This utility helps you plot a horizontal slice across the earth for one of the CVMs"
    print "that you installed with UCVM."
    print ""
    print "In order to create the plot, you must first specify the region."
    print ""

    lon1 = ask_number(
        "Please enter the bottom-left longitude from which the plot should start: "
    )
    lat1 = ask_number(
        "Next, enter the bottom-left latitude from which the plot should start: "
    )
    lon2 = ask_number(
        "Enter the top-right longitude where the plot should end: ")
    lat2 = ask_number(
        "Enter the top-right latitude where the plot should end: ")

    # Check to see that this is a valid box.
    if lon1 > lon2 or lat1 > lat2:
        print "Error: (%.2f, %.2f) to (%.2f, %.2f) is not a valid box. Please re-run this script" % (
            lon1, lat1, lon2, lat2)
        print "and specify a valid region. The first point should be the lower-left corner, the"
        print "second point should be the upper-right corner."
Exemple #2
0
            if value is None:
                exec("%s = %s" % (key, value))
            else:
                exec("%s = '%s'" % (key, value))
else:
    print ""
    print "Elevation from Etree - UCVM %s" % VERSION
    print ""
    print "This utility helps you either plot a Vs30 basin depth map or save the data in a"
    print "text file that you can then later parse."
    print ""
    print "In order to create the plot, you must first specify the region."
    print ""

    lon1 = ask_number(
        "Please enter the bottom-left longitude from which the Vs30 values should come: "
    )
    lat1 = ask_number(
        "Next, enter the bottom-left latitude from which the Vs30 values should come: "
    )
    lon2 = ask_number(
        "Enter the top-right longitude where the Vs30 values should end: ")
    lat2 = ask_number(
        "Enter the top-right latitude where the Vs30 values should end: ")

    # Check to see that this is a valid box.
    if lon1 > lon2 or lat1 > lat2:
        print "Error: (%.2f, %.2f) to (%.2f, %.2f) is not a valid box. Please re-run this script" % (
            lon1, lat1, lon2, lat2)
        print "and specify a valid region. The first point should be the lower-left corner, the"
        print "second point should be the upper-right corner."
Exemple #3
0
        except StandardError, e:
            if value is None:
                exec("%s = %s" % (key, value))
            else:
                exec("%s = '%s'" % (key, value))
else:
    print ""
    print "Plot Cross-Section - UCVM %s" % VERSION
    print ""
    print "This utility helps you plot a cross-section across the earth for one of the CVMs"
    print "that you installed with UCVM."
    print ""
    print "In order to create the plot, you must first specify the starting point."
    print ""

    lon1 = ask_number(
        "Please enter the origin longitude from which the plot should start: ")
    lat1 = ask_number(
        "Next, enter the origin latitude from which the plot should start: ")
    lon2 = ask_number(
        "Enter the destination longitude where the plot should end: ")
    lat2 = ask_number(
        "Enter the destination latitude where the plot should end: ")
    meta['lon1'] = lon1
    meta['lon2'] = lon2
    meta['lat1'] = lat1
    meta['lat2'] = lat2

    starting_elevation = 0
    starting_elevation = ask_number("Please enter the elevation, in meters, at which you would like \n" + \
                                    "this cross-section to start: ")
    meta['starting_elevation'] = starting_elevation
Exemple #4
0
        except StandardError, e:
            if value is None:
                exec("%s = %s" % (key, value))
            else:
                exec("%s = '%s'" % (key, value))
else:
    print ""
    print "Plot Depth-Profile - UCVM %s" % VERSION
    print ""
    print "This utility helps you plot a depth-profile for one of the CVMs"
    print "that you installed with UCVM."
    print ""
    print "In order to create the plot, you must first specify the grid point."
    print ""

    lon1 = ask_number("Please enter the longitude: ")
    lat1 = ask_number("Next, enter the latitude: ")

    meta['lon1'] = lon1
    meta['lat1'] = lat1

    starting_depth = -1  ## default, 0
    while starting_depth < 0:
        starting_depth = ask_number("Please enter the depth, in meters, at which you would like \n" + \
                                  "this plot to start: ")
        if starting_depth < 0:
            print "Error: the depth must be a positive number."
    meta['starting_depth'] = starting_depth

    ending_depth = -1  ## max, 15000
    while ending_depth < 0: