Skip to content

Commit

Permalink
Commit to release 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AnsArn committed Jan 20, 2020
1 parent a862029 commit 65fa99d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
' PARAMETERIZATIONS '
stability_correction = 'Ri' # possibilities: 'Ri','MO'
albedo_method = 'Oerlemans98' # possibilities: 'Oerlemans98'
densification_method = 'Boone' # possibilities: 'Boone','Vionnet'
densification_method = 'Boone' # possibilities: 'Boone','Vionnet'
penetrating_method = 'Bintanja95' # possibilities: 'Bintanja95'
roughness_method = 'Moelg12' # possibilities: 'Moelg12'
saturation_water_vapour_method = 'Sonntag90' # possibilities: 'Sonntag90'
Expand Down
6 changes: 3 additions & 3 deletions cosipy/tests/test_GRID_getter_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_grid_getter_functions():
assert GRID.get_temperature() == layer_temperatures
assert GRID.get_liquid_water_content() == layer_liquid_water
assert GRID.get_snow_heights() == layer_heights[0:3]
#assert GRID.get_ice_heights() == layer_heights[3:5]
assert GRID.get_ice_heights() == layer_heights[3:5]
assert GRID.get_node_height(0) == layer_heights[0]
assert GRID.get_node_density(0) == approx(layer_densities[0], abs=1e-3)
assert GRID.get_node_temperature(0) == layer_temperatures[0]
Expand All @@ -24,5 +24,5 @@ def test_grid_getter_functions():
#number_nodes_before = GRID.get_number_layers()
#GRID.remove_node()
#assert GRID.get_number_nodes() == number_nodes_before -1
# assert np.nanmean(GRID.get_density()) == np.nanmean(layer_densities)
# assert GRID.get_density() == layer_densities
#assert np.nanmean(GRID.get_density()) == np.nanmean(layer_densities)
#assert GRID.get_density() == layer_densities
3 changes: 3 additions & 0 deletions cosipy/tests/test_GRID_update_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ def test_grid_getter_functions():
SWE_after_adaptive = np.array(GRID.get_height()) / np.array(GRID.get_density())
SWE_after_adaptive_sum = np.nansum(SWE_after_adaptive)

#assert SWE_before_sum == SWE_after_sum
#assert SWE_after_sum == SWE_after_adaptive_sum

assert SWE_before_sum == approx(SWE_after_sum, abs=1e-3)
assert SWE_after_sum == approx(SWE_after_adaptive_sum, abs=1e-3)
4 changes: 2 additions & 2 deletions cosipy/tests/test_parameterisation_densification.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ def test_densification_parameterisation():
SWE_after = np.array(GRID.get_height()) / np.array(GRID.get_density())
SWE_after_sum = np.nansum(SWE_after)

# assert SWE_before_sum == approx(SWE_after_sum, abs=1e-3)
#
#assert SWE_before_sum == approx(SWE_after_sum, abs=1e-3)
#assert SWE_before_sum == SWE_after_sum
2 changes: 1 addition & 1 deletion cosipy/tests/test_parameterisation_surfaceTemperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
def test_surface_Temperature_parameterisation():

fun, surface_temperature, lw_radiation_in, lw_radiation_out, sensible_heat_flux, latent_heat_flux, \
ground_heat_flux, sw_radiation_net, rho, Lv, Cs_t, Cs_q, q0, q2, phi \
ground_heat_flux, sw_radiation_net, rho, Lv, Cs_t, Cs_q, q0, q2 \
= update_surface_temperature(GRID, 0.6, (0.24/1000), 275, 0.6, 789, 1000, 4.5, 0.0, 0.1)

assert surface_temperature <= zero_temperature and surface_temperature >= 220.0
Expand Down

0 comments on commit 65fa99d

Please sign in to comment.