Welcome, Guest
Username: Password: Remember me

TOPIC: Spatially varying tracer initial conditions

Spatially varying tracer initial conditions 2 years 9 months ago #39860

  • DHaverson
  • DHaverson's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 4
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
The administrator has disabled public write access.

Spatially varying tracer initial conditions 2 years 9 months ago #39862

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello David,

When calling READ_BIN_2D subroutine, the variable N is suspicious. Is it equal to NPOIN or not?
When the computational domain is split, NPOIN is the number of nodes in the split subdomain.

Perhaps you can upload your whole Fortran file?

Chi-Tuan
The administrator has disabled public write access.

Spatially varying tracer initial conditions 2 years 9 months ago #39864

  • DHaverson
  • DHaverson's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 4
Hi Chi_Tuan

Sorry that was a typo when copying across to the message, yes should have been NPOIN not N.

Have attached the fortran file.

Yes thats what I thought that NPOIN should have adjusted for the local mesh size.

David

File Attachment:

File Name: user_condin_trac.f
File Size: 2 KB
The administrator has disabled public write access.

Spatially varying tracer initial conditions 2 years 9 months ago #39866

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello again,

You should use BINARY ATMOSPHERIC DATA FILE or otherwise BINARY DATA FILE 1 rather than BINARY DATA FILE 2 as the first 2 files are partitioned like a result file or a geometry file, but not BINARY DATA FILE 2 (which is only a copy of your initial file for every subdomain if you look at it in the temporary folder). The argument PARAL rather than SERAFIN in the dictionary tells it.

That may explain your issue (no matching of the number of nodes of the subdomain and the number of nodes in the atmospheric file).

If using the BINARY ATMOSPHERIC DATA FILE and if this file does not follow what METEO_TELEMAC module expects as input format, you can use the new keyword in v8p3: FREE FORMAT FOR ATMOSPHERIC DATA FILE.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: DHaverson

Spatially varying tracer initial conditions 2 years 9 months ago #39867

  • DHaverson
  • DHaverson's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Thank you received: 4
Many thanks Chi-Tuan

Switching to Binary Data File 1 solved it.

Wasn't aware Data File 1 and 2 where not structurally the same.

Cheers

David
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.