Changeset 4050


Ignore:
Timestamp:
Dec 4, 2006, 11:58:25 AM (17 years ago)
Author:
duncan
Message:

do ticket#107

Location:
anuga_core/source/anuga/shallow_water
Files:
2 edited

Legend:

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

    r4038 r4050  
    26022602    if maxlat != None:
    26032603        assert -90 < maxlat < 90 , msg
     2604        if minlat != None:
     2605            assert maxlat > minlat
    26042606    if minlon != None:
    26052607        assert -180 < minlon < 180 , msg
    26062608    if maxlon != None:
    26072609        assert -180 < maxlon < 180 , msg
     2610        if minlon != None:
     2611            assert maxlon > minlon
     2612       
    26082613
    26092614
  • anuga_core/source/anuga/shallow_water/test_data_manager.py

    r4037 r4050  
    27482748
    27492749
     2750    def test_ferret2sww_lat_long(self):
     2751        # Test that min lat long works
     2752
     2753        #The test file has
     2754        # LON = 150.66667, 150.83334, 151, 151.16667
     2755        # LAT = -34.5, -34.33333, -34.16667, -34 ;
     2756       
     2757        #Read
     2758        from anuga.coordinate_transforms.redfearn import redfearn
     2759        fid = NetCDFFile(self.test_MOST_file + '_ha.nc')
     2760        first_value = fid.variables['HA'][:][0,0,0]
     2761        fourth_value = fid.variables['HA'][:][0,0,3]
     2762        fid.close()
     2763
     2764
     2765        #Call conversion (with zero origin)
     2766        #ferret2sww('small', verbose=False,
     2767        #           origin = (56, 0, 0))
     2768        try:
     2769            ferret2sww(self.test_MOST_file, verbose=False,
     2770                   origin = (56, 0, 0), minlat=-34.5, maxlat=-35)
     2771        except AssertionError:
     2772            pass
     2773        else:
     2774            self.failUnless(0 ==1,  'Bad input did not throw exception error!')
    27502775
    27512776    def test_sww_extent(self):
Note: See TracChangeset for help on using the changeset viewer.