Welcome, Guest
Username: Password: Remember me

TOPIC: PROBLEM with fortran file from v6 to v8p1

PROBLEM with fortran file from v6 to v8p1 3 years 10 months ago #37481

  • kero_feuz
  • kero_feuz's Avatar
Hello friends

I have a problem with fortran file
the file is correct for v6 when I try to run it at v8p1 doesn't run
I do all steps manuals mentions.

File Attachment:

File Name: cas2D.cas
File Size: 4 KB


File Attachment:

File Name: condins3.f
File Size: 10 KB


File Attachment:

File Name: condins33.f
File Size: 6 KB


Thanks
K.
The administrator has disabled public write access.

PROBLEM with fortran file from v6 to v8p1 3 years 10 months ago #37482

  • kero_feuz
  • kero_feuz's Avatar
Follow to above
i get a screenshot of the error
also the file mention at error C:\opentelemac-mascaret\v8p1\sources\utils\bief\declarations_telemac.f

Screenshot2020-12-30082221.jpg


File Attachment:

File Name: declarations_telemac.f
File Size: 11 KB
The administrator has disabled public write access.

PROBLEM with fortran file from v6 to v8p1 3 years 10 months ago #37489

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello kero_feuz,

A good way to update a TELEMAC model for a new release (in particular when the Fortran subroutines are quite old) is to start from the new subroutines of the latest release and put the old modifications in these new subroutines.

For example, from your condin3.f, I would use the USER_CONDIN_UV and USER_CONDIN_TRAC subroutines to put the relevant differences for U component velocity + initial tracer definition (as in the cone example).
For the water depth/surface elevation, I would use the keyword
INITIAL CONDITIONS = CONSTANT ELEVATION + INITIAL ELEVATION = 0.37

Looking quickly at your tentative implementation, I would suggest you to use double precision numbers with decimal point . and extension D (for double): e.g. 38.5D0 rather than 38.5 (which is only single precision float) or 0.D0 rather than only 0
Fortran is sensitive to this and the results may be different if not using the correct format for float numbers (the automatic conversions do not always work).

The following lines:
             IF (T%ADR(1)%P%R(I).GT.0) THEN
                T%ADR(1)%P%R(I) = T%ADR(1)%P%R(I)
                ELSEIF (T%ADR(1)%P%R(I).LT.0)THEN
                T%ADR(1)%P%R(I) =0
                ELSEIF (T%ADR(1)%P%R(I).EQ.0)THEN
                T%ADR(1)%P%R(I) =0
             ENDIF
can be simply replaced by:
T%ADR(1)%P%R(I) = MAX (T%ADR(1)%P%R(I), 0.D0)

I think a power number is missing for line (after the red **):
IF((X(IPOIN)-10.05D0)**2+(Y(IPOIN)-10.05D0)**2.LT.4.D0[color=#ff0000][b]**[/b][/color]) THEN

The LNG and LU error is classical from old subroutines coming from an old release.
Calling USE DECLARATIONS_SPECIAL and commenting the declaration of these old common values should solve this error in your user Fortran files.

Anyway, using the new structures of user Fortran files like every user_condin_... should facilitate the update of Fortran subroutines when changing release (from v8p1).

At last, please do not use tabulations in your ASCII files as it may create errors (e.g. compilation or execution).

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: kero_feuz
Moderators: pham

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