Skip to content

Commit

Permalink
Bug fix to failure of regional mean climate metrics
Browse files Browse the repository at this point in the history
Changes are made to mean_climate_driver.py to call the updated version
of region_subset() function. Specifically, current mean_climate_driver.py
passed three input parameters in to region_subset() to mask the data for
regional mean climate calculation. However, the region_subset() in
pcmdi_metrics.io library required 5 input parameters, leading to the
failure of mean_climate_driver.py calculation.
  • Loading branch information
zhangshixuan1987 committed Sep 22, 2024
1 parent 0e69789 commit 8ba7e7d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pcmdi_metrics/mean_climate/mean_climate_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,18 @@
ds_ref_dict[region] = ds_ref_tmp
else:
ds_test_tmp = region_subset(
ds_test_tmp, regions_specs, region=region
ds_test_tmp,
region,
None,
regions_specs,
)
ds_test_dict[region] = ds_test_tmp
if region not in list(ds_ref_dict.keys()):
ds_ref_dict[region] = region_subset(
ds_ref_tmp, regions_specs, region=region
ds_ref_tmp,
region,
None,
regions_specs,
)
print("spatial subset done")

Expand Down

0 comments on commit 8ba7e7d

Please sign in to comment.