PSyclone icon indicating copy to clipboard operation
PSyclone copied to clipboard

Names of generated LFRic basis functions can be too long for compiler

Open tommbendall opened this issue 1 month ago • 2 comments

I've just had the following error trying to compile some new LFRic code:

  103 |       REAL(KIND=r_def), allocatable :: basis_aspc2_source_surface_altitude_on_aspc1_surface_altitude_w0_k0(:,:,:)
      |                                                                                                        1
Error: Name at (1) is too long

This is because my kernel takes the arguments source_surface_altitude (in ANY_SPACE_2) and samples it at surface_altitude_w0_k0 in (ANY_SPACE_1). The variable name above was generated for the basis function variable in the psy-layer.

Could instances like this be avoided by not appending the field variable names to the basis function variable name?

tommbendall avatar Dec 12 '25 14:12 tommbendall