Skip to content

Commit

Permalink
add clarifying comments
Browse files Browse the repository at this point in the history
  • Loading branch information
navidcy committed May 14, 2024
1 parent f346932 commit 088c547
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_expt_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def number_of_gridpoints(longitude_extent, latitude_extent, resolution):

def generate_temperature_arrays(nx, ny, number_vertical_layers):

# temperatures close to 0 ᵒC
temp_in_C = np.random.randn(ny, nx, number_vertical_layers)

temp_in_C_masked = np.copy(temp_in_C)
Expand All @@ -122,6 +123,7 @@ def generate_temperature_arrays(nx, ny, number_vertical_layers):
temp_in_K = np.copy(temp_in_C) + 273.15
temp_in_K_masked = np.copy(temp_in_C_masked) + 273.15

# ensure we didn't mask the minimum temperature
if np.nanmin(temp_in_C_masked) == np.min(temp_in_C):
return temp_in_C, temp_in_C_masked, temp_in_K, temp_in_K_masked
else:
Expand Down

0 comments on commit 088c547

Please sign in to comment.