Welcome, Guest
Username: Password: Remember me

TOPIC: Fortran routine for interpolation of wind

Fortran routine for interpolation of wind 7 months 2 days ago #43452

  • crojas
  • crojas's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Thank you received: 1
Hi,

Recently I started using the latest version of Telemac V8p4r0, and I've been running some tests to understand the changes since previously I was working with V7p2r2.

I have a Fortran file to work with option 3 for wind, variable in time and space, which works fine on the previous version of Telemac. However, since there have been some changes, this routine no longer works.

Since I don't know Fortran, I've been reading the developer manual of Telemac trying to understand what the routine was doing and I was able to notice, using the WRITE statement, that my routine is based on knowing the mesh coordinates (abscissa and ordinate) which do not have in the newest version and this causes the model to just stop running.

However, I don't understand how the previous routine knows the coordinates since it does not call for another function or anything. The only idea I have left is that the mesh coordinates are passed to the function itself when called. Indeed, the V7 subroutine METEO lists as a parameter both X and Y:
     &(PATMOS,WINDX,WINDY,FUAIR,FVAIR,X,Y,AT,LT,NPOIN,VENT,ATMOS,
     & HN,TRA01,GRAV,ROEAU,NORD,PRIVE,ATMFILEA,ATMFILEB,FILES,LISTIN,
     & PATMOS_VALUE,AWATER_QUALITY,PLUIE,AOPTWIND,AWIND_SPD)

whereas the new version of this subroutine does not:
     &(PATMOS,WINDX,WINDY,FUAIR,FVAIR,AT,LT,NPOIN,VENT,ATMOS,
     & ATMFILEA,ATMFILEB,FILES,LISTIN,
     & PATMOS_VALUE,AWATER_QUALITY,PLUIE,AOPTWIND,AWIND_SPD)

So my question is, how can I pass the mesh coordinates to the meteo subroutine?
I think that I need to modify the Fortran file that calls this function, right? Or is there another way to access the mesh coordinates within the METEO subroutine?

Thanks in advance,
Cristian
The administrator has disabled public write access.

Fortran routine for interpolation of wind 7 months 1 day ago #43458

  • crojas
  • crojas's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Thank you received: 1
I kept checking where are the problems on the routine and in order to debug I ran the model with the previous version of Telemac and saved the coordinates in a file.
Then, I read these coordinates in TelemacV8, and the routine worked for a couple of time steps and stopped working without any message.
Using more WRITE statements together with the DEBUG option in Telemac, I noticed that now the problem is in the code executed for the remaining steps (not the first one).

Could somebody guide me on what else could I do to fix this?
I've attached both the old file and the modified version of the actual routine.

Thanks
Attachments:
The administrator has disabled public write access.

Fortran routine for interpolation of wind 7 months 1 day ago #43461

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3632
  • Thank you received: 1010
Hi
The X and Y array were moved from the routine arguments to the common declarations so there are always usable.
AS already explain, to update fortran when using new telemac version, you should start from the latest version of the source file and just add your own modification...
If needed, you could add some complementary declarations as most of the main variables are available by this way...
Hope this helps
Christophe
The administrator has disabled public write access.

Fortran routine for interpolation of wind 7 months 21 hours ago #43466

  • crojas
  • crojas's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Thank you received: 1
Hi Christophe,

I did modify the file starting from the last version available!
As I said, I was trying to understand why it was not working.

Anyway, the only problem that is not working on the Fortran routine is how to access the mesh coordinates. Since I'm using a dirty fix which is doing the job but only for a specific model.

Can you guide me on how to access them on the Fortran routine?

Thanks!
The administrator has disabled public write access.

Fortran routine for interpolation of wind 7 months 20 hours ago #43468

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3632
  • Thank you received: 1010
X and Y are declared in the common declarations part of the subroutine.
So you could directly use X and Y in the fortran file without any other change...
Christophe
The administrator has disabled public write access.
Moderators: borisb

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