# Regrid lat-lon to N640

**URL:** <https://discourse.pangeo.io/t/regrid-lat-lon-to-n640/3151>\
**Category:** Uncategorized\
**Created:** [February 2, 2023, 4:56pm UTC](https://discourse.pangeo.io/t/regrid-lat-lon-to-n640/3151 "2023-02-02T16:56:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raybellwaves](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/raybellwaves/32/782_2.png) [@raybellwaves](https://discourse.pangeo.io/u/raybellwaves)\
**Post date:** [February 2, 2023, 4:56pm UTC](https://discourse.pangeo.io/t/regrid-lat-lon-to-n640/3151/1 "2023-02-02T16:56:55Z")

</div>

For reasons I won’t go into i’m looking to regrid lat-lon data to N640 ([N640 | ECMWF](https://www.ecmwf.int/en/forecasts/documentation-and-support/gaussian_n640)).

The best way to work with N640 is likely a flat array such as that used in gs://gcp-public-data-arco-era5/co/single-level-reanalysis.zarr which is N320 ([N320 | ECMWF](https://www.ecmwf.int/en/forecasts/documentation-and-support/gaussian_n320)) also see [arco-era5/0-Surface-Reanalysis-Walkthrough.ipynb at main · google-research/arco-era5 · GitHub](https://github.com/google-research/arco-era5/blob/main/docs/0-Surface-Reanalysis-Walkthrough.ipynb)

I haven’t found any libraries which can help. [regrid — metview documentation](https://metview.readthedocs.io/en/latest/gen_files/icon_functions/regrid.html) may only have spectral to lat-lon regridded but not the inverse

---

<div class="post-metadata">

**Author:** ![raybellwaves](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/raybellwaves/32/782_2.png) [@raybellwaves](https://discourse.pangeo.io/u/raybellwaves)\
**Post date:** [February 2, 2023, 10:39pm UTC](https://discourse.pangeo.io/t/regrid-lat-lon-to-n640/3151/2 "2023-02-02T22:39:02Z")

</div>

Nevermind. metview can do this.

Solution on my newly created cheat sheet for metview [Ray Bell - Metview](https://sites.google.com/view/raybellwaves/cheat-sheets/metview)

but may look something like

```auto
import metview as mv
fs = mv.read("file.grib")
fs_N640 = mv.read(data=fs, grid="N640")

```
