# How to limit the output to a single NetCDF file

**URL:** https://nemo-ocean.discourse.group/t/how-to-limit-the-output-to-a-single-netcdf-file/612
**Category:** Uncategorized
**Created:** [12 January 2024 08:13 UTC](https://nemo-ocean.discourse.group/t/how-to-limit-the-output-to-a-single-netcdf-file/612 "2024-01-12T08:13:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![xhjhggybz](https://avatars.discourse-cdn.com/v4/letter/x/e480ec/32.png) [@xhjhggybz](https://nemo-ocean.discourse.group/u/xhjhggybz)
#### Post date: [12 January 2024 08:13 UTC](https://nemo-ocean.discourse.group/t/how-to-limit-the-output-to-a-single-netcdf-file/612/1 "2024-01-12T08:13:18Z")

</div>

Hello, I would like to know how to verify the output results of the NEMO program. Additionally, is there an option or setting that allows the output from multiple processes to be confined to a single file?

---

<div class="post-metadata">

### Author: ![Antonio](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Antonio](https://nemo-ocean.discourse.group/u/Antonio)
#### Post date: [5 March 2024 11:04 UTC](https://nemo-ocean.discourse.group/t/how-to-limit-the-output-to-a-single-netcdf-file/612/2 "2024-03-05T11:04:26Z")

</div>

Hi, have you solved this problem? I met a similar problem that I want to place all input files in a folder and all generated output files in one folder, but I don’t know how to do.

---

<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: [7 March 2024 15:41 UTC](https://nemo-ocean.discourse.group/t/how-to-limit-the-output-to-a-single-netcdf-file/612/3 "2024-03-07T15:41:19Z")

</div>

- for the folder of the input files, it depends of the input files :
  - for the restarts, you have the namelist variables `cn_ocerst_indir`, `cn_ocerst_outdir`
  - for file which are simply defined by their name (e.g. `cn_domcfg = "domain_cfg"`) simply add the folder path in the file name (e.g. `cn_domcfg = "MY_PATH/domain_cfg"`)
  - for the file read trough the structure definition :

```fortran
  ! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights filename ! rotation ! land/sea mask !

```

use `cn_dir` in the corresponding namelist blocks

- for the folder of the output files, see : [How to change output folder?](https://nemo-ocean.discourse.group/t/how-to-change-output-folder/422)
- to output from multiple processes confined into a single file
  - you need to use `XIOS` with the option `type="one_file` in your `file_definition`. See [here](https://sites.nemo-ocean.io/user-guide/install.html#install-xios-library) and XIOS chapter in [NEMO book](https://zenodo.org/records/8167700)
  - or use [REBUILD\_NEMO](https://sites.nemo-ocean.io/user-guide/tools.html#rebuild-nemo).

---

<div class="post-metadata">

### Author: ![Antonio](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Antonio](https://nemo-ocean.discourse.group/u/Antonio)
#### Post date: [10 March 2024 11:52 UTC](https://nemo-ocean.discourse.group/t/how-to-limit-the-output-to-a-single-netcdf-file/612/4 "2024-03-10T11:52:30Z")

</div>

Thank you very much!

---

<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: [21 March 2024 10:16 UTC](https://nemo-ocean.discourse.group/t/how-to-limit-the-output-to-a-single-netcdf-file/612/5 "2024-03-21T10:16:31Z")

</div>


