# Regridding error while using xESMF (MPI module missing)

**URL:** <https://discourse.pangeo.io/t/regridding-error-while-using-xesmf-mpi-module-missing/749>\
**Category:** Pangeo Cloud Support\
**Created:** [July 17, 2020, 9:39pm UTC](https://discourse.pangeo.io/t/regridding-error-while-using-xesmf-mpi-module-missing/749 "2020-07-17T21:39:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shunzlu](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/shunzlu/32/463_2.png) [@shunzlu](https://discourse.pangeo.io/u/shunzlu)\
**Post date:** [July 17, 2020, 9:39pm UTC](https://discourse.pangeo.io/t/regridding-error-while-using-xesmf-mpi-module-missing/749/1 "2020-07-17T21:39:47Z")

</div>

Hi everyone,

I’m working on Pangeo Cloud ([us-central1-b.gcp.pangeo.io](http://us-central1-b.gcp.pangeo.io)) to analyze some CMIP6 outputs. I used python package xESMF to regrid the data from different models and I got the following error:

ImportError: Regrid(filename) requires PIO and does not work if ESMF has not been built with MPI support

I think this error is the same as [this issue](https://github.com/JiaweiZhuang/xESMF/issues/47), so I listed all packages in the current environment and I couldn’t find the MPI module. I tried to solve this problem by going back to esmpy=7.1.0 (which is suggested in the above issue) but I failed. `conda install esmpy=7.1.0` doesn’t work on Pangeo Cloud.

I was wondering if there is any solution for this.

Here is a reproducible example:

```
import xarray as xr
import xesmf as xe
import numpy as np

ds = xr.tutorial.open_dataset('air_temperature') 
ds_out = xr.Dataset({'lat': (['lat'], np.arange(16, 75, 1.0)),
                     'lon': (['lon'], np.arange(200, 330, 1.5)),
                    }
                   )

regridder = xe.Regridder(ds, ds_out, 'bilinear')

```

Thank you!  
Shunzi

---

<div class="post-metadata">

**Author:** ![rabernat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/rabernat/32/22_2.png) [@rabernat](https://discourse.pangeo.io/u/rabernat)\
**Post date:** [July 18, 2020, 12:13am UTC](https://discourse.pangeo.io/t/regridding-error-while-using-xesmf-mpi-module-missing/749/2 "2020-07-18T00:13:39Z")

</div>

Hmmm that’s not good. We definitely need xesmf in the environment. In practice, to update the environment, we need to make a change in a github repo. I have opened an issue for you:

> <https://github.com/pangeo-data/pangeo-docker-images/issues/101>
>
> As reported on discourse: https://discourse.pangeo.io/t/regridding-error-while-using-xesmf-mpi-module-missing/749

I think we need to start pointing people directly to that issue tracker for environment questions.
