Esempio n. 1
0
def test_ice_sheet_too_high():

    ice = IceSheet()

    state = climt.get_default_state([ice],
                                    x=dict(label='longtiude',
                                           values=np.linspace(0, 2, 4),
                                           units='degrees_east'),
                                    y=dict(label='latitude',
                                           values=np.linspace(0, 2, 4),
                                           units='degrees_north'))

    state['area_type'][:] = 'land_ice'
    state['land_ice_thickness'][:] = 8
    state['surface_snow_thickness'][:] = 3

    with pytest.raises(ValueError) as excinfo:
        ice(state, timedelta(seconds=100))

    assert 'exceeds maximum value' in str(excinfo.value)
Esempio n. 2
0
 def get_component_instance(self):
     ice = IceSheet()
     return ice
Esempio n. 3
0
 def get_component_instance(self, state_modification_func=lambda x: x):
     ice = IceSheet()
     return ice
Esempio n. 4
0
 def get_component_instance(self):
     return IceSheet()