Welcome, Guest
Username: Password: Remember me

TOPIC: Modelling storm surge in telemac2d with variable wind time and space

Modelling storm surge in telemac2d with variable wind time and space 5 years 11 months ago #32327

  • SAICHENTHUR
  • SAICHENTHUR's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 83
  • Thank you received: 7
Hi

There is no any such tutorials for this, to my knowledge. You can create a time and space varying wind file for any cyclone period downloaded from ECMWF, using the python scripts, and use option-3 for the wind simulation to run a surge model. Dont forget to include meteo.f file. Check for manuals and examples given under Telemac2d.

Thank you
The administrator has disabled public write access.

Better interpolation for variable wind time and space t2d_wind_txy.f 5 years 3 months ago #34178

  • victor
  • victor's Avatar
Dear all

I just updated the t2d_wind_txy.f sobroutine in wind_txy example to have interpolated values in all time steps.

The problem that I found is that the wind was updated only for AT time equal to AT step in the winf file f01_wind_txy.

I added some lines to the fortran IDWM to get full interpolation.

! #######################################################################
! IDWM WIND INTERPOLATION CODE
! #######################################################################
!
PI = ACOS(-1.D0)
!
! ASSEMBLE THE ARRAYS OF X,Y,WNDSPD AND X,Y,WNDDIR FOR EACH ITERATION
DO A = 1,NUMPOINTS
IF(AT_WIND(A).EQ.AT) THEN
DO B = 1,NUMSTA
! ASSEMBLE THE ARRAYS FOR THIS TIME STEP
INPSTA_D(B,1) = XX(B)
INPSTA_D(B,2) = YY(B)
INPSTA_D(B,3) = WIND(A,B*2+1)
INPSTA_S(B,1) = XX(B)
INPSTA_S(B,2) = YY(B)
INPSTA_S(B,3) = WIND(A,B*2)
ENDDO
ENDIF
! interpolate FOR EACH ITERATION
IF((AT_WIND(A).LT.AT).AND.(AT_WIND(A).NE.AT)) THEN
DO B = 1,NUMSTA
! ASSEMBLE THE ARRAYS FOR THIS TIME STEP
INPSTA_D(B,1) = XX(B)
INPSTA_D(B,2) = YY(B)
INPSTA_D(B,3) = (WIND(A+1,B*2+1)-WIND(A,B*2+1))
& *(AT-AT_WIND(A))/(AT_WIND(A+1)-AT_WIND(A))+WIND(A,B*2+1)
INPSTA_S(B,1) = XX(B)
INPSTA_S(B,2) = YY(B)
INPSTA_S(B,3) = (WIND(A+1,B*2)-WIND(A,B*2))
& *(AT-AT_WIND(A))/(AT_WIND(A+1)-AT_WIND(A))+WIND(A,B*2)
ENDDO
ENDIF
ENDDO
!
CALL IDWM_T2D(INPSTA_S,POINTS,OUT_WSPD,NPOIN,NUMSTA)
CALL IDWM_T2D(INPSTA_D,POINTS,OUT_WDIR,NPOIN,NUMSTA)
!
! CONVERT OUT_WSPD AND OUT_WDIR TO WINDX AND WINDY
DO K = 1,NPOIN
IF(OUT_WDIR(K).GE.0.D0.AND.OUT_WSPD(K).GE.0.D0) THEN
IF(OUT_WDIR(K).GE.0.D0.AND.OUT_WDIR(K).LE.90.D0) THEN
THETA_RAD = OUT_WDIR(K)*PI/180.D0
WINDX(K) = -SIN(THETA_RAD)*OUT_WSPD(K)
WINDY(K) = -COS(THETA_RAD)*OUT_WSPD(K)
ENDIF
!
IF(OUT_WDIR(K).GT.90.D0.AND.OUT_WDIR(K).LE.180.D0) THEN
THETA_RAD = (180.D0-OUT_WDIR(K))*PI/180.D0
WINDX(K) = -SIN(THETA_RAD)*OUT_WSPD(K)
WINDY(K) = COS(THETA_RAD)*OUT_WSPD(K)
ENDIF
!
IF(OUT_WDIR(K).GT.180.D0.AND.OUT_WDIR(K).LE.270.D0) THEN
THETA_RAD = (OUT_WDIR(K)-180.D0)*PI/180.D0
WINDX(K) = SIN(THETA_RAD)*OUT_WSPD(K)
WINDY(K) = COS(THETA_RAD)*OUT_WSPD(K)
ENDIF
!
IF(OUT_WDIR(K).GT.270.D0.AND.OUT_WDIR(K).LE.360.D0) THEN
THETA_RAD = (360.D0-OUT_WDIR(K))*PI/180.D0
WINDX(K) = SIN(THETA_RAD)*OUT_WSPD(K)
WINDY(K) = -COS(THETA_RAD)*OUT_WSPD(K)
ENDIF
ELSE
WINDX(K) = -999.D0
WINDY(K) = -999.D0
WRITE(*,*) 'NO WIND DATA FOR TIME ', AT
ENDIF
ENDDO !K
!
! #######################################################################
ENDIF
ENDIF
!
! WIND AND/OR WATER QUALITY VARIABLES
! VARYING IN SPACE AND TIME
!
ELSEIF(FILES(ATMFILEB)%NAME(1:1).NE.' ') THEN
CALL METEO_FROM_BINARY_FILE(PATMOS,WINDX,WINDY,AT,NPOIN,VENT,
& ATMOS,ATMFILEB,FILES,LISTIN,
& WATER_QUALITY,PLUIE,OPTWIND,
& WIND_SPD)
ENDIF
ENDIF
!
!
!
RETURN
END

One last thing. Be aware of that this example takes wind comming direction as default for meteo stations. If your input is the propagation direction you have to invert U avd V vales.

Cheers

Victor
The administrator has disabled public write access.

Updated fortran for full wind interpolation. 5 years 3 months ago #34179

  • victor
  • victor's Avatar
Here the updated file

File Attachment:

File Name: t2d_wind_txy3.f
File Size: 24 KB
The administrator has disabled public write access.
Moderators: pham

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