# \[v2\] Interpolation onto the NEMOMED8 curvilinear grid

**URL:** https://nemo-ocean.discourse.group/t/v2-interpolation-onto-the-nemomed8-curvilinear-grid/262
**Category:** Oldies (\< v3.6)
**Tags:** tools, LBC
**Created:** [5 April 2022 02:42 UTC](https://nemo-ocean.discourse.group/t/v2-interpolation-onto-the-nemomed8-curvilinear-grid/262 "2022-04-05T02:42:20Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![TristanV](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@TristanV](https://nemo-ocean.discourse.group/u/TristanV)
#### Post date: [5 April 2022 02:42 UTC](https://nemo-ocean.discourse.group/t/v2-interpolation-onto-the-nemomed8-curvilinear-grid/262/1 "2022-04-05T02:42:20Z")

</div>

Hello everyone,

I am looking to interpolate LMDZ-regional output onto the grid of the Mediterranean regional version of NEMO (NEMOMED8) using CDO and bilinear interpolation.  
I found this well detailed procedure on the NEMO wiki:  
[https://forge.ipsl.jussieu.fr/nemo/wiki/Users/SetupNewConfiguration/cdo-interpolation](https://forge.ipsl.jussieu.fr/nemo/wiki/Users/SetupNewConfiguration/cdo-interpolation)  
I followed the procedure and the result looks pretty good on the Mediterranean Sea and the near Atlantic zone (attached picture). However, as you can see, there are some issues on the north-west African cost and north-west Spain. By masking with LMDZ land-sea mask before interpolation, it seems that there is a problem with longitude and latitude coordinates on these regions.

Do you have any clue to improve the interpolation? Though it’s not a big deal since it looks OK on the Med Sea.

Thanks in advance  
Tristan

PS: I can provide the files if needed

 ![Capture_T.JPG](https://global.discourse-cdn.com/free1/uploads/nemo_ocean/original/1X/f54156b12c1b4ed2c6d7d7267eb0afaa6461a6e5.jpeg)

---

<div class="post-metadata">

### Author: ![cpelletier](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@cpelletier](https://nemo-ocean.discourse.group/u/cpelletier)
#### Post date: [5 April 2022 12:42 UTC](https://nemo-ocean.discourse.group/t/v2-interpolation-onto-the-nemomed8-curvilinear-grid/262/2 "2022-04-05T12:42:23Z")

</div>

Hi Tristan,

Is it possible that the NEMO (destination) lat/lon fed to CDO are coming from a file (output or `mesh_mask`) featuring land suppression?

Best  
Charles

---

<div class="post-metadata">

### Author: ![TristanV](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@TristanV](https://nemo-ocean.discourse.group/u/TristanV)
#### Post date: [6 April 2022 00:05 UTC](https://nemo-ocean.discourse.group/t/v2-interpolation-onto-the-nemomed8-curvilinear-grid/262/3 "2022-04-06T00:05:11Z")

</div>

Hi Charles,

Thanks for your reply. Yes indeed lat/lon comes from the `mesh_mask` of NEMOMED8 file but I am not sure what you are referring to with “featuring land suppression”, could you explain me ?

Best  
Tristan

---

<div class="post-metadata">

### Author: ![cpelletier](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@cpelletier](https://nemo-ocean.discourse.group/u/cpelletier)
#### Post date: [6 April 2022 07:08 UTC](https://nemo-ocean.discourse.group/t/v2-interpolation-onto-the-nemomed8-curvilinear-grid/262/4 "2022-04-06T07:08:50Z")

</div>

If the `mesh_mask` file has been generated from a run featuring land suppression, see Fig 8.6 on

> **[Exchange with neighbouring processors (lbclnk, lib\_mpp)](https://www.nemo-ocean.eu/doc/node60.html)**
>
> Exchange with neighbouring processors (lbclnk, lib\_mpp)

Then the lat/lon are not meaningful over land subdomains, and interpolations can go wrong. Could you share that `mesh_mask` file?

---

<div class="post-metadata">

### Author: ![TristanV](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@TristanV](https://nemo-ocean.discourse.group/u/TristanV)
#### Post date: [6 April 2022 08:21 UTC](https://nemo-ocean.discourse.group/t/v2-interpolation-onto-the-nemomed8-curvilinear-grid/262/5 "2022-04-06T08:21:07Z")

</div>

Sure, here it is:

> **[meshmask\_med8.nc](https://wetransfer.com/downloads/414b1550bc36602a414d0f8d7fec5f7d20220406081942/e02615)**
>
> 1 file sent via WeTransfer, the simplest way to send your files around the world

Tristan

---

<div class="post-metadata">

### Author: ![cpelletier](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@cpelletier](https://nemo-ocean.discourse.group/u/cpelletier)
#### Post date: [6 April 2022 09:55 UTC](https://nemo-ocean.discourse.group/t/v2-interpolation-onto-the-nemomed8-curvilinear-grid/262/6 "2022-04-06T09:55:09Z")

</div>

Your mesh mask does not feature land suppression, so that is not the problem. I am not familiar with that grid, but it kind of folds over land around the Gibraltar strait, which I suspect confuses CDO.

It may be worth trying to remap taking into account a destination mask

> **[conservative regridding considering destination grid mask - CDO - Project...](https://code.mpimet.mpg.de/boards/1/topics/6847?r=6895#message-6895)**
>
> Redmine

It is not an ideal fix, because then your interpolation is mask-dependent (i.e., you would need to re-interpolate if the bathymetry or `rn_hmin` change), but that is the best I can come up with.

---

<div class="post-metadata">

### Author: ![TristanV](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@TristanV](https://nemo-ocean.discourse.group/u/TristanV)
#### Post date: [6 April 2022 10:56 UTC](https://nemo-ocean.discourse.group/t/v2-interpolation-onto-the-nemomed8-curvilinear-grid/262/7 "2022-04-06T10:56:40Z")

</div>

I tried with the destination mask method and it looks better (attached figure) ! (though it was a bit tricky to do it, I am thinking to make a tutorial for the potential user).

Thanks for the great help Charles. I take not in case of bathymetry or `rn_hmin` change.

Best  
Tristan

 ![Capture_T.J_2PG](https://global.discourse-cdn.com/free1/uploads/nemo_ocean/original/1X/b0edf395f0b9d655606def5f99b9593a667b3fb4.jpeg)

---

<div class="post-metadata">

### Author: ![smasson](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@smasson](https://nemo-ocean.discourse.group/u/smasson)
#### Post date: [6 April 2022 14:40 UTC](https://nemo-ocean.discourse.group/t/v2-interpolation-onto-the-nemomed8-curvilinear-grid/262/8 "2022-04-06T14:40:39Z")

</div>

> [@TristanV](#):
>
> I am thinking to make a tutorial for the potential user

Yes it would be very helpfull.
