Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Selafin File

Selafin File 13 years 8 months ago #1162

  • ajourieh
  • ajourieh's Avatar
Dear All,

how i can convert the selafin file to xyz or ASCCI file

thanks
The administrator has disabled public write access.

Re:Selafin File 13 years 8 months ago #1163

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi

The easiest way is using Fudaa. When your result is open, you could export it with different format.

Another possibility is to create a program that read the Selafin format (the description is made in the different manuals) and write the data in the format your want

regards
Christophe
The administrator has disabled public write access.

Re:Selafin File 13 years 8 months ago #1164

  • Serrer
  • Serrer's Avatar
  • OFFLINE
  • Moderator
  • Posts: 720
  • Thank you received: 304
Alternatively...
1. File->Open the SELAFIN file with Blue Kenue.
2. Select the variable you with to export in the WorkSpace.
3. File->Save Copy As... (changing the "Save as type" to XYZ) creates an ASCII XYZ file.

You have to option of saving a TELEMAC variable to a number of different formats including, XYZ, TriGrid (ngh or nod), Google Earth kml, ADCIRC (mesh *.14) and SMS (mesh *.2dm)

Cheers... Martin
The administrator has disabled public write access.

Re:Selafin File 13 years 8 months ago #1233

  • ajourieh
  • ajourieh's Avatar
thanks for your quick responses,

but i meant the results file of( Telemac3D) for example the velocity values of a vertical cross section?? it is possible to export it in ASCII fromat?

thanks
The administrator has disabled public write access.

Re:Selafin File 13 years 8 months ago #1236

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Actually there is a sofware to extract cross sections: postel3d, but is gives a specific binary format called leonard which is only understood by Rubens (where it is called leo). People now generally use Tecplot to do cross-sections, but this is a commercial product. Otherwise you can export what you want by implementing subroutine utimp of telemac3d, with a little help from the programming guide, but Telemac-3D will be open source only in July and is currently distributed only with a commercial assistance, unless you are a university with a specific agreement ?

Regards,

Jean-Michel
The administrator has disabled public write access.

Re:Selafin File 13 years 7 months ago #1306

  • fezai
  • fezai's Avatar
Hi,

I'm a beginner in Fortran, I'm trying to read selafin files (particularly output files), but I have a problem with reading records, the following messages appears when I compile the code :

"forrtl: severe (98): cannot allocate memory for the file buffer ..."

A sample code for reading the Title for example is attached.

Any help,

Thanks
The administrator has disabled public write access.

Re:Selafin File 13 years 7 months ago #1307

  • jmhervouet
  • jmhervouet's Avatar
Hi,

This is definitely a Fortran error, but your file is missing...

Jean-Michel Hervouet
The administrator has disabled public write access.

Re:Selafin File 13 years 7 months ago #1308

  • fezai
  • fezai's Avatar
I tried to attach the file once again. Otherwise here is the code :

PROGRAM ReadSelaphin

CHARACTER :: strTitle*80

OPEN(1, FILE="C:\TELEMAC\Sta2.r2d", FORM="UNFORMATTED")
OPEN(2, FILE="C:\TELEMAC\Sta2.txt", FORM="FORMATTED")

READ(1, END=5) strTitle

WRITE(2,*) strTitle


5 CLOSE(1)
6 CLOSE(2)

END
The administrator has disabled public write access.

Re:Selafin File 13 years 7 months ago #1311

  • jmhervouet
  • jmhervouet's Avatar
Hi,

I do not see any problem in your sample code (maybe I miss something also).

Declare StrTitle as :

CHARACTER(LEN=80) :: StrTitle

add a line STOP before the line END

this is more standard,

and add ERR= statements in your open and read statements to see where the crash happens, then you can add flags like
PRINT*,'FLAG 1', etc. to see which instructions causes the problem.

Regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Re:Selafin File 13 years 7 months ago #1313

  • fezai
  • fezai's Avatar
Hi,

The problem occurs exactly in the line (READ(1, END=5, ERR=7) strTitle).

I added the "ERR=7", the crash doesn't appear but I could understand that the program ignores the error (the output file, unit 2, is not written).

I am sorry for all these questions, but I made so many tests with different selaphin files and different OPEN and READ options, but it doesn't work.

I would like to mention that I wrote a binary file with Fortran containing a 80 characters string, the code works without problems.

Here is the code correction, following your advises :

PROGRAM ReadSelaphin


CHARACTER(LEN=80) :: strTitle

OPEN(1, FILE="C:\TELEMAC\Sta2.ref", FORM="UNFORMATTED")

OPEN(2, FILE="C:\TELEMAC\Sta2.txt", FORM="FORMATTED")

READ(1, END=5, ERR=7) strTitle

WRITE(2,*) strTitle
5 CLOSE(1)
6 CLOSE(2)
7 CONTINUE

STOP
END

Kind Regards

Fezai
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: Serrer, a.barton

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