Skip to content

Conversation

@AnnaKwa
Copy link
Contributor

@AnnaKwa AnnaKwa commented Jan 28, 2026

ACE inference can be configured to save only a portion of the globe, but when using regional input coarse data to HiRO we ran into a bug where inferred coordinate ranges at write time were incorrect. This was because adjust_fine_coord_range used to subselect the saved model topography data uses the coarse data tensor shape (<global bounds) and topography tensor shape (global bounds) to infer the downscale factor if downscale_factor is not passed as an arg. The error in coordinate subselection propagates further, resulting in the runtime error.

This PR fixes the issue by passing model.downscale_factor through the build methods so that adjust_fine_coord_range can use it to get the correct coord range. It is already an optional input to the function because the cascaded model generation run into this scenario.

I confirmed this works by running inference on a subset of 100 km data that failed previously. I attempted to add this case to the integration tests for inference but found it would require adding a lot more complexity to the test data generation since other tests currently assume the fine and coarse test coordinates match in range. I could add some optional indirect parameterization but then the test inference model config uses the fine data as the topography so there would also have to be updates to change it to something that doesn't match the coarse test data. After all those changes it starts to feel like the integration test data is constructed so differently from what we'd encounter in a production run that the test may not be very useful.

@AnnaKwa AnnaKwa changed the title Allow downscaling to operate on subset of full coarse global data Allow downscaling to operate on lat/lon subset of coarse global data Jan 28, 2026
@AnnaKwa AnnaKwa changed the title Allow downscaling to operate on lat/lon subset of coarse global data Fix: allow downscaling to operate on lat/lon subset of coarse global data Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant