Hi
I'm trying to modify my user_condin_trac subroutine to read in a binary file (using read_bin_2d.f) to provide spatially varying tracer initial conditions.
Have successfully done that in scalar but not parallel. I think the problem lies with using NPOIN once ncsize > 1 instead of using the local number of mesh points, as I get the error:
READ_BIN_2D: INCORRECT NUMBER OF POINTS IN THE FILE
Is there a more approriate variable to use instead of NPOIN when in parallel?
IF(NTRAC.GT.0) THEN
DO ITRAC=1,NTRAC
! READ TRACER VALUES GIVEN IN THE BINARY DATA FILE
IF(T2D_FILES(T2DBI2)%NAME(1:1).NE.' ') THEN
CALL READ_BIN_2D
& (T%ADR(ITRAC)%P%R,NAMETRAC(ITRAC)(1:16),
& AT,T2D_FILES(T2DBI2)%LU,T2D_FILES(T2DBI2)%FMT,
& N,READ_BIN_TR,TEL_OFFSET)
ENDIF
ENDDO
ENDIF
Many thanks
David