# Zoom example in Nemo 4.2.2

**URL:** https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697
**Category:** Uncategorized
**Created:** [16 May 2024 09:02 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697 "2024-05-16T09:02:33Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)
#### Post date: [16 May 2024 09:02 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/1 "2024-05-16T09:02:33Z")

</div>

Dear All,

I’m trying to extract hourly SSH in a single location in a Nemo 4.2.2 based run. And it does not work, the model just holds, and does nothing when it’s time to print. Although I have done that fine when using previous versions of Nemo.  
Has anyone an example on how to code a zoom properly in the xml files, domain, grid, field and file ?

Thanks for your help,

Robinson

---

<div class="post-metadata">

### Author: ![daley\_calvert](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@daley\_calvert](https://nemo-ocean.discourse.group/u/daley_calvert)
#### Post date: [20 May 2024 16:42 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/2 "2024-05-20T16:42:48Z")

</div>

Hi Robinson,

The “1point” zoom domain is given as an example in the [domain\_def\_nemo.xml](https://forge.nemo-ocean.eu/nemo/nemo/-/blob/4.2.2/cfgs/SHARED/domain_def_nemo.xml?ref_type=tags#L13) and [grid\_def\_nemo.xml](https://forge.nemo-ocean.eu/nemo/nemo/-/blob/4.2.2/cfgs/SHARED/grid_def_nemo.xml?ref_type=tags#L109) files.

It would be used to extract a scalar timeseries from SSH data by including `grid_ref="grid_1point"` in the `file_def.xml` type files, e.g.

```xml
<field field_ref="ssh" grid_ref="grid_1point" />

```

Is this consistent with your zoom syntax? Do you also have this issue when using other diagnostic frequencies?

Daley

---

<div class="post-metadata">

### Author: ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)
#### Post date: [21 May 2024 07:19 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/3 "2024-05-21T07:19:50Z")

</div>

Hei Daley,

Thanks for your reply, but unless I am wrong I have followed exactly this procedure.  
And it always worked in previous versions of Nemo. Will check again,

Thanks again,

Robinson

---

<div class="post-metadata">

### Author: ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)
#### Post date: [21 May 2024 11:52 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/4 "2024-05-21T11:52:46Z")

</div>

Hei again,

Just to be sure, is there a specific XIOS version one should compile Nemo 4.2.2 with ?

Thanks for your help,

Robinson

---

<div class="post-metadata">

### Author: ![daley\_calvert](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@daley\_calvert](https://nemo-ocean.discourse.group/u/daley_calvert)
#### Post date: [24 May 2024 13:52 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/5 "2024-05-24T13:52:35Z")

</div>

Hi Robinson,

You should use at least [r2131 of XIOS 2](http://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/trunk?rev=2131), since this contains changes required for the tiling.

I’m not sure if this is related to your error, however, so I would recommend using the [latest version of XIOS 2](http://forge.ipsl.jussieu.fr/ioserver/browser/XIOS2/trunk) if you can.

Daley

---

<div class="post-metadata">

### Author: ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)
#### Post date: [24 May 2024 14:05 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/6 "2024-05-24T14:05:01Z")

</div>

Hei Daley,

Thank you, i will try.

/robinson

---

<div class="post-metadata">

### Author: ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)
#### Post date: [29 May 2024 08:53 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/7 "2024-05-29T08:53:54Z")

</div>

Hei Daley,

I have tried everything, even changing the Netcdf and/or HDF5 versions, same results. Normal outputs that contain the entire domain work, but zooms do not.

Any idea is welcome,

Thanks for your help,

Robinson

---

<div class="post-metadata">

### Author: ![daley\_calvert](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@daley\_calvert](https://nemo-ocean.discourse.group/u/daley_calvert)
#### Post date: [29 May 2024 13:01 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/8 "2024-05-29T13:01:46Z")

</div>

Hi Robinson,

Could you attach the XIOS .xml files you are using? I will try to replicate the issue.

Daley

---

<div class="post-metadata">

### Author: ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)
#### Post date: [29 May 2024 13:19 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/9 "2024-05-29T13:19:06Z")

</div>

Hei Daley,

Thanks a lot for your help, I really appreciate because I’m really blocked now.  
I have put the xml files here:

[https://ns5001k.web.sigma2.no/ROBINSON\_DIRECTORIES/DALEY/](https://ns5001k.web.sigma2.no/ROBINSON_DIRECTORIES/DALEY/)

I’m trying to output a simple ssh time series at a point, which you can easily identify using the grep command, it contains the word “andenes”.

Thanks again,

Robinson

---

<div class="post-metadata">

### Author: ![daley\_calvert](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@daley\_calvert](https://nemo-ocean.discourse.group/u/daley_calvert)
#### Post date: [29 May 2024 15:17 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/10 "2024-05-29T15:17:33Z")

</div>

Hi Robinson,

In your field\_def.xml you have:

```xml
<field_group id="tide_gauges" grid_ref="grid_T">
   <field id="ssh_andenes" field_ref="ssh" grid_ref="grid_1point"/>
</field_group>

```

and in your file\_def.xml you have:

```xml
<file id="file172" name_suffix="_ssh" description="ocean T grid variables">
   <field field_ref="ssh_andenes" name="ssh_andenes"/>
</file>

```

Have you tried using the `grid_ref="grid_1point"` in the file\_def.xml and not in the field\_def.xml? I.e.

```xml
<file id="file172" name_suffix="_ssh" description="ocean T grid variables">
   <field field_ref="ssh_andenes" name="ssh_andenes" grid_ref="grid_1point"/>
</file>

```

To my understanding, `grid_ref` has different meanings depending on whether it appears in a `field` or `file` definition:

- In a `field` definition, it determines the grid the data will be **received on** from NEMO
- In a `file` definition, it determines the grid the data will be **output on** in netCDF files

I think your run may be hanging because in your current definition, XIOS is expecting to receive data for a single point. I may be wrong about this, so please give my suggestion a try and let me know what happens.

---

<div class="post-metadata">

### Author: ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)
#### Post date: [29 May 2024 16:29 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/11 "2024-05-29T16:29:45Z")

</div>

Hei Daley,

Thanks a lot for the help, I will try this right now. I think i had tried what you suggest, but I will try again just to be sure.

Thanks again,

---

<div class="post-metadata">

### Author: ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)
#### Post date: [29 May 2024 16:42 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/13 "2024-05-29T16:42:13Z")

</div>

I remove the definition in field\_def, and wrote in file\_def:

```
<file id="file172" name_suffix="_ssh" description="ocean T grid variables" >
 <field field_ref="ssh" name="ssh_andenes" grid_ref="grid_1point" />
 </file>

```

Same result… the model freezes when it is time to print the ssh at a single point.

---

<div class="post-metadata">

### Author: ![daley\_calvert](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@daley\_calvert](https://nemo-ocean.discourse.group/u/daley_calvert)
#### Post date: [29 May 2024 19:40 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/14 "2024-05-29T19:40:28Z")

</div>

I’ve just tried using your XIOS files in an ORCA2 ocean-only run (using different zoom points and using XIOS in server mode), and it ran ok.

However, when I ran this using XIOS in attached mode (as your iodef.xml seems to suggest you are doing), I got a floating point error in XIOS. Removing the `ssh_andenes` variable resolved this. So, there seems to be an issue with the zoom when using XIOS in attached mode.

I wonder if you also have this issue, but XIOS is hanging instead of crashing. Could you try running XIOS in detached/server mode?

---

<div class="post-metadata">

### Author: ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)
#### Post date: [29 May 2024 21:03 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/15 "2024-05-29T21:03:16Z")

</div>

This is a great idea, thanks a lot, I will try tomorrow. By attached mode, you mean i run only nemo.exe, right ? Indeed this is what I do, but it was never a problem with the zoom.

Thanks again, I would have never thought about it,

---

<div class="post-metadata">

### Author: ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)
#### Post date: [30 May 2024 09:24 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/16 "2024-05-30T09:24:51Z")

</div>

It works !!! Daley, if we ever meet do remind me to offer you a beer, you saved my life. I would have never thought of this server idea.

---

<div class="post-metadata">

### Author: ![daley\_calvert](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@daley\_calvert](https://nemo-ocean.discourse.group/u/daley_calvert)
#### Post date: [30 May 2024 11:30 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/17 "2024-05-30T11:30:48Z")

</div>

Hooray! Glad to hear it Robinson 😃

---

<div class="post-metadata">

### Author: ![elsy](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/elsy/32/163_2.png) [@elsy](https://nemo-ocean.discourse.group/u/elsy)
#### Post date: [17 July 2024 10:09 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/18 "2024-07-17T10:09:11Z")

</div>

Hello everyone, I try to use the same to extract different points in my grid, my domain\_def.xml are:

\< domain id=“1point” domain\_ref=“grid\_T” \>  
\<zoom\_domain ibegin=“1127” jbegin=“722” ni=“1” nj=“1”/\>  
\<zoom\_domain ibegin=“1133” jbegin=“694” ni=“1” nj=“1”/\>  
\<zoom\_domain ibegin=“1114” jbegin=“763” ni=“1” nj=“1”/\>  
\< /domain\>

but it only extracts the last point. Does anyone have any ideas to fix it? thank you so much

---

<div class="post-metadata">

### Author: ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)
#### Post date: [17 July 2024 10:22 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/19 "2024-07-17T10:22:57Z")

</div>

Hei Elsy,

Each subdomain that you call “1point”, is a box of consecutive points, consecutive meaning here it can also be a single point. In your case you try to define 3 unrelated points so it cannot work.  
You need to define 3 boxes, named for example point\_1, point\_2, point\_3, which are independent.  
And then it should work.

/robinson

---

<div class="post-metadata">

### Author: ![elsy](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/elsy/32/163_2.png) [@elsy](https://nemo-ocean.discourse.group/u/elsy)
#### Post date: [17 July 2024 11:15 UTC](https://nemo-ocean.discourse.group/t/zoom-example-in-nemo-4-2-2/697/20 "2024-07-17T11:15:05Z")

</div>

It works, you also need to define grid\_def.xml, many thanks.
