Skip to content

Commit

Permalink
don't hardcode mask
Browse files Browse the repository at this point in the history
  • Loading branch information
navidcy committed May 14, 2024
1 parent e9ec8f8 commit 051da87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_expt_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ def generate_temperature_arrays(nx, ny, number_vertical_layers):
temp_in_C = np.random.randn(ny, nx, number_vertical_layers)

temp_in_C_masked = np.copy(temp_in_C)
temp_in_C_masked[20:24, 32:35, :] = float("nan")
if int(ny/4+4) < ny-1 and int(nx/3+4) < nx+1:
temp_in_C_masked[int(ny/3):int(ny/3+5), int(nx):int(nx/4+4), :] = float("nan")
else:
raise ValueError("use bigger domain")

temp_in_K = np.copy(temp_in_C) + 273.15
temp_in_K_masked = np.copy(temp_in_C_masked) + 273.15
Expand Down

0 comments on commit 051da87

Please sign in to comment.