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

TOPIC: how to extract data from slf file?

how to extract data from slf file? 9 years 7 months ago #16443

  • anasrahman
  • anasrahman's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Hi everyone,

I tried to run the script above, but unfortunately I got the following error :

ImportError: No module named parsers.parserSELAFIN

May I know where can I get the mentioned module?

Beside from this module, where can I also find the following modules?

from parsers.parserSELAFIN import SELAFIN,subsetVariablesSLF,getValueHistorySLF


Thank you

Anas
The administrator has disabled public write access.

how to extract data from slf file? 9 years 7 months ago #16461

  • konsonaut
  • konsonaut's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 413
  • Thank you received: 144
Hello Anas,

to clarify: the script which I posted represents one way how to manipulate data from Telemac result files and so it contains a lot of personal choices which other people would not need or would program in another way.

Some hints:
first you have to be sure that the directory parsers (which contains parserSELAFIN.py is in C:\opentelemac-mascaret\python27.

I recommend to have a look on the very good Python guide Python Scientific Lecture Notes which covers also the basic use of Numpy, Scipy and Matplotlib. For example your FOR-loop in your script will not work. Furthermore I recommend a good Python editor with Syntax highlighting.
Try to use the print statements like print frames or print times in order to know what the variables are.

As I said there exist maybe better scripts for extracting variables etc. from 3D result files. However, and for even more confusion, accessing nodes from 3D result files is also straightworward since a nodenumber in 2D (nodenumber) corresponds to the nodenumber of the first layer in the 3D result file. The number of the node at the same horizontal coordinates and e.g. layer 3 is then nodenumber + 2 * number of nodes. The number of nodes is the number of nodes in the 2D mesh.


Hope this helps,
Clemens
The administrator has disabled public write access.

how to extract data from slf file? 9 years 7 months ago #16463

  • anasrahman
  • anasrahman's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Thank you for your clarification Clements.

I really appreciate your help.

Regards
Anas
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

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