cyclone.F90 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. MODULE cyclone
  2. !!======================================================================
  3. !! *** MODULE cyclone ***
  4. !! add the Tropical Cyclones along tracks to the surface wind forcing
  5. !!
  6. !!======================================================================
  7. !! History : 3.3 ! 2010-05 (E Vincent, G Madec, S Masson) Original code
  8. !!----------------------------------------------------------------------
  9. #if defined key_cyclone
  10. !!----------------------------------------------------------------------
  11. !! 'key_cyclone' : key option add Tropical Cyclones in the wind forcing
  12. !!----------------------------------------------------------------------
  13. !! wnd_cyc : 1 module subroutine
  14. !!----------------------------------------------------------------------
  15. USE oce ! ocean dynamics and active tracers
  16. USE sbc_oce ! surface boundary condition: ocean
  17. USE dom_oce ! ocean space domain variables
  18. USE phycst ! physical constant
  19. USE fldread ! read input fields
  20. USE in_out_manager ! I/O manager
  21. USE geo2ocean ! tools for projection on ORCA grid
  22. USE wrk_nemo ! work arrays
  23. USE lib_mpp
  24. IMPLICIT NONE
  25. PRIVATE
  26. PUBLIC wnd_cyc ! routine called in sbcblk_core.F90 module
  27. INTEGER , PARAMETER :: jp_is1 = 1 ! index of presence 1 or absence 0 of a TC record
  28. INTEGER , PARAMETER :: jp_lon = 2 ! index of longitude for present TCs
  29. INTEGER , PARAMETER :: jp_lat = 3 ! index of latitude for present TCs
  30. INTEGER , PARAMETER :: jp_vmax = 4 ! index of max wind for present TCs
  31. INTEGER , PARAMETER :: jp_pres = 5 ! index of eye-pres for present TCs
  32. TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf ! structure of input fields (file informations, fields read)
  33. !! * Substitutions
  34. # include "vectopt_loop_substitute.h90"
  35. !!----------------------------------------------------------------------
  36. !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010)
  37. !! $Id: cyclone.F90 2355 2015-05-20 07:11:50Z ufla $
  38. !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
  39. !!----------------------------------------------------------------------
  40. CONTAINS
  41. SUBROUTINE wnd_cyc( kt, pwnd_i, pwnd_j )
  42. !!----------------------------------------------------------------------
  43. !! *** ROUTINE wnd_cyc ***
  44. !!
  45. !! ** Purpose : Add cyclone winds on the ORCA grid
  46. !!
  47. !! ** Action : - open TC data, find TCs for the current timestep
  48. !! - for each potential TC, add the winds on the grid
  49. !!----------------------------------------------------------------------
  50. INTEGER , INTENT(in) :: kt ! time step index
  51. REAL(wp), INTENT(out), DIMENSION(jpi,jpj) :: pwnd_i ! wind speed i-components at T-point ORCA direction
  52. REAL(wp), INTENT(out), DIMENSION(jpi,jpj) :: pwnd_j ! wind speed j-components at T-point ORCA direction
  53. !
  54. !!
  55. INTEGER :: ji, jj , jtc ! loop arguments
  56. INTEGER :: ierror ! loop arguments
  57. INTEGER :: vortex=1 ! vortex shape to be used: 0=Holland 1=Willoughby
  58. REAL(wp) :: zrout1=1.5e6 ! distance from center where we begin to kill vortex (m)
  59. REAL(wp) :: zrout2=2.5e6 ! distance from center where we bring vortex to zero (m)
  60. REAL(wp) :: zb ! power in Holland vortex shape
  61. REAL(wp) :: zA ! shape parameter in Willoughby vortex : A transtion between first and second outter exp
  62. REAL(wp) :: zn ! shape parameter in Willoughby vortex : n power law in the eye
  63. REAL(wp) :: zXX1 ! shape parameter in Willoughby vortex : decay length second outter exponential
  64. REAL(wp) :: zXX2 ! shape parameter in Willoughby vortex : decay length first outter exponential
  65. REAL(wp) :: zztmp ! temporary
  66. REAL(wp) :: zzrglam, zzrgphi ! temporary
  67. REAL(wp) :: ztheta ! azimuthal angle
  68. REAL(wp) :: zdist ! dist to the TC center
  69. REAL(wp) :: zhemi ! 1 for NH ; -1 for SH
  70. REAL(wp) :: zinfl ! clim inflow angle in TCs
  71. REAL(wp) :: zrmw ! mean radius of Max wind of a tropical cyclone (Willoughby 2004) [m]
  72. REAL(wp) :: zwnd_r, zwnd_t ! radial and tangential components of the wind
  73. REAL(wp) :: zvmax ! timestep interpolated vmax
  74. REAL(wp) :: zrlon, zrlat ! temporary
  75. REAL(wp), DIMENSION(:,:), POINTER :: zwnd_x, zwnd_y ! zonal and meridional components of the wind
  76. REAL(wp), DIMENSION(14,5) :: ztct ! tropical cyclone track data at kt
  77. !
  78. CHARACTER(len=100) :: cn_dir ! Root directory for location of files
  79. TYPE(FLD_N), DIMENSION(1) :: slf_i ! array of namelist informations on the TC position
  80. TYPE(FLD_N) :: sn_tc ! informations about the fields to be read
  81. !!--------------------------------------------------------------------
  82. CALL wrk_alloc( jpi,jpj, zwnd_x, zwnd_y )
  83. ! ! ====================== !
  84. IF( kt == nit000 ) THEN ! First call kt=nit000 !
  85. ! ! ====================== !
  86. ! set file information (default values)
  87. cn_dir = './' ! directory in which the model is executed
  88. !
  89. ! (NB: frequency positive => hours, negative => months)
  90. ! ! file ! frequency ! variable ! time intep ! clim ! 'yearly' or ! weights ! rotation ! land/sea mask !
  91. ! ! name ! (hours) ! name ! (T/F) ! (T/F) ! 'monthly' ! filename ! pairs ! filename !
  92. sn_tc = FLD_N( 'tc_track', 6 , 'tc' , .true. , .false. , 'yearly' , '' , '' , '' )
  93. !
  94. ! Namelist is read in namsbc_core
  95. ! set sf structure
  96. ALLOCATE( sf(1), STAT=ierror )
  97. IF( ierror > 0 ) THEN
  98. CALL ctl_stop( 'wnd_cyc: unable to allocate sf structure' ) ; RETURN
  99. ENDIF
  100. ALLOCATE( sf(1)%fnow(14,5,1) )
  101. ALLOCATE( sf(1)%fdta(14,5,1,2) )
  102. slf_i(1) = sn_tc
  103. !
  104. ! fill sf with slf_i and control print
  105. CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_tc', 'tropical cyclone track', 'namsbc_tc' )
  106. !
  107. ENDIF
  108. ! Interpolation of lon lat vmax... at the current timestep
  109. ! ***************************************************************
  110. CALL fld_read( kt, nn_fsbc, sf ) ! input fields provided at the current time-step
  111. ztct(:,:) = sf(1)%fnow(:,:,1)
  112. ! Add TC wind on the grid
  113. ! ***************************************************************
  114. zwnd_x(:,:) = 0.e0
  115. zwnd_y(:,:) = 0.e0
  116. DO jtc = 1, 14
  117. !
  118. IF( ztct(jtc,jp_is1) == 1 ) THEN ! cyclone is defined in this slot ? yes--> begin
  119. zvmax = ztct(jtc,jp_vmax)
  120. zrlon = rad * ztct(jtc,jp_lon )
  121. zrlat = rad * ztct(jtc,jp_lat )
  122. zhemi = SIGN( 1. , zrlat )
  123. zinfl = 15.* rad ! clim inflow angle in Tropical Cyclones
  124. IF ( vortex == 0 ) THEN
  125. ! Vortex Holland reconstruct wind at each lon-lat position
  126. ! ********************************************************
  127. zrmw = 51.6 * EXP( -0.0223*zvmax + 0.0281* ABS( ztct(jtc,jp_lat) ) ) * 1000.
  128. ! climatological ZRMW of cyclones as a function of wind and latitude (Willoughby 2004)
  129. ! zb = 1.0036 + 0.0173 * zvmax - 0.0313 * LOG(zrmw/1000.) + 0.0087 * ABS( ztct(jtc,jp_lat) )
  130. ! fitted B parameter (Willoughby 2004)
  131. zb = 2.
  132. DO jj = 1, jpj
  133. DO ji = 1, jpi
  134. ! calc distance between TC center and any point following great circle
  135. ! source : http://www.movable-type.co.uk/scripts/latlong.html
  136. zzrglam = rad * glamt(ji,jj) - zrlon
  137. zzrgphi = rad * gphit(ji,jj)
  138. zdist = ra * ACOS( SIN( zrlat ) * SIN( zzrgphi ) &
  139. & + COS( zrlat ) * COS( zzrgphi ) * COS( zzrglam ) )
  140. IF (zdist < zrout2) THEN ! calculation of wind only to a given max radius
  141. ! shape of the wind profile
  142. zztmp = ( zrmw / ( zdist + 1.e-12 ) )**zb
  143. zztmp = zvmax * SQRT( zztmp * EXP(1. - zztmp) )
  144. IF (zdist > zrout1) THEN ! bring to zero between r_out1 and r_out2
  145. zztmp = zztmp * ( (zrout2-zdist)*1.e-6 )
  146. ENDIF
  147. ! !!! KILL EQ WINDS
  148. ! IF (SIGN( 1. , zrlat ) /= zhemi) THEN
  149. ! zztmp = 0. ! winds in other hemisphere
  150. ! IF (ABS(gphit(ji,jj)) <= 5.) zztmp=0. ! kill between 5N-5S
  151. ! ENDIF
  152. ! IF (ABS(gphit(ji,jj)) <= 10. .and. ABS(gphit(ji,jj)) > 5.) THEN
  153. ! zztmp = zztmp * ( 1./5. * (ABS(gphit(ji,jj)) - 5.) )
  154. ! !linear to zero between 10 and 5
  155. ! ENDIF
  156. ! !!! / KILL EQ
  157. IF (ABS(gphit(ji,jj)) >= 55.) zztmp = 0. ! kill weak spurious winds at high latitude
  158. zwnd_t = COS( zinfl ) * zztmp
  159. zwnd_r = - SIN( zinfl ) * zztmp
  160. ! Project radial-tangential components on zonal-meridional components
  161. ! -------------------------------------------------------------------
  162. ! ztheta = azimuthal angle of the great circle between two points
  163. zztmp = COS( zrlat ) * SIN( zzrgphi ) &
  164. & - SIN( zrlat ) * COS( zzrgphi ) * COS( zzrglam )
  165. ztheta = ATAN2( COS( zzrgphi ) * SIN( zzrglam ) , zztmp )
  166. zwnd_x(ji,jj) = zwnd_x(ji,jj) - zhemi * COS(ztheta)*zwnd_t + SIN(ztheta)*zwnd_r
  167. zwnd_y(ji,jj) = zwnd_y(ji,jj) + zhemi * SIN(ztheta)*zwnd_t + COS(ztheta)*zwnd_r
  168. ENDIF
  169. END DO
  170. END DO
  171. ELSE IF ( vortex == 1 ) THEN
  172. ! Vortex Willoughby reconstruct wind at each lon-lat position
  173. ! ***********************************************************
  174. zrmw = 46.4 * EXP( -0.0155*zvmax + 0.0169* ABS( ztct(jtc,jp_lat) ) )*1000.
  175. ! climatological ZRMW of cyclones as a function of wind and latitude (Willoughby 2006)
  176. zXX2 = 25.*1000. ! 25km fixed "near-eye" exponential decay
  177. zXX1 = ( 287.6 - 1.942 *zvmax + 7.799 *LOG(zrmw/1000.) + 1.819 *ABS( ztct(jtc,jp_lat) ) )*1000.
  178. zn = 2.1340 + 0.0077*zvmax - 0.4522*LOG(zrmw/1000.) - 0.0038*ABS( ztct(jtc,jp_lat) )
  179. zA = 0.5913 + 0.0029*zvmax - 0.1361*LOG(zrmw/1000.) - 0.0042*ABS( ztct(jtc,jp_lat) )
  180. IF (zA < 0) THEN
  181. zA=0
  182. ENDIF
  183. DO jj = 1, jpj
  184. DO ji = 1, jpi
  185. zzrglam = rad * glamt(ji,jj) - zrlon
  186. zzrgphi = rad * gphit(ji,jj)
  187. zdist = ra * ACOS( SIN( zrlat ) * SIN( zzrgphi ) &
  188. & + COS( zrlat ) * COS( zzrgphi ) * COS( zzrglam ) )
  189. IF (zdist < zrout2) THEN ! calculation of wind only to a given max radius
  190. ! shape of the wind profile
  191. IF (zdist <= zrmw) THEN ! inside the Radius of Maximum Wind
  192. zztmp = zvmax * (zdist/zrmw)**zn
  193. ELSE
  194. zztmp = zvmax * ( (1-zA) * EXP(- (zdist-zrmw)/zXX1 ) + zA * EXP(- (zdist-zrmw)/zXX2 ) )
  195. ENDIF
  196. IF (zdist > zrout1) THEN ! bring to zero between r_out1 and r_out2
  197. zztmp = zztmp * ( (zrout2-zdist)*1.e-6 )
  198. ENDIF
  199. ! !!! KILL EQ WINDS
  200. ! IF (SIGN( 1. , zrlat ) /= zhemi) THEN
  201. ! zztmp = 0. ! winds in other hemisphere
  202. ! IF (ABS(gphit(ji,jj)) <= 5.) zztmp=0. ! kill between 5N-5S
  203. ! ENDIF
  204. ! IF (ABS(gphit(ji,jj)) <= 10. .and. ABS(gphit(ji,jj)) > 5.) THEN
  205. ! zztmp = zztmp * ( 1./5. * (ABS(gphit(ji,jj)) - 5.) )
  206. ! !linear to zero between 10 and 5
  207. ! ENDIF
  208. ! !!! / KILL EQ
  209. IF (ABS(gphit(ji,jj)) >= 55.) zztmp = 0. ! kill weak spurious winds at high latitude
  210. zwnd_t = COS( zinfl ) * zztmp
  211. zwnd_r = - SIN( zinfl ) * zztmp
  212. ! Project radial-tangential components on zonal-meridional components
  213. ! -------------------------------------------------------------------
  214. ! ztheta = azimuthal angle of the great circle between two points
  215. zztmp = COS( zrlat ) * SIN( zzrgphi ) &
  216. & - SIN( zrlat ) * COS( zzrgphi ) * COS( zzrglam )
  217. ztheta = ATAN2( COS( zzrgphi ) * SIN( zzrglam ) , zztmp )
  218. zwnd_x(ji,jj) = zwnd_x(ji,jj) - zhemi * COS(ztheta)*zwnd_t + SIN(ztheta)*zwnd_r
  219. zwnd_y(ji,jj) = zwnd_y(ji,jj) + zhemi * SIN(ztheta)*zwnd_t + COS(ztheta)*zwnd_r
  220. ENDIF
  221. END DO
  222. END DO
  223. ENDIF ! / vortex Holland or Wiloughby
  224. ENDIF ! / cyclone is defined in this slot ? yes--> begin
  225. END DO ! / end simultaneous cyclones loop
  226. CALL rot_rep ( zwnd_x, zwnd_y, 'T', 'en->i', pwnd_i ) !rotation of components on ORCA grid
  227. CALL rot_rep ( zwnd_x, zwnd_y, 'T', 'en->j', pwnd_j ) !rotation of components on ORCA grid
  228. CALL wrk_dealloc( jpi,jpj, zwnd_x, zwnd_y )
  229. END SUBROUTINE wnd_cyc
  230. #endif
  231. !!======================================================================
  232. END MODULE cyclone