New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
cyclone.F90 in branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/OPA_SRC/SBC – NEMO

source: branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/OPA_SRC/SBC/cyclone.F90 @ 3559

Last change on this file since 3559 was 3559, checked in by cetlod, 11 years ago

branch:2012/dev_r3438_LOCEAN15_PISLOB minor changes for Tropical Cyclones module

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