Skip to content

Commit

Permalink
rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
huppd committed Nov 7, 2024
1 parent 427a954 commit 68ee283
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/engine/test_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ def add_variable_to_grib(filename, dict_data):

@pytest.fixture
def setup_grib_file(tmp_path):
array_t = np.ones(
array_v = np.ones(
(
TIME_DIM_GRIB_SIZE,
STEP_DIM_SIZE,
HEIGHT_DIM_GRIB_SIZE,
HORIZONTAL_DIM_GRIB_SIZE,
)
)
array_t[:, :, :, 0] = 0
array_t[:, :, :, -1] = 2
array_v[:, :, :, 0] = 0
array_v[:, :, :, -1] = 2

array_pres = (
array_t = (
np.ones(
(
TIME_DIM_GRIB_SIZE,
Expand All @@ -85,10 +85,10 @@ def setup_grib_file(tmp_path):
)
* 3
)
array_pres[:, :, :, 0] = 2
array_pres[:, :, :, -1] = 4
array_t[:, :, :, 0] = 2
array_t[:, :, :, -1] = 4

dict_data = {"t": array_pres, "v": array_t}
dict_data = {"t": array_t, "v": array_v}

# This would be where your grib file is created
add_variable_to_grib(tmp_path / GRIB_FILENAME, dict_data)
Expand Down

0 comments on commit 68ee283

Please sign in to comment.