# ASCII output and diagnostics

**URL:** https://nemo-ocean.discourse.group/t/ascii-output-and-diagnostics/544
**Category:** v4.0.x
**Created:** [27 July 2023 11:12 UTC](https://nemo-ocean.discourse.group/t/ascii-output-and-diagnostics/544 "2023-07-27T11:12:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tmwilder](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/tmwilder/32/120_2.png) [@tmwilder](https://nemo-ocean.discourse.group/u/tmwilder)
#### Post date: [27 July 2023 11:12 UTC](https://nemo-ocean.discourse.group/t/ascii-output-and-diagnostics/544/1 "2023-07-27T11:12:00Z")

</div>

I am attempting to diagnose some possible errors in my code through the use of print statements in `ocean.output` and timestep diagnostics written to netcdf. However, I am encountering a few issues, which I hope someone can advise on.

The first issue is the lack of ascii output in `ocean.output` when running ORCA025 in GOSI9p8.0 on Monsoon2. The netcdf files are populated.  
 ![image](https://global.discourse-cdn.com/free1/uploads/nemo_ocean/original/1X/0f302ceed2ceaff1687a3d335b19202da704a77c.png)

In an idealised configuration of nemo the results are,  
 ![image](https://global.discourse-cdn.com/free1/uploads/nemo_ocean/original/1X/cfb768842ea44a847785cab13a9060ebd6685897.png)

To print these values is shown below, where indices are changed for the right configuration in use.

```fortran
IF(lwp) WRITE(numout,*) 'The first timestep is', kit000
IF(lwp) WRITE(numout,*) 'prd at (100,100,20) is', prd(100,100,20)
IF(lwp) WRITE(numout,*) 'pn2 at (100,100,20) is', pn2(100,100,20)
IF(lwp) WRITE(numout,*) 'zwzdx at (100,100,20) is', zwzdx(100,100,20)
IF(lwp) WRITE(numout,*) 'zwzdy at (100,100,20) is', zwzdy(100,100,20)
IF(lwp) WRITE(numout,*) 'nmlnqg at (100,100) is', nmlnqg(100,100)
IF(lwp) WRITE(numout,*) 'zstlimx at (100,100,20) is', zstlimx(100,100,20)
IF(lwp) WRITE(numout,*) 'zstlimy at (100,100,20) is', zstlimy(100,100,20)

```

A further issue arises when trying to examine the timestep output in the netcdf files. For example, in the idealised configuration, `zstlimy = -5.59139...e-11` at point `(ji=100,jj=100,jk=20)`, then looking in to the netcdf file using Python, `zstlimy[19,99,99]=0.0`. However, `zstlimy` is populated.

Another ascii output is for a variable `dwzmagsq`. This is done like so,

```fortran
IF(lwp) WRITE(numout,*) 'dwzmagsq at', ji, jj, jk, 'is', dwzmagsq(ji,jj,jk)

```

The maximum value for this variable in the netcdf output is `1.3163353e-20`, yet searching for this value in `ocean.output` brings up nothing. I am wondering If I have just written one process to the `ocean.output` file, and not all?

Any advice would be great.

---

<div class="post-metadata">

### Author: ![Saeed](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@Saeed](https://nemo-ocean.discourse.group/u/Saeed)
#### Post date: [1 August 2023 08:56 UTC](https://nemo-ocean.discourse.group/t/ascii-output-and-diagnostics/544/2 "2023-08-01T08:56:50Z")

</div>

Hi Thomas

I think it is good to do a simply printing without using IF(lwp) and numout. For example, just write:

print \*, ‘dwzmagsq at’, ji, jj, jk, ‘is’, dwzmagsq(ji,jj,jk)

Then just check if you get the reasonable results. In this case, you get the results in the log file of your submit script.

Saeed
