Welcome, Guest
Username: Password: Remember me

TOPIC: Howchange the quantity of number after a decimal dot in output result?

Howchange the quantity of number after a decimal dot in output result? 6 years 4 weeks ago #31826

  • hovanhoa
  • hovanhoa's Avatar
Dear all,

I would like to get the output result with 3 numbers after decimal dot in result file. How I do in telemac2d? See the attached file. It is diffult to compare the discharge result following time. Please help.

Thanks inadvanced!

Hoa.
Attachments:
The administrator has disabled public write access.

Howchange the quantity of number after a decimal dot in output result? 6 years 3 weeks ago #31847

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hello,

This file is not a standard result file. How did you generate it? You probably introduced print/write statements somewhere in the code...
So you can use the fortran formatted read/write syntax (largely documented on the web for instance) to have what you want, something like that:
WRITE(*,"(6F12.3)")

I hope it helps.

Regards,
Laurent
The administrator has disabled public write access.

Howchange the quantity of number after a decimal dot in output result? 6 years 3 weeks ago #31851

  • hovanhoa
  • hovanhoa's Avatar
Hi Laurent,

I do it by command as follows:
SECTIONS INPUT FILE ='IN.txt'

SECTIONS OUTPUT FILE ='OUT.txt'

I would like to change some code in telemac system file. How I do this?

Please help.

Thanks much.

Best!

Hoa
The administrator has disabled public write access.

Howchange the quantity of number after a decimal dot in output result? 6 years 3 weeks ago #31852

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hi Hoa,

You can look at the subroutine fluxpr_telemac2d.f
The write statement is at the end of the subroutine:
WRITE (NSEO_FPR, FMT=FMTZON) ...
If you want to change the output format, you can change the parameter
FMTZON='(4(1X,1PG21.14))'
at the beginning of the subroutine.

Regards,
Laurent
The administrator has disabled public write access.
The following user(s) said Thank You: hovanhoa
Moderators: pham

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