Welcome, Guest
Username: Password: Remember me

TOPIC: Library - modifications in Tomawac

Library - modifications in Tomawac 13 years 2 months ago #2245

  • pauline.weywada
  • pauline.weywada's Avatar
Hello,

I'm interested in knowing a bit more about the Tomawac's library.

From what I've understood:
- the *.dico file lists all the variables that can be input in the steering file;
- lecdon_tomawac.f reads this steering file through the call of damocles, thus all the variables must be stored in a table;
- delcaration_tomawac.f declares the bief structures in Tomawac for all the variables in the dictionary.

Thus, if I want to define say a source term via a new subroutine for example something similar to qmout.f), I have to update these three files to include any new input parameter that I need?

I hope my question is clear enough, otherwise let me know!

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

Re: Library - modifications in Tomawac 13 years 2 months ago #2250

  • jmhervouet
  • jmhervouet's Avatar
Hello,

If you want to add a variable for an output in the results file you must :

* declare it with a BIEF_OBJ type in declarations_tomawac
* allocate it in point_tomawac, and add it in the block of output variables (a list of CALL ADDBLO at the end of point_tomawac). The rank in the block will be the rank of the variable.
* give a name and mnemo (one or a few letters) in subroutine nomvar_tomawac, with the same given rank.

Your variable can be accessed and built anywhere either by transmitting it through arguments, or by the line :

USE DECLARATIONS_TOMAWAC, ONLY : MYVARIABLE

but then it is a bief_obj structure, so the double precision values are MYVARIABLE%R(...). Other components are also available, for example if you print MYVARIABLE%NAME it must give the fortran name MYVARIABLE (this is useful to know the original real name of a local argument).

Then you can use the mnemo in the keyword VARIABLES FOR GRAPHIC OUTPUTS and you should see it in the results file.

This is the basic principle, now see what happens when you do it, and report if it does not work,

With best regards,

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

Re: Library - modifications in Tomawac 13 years 2 months ago #2267

  • pauline.weywada
  • pauline.weywada's Avatar
Hello,

What I would like to do is more to create a new source term, like qmout for exemple.

I have 2 variables that I need to add, equivalent to smout (to test if this source term has to be taken into account) and cmout1 (a constant) for exemple. These variables are read in the steering file.
I added them in declaration_tomawac.f and in lecdon_tomawac.

I would like to add them as arguments in semimp.f, where this new subroutine is called in, but when I do so, I have this message:

wac.f(742): error #6784: The number of actual arguments cannot be greater than the number of dummy arguments. [SEMIMP]
CALL SEMIMP(SF%R, SXK%R, SFR%R, SDFR%R, SDEPTH%R, SUV%R, SVV%R,
^
compilation aborted for wac.f (code 1)
NMAKE : fatal error V1077: '"C:\Program Files (x86)\Intel\Compiler\11.1\060\Bin\ia32\ifort.exe"' : return code '0x1'
Stop.
C:\telemac_v6p1\sources/tomawac/toma_v6p1/sources : maktel install


I guess it has something to do with the way I declare/define my new arguments, but how or where should I declare then?

Thanks for your help,
pauline.
The administrator has disabled public write access.

Re: Library - modifications in Tomawac 13 years 2 months ago #2268

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Your problem is only that there is an interface : interface_tomawac, that allows to check the arguments and prevent programming errors, and you did not modify this interface. What you can do is :

changing the name of the modified subroutine in your Fortran file and in the CALL, thus there will be no more checking because this new name will not be in the interface. If one day we put this modified subroutine in the Tomawac library we shall put back the previous name and update the interface accordingly.

With best regards,

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

Re: Library - modifications in Tomawac 13 years 2 months ago #2271

  • pauline.weywada
  • pauline.weywada's Avatar
Great thank you I just managed to compile TOMAWAC while taking into account my new routine.

BTW in my dictionary, the first line is '&DYN', what does this mean?

Thank you very much for your help,
Regards,
Pauline.
The administrator has disabled public write access.

Re: Library - modifications in Tomawac 13 years 2 months ago #2273

  • jmhervouet
  • jmhervouet's Avatar
Hello,

&DYN is a command for library Damocles (for reading keywords) that says that we automatically resize the keywords when the user has not given the size announced in the dictionary. In this way keywords that have a size that cannot be known in advance, e.g. DISCHARGES OF SOURCES when we do not know how many sources they will be.

SO don't worry with this,

With best regards,

Jean-Michel
The administrator has disabled public write access.

Re: Library - modifications in Tomawac 13 years 2 months ago #2283

  • pauline.weywada
  • pauline.weywada's Avatar
Hello,

OK thank you that makes things clearer! I think I'm starting to have a good enough understanding of all this :)

Thank you!
Pauline.
The administrator has disabled public write access.

Library - modifications in Tomawac 6 years 4 months ago #30778

  • Uma
  • Uma's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
Dear all,

I am trying to implement my code in TOMAWAC wave model.
I am struggling with this problem for more than 2 months.
Other codes for nonlinear energy transfers like DIA,
GQM (Gagnaire and Benoit 2010) and MDIA takes
very less time.

I ran the DIA(MDIA)​algorithm for time evolution
​(integration)​upto 96 hrs with 2 seconds time step.
I wonder, the TOMAWC model runs very fast,
within few seconds I could get the result.

Are they using any vectorisation or something else.
Generally what wave models are using. Please clear me.
Your valuable suggestions will help me a lot.

Thank you!
Uma. G
The administrator has disabled public write access.
Moderators: tfouquet

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