From 6208f6ff24da415ca47faf3185cb1a6e7a4c249f Mon Sep 17 00:00:00 2001 From: Lukas Pilz Date: Mon, 7 Oct 2024 11:38:17 +0200 Subject: [PATCH] Update mamba (#187) * Add explicit casting to fix result dtype as value-based promotion was removed from NumPy v2 --- .github/workflows/ci.yaml | 2 +- .github/workflows/upstream-dev-ci.yaml | 2 +- xwrf/grid.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5a5ddb0a..e7c52838 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: set up conda environment - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@v2 with: environment-file: ci/environment.yml init-shell: >- diff --git a/.github/workflows/upstream-dev-ci.yaml b/.github/workflows/upstream-dev-ci.yaml index fcfcc470..6d3893ea 100644 --- a/.github/workflows/upstream-dev-ci.yaml +++ b/.github/workflows/upstream-dev-ci.yaml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@v4 - name: set up conda environment id: conda - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@v2 with: environment-file: ci/environment-upstream-dev.yml init-shell: >- diff --git a/xwrf/grid.py b/xwrf/grid.py index 40e9c34c..1be8151d 100644 --- a/xwrf/grid.py +++ b/xwrf/grid.py @@ -72,8 +72,8 @@ def _wrf_grid_from_dataset(ds: xr.Dataset) -> Mapping[Hashable, pyproj.CRS | np. trf = pyproj.Transformer.from_crs(wgs84, crs, always_xy=True) e, n = trf.transform(cen_lon, cen_lat) - nx = ds.sizes['west_east'] - ny = ds.sizes['south_north'] + nx = np.float64(ds.sizes['west_east']) + ny = np.float64(ds.sizes['south_north']) x0 = -(nx - 1) / 2.0 * dx + e # DL corner y0 = -(ny - 1) / 2.0 * dy + n # DL corner