# AttributeError: 'GridHolder' object has no attribute 'bilinear' during make\_bry.py with pyinterp

**URL:** <https://forum.croco-ocean.org/t/attributeerror-gridholder-object-has-no-attribute-bilinear-during-make-bry-py-with-pyinterp/7667>\
**Category:** croco tools (pre/post-processing)\
**Tags:** forcing\
**Created:** [June 11, 2026, 12:35pm UTC](https://forum.croco-ocean.org/t/attributeerror-gridholder-object-has-no-attribute-bilinear-during-make-bry-py-with-pyinterp/7667 "2026-06-11T12:35:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AsishKsasidharan](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/asishksasidharan/32/757_2.png) [@AsishKsasidharan](https://forum.croco-ocean.org/u/AsishKsasidharan)\
**Post date:** [June 11, 2026, 12:35pm UTC](https://forum.croco-ocean.org/t/attributeerror-gridholder-object-has-no-attribute-bilinear-during-make-bry-py-with-pyinterp/7667/1 "2026-06-11T12:35:03Z")

</div>

Hello CROCO Community,

I am running into an error while attempting to generate boundary files (`make_bry.py`) using the Python preprocessing tools (`pytools_X`) for a Bay of Bengal setup.

The script crashes during the horizontal interpolation of sea surface height (`ssh`) from GLORYS data, specifically throwing an `AttributeError` related to the `pyinterp` backend.

### Environment Details:

- **Python Version:** 3.11

- **Input Data:** GLORYS Mercator data

- **Boundary being processed:** South

### Error Traceback:

Plaintext

```auto
  Interpolate ssh
Traceback (most recent call last):
  File "make_bry.py", line 54, in <module>
    main()
  File "make_bry.py", line 50, in main
    croco.create_bry()
  File "Modules/croco_class.py", line 289, in create_bry
    self.bry = create_bry(self.config)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "Modules/ibc_tools.py", line 368, in create_bry
    crocovars, extrapolators = compute_ibc_core(
                               ^^^^^^^^^^^^^^^^^
  File "Modules/ibc_tools.py", line 488, in compute_ibc_core
    zeta, extrapolator_zeta = interp_horiz(
                              ^^^^^^^^^^^^^
  File "Modules/interp_tools.py", line 102, in interp_horiz
    tmpvar = val_interpolator.bilinear(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "site-packages/pyinterp/backends/xarray.py", line 318, in __getattr__
    return getattr(self._instance, name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'GridHolder' object has no attribute 'bilinear'

```

### Relevant Code Block (`interp_tools.py` around line 102):

Python

```auto
# Perform pyinterp bicubic interpolation on CROCO grid
val_interpolator = pyxr.Grid2D(data_array)
tmpvar = val_interpolator.bilinear(
    coords=dict(lon=crocogrd.lon.ravel(), lat=crocogrd.lat.ravel()),
    num_threads=1,
).reshape(crocogrd.lon.shape)

```

### Questions:

1. Is this a known incompatibility between recent versions of the `pyinterp` library (which seem to have deprecated or renamed `.bilinear()`) and the current `pytools_X` code?

2. What is the recommended or stable version of `pyinterp` required for CROCO Python preprocessing?

3. Should I manually patch `interp_tools.py` to use `.bivariate()` instead of `.bilinear()`, Or is there a standard environment file I should use to downgrade conflicting packages?

Any guidance or workarounds would be greatly appreciated!

Thank you, Asish

---

<div class="post-metadata">

**Author:** ![swapnil](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/swapnil/32/855_2.png) [@swapnil](https://forum.croco-ocean.org/u/swapnil)\
**Post date:** [June 11, 2026, 4:22pm UTC](https://forum.croco-ocean.org/t/attributeerror-gridholder-object-has-no-attribute-bilinear-during-make-bry-py-with-pyinterp/7667/2 "2026-06-11T16:22:55Z")

</div>

Asish,  
what problem have you faced? Is it for good ? .py  
I will see that problem.  
in simple language. OK.  
Best regards,

---

<div class="post-metadata">

**Author:** ![AsishKsasidharan](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/asishksasidharan/32/757_2.png) [@AsishKsasidharan](https://forum.croco-ocean.org/u/AsishKsasidharan)\
**Post date:** [June 11, 2026, 5:13pm UTC](https://forum.croco-ocean.org/t/attributeerror-gridholder-object-has-no-attribute-bilinear-during-make-bry-py-with-pyinterp/7667/3 "2026-06-11T17:13:30Z")

</div>

Whenever I try to run `make_bry.py`, I get the following error:

```auto

```

```auto
AttributeError: 'GridHolder' object has no attribute 'bilinear'

```

As a workaround, I modified the code from:

```auto

```

```auto
tmpvar = val_interpolator.bilinear(...)

```

to:

```auto

```

```auto
tmpvar = val_interpolator.bivariate(...)

```

This allows the script to run, but I am not confident that the interpolation is being performed correctly. I am also unsure why the original error is being raised. Could this be due to a deprecated package, a version mismatch, or a change in the underlying library API?

I would appreciate any guidance on whether `bivariate()` is an appropriate replacement for `bilinear()` and how I can verify that the interpolation results are correct.

---

<div class="post-metadata">

**Author:** ![swapnil](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/swapnil/32/855_2.png) [@swapnil](https://forum.croco-ocean.org/u/swapnil)\
**Post date:** [June 12, 2026, 3:21am UTC](https://forum.croco-ocean.org/t/attributeerror-gridholder-object-has-no-attribute-bilinear-during-make-bry-py-with-pyinterp/7667/5 "2026-06-12T03:21:22Z")

</div>

ok make\_bry.py have problem. I will check it ok. don’t worry . there also bry from gcm. that also?  
Thanks.

---

<div class="post-metadata">

**Author:** ![slegac](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/slegac/32/267_2.png) [@slegac](https://forum.croco-ocean.org/u/slegac)\
**Post date:** [June 12, 2026, 8:53am UTC](https://forum.croco-ocean.org/t/attributeerror-gridholder-object-has-no-attribute-bilinear-during-make-bry-py-with-pyinterp/7667/6 "2026-06-12T08:53:52Z")

</div>

Hello @AsishKsasidharan , it seems the pb you describes can be related to [CROCO\_PYTOOLS - update of pyinterp feb 2026](https://forum.croco-ocean.org/t/croco-pytools-update-of-pyinterp-feb-2026/7592)

Which version of pyinterp and croco\_pytools are you using ?

---

<div class="post-metadata">

**Author:** ![AsishKsasidharan](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/asishksasidharan/32/757_2.png) [@AsishKsasidharan](https://forum.croco-ocean.org/u/AsishKsasidharan)\
**Post date:** [June 12, 2026, 9:49am UTC](https://forum.croco-ocean.org/t/attributeerror-gridholder-object-has-no-attribute-bilinear-during-make-bry-py-with-pyinterp/7667/7 "2026-06-12T09:49:41Z")

</div>

I am currently using **CROCO\_PYTOOLS Release 2.0.0**. Since the issue persisted, I also tested **Release 2.0.4** , but encountered the same error.

I tried both the `bicubic()` and `bilinear()` interpolation methods, and both resulted in the same issue. Following the recommendation to use an earlier version of **pyinterp** where the previous `bicubic()` behavior is still available (e.g., `pyinterp <= 2025.11.0`), I downgraded accordingly. However, this did not resolve the problem, and the same error persisted.

As a workaround, I switched to `bivariate()`, which allowed the code to run successfully. However, I am uncertain whether the interpolation is being performed correctly and whether the resulting fields are scientifically reliable.
