Thanks again for your advice. I spoke too soon about the code producing the mesh layers at all - debugger says the problem comes from how Telemac calls from CONDIM. I think my original code above is causing the problem as Telemac is struggling to implement it, or at least work it with the rest of Calcot.
Reading CALCOT it seems to give preference to TRANSF.EQ.0 and TRANSF.EQ.5, otherwise it follows steps 2-3-5. Given this, I hoped coding under IF(TRANSF_PLANE%I(I1).EQ.0) THEN would solely implement my code (below).
IF(TRANSF.EQ.0) THEN
DO IPOIN = 1,NPOIN2
ZZ(IPOIN,2)= ZZ(IPOIN,1) + 0.01D0
ZZ(IPOIN,3)= ZZ(IPOIN,1) + 0.02D0
ZZ(IPOIN,4)= ZZ(IPOIN,1) + 0.03D0
ZZ(IPOIN,5)= ZZ(IPOIN,1) + 0.04D0
ENDDO
! SIGMA TRANSFORMATION
DO WHILE(I1.NE.NPLAN)
IF(TRANSF_PLANE%I(I1).EQ.0) THEN
I1=2
! LOOKS FOR SEQUENCES OF SIGMA TRANSFORMATION PLANES
I2=I1
DO WHILE(TRANSF_PLANE%I(I2+1).NE.0.AND.I2+1.NE.NPLAN)
I2=I2+1
ENDDO
! SIGMA TRANSFORMATION FOR PLANES I1 TO I2
! BETWEEN ALREADY TREATED PLANES I1-1 AND I2+1
DO IPLAN=I1,I2
IF(TRANSF_PLANE%I(IPLAN).EQ.1) THEN
ZSTAR%R(IPLAN)=FLOAT(IPLAN-I1+1)/FLOAT(I2-I1+2)
ENDIF
DO IPOIN = 1,NPOIN2
ZZ(IPOIN,IPLAN) = ZZ(IPOIN,I1-1)
& + ZSTAR%R(IPLAN)*( ZZ(IPOIN,I2+1)
& -ZZ(IPOIN,I1-1) )
ENDDO
ENDDO
ENDDO
In this case, Telemac just gets stuck calling CONDIM. I left it for an hour and no change.
Otherwise, I altered the code in sectiion 3 to accept my above code in the IF(TRANSF_PLANE%I(I1).EQ.0) in lieu of option TRANSF_PLANE%I 3, by changing the references to TRANSF_PLANE%I(I1).EQ.3 to .EQ.0 (below). However I get an error when Telemac calls CONDIM. So CONDIM seems to be the problem in implementing my code.
I1=2
DO WHILE(I1.NE.NPLAN)
[b] IF(TRANSF_PLANE%I(I1).EQ.0)[/b] THEN
I1=I1+1
ELSE
! LOOKS FOR SEQUENCES OF SIGMA TRANSFORMATION PLANES
I2=I1
[b]DO WHILE(TRANSF_PLANE%I(I2+1).NE.0.AND.I2+1.NE.NPLAN)[/b]
I2=I2+1
ENDDO
! SIGMA TRANSFORMATION FOR PLANES I1 TO I2
! BETWEEN ALREADY TREATED PLANES I1-1 AND I2+1
DO IPLAN=I1,I2
IF(TRANSF_PLANE%I(IPLAN).EQ.0) THEN
ZSTAR%R(IPLAN)=FLOAT(IPLAN-I1+1)/FLOAT(I2-I1+2)
! ELSE
! ZSTAR%R(IPLAN) HAS BEEN GIVEN BY USER IN CONDIM
ENDIF
DO IPOIN = 1,NPOIN2
ZZ(IPOIN,IPLAN) = ZZ(IPOIN,I1-1)
& + ZSTAR%R(IPLAN)*( ZZ(IPOIN,I2+1)
& -ZZ(IPOIN,I1-1) )
ENDDO
ENDDO
I1=I2+1
ENDIF
ENDDO
!