Changeset 6595
- Timestamp:
- Mar 24, 2009, 2:06:16 PM (15 years ago)
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/coordinate_transforms/test_redfearn.py
r6520 r6595 147 147 148 148 # Then project to zone 49 149 zone, easting, northing = redfearn(-29.233299999,114.05, zone=49)149 zone, easting, northing = redfearn(-29.233299999,114.05, zone=49) 150 150 151 151 assert zone == 49 … … 163 163 164 164 # Then project to zone 50 165 zone, easting, northing = redfearn(-29.1333,113.9667, zone=50)165 zone, easting, northing = redfearn(-29.1333,113.9667, zone=50) 166 166 167 167 assert zone == 50 … … 178 178 179 179 # Then project to zone 49 180 zone, easting, northing = redfearn(-29.1667,114, zone=49)180 zone, easting, northing = redfearn(-29.1667,114, zone=49) 181 181 182 182 assert zone == 49 -
anuga_core/source/anuga/shallow_water/data_manager.py
r6584 r6595 5503 5503 origin=None, 5504 5504 zone=None, 5505 central_meridian=None, 5505 5506 mean_stage=0.0, 5506 5507 zscale=1.0, … … 5719 5720 # Check zone boundaries 5720 5721 if zone is None: 5721 refzone, _, _ = redfearn(latitudes[0], longitudes[0]) 5722 refzone, _, _ = redfearn(latitudes[0], longitudes[0], 5723 central_meridian=central_meridian) 5722 5724 else: 5723 5725 refzone = zone 5724 5726 5727 5728 5725 5729 old_zone = refzone 5726 5730 5727 5731 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) 5730 5735 x[i] = easting 5731 5736 y[i] = northing 5732 if zone != refzone:5737 if computed_zone != refzone: 5733 5738 msg = 'All sts gauges need to be in the same zone. \n' 5734 5739 msg += 'offending gauge:Zone %d,%.4f, %4f\n' \ 5735 % ( zone, easting, northing)5740 % (computed_zone, easting, northing) 5736 5741 msg += 'previous gauge:Zone %d,%.4f, %4f' \ 5737 5742 % (old_zone, old_easting, old_northing) 5738 5743 raise Exception, msg 5739 old_zone = zone5744 old_zone = computed_zone 5740 5745 old_easting = easting 5741 5746 old_northing = northing -
anuga_core/source/anuga/shallow_water/test_data_manager.py
r6584 r6595 6793 6793 os.remove(sts_file) 6794 6794 6795 def test_urs2sts_nonstandard_ projection(self):6795 def test_urs2sts_nonstandard_meridian(self): 6796 6796 """ 6797 Test single source 6797 Test single source using the meridian from zone 50 as a nonstandard meridian 6798 6798 """ 6799 6799 tide=0 … … 6818 6818 6819 6819 base_name, files = self.write_mux2(lat_long_points, 6820 time_step_count, time_step,6821 first_tstep, last_tstep,6822 depth=gauge_depth,6823 ha=ha,6824 ua=ua,6825 va=va)6820 time_step_count, time_step, 6821 first_tstep, last_tstep, 6822 depth=gauge_depth, 6823 ha=ha, 6824 ua=ua, 6825 va=va) 6826 6826 6827 6827 urs2sts(base_name, 6828 6828 basename_out=base_name, 6829 zone=50, 6830 mean_stage=tide,verbose=False) 6829 central_meridian=123, 6830 mean_stage=tide, 6831 verbose=False) 6831 6832 6832 6833 # now I want to check the sts file ... … … 6848 6849 y = points[:,1] 6849 6850 6850 # Check that all coordinate are correctly represented6851 # Using the non standard projection (50)6851 # Check that all coordinate are correctly represented 6852 # Using the non standard projection (50) 6852 6853 for i in range(4): 6853 zone, e, n = redfearn(lat_long_points[i][0], lat_long_points[i][1], zone=50) 6854 zone, e, n = redfearn(lat_long_points[i][0], 6855 lat_long_points[i][1], 6856 central_meridian=123) 6854 6857 assert num.allclose([x[i],y[i]], [e,n]) 6855 assert zone==geo_reference.zone 6856 6858 assert zone==-1 6859 6860 6857 6861 def test_urs2sts_nonstandard_projection_reverse(self): 6858 6862 """ … … 6910 6914 y = points[:,1] 6911 6915 6912 # Check that all coordinate are correctly represented6913 # Using the non standard projection (50)6916 # Check that all coordinate are correctly represented 6917 # Using the non standard projection (50) 6914 6918 for i in range(4): 6915 zone, e, n = redfearn(lat_long_points[i][0], lat_long_points[i][1], zone=50) 6919 zone, e, n = redfearn(lat_long_points[i][0], lat_long_points[i][1], 6920 zone=50) 6916 6921 assert num.allclose([x[i],y[i]], [e,n]) 6917 6922 assert zone==geo_reference.zone -
anuga_work/production/australia_ph2/adelaide/build_urs_boundary.py
r6387 r6595 142 142 basename_out=output_dir, 143 143 ordering_filename=project.urs_order, 144 central_meridian=project.central_meridian, 144 145 weights=mux_weights, 145 mean_stage=project.tide,146 146 verbose=True) 147 147 else: # a single mux stem file, assume 1.0 weight … … 160 160 basename_out=output_dir, 161 161 ordering_filename=order_filename, 162 central_meridian=project.central_meridian, 162 163 weights=mux_weights, 163 mean_stage=project.tide,164 164 verbose=True) 165 165 -
anuga_work/production/australia_ph2/adelaide/project.py
r6581 r6595 25 25 # Model specific parameters. 26 26 # One or all can be changed each time the run_model script is executed 27 28 central_meridian = 137.5 # This is the nonstandard projection needed 27 29 tide = 0 # difference between MSL and HAT 28 30 event_number = 64322 # the event number
Note: See TracChangeset
for help on using the changeset viewer.