Hi,
Thanks for the advice Pilou.
I have used .GT.0D0 for implementing drag before to see if I could avoid the .EQ. issue and the head losses were still not applied. I've adopted the approach you suggested for the double precision problem and I've not had any luck.
Given that a) Telemac reads the variables fine, and b) the code for PRIVE matches the method others have used, perhaps it's something to do with the stored variables?
For the variables: I created a new Serafin variable (BOTTOM FRICTION); re-named the variable; mapped out polygon values onto the mesh. I'm not sure if there's another step I'm missing? I've attached the file in case anyone has time to look. The .f code is the less optimized version but it still runs fine when hard-coding points.
Additionally, is there an alternative to private variables that could work in paralleled? I saw in the Sysephe forum that FIND_VARIABLE could be used to read the variables from the geometry file. I assume this would be the appropiate thing to adapt? From there I could implement it in my code. For example, tentatively:
CALL FIND_VARIABLE('SERAFIN ',T2D_FILES(T2DGEO)%LU,'DRAG',
& ZR,MESH%NPOIN,IERR)
CALL OV('X=Y ',ZR,DRAG%R,ZF,NPOIN)
DO I=1,NPOIN2
IF (ABS(ZR-4.D0).LT.4D-6)THEN
...
Many thanks!