Opened 4 years ago

Closed 4 years ago

#2104 closed help (fixed)

NDdiag Error 1183

Reported by: ambrogio Owned by: willie
Component: NDdiag Keywords:
Cc: Platform:
UM Version: 7.3


Dear Helpdesk officer,

I'm a PhD student at University of Reading (Meteorology) department and I'm having an unexpected problem with NDdiag. I normally use a simple shell script (attached) to convert UM field files (vn8.2 or vn7.3) to pp files and then run NDdiag in order to have pressure-level diagnostics.
Now, repeating the procedure with a new set of UM files I'm getting the error copied below:


NDdiag, Release 2.1.1


An NCAS-CMS Supported Tool.

Pressure-level diagnostics from UM data on the NEW DYNAMICS grid

Authors: Peter Panagi, S.L. Gray

Please acknowledge NCAS-CMS and the authors in ALL publications
that have made use of this software.


Input file: /export/cloud/stingjet/xd835074/Tini/pv_tracers/xneea/file_ndd
Diagnostics File: /home/xd835074/programs/NDdiag_2.2.2/nddiag.control.analysis
Output File: /export/cloud/stingjet/xd835074/Tini/pv_tracers/xneea/file_ndd

Date: 2017/03/13 Time: 15:29

Input grid ……

N(theta), N(rho) : 60 60
(NX,NY) p-grid : 600 360
(NUX,NUY) v-grid : 600 360

Output grid (NX,NY) : 600 360
DATE : 2014/ 2/11 13: 0
DATE : 2014/ 2/11 13: 0

Error 1183: deallocating an unallocated allocatable array
Location: the DEALLOCATE statement at line 1152 of "PP_ROUTINES.f90" line 23: 13807 Aborted ${nddiag_exe} $ifile ~/programs/NDdiag_2.2.2/nddiag.control.${nddiagtype} $ifile${nddiagtype}

If you can access our departmental server, you can see at /export/cloud/stingjet/xd835074/Tini/pv_tracers/xneea/file_nddiag/test/ an example of the file not working (xneeaa…) and two examples of files with different resolution, domain and output time-frequency that are working fine instead (there are UM, pp, and NDdiag-pp formats). I can't see any significant difference between those 3 set of files so I have really no idea of why I am getting this error. Do you have any clue? Do I need to send you the files?

Many thanks for your attention, best wishes


Attachments (1) (1007 bytes) - added by ambrogio 4 years ago.

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by ambrogio

comment:1 Changed 4 years ago by willie

  • Component changed from Other to NDdiag
  • Owner changed from um_support to willie
  • Status changed from new to accepted

Hi Ambrogio,

This seems to be an optimization problem. I tried NDdiag 2.2.3 on ARCHER with the Cray compiler and the standard optimizations and it failed after a couple of time steps - I get a memory fault in line 857 of the pressure diagnostics (the call to QSAT). I added the debug option -g and it worked!

I am not sure what is going on here and it could be difficult to track down. So I would recommend running on ARCHER or JASMIN with the debug option enabled. These computers have lots of memory and there is less chance of hitting limits. Also make sure you use the latest version of NDdiag (2.2.3).


comment:2 Changed 4 years ago by ambrogio

Dear Willie,

Thanks for this.

I just have two basic questions:

1) Where do I add the -g ? (I've never run a script in debugging mode)
2) Where is NDdiag in Archer? I can't find it

Many thanks again


comment:3 Changed 4 years ago by willie

Hi Ambrogio,

Just copy the source code onto ARCHER and build it. Change into the 'code' directory and type

make F90C=ftn FFLAGS="-c -O3,fp0 -g"

Once this is done you can use your script. An advantage of doing this is that the large output files from the UM are already on ARCHER (usually), so don't have to be copied.


comment:4 Changed 4 years ago by willie

Hi Ambrogio,

Looking further into your problem, I have discovered a bug in NDdiag. You have specified a number of pressure levels of (1000-50)/15 which rounds to 64, but your input data has only 60 model levels. This has exposed an array bounds error in NDdiag. NDdiag out-of-the-box parameters give (1000-50)/50 +1 = 20 pressure levels which is much smaller than the usual model vertical levels we encounter in the UM. So the work around in your case would be to use 20mb steps while I figure out how to correct the code.


comment:5 Changed 4 years ago by ambrogio

Dear Willie,

Thanks a lot
After your email this morning I changed the number of levels in my control file going now from 1000 to 160 hPa, still with a spacing of 15 hPa. This means that now I have only 57 levels. With this change NDdiag works now without problems without needing to be in debugging mode.

Many thanks for all the support on this!
Best wishes


comment:6 Changed 4 years ago by willie

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.