Skip to content

Commit

Permalink
Update neuralgcm_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Nov 7, 2024
1 parent be4c81d commit 9627c06
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/neuralgcm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,16 @@ def setUp(self):
eval_era5 = xarray_utils.regrid(sliced_era5, regridder)
eval_era5 = xarray_utils.fill_nan_with_nearest(eval_era5)

# inner_steps = 24 # save model outputs once every 24 hours
# outer_steps = 4 * 24 // inner_steps # total of 4 days
inner_steps = 4 # save model outputs once every 24 hours
outer_steps = 4 * 4 // inner_steps # total of 4 days
import os
if os.getenv("NEURALGCM_LARGE") is not None:
inner_steps = 24 # save model outputs once every 24 hours
outer_steps = 4 * 24 // inner_steps # total of 4 days
elif s.getenv("NEURALGCM_MEDIUM") is not None:
inner_steps = 4 # save model outputs once every 24 hours
outer_steps = 4 * 4 // inner_steps # total of 4 days
else:
inner_steps = 1 # save model outputs once every 24 hours
outer_steps = 1 * 1 // inner_steps # total of 4 days

timedelta = np.timedelta64(1, "h") * inner_steps
# times = (np.arange(outer_steps) * inner_steps) # time axis in hours
Expand Down

0 comments on commit 9627c06

Please sign in to comment.