# netCDF error on ARCHER2-23C

**URL:** <https://cms-helpdesk.ncas.ac.uk/t/netcdf-error-on-archer2-23c/378>\
**Category:** Unified Model\
**Tags:** ARCHER2\
**Created:** [5 January 2022 11:54 UTC](https://cms-helpdesk.ncas.ac.uk/t/netcdf-error-on-archer2-23c/378 "2022-01-05T11:54:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![PHill](https://avatars.discourse-cdn.com/v4/letter/p/779978/32.png) [@PHill](https://cms-helpdesk.ncas.ac.uk/u/PHill)\
**Post date:** [5 January 2022 11:54 UTC](https://cms-helpdesk.ncas.ac.uk/t/netcdf-error-on-archer2-23c/378/1 "2022-01-05T11:54:46Z")

</div>

Hi Support Team,

I am trying to get an experiment (u-cg007) that I was previously running on the ARCHER2 4 cabinet system to run on th 23 cabinet system.

The experiment runs ok for the inital 24 hour cycle, but fails early in the second cycle, with the following error:

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* NetCDF\_File Error Report \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Problem with unit 14 filename is /work/n02/n02/phill/cylc-run/u-cg007/share/data/history/ch\_large\_std\_302pt5\_  
98L\_fix\_rh/atmos\_ch\_large\_std\_302pt5\_98L\_fix\_rh\_Table5\_10000102\_00.nc

???  
???!!!???!!!???!!!???!!!???!!! ERROR ???!!!???!!!???!!!???!!!???!!!  
? Error code: 60  
? Error from routine: NC\_PUT\_VAR\_REAL\_1D  
? Error message: NetCDF: Numeric conversion not representable : NF90\_PUT\_VAR  
? Error from processor: 0  
? Error number: 57  
???

Any suggestions for how to fix this would be greatly appreciated!

Thanks,

Peter

---

<div class="post-metadata">

**Author:** ![dcase](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/dcase/32/468_2.png) [@dcase](https://cms-helpdesk.ncas.ac.uk/u/dcase)\
**Post date:** [5 January 2022 15:30 UTC](https://cms-helpdesk.ncas.ac.uk/t/netcdf-error-on-archer2-23c/378/2 "2022-01-05T15:30:12Z")

</div>

> [@PHill](#):
>
> /work/n02/n02/phill

Peter,  
I can’t see your files (you would have to chmod -R g+rX /home/n02/n02/  
and chmod -R g+rX /work/n02/n02/)

but if you want a suggestion then I would see whether the crash is in the code in your branch, and if it is I would look at the type of the data being written. It’s possible that, because you have different compilers on the full ARCHER2, they are making different decisions as to the data type and so not matching what netcdf is expecting.

You can also compile with debug options if you can’t find where it’s crashing.  
Hope that’s a sensible suggestion,

Dave

---

<div class="post-metadata">

**Author:** ![dcase](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/dcase/32/468_2.png) [@dcase](https://cms-helpdesk.ncas.ac.uk/u/dcase)\
**Post date:** [5 January 2022 15:31 UTC](https://cms-helpdesk.ncas.ac.uk/t/netcdf-error-on-archer2-23c/378/3 "2022-01-05T15:31:22Z")

</div>

The chmod command should have had your name in it, ie /work/n02/n02/phill

---

<div class="post-metadata">

**Author:** ![PHill](https://avatars.discourse-cdn.com/v4/letter/p/779978/32.png) [@PHill](https://cms-helpdesk.ncas.ac.uk/u/PHill)\
**Post date:** [6 January 2022 11:01 UTC](https://cms-helpdesk.ncas.ac.uk/t/netcdf-error-on-archer2-23c/378/4 "2022-01-06T11:01:48Z")

</div>

Hi Dave,

Thanks for your help.

I’ve changed permissions on ARCHER2, so you should be able to view the folders now.

I attempted to compile with debug options, but got a compilation failure instead. I only used the “safe” compilation on the 4C system, so can’t say whether this is a new error on the 23C system. Unfortunately I didn’t copy this error before re-running a clean run with the safe compilation option, but (from memory and my google search history) the error was in pio\_byteswap.c and related to the “span” variable “must have explicitly specified data sharing attributes”. I don’t think this is related to the netcdf error anyway?

Do you have any further suggestions, other than adding some print commands to check which variable is causing the error?

Thanks,

Peter

---

<div class="post-metadata">

**Author:** ![dcase](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/dcase/32/468_2.png) [@dcase](https://cms-helpdesk.ncas.ac.uk/u/dcase)\
**Post date:** [6 January 2022 12:10 UTC](https://cms-helpdesk.ncas.ac.uk/t/netcdf-error-on-archer2-23c/378/5 "2022-01-06T12:10:04Z")

</div>

Some things can be compiler dependent - there are certainly problems with shumlib in CCE11 (which go away with CCE12) which are the compilers fault. But as you say - your error is not this.

I suggested the debug options to help find which line the code crashes in - but do you already know this? Are you the author of the subroutine? If so, you can put a link to the source and line here. Putting print statements to check every variable to ensure that all the data is valid, of the correct type, and with the correct bounds is a simple but hopefully sensible thing to do. If you can find which variable (data itself + count etc that is all passed to the put var routine) then I expect you will be close.

It’s possible that changing compiler versions will solve things if it worked on the 4cab system, but if this is your code it would be better to debug if there’s an issue.

Let us know what you see

---

<div class="post-metadata">

**Author:** ![PHill](https://avatars.discourse-cdn.com/v4/letter/p/779978/32.png) [@PHill](https://cms-helpdesk.ncas.ac.uk/u/PHill)\
**Post date:** [12 January 2022 10:58 UTC](https://cms-helpdesk.ncas.ac.uk/t/netcdf-error-on-archer2-23c/378/6 "2022-01-12T10:58:15Z")

</div>

The code crashes when trying to write diagnostics to a netCDF file - in particular it gets an error from NF90\_PUT\_VAR, which I think is netCDF library code, which is called by nc\_put\_var\_real\_1d. I guess this is a controlled exit rather than a crash? This is not code I’ve edited.

After doing some further digging, the error is when writing the 10metre u-wind diagnostic.

The experiment ran OK on the 4 cabinet system. It was set to run in 24 hour cycles and was crashing when writing hourly-mean diagnostics for the first hour of the second cycle. The model evolution over the first cycle looked reasonable, so I’ve changed the model to use a 48 hour cycle and it still crashes when writing the same diagnostic for the first hour of the second cycle, though this is 24 hours later. I think this means the error is probably related to the cycling?

The crash isn’t occuring in code I wrote, so I’d be happy to experiment with using a different compiler. How do you change the compiler that is used?

Thanks,

Peter

---

<div class="post-metadata">

**Author:** ![grenville](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/grenville/32/29_2.png) [@grenville](https://cms-helpdesk.ncas.ac.uk/u/grenville)\
**Post date:** [12 January 2022 11:25 UTC](https://cms-helpdesk.ncas.ac.uk/t/netcdf-error-on-archer2-23c/378/7 "2022-01-12T11:25:24Z")

</div>

Hi Peter

I suspect the model is creating rubbish - please try to write out 64-bit data rather than 32-bit (look for `ncvar_prec` in the rose gui, set it to 2)

Grenville

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/cms_support/original/1X/1fd2411499ffcbc299fe756cd5cdf26e44956558.png) [@system](https://cms-helpdesk.ncas.ac.uk/u/system)\
**Post date:** [21 January 2022 14:37 UTC](https://cms-helpdesk.ncas.ac.uk/t/netcdf-error-on-archer2-23c/378/8 "2022-01-21T14:37:55Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
