Welcome, Guest
Username: Password: Remember me

TOPIC: Wind time series without fortran file

Wind time series without fortran file 13 years 1 month ago #2801

  • pprodano
  • pprodano's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 96
  • Thank you received: 55
Hello,

I have been able to complete some preliminary Telemac-2D simulations of a large lake where the only forcing is wind that is constant in time and space. This I did simply by specifying keywords in the cas.txt file.

Now I wish to investigate wind forcing that is variable in time but constant in space (i.e., one wind time series is applicable for the entire lake). Can I do this simply by specifying a time series file (similar to what is done with liquid boundary conditions)? Can I specify a single wind time series in an external file and apply it to the entire model domain?

I would like to avoid doing Fortran programming if I can.

Thank you in advance,

Pat
The administrator has disabled public write access.

Re: Wind time series without fortran file 13 years 1 month ago #2806

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Cases more complicated than constant wind are so far to be programmed in subroutine METEO. I give hereafter an example written for Telemac-3D, a file with wind intensity and direction, and subroutine meteo that call a subroutine lecent to read this file, you can inspire from this (sorry attached files do not seem to work with my web browser). It is written so that "FORMATTED DATA FILE 1" is used for the file with wind.

With best regards,

Jean-Michel Hervouet


File with wind :

T=0 1er septembre 2006 0h
T(s) V(m/s) Cap (°) EvaporatioPrecipitations (m3/s/m2 *e+08)
0 2.00 150.00 0.00 0.00
3600 1.00 180.00 0.00 0.00
7200 1.00 110.00 0.00 0.00
10800 2.00 130.00 0.00 0.00
14400 1.00 130.00 0.00 0.00
18000 2.00 140.00 0.00 0.00
21600 1.00 30.00 0.00 0.00
25200 1.00 310.00 0.00 0.00
28800 1.00 270.00 0.00 0.00
32400 3.00 280.00 0.00 0.00
36000 5.00 280.00 0.00 0.00
39600 5.00 190.00 0.00 0.00

Subroutine meteo and lecent :

C ****************
SUBROUTINE METEO
C ****************
C
*(PATMOS,WINDX,WINDY,FUAIR,FVAIR,X,Y,AT,LT,NPOIN,VENT,ATMOS,
* HN,TRA01,GRAV,ROEAU,NORD,PRIVE)
C
C***********************************************************************
C TELEMAC 2D VERSION 5.4 02/01/04 J-M HERVOUET (LNH) 01 30 87 80 18
C
C***********************************************************************
C
C FONCTION : CALCUL DES CHAMPS DE VENT ET DE PRESSION
C EN GENERAL A PARTIR DE FICHIERS DE DONNEES
C
C CE SOUS-PROGRAMME PEUT ETRE COMPLETE PAR L'UTILISATEUR
C
C
C
C FUNCTION: SETTING ATMOSPHERIC PRESSURE AND WIND VELOCITIES
C
C MUST BE ADAPTED BY USER.
C
C
C ARGUMENTS
C .________________.____.______________________________________________.
C | NOM |MODE| ROLE |
C |________________|____|______________________________________________|
C | PATMOS |<-- | ATMOSPHERIC PRESSURE
C | WINDX,Y |<-- | TWO COMPONENTS OF WIND VELOCITY
C | FUAIR,FVAIR | -->| IDEM IF WIND CONSTANT.
C | X , Y | -->| COORDINATES OF POINTS IN THE MESH
C | AT,LT | -->| TIME, ITERATION NUMBER
C | NPOIN | -->| NUMBER OF POINTS IN THE MESH
C | VENT | -->| YES IF WIND TAKEN INTO ACCOUNT
C | ATMOS | -->| YES IF PRESSURE TAKEN INTO ACCOUNT
C | HN | -->| DEPTH
C | TRA01 | -->| WORKING ARRAY
C | GRAV | -->| GRAVITY ACCELERATION
C | ROEAU | -->| WATER DENSITY
C | NORD | -->| DIRECTION OF NORTH, COUNTER-CLOCK-WISE
C | | | STARTING FROM VERTICAL AXIS
C | PRIVE | -->| USER WORKING ARRAYS (BIEF_OBJ BLOCK)
C |________________|____|_______________________________________________
C MODE : -->(DONNEE NON MODIFIEE), <--(RESULTAT), <-->(DONNEE MODIFIEE)
C
C
C
C APPELE PAR : TELMAC
C
C SOUS PROGRAMME APPELE : OV
C
C***********************************************************************
C
USE BIEF
C
IMPLICIT NONE
INTEGER LNG,LU
COMMON/INFO/LNG,LU
C
C+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
C
INTEGER, INTENT(IN) :: LT,NPOIN
LOGICAL, INTENT(IN) :: ATMOS,VENT
DOUBLE PRECISION, INTENT(IN) :: X(NPOIN),Y(NPOIN),HN(NPOIN)
DOUBLE PRECISION, INTENT(INOUT) :: WINDX(NPOIN),WINDY(NPOIN)
DOUBLE PRECISION, INTENT(INOUT) :: PATMOS(NPOIN),TRA01(NPOIN)
DOUBLE PRECISION, INTENT(IN) :: FUAIR,FVAIR,AT,GRAV,ROEAU,NORD
TYPE(BIEF_OBJ), INTENT(INOUT) :: PRIVE
C
C+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
C
DOUBLE PRECISION P0,Z(1)
CML
INTEGER IPOIN
DOUBLE PRECISION COEF
CML
C
C
C
C BEWARE, HERE ONLY ONE COMPUTATION AT FIRST TIME-STEP
C
IF(LT.EQ.0) THEN
C
C
C
C ATMOSPHERIC PRESSURE
C
IF(ATMOS) THEN
P0 = 100000.D0
CALL OV( 'X=C ' , PATMOS , Y , Z , P0 , NPOIN )
ENDIF
C
C FIN DE IF(LT.EQ.0)
ENDIF

C
C
C VENT : ICI ON LE PREND CONSTANT AVEC LES VALEURS DONNEES DANS LE
C FICHIER CAS.
C
C SUIVANT LE REPERE DANS LEQUEL LA VITESSE DU VENT EST FOURNIE
C IL PEUT Y AVOIR UNE ROTATION A FAIRE.

CALL LECENT(FUAIR,FVAIR,LT,AT,NPOIN,26)
C
IF(VENT) THEN
CALL OV( 'X=C ' , WINDX , Y , Z , FUAIR , NPOIN )
CALL OV( 'X=C ' , WINDY , Y , Z , FVAIR , NPOIN )
ENDIF
C
C
C
C
RETURN
END
C *****************
SUBROUTINE LECENT
C *****************
C
*(FUAIR,FVAIR,LT,AT,NPOIN,NFO1)
C
C***********************************************************************
C TELEMAC-3D V2P1 20/04/97 R SAMIE (LNH) 30 87 72 88
C***********************************************************************
C
C FONCTION:
C =========
C
C LECTURE DU FICHIER D'ENTREE AU FORMAT ASCII
C
C
C ARGUMENTS
C .________________.____.______________________________________________.
C ! NOM !MODE! ROLE !
C !________________!____!______________________________________________!
C ! VENTMOD !--> ! MODULE DU VENT MESURE A SAINT-CHAMAS !
C ! VENTCAP !--> ! DIRECTION DU VENT MESURE A SAINT-CHAMAS !
C ! FUAIR !<-> ! VENT SUIVANT X !
C ! FVAIR !<-- ! VENT SUIVANT Y !
C ! TABENT( ,9) !<-- ! TABLEAU D'ENTREE ET DE TRAVAIL !
C ! !<-- ! ( ,1) VARIABLE TEMPS !
C ! !<-- ! ( ,2) VARIABLE MODULE DU VENT !
C ! !<-- ! ( ,3) VARIABLE DIRECTION DU VENT !
C ! !<-- ! ( ,4) VARIABLE DEBIT A ST-CHAMAS !
C ! !<-- ! ( ,5) VARIABLE SURFACE LIBRE A MARTIGUES !
C ! !<-- ! ( ,6) VARIABLE FUAIR !
C ! !<-- ! ( ,7) VARIABLE FVAIR !
C ! !<-- ! ( ,8) VARIABLE DEBIT DE L'ARC !
C ! !<-- ! ( ,9) VARIABLE DEBIT DE LA TOULOUBRE !
C ! NPOIN ! -->! NOMBRE DE NOEUDS DU MAILLAGE 2D !
C ! AT !<-- ! TEMPS DU CALCUL !
C ! LT ! -->! NUMERO DU PAS DE TEMPS !
C ! NFO1 ! ! FICHIER FORMATE D'ENTREE !
C !________________!____!______________________________________________!
C MODE : -->(DONNEE NON MODIFIEE), <--(RESULTAT), <-->(DONNEE MODIFIEE)
C
C
C
C SOUS-PROGRAMME APPELE PAR : MITRID
C SOUS-PROGRAMMES APPELES : OV
C
C***********************************************************************
C
IMPLICIT NONE
INTEGER LNG,LU
COMMON/INFO/LNG,LU
C
INTEGER NFO1
C
INTEGER NPOIN , LT
INTEGER POSTAB , I , NBENR
C
DOUBLE PRECISION FUAIR,FVAIR
DOUBLE PRECISION TABENT(60000,9)
DOUBLE PRECISION AT,AT1,AT2,DELTAT
DOUBLE PRECISION PI,ALPHA
C
INTRINSIC SIN, COS
C
SAVE TABENT,POSTAB,NBENR
C
PI = 3.14159265359D0
C
C***********************************************************************
C
C LECTURE DU FICHIER DE DONNEES D'ENTREE (DEBIT, VENT)
C AU PREMIER PAS DE TEMPS ET REMPLISSAGE DU TABLEAU TABENT
C
C LECTURE DE L'ENTETE DU FICHIER DE DONNEES
C
C
IF (LT.EQ.0) THEN
C
WRITE(LU,*)
WRITE(LU,*) 'DEBUT DE LECTURE DU FICHIER D''ENTREE'
WRITE(LU,*) '====================================='
C
REWIND NFO1
C
DO 10 I = 1 , 2
READ(NFO1,*)
10 CONTINUE
C
NBENR = 1
C
C LECTURE DES VARIABLES ET REMPLISSAGE DU TABLEAU TABENT
C
100 READ(NFO1,*,END=20) TABENT(NBENR,1) , TABENT(NBENR,2) ,
* TABENT(NBENR,3)
C
C CALCUL DU VENT SUIVANT LES AXES X ET Y
C
TABENT(NBENR,6) = -TABENT(NBENR,2) *
* SIN(TABENT(NBENR,3)*PI/180.D0)
TABENT(NBENR,7) = -TABENT(NBENR,2) *
* COS(TABENT(NBENR,3)*PI/180.D0)
C
NBENR = NBENR + 1
IF ( NBENR .GT. 60000 ) THEN
WRITE(LU,*) '=============================================='
WRITE(LU,*) '= ATTENTION : LE NOMBRE D''ENREGISTREMENT DU ='
WRITE(LU,*) '= FICHIER D''ENTREE EST SUPERIEUR AU ='
WRITE(LU,*) '= DIMENSIONNEMENT DU TABLEAU TABENT (30000) ='
WRITE(LU,*) '=============================================='
CALL PLANTE(1)
STOP
ENDIF
GO TO 100
C
20 CONTINUE
C
C
CER1000 FORMAT (F8.0,7X,F5.2,4X,F6.1,5X,F5.1,6X,F4.1,5X,F5.2,5X,F5.2)
1000 FORMAT (F10.0,5F10.2)
C
NBENR = NBENR - 1
C
WRITE(LU,*) '======================================='
WRITE(LU,*) 'FIN DE LECTURE DU FICHIER D''ENTREE '
WRITE(LU,*) ' IL Y A ',NBENR,' ENREGISTREMENTS '
WRITE(LU,*) ' DE T = ',TABENT(1,1), ' A = ',
* TABENT(NBENR,1),' SECONDES '
WRITE(LU,*) '======================================='
C
C
C FIN DE REMPLISSAGE DU TABLEAU TABENT ET INITIALISATION DU POINTEUR
C POSTAB
C
POSTAB = 1
C
ENDIF
C
C
C
C LECTURE ET INTERPOLATION DES DONNEES A CHAQUE PAS DE TEMPS
C
C
C POSITIONNEMENT DU POINTEUR POSTAB A CHAQUE PAS DE TEMPS
C
C
120 IF ( AT.LT.TABENT(POSTAB,1) .OR. AT.GE.TABENT(POSTAB+1,1) ) THEN
IF ( AT .LT. TABENT(POSTAB,1) ) POSTAB = POSTAB - 1
IF ( AT .GE. TABENT(POSTAB+1,1) ) POSTAB = POSTAB + 1
IF ( POSTAB .GT. NBENR ) THEN
WRITE(LU,*) '================================================'
WRITE(LU,*) 'ATTENTION : LE TEMPS DU CALCUL AT = ', AT
WRITE(LU,*) 'EST SUPERIEUR AU TEMPS MAXIMUM DE VOTRE FICHIER'
WRITE(LU,*) 'DE DONNEES D''ENTREE T = ', TABENT(NBENR,1)
WRITE(LU,*) '================================================'
CALL PLANTE(1)
STOP
ENDIF
GO TO 120
ENDIF
C
C
AT1 = TABENT(POSTAB,1)
AT2 = TABENT(POSTAB+1,1)
DELTAT = AT2 - AT1
C
ALPHA = ( AT - AT1 ) / DELTAT
C
FUAIR = TABENT(POSTAB,6) +
* ( (TABENT(POSTAB+1,6)-TABENT(POSTAB,6)) * ALPHA )
FVAIR = TABENT(POSTAB,7) +
* ( (TABENT(POSTAB+1,7)-TABENT(POSTAB,7)) * ALPHA )
C
C
RETURN
END
The administrator has disabled public write access.

Re: Wind time series without fortran file 8 years 8 months ago #20115

  • huyquangtran
  • huyquangtran's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 271
  • Thank you received: 23
Hi everyone,

I have read this topic, but I don' t clearly understand. So sorry for asking again.


I am trying to put wind data in my 2D TELEMAC model, and also I want to couple with TOMAWAC.

The wind data I have only is in an excel file measured every hour, with direction (N,S,SW...etc), and speed (m/s) at one point within my model.

My question is:

Without Fortran, is it possible to create a file that TELEMAC can read? If need a Fortran file, could someone give me a file that I can modify a little bit, making it possible to read in TELEMAC?


Thank you in advance.

Best Regards

Huy
The administrator has disabled public write access.

Wind time series without fortran file 8 years 8 months ago #20135

  • riadh
  • riadh's Avatar
Hello

In the valiadtion folder of Telemac2D (../examples/telemac2d) you can find 2 examples of cases using wind varying in time (case called wind) and in time and space (called wind_txy).
These cases use an ascci file giving the wind data, thus you can just change your file and in the same way.
Please read the user manual also, where a whole section is dedicated to the intruduction of wind and atmospheric pressure.

with my best regards

Riadh ATA
The administrator has disabled public write access.

Wind time series without fortran file 8 years 8 months ago #20422

  • huyquangtran
  • huyquangtran's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 271
  • Thank you received: 23
Hi Jean-Michel, Riadh and Everyone,

Sorry for asking about Wind again on this topic.

Regarding wind fluence, and option for wind in TELEMAC 2D. I have read the user manual V7.0 (p.49), I see that OPTION FOR WIND: 3 (wind is variable in time and space) is not implemented. Is it right?

I have followed the instruction, and also looked at an example of this option from the directory: C:\opentelemac-mascaret\v7p0\examples\telemac2d\wind_txy

but this is a simple case that the wind data is given at several locations and the file is formatted in *.text, and read by a Fortran file.

My question is:

Up to now, could I apply OPTION FOR WIND: 3 in TELEMAC 2D model by using the data from ECMWF (in netCDF, or GRIB file)? I mean: is there any subroutine available to read these kinds of wind files? as ECMWF data is very good for us in terms of time periods, locations, and the accuracy instead of using field data

Thank you and Best Regards

Huy
The administrator has disabled public write access.

Wind time series without fortran file 8 years 8 months ago #20441

  • pprodano
  • pprodano's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 96
  • Thank you received: 55
Hello,

When I have to use met data from netCDF and/or GRIB files, I simply extract the data as ascii text, and feed it into the meteo.f subroutine from the wind_txy example. It is much simpler than getting fortran to read netCDF/GRIB files inside TELEMAC.

What I would suggest is to extract the wind data for small number of stations first, then apply the winds as in wind_xy example. If it all works, then you can do it for many more stations.

Pat
The administrator has disabled public write access.
The following user(s) said Thank You: huyquangtran

Wind time series without fortran file 8 years 8 months ago #20460

  • huyquangtran
  • huyquangtran's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 271
  • Thank you received: 23
Oh... :P thanks Pat!

You have a very simple idea! I thought I have to extract like a mesh from ECMWF :silly: with exact matched in my model. Just several points, it is so simple! I have done the case of one point, now I will try with several points! Whether my simulation will be successful or not, I will let you know.

Best Regards

Huy
The administrator has disabled public write access.
Moderators: pham

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