Welcome, Guest
Username: Password: Remember me

TOPIC: write variable value to file at specific location

write variable value to file at specific location 12 years 10 months ago #3398

  • kwan
  • kwan's Avatar
If I specify a location (x1,y1) in the domain, can I write the variable values in a file at location (x1,y1) for each time step? If so how?
Thanks
Steve
The administrator has disabled public write access.

Re: write variable value to file at specific location 12 years 10 months ago #3401

  • jmhervouet
  • jmhervouet's Avatar
Hello,

You can write what you want in subroutine utimp_telemac2d if you put it in your Fortran file. Just recall that the runs are done in a temporary folder, so extra files names must be ../name_of_file otherwise your file will be destroyed at the end of the run. If your location x1,y1 is not a node in the mesh this implies interpolation, thus knowing in which element you are, computing the barycentric coordinates, etc.. If you work in parallel nodes numbers are modified, but you can rely on MESH%KNOLG%I to find the original number (generally this implies a loop over all points to know if your point is in the local sub-domain or not).

So to sum up quick and dirty is easy, and writing general code is tedious... good luck and happy new year.

With best regards,

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

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