Ignore:
Timestamp:
Mar 24, 2009, 2:06:16 PM (16 years ago)
Author:
ole
Message:

Added the nonstandard central meridian option, tested and implemented it in the Adeladie Phase II scripts.

File:
1 edited

Legend:

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

    r6584 r6595  
    55035503            origin=None,
    55045504            zone=None,
     5505            central_meridian=None,           
    55055506            mean_stage=0.0,
    55065507            zscale=1.0,
     
    57195720    # Check zone boundaries
    57205721    if zone is None:
    5721         refzone, _, _ = redfearn(latitudes[0], longitudes[0])
     5722        refzone, _, _ = redfearn(latitudes[0], longitudes[0],
     5723                                 central_meridian=central_meridian)
    57225724    else:
    57235725        refzone = zone
    57245726
     5727       
     5728
    57255729    old_zone = refzone
    57265730
    57275731    for i in range(number_of_points):
    5728         zone, easting, northing = redfearn(latitudes[i], longitudes[i],
    5729                                            zone=zone)
     5732        computed_zone, easting, northing = redfearn(latitudes[i], longitudes[i],
     5733                                                    zone=zone,
     5734                                                    central_meridian=central_meridian)
    57305735        x[i] = easting
    57315736        y[i] = northing
    5732         if zone != refzone:
     5737        if computed_zone != refzone:
    57335738            msg = 'All sts gauges need to be in the same zone. \n'
    57345739            msg += 'offending gauge:Zone %d,%.4f, %4f\n' \
    5735                    % (zone, easting, northing)
     5740                   % (computed_zone, easting, northing)
    57365741            msg += 'previous gauge:Zone %d,%.4f, %4f' \
    57375742                   % (old_zone, old_easting, old_northing)
    57385743            raise Exception, msg
    5739         old_zone = zone
     5744        old_zone = computed_zone
    57405745        old_easting = easting
    57415746        old_northing = northing
Note: See TracChangeset for help on using the changeset viewer.