Welcome, Guest
Username: Password: Remember me

TOPIC: function date_jmd in the external fortran file

function date_jmd in the external fortran file 9 years 5 months ago #17235

  • o.gourgue
  • o.gourgue's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 11
I have a very simple question and hope someone has a very simple answer :-)

How could I use the function date_jmd (from telemac_2d/tpxo.f) in my external fortran file? I need to compute the time between two dates and this function would be very useful.

I tried with "USE TPXO" at the top of my fortran file, but it did not work.

I know it is more a Fortran issue rather than a TELEMAC one, but I would really appreciate your help.
The administrator has disabled public write access.

function date_jmd in the external fortran file 9 years 5 months ago #17236

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

I think you could make a copy of this function in your own external fortran.
In fact it depends if this function needs some other functions...
Depending on this, maybe you have to mobe all the requested subroutine in your external fortran file or copy them in the same directory and compile them before trying to compile your own program. In such case, you have to indicate that you include some objects file ...

Hope this helps even I'm not sure to be really clear...
Christophe
The administrator has disabled public write access.

function date_jmd in the external fortran file 9 years 5 months ago #17239

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Another solution without copy would be to change tpxo, declaring DATE_MJD in its list of public subroutines. Then you would access this function with a USE TPXO (perhaps USE TPXO, ONLY : DATE_MJD, not sure if this works for functions...).

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.