I’m using NEMO v4.0 but I don’t think fldread has changed since then. The issue occurs when using the intel ifx v2025.3.0 compiler with -O2 optimisation and unstructured boundaries and 256 cpus. In subroutine fld_map_core the optimisation breaks at line;
pdta_bdy(jb,1,jk) = pdta_read(kmap(jb),1,jk)
I replaced this with,
tmp = kmap(jb)
pdta_bdy(jb,1,jk) = pdta_read(tmp,1,jk)
and it works as expected. I think this is forcing a reduction in the optimization here.