Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ci.yaml #391

Merged
merged 4 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4
- name: Create conda environment
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
cache-downloads: true
micromamba-version: "latest"
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- name: Create conda environment
uses: mamba-org/provision-with-micromamba@v16
uses: mamba-org/setup-micromamba@v1
with:
cache-downloads: true
micromamba-version: "latest"
Expand Down
8 changes: 5 additions & 3 deletions xesmf/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,12 +1044,14 @@ def _init_para_regrid(self, ds_in, ds_out, kwargs):

if self.sequence_out:
ds_out = ds_out.rename({self.out_horiz_dims[1]: 'x_out'})
out_chunks = ds_out.chunks.get('x_out')
else:
ds_out = ds_out.rename(
{self.out_horiz_dims[0]: 'y_out', self.out_horiz_dims[1]: 'x_out'}
)
out_chunks = [ds_out.chunks.get(k) for k in ['y_out', 'x_out']]

out_chunks = [ds_out.chunks.get(k) for k in ['y_out', 'x_out']]
in_chunks = [ds_in.chunks.get(k) for k in ['y_in', 'x_in']]
chunks = out_chunks + in_chunks

# Rename coords to avoid issues in xr.map_blocks
for coord in list(self.out_coords.keys()):
Expand All @@ -1060,7 +1062,7 @@ def _init_para_regrid(self, ds_in, ds_out, kwargs):
weights_dims = ('y_out', 'x_out', 'y_in', 'x_in')
templ = sps.zeros((self.shape_out + self.shape_in))
w_templ = xr.DataArray(templ, dims=weights_dims).chunk(
out_chunks
chunks
) # template has same chunks as ds_out

w = xr.map_blocks(
Expand Down
Loading