Error when adding to all_ntp array

Hello,

I am getting the following error after adding an array to the all_ntp array to have a non-transported prognostic variable for storing the temperature from the previous timestep:

???
???!!!???!!!???!!!???!!!???!!! ERROR ???!!!???!!!???!!!???!!!???!!!
? Error code: 1
? Error from routine: UKCA_UM_D1_INITIALISE
? Error message: Some item addresses not found in D1 array
? Error from processor: 125
? Error number: 48
???

When I do some digging, this error occurs in UKCA_UM_D1_INITIALISE in /src/control/ukca_interface/ukca_um_interf_mod.F90 when the following occurs:

! Get data from D1
! ----------------------------------------------------------------------
! Check if all items selected have been identified in D1.
! If any are missing abort. If all selected items have been
! identified then call getd1flds for all items required.
! Two separate loops allow all missing inputs to be identified
! without having to run the code multiple times.
! ----------------------------------------------------------------------
! Do checking
errcode = 0
DO i=1,Nukca_D1items
IF (UkcaD1codes(i)%address == imdi .AND. &
UkcaD1codes(i)%required) THEN
errcode = errcode + 1
cmessage = ‘Item address not found in D1 array: ’
WRITE(umMessage,’(A37,I5)') cmessage (1:37), &
UkcaD1Codes(i)%section*1000 + UkcaD1Codes(i)%item
CALL umPrint(umMessage,src=RoutineName)
END IF
END DO
IF (errcode > 0) THEN
cmessage = ‘Some item addresses not found in D1 array’
CALL ereport(RoutineName, errcode, cmessage)
END IF

But the error in the job.err file has no stashcode associated with it so I’m not sure how to debug. Any help is appreciated! Thank you

Hi Isabelle,
The detailed error message (and anything passed via umPrint) will appear in the work/date-time/atmos_main/pe_output/*.fort.peXXX files.
Mohit

Hi Mohit,

Thank you – it is indeed the new array I have added to the all_ntp array:
’Item address not found in D1 array: 34850’

Do you know where the D1 array is filled? I have included my new array in the ukca_setd1defs in the function ntp_name2stashitem by increasing the ‘n_lut_entries’ by 1 and adding the line:

! Look-up table of UKCA section stash codes for non-transported prognostics

INTEGER, PARAMETER :: n_lut_entries = 138

TYPE :: lut_entry
CHARACTER(LEN=ukca_maxlen_fieldname) :: varname
INTEGER :: stash_no ! Either item number or full stash code
END TYPE lut_entry
TYPE(lut_entry), PARAMETER :: lookup_table(n_lut_entries)=[ &

(other entries)
lut_entry(‘prev_temperature’, 850), &

Do I need to do something else?

Thanks!

Hi,

The error is most likely due to the UM not recognising the new stash field as a valid ‘prognostic’, so we need to check if there are any issues with the STASHmaster entry for 34850.

Mohit

Hi Mohit,

Thanks! It was as STASH issue, but now I am getting this error:

Array sizes in local variable and D1 do not agree Error code: 34850 PE: 0
Expected size: 18576 Length in D1: 24080

???
???!!!???!!!???!!!???!!!???!!! ERROR ???!!!???!!!???!!!???!!!???!!!
? Error code: 34850
? Error from routine: extract_d1_data3d
? Error message: Check if domain profiles DTILE and DPFT match with NTILE and NPFT
? Error from processor: 0
? Error number: 48
???

That still looks like a size mismatch in the STASH definition.

Have you used one of the other chemistry Non transported prognostics (e.g. 3499x) as a template for the STASH entry? A tracer field (34001- 499) will have halos included and hence different array sizes.

Mohit

EDIT - seems to be working now with the STASH fixed

I have entered it as follows:

1| 1 | 34 | 850 |PREVIOUS TEMPERATURE |
2| 2 | 0 | 1 | 1 | 2 | 40 | 11 | 0 | 0 | 0 | 0 |
3| 000000000000000000010000110000 | 00000000000000000001 | 3 |
4| 1 | 0 | -99 -99 -99 -99 -99 -99 -99 -99 -99 -99 |
5| 0 | 0 | 0 | 65 | 0 | 0 | 0 | 0 | 0 |

which is similar to, for example:

1| 1 | 34 | 996 |NO2 MASS MIXING RATIO AFTER TIMESTEP|
2| 2 | 0 | 1 | 1 | 2 | 40 | 11 | 0 | 0 | 0 | 0 |
3| 000000000000000000110000110000 | 00000000000000000001 | 3 |
4| 1 | 0 | -99 -99 -99 -99 -99 -99 -99 -99 -99 -99 |
5| 0 | 3102 | 0 | 65 | 0 | 0 | 0 | 0 | 0 |