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/2013/dev_r3853_CNRS9_ConfSetting/NEMOGCM/NEMO/OPA_SRC/SBC – NEMO

source: branches/2013/dev_r3853_CNRS9_ConfSetting/NEMOGCM/NEMO/OPA_SRC/SBC/cyclone.F90 @ 3875

Last change on this file since 3875 was 3875, checked in by clevy, 11 years ago

Configuration Setting/Step? 1, see ticket:#1074

File size: 14.3 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         !  Namelist is read in namsbc_core
106         ! set sf structure
107         ALLOCATE( sf(1), STAT=ierror )
108         IF( ierror > 0 ) THEN
109            CALL ctl_stop( 'wnd_cyc: unable to allocate sf structure' )   ;   RETURN
110         ENDIF
111         ALLOCATE( sf(1)%fnow(14,5,1) )
112         ALLOCATE( sf(1)%fdta(14,5,1,2) )
113         slf_i(1) = sn_tc
114         !
115         ! fill sf with slf_i and control print
116         CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_tc', 'tropical cyclone track', 'namsbc_tc' )
117         !
118      ENDIF
119
120
121      !       Interpolation of lon lat vmax... at the current timestep
122      !       ***************************************************************
123
124      CALL fld_read( kt, nn_fsbc, sf )                   ! input fields provided at the current time-step
125
126      ztct(:,:) = sf(1)%fnow(:,:,1)
127
128      !       Add TC wind on the grid
129      !       ***************************************************************
130
131      zwnd_x(:,:) = 0.e0 
132      zwnd_y(:,:) = 0.e0 
133     
134      DO jtc = 1, 14
135         !
136         IF( ztct(jtc,jp_is1) == 1 ) THEN                ! cyclone is defined in this slot ? yes--> begin
137
138            zvmax =       ztct(jtc,jp_vmax)
139            zrlon = rad * ztct(jtc,jp_lon )
140            zrlat = rad * ztct(jtc,jp_lat )
141            zhemi = SIGN( 1. , zrlat )
142            zinfl = 15.* rad                             ! clim inflow angle in Tropical Cyclones
143         IF ( vortex == 0 ) THEN
144
145            ! Vortex Holland reconstruct wind at each lon-lat position
146            ! ********************************************************
147            zrmw = 51.6 * EXP( -0.0223*zvmax + 0.0281* ABS( ztct(jtc,jp_lat) ) ) * 1000.
148            ! climatological ZRMW of cyclones as a function of wind and latitude (Willoughby 2004)             
149            ! zb = 1.0036 + 0.0173 * zvmax - 0.0313 * LOG(zrmw/1000.) + 0.0087 * ABS( ztct(jtc,jp_lat) )
150            ! fitted B parameter (Willoughby 2004)
151            zb = 2.
152
153            DO jj = 1, jpj
154               DO ji = 1, jpi
155
156                  ! calc distance between TC center and any point following great circle
157                  ! source : http://www.movable-type.co.uk/scripts/latlong.html
158                  zzrglam = rad * glamt(ji,jj) - zrlon
159                  zzrgphi = rad * gphit(ji,jj)
160                  zdist = ra * ACOS(  SIN( zrlat ) * SIN( zzrgphi )   &
161                     &              + COS( zrlat ) * COS( zzrgphi ) * COS( zzrglam ) )
162
163                 IF (zdist < zrout2) THEN ! calculation of wind only to a given max radius
164                  ! shape of the wind profile
165                  zztmp = ( zrmw / ( zdist + 1.e-12 ) )**zb
166                  zztmp =  zvmax * SQRT( zztmp * EXP(1. - zztmp) )   
167
168                  IF (zdist > zrout1) THEN ! bring to zero between r_out1 and r_out2
169                     zztmp = zztmp * ( (zrout2-zdist)*1.e-6 )
170                  ENDIF
171
172                  ! !!! KILL EQ WINDS
173                  ! IF (SIGN( 1. , zrlat ) /= zhemi) THEN
174                  !    zztmp = 0.                              ! winds in other hemisphere
175                  !    IF (ABS(gphit(ji,jj)) <= 5.) zztmp=0.   ! kill between 5N-5S
176                  ! ENDIF
177                  ! IF (ABS(gphit(ji,jj)) <= 10. .and. ABS(gphit(ji,jj)) > 5.) THEN
178                  !    zztmp = zztmp * ( 1./5. * (ABS(gphit(ji,jj)) - 5.) )
179                  !    !linear to zero between 10 and 5
180                  ! ENDIF
181                  ! !!! / KILL EQ
182
183                  IF (ABS(gphit(ji,jj)) >= 55.) zztmp = 0. ! kill weak spurious winds at high latitude
184
185                  zwnd_t =   COS( zinfl ) * zztmp   
186                  zwnd_r = - SIN( zinfl ) * zztmp
187
188                  ! Project radial-tangential components on zonal-meridional components
189                  ! -------------------------------------------------------------------
190                 
191                  ! ztheta = azimuthal angle of the great circle between two points
192                  zztmp = COS( zrlat ) * SIN( zzrgphi ) &
193                     &  - SIN( zrlat ) * COS( zzrgphi ) * COS( zzrglam )
194                  ztheta = ATAN2(        COS( zzrgphi ) * SIN( zzrglam ) , zztmp )
195
196                  zwnd_x(ji,jj) = zwnd_x(ji,jj) - zhemi * COS(ztheta)*zwnd_t + SIN(ztheta)*zwnd_r
197                  zwnd_y(ji,jj) = zwnd_y(ji,jj) + zhemi * SIN(ztheta)*zwnd_t + COS(ztheta)*zwnd_r
198                 ENDIF
199               END DO
200            END DO
201         
202         ELSE IF ( vortex == 1 ) THEN
203
204            ! Vortex Willoughby reconstruct wind at each lon-lat position
205            ! ***********************************************************
206            zrmw = 46.4 * EXP( -0.0155*zvmax + 0.0169* ABS( ztct(jtc,jp_lat) ) )*1000.
207            ! climatological ZRMW of cyclones as a function of wind and latitude (Willoughby 2006)
208            zXX2 = 25.*1000.                                              ! 25km fixed "near-eye" exponential decay
209            zXX1 = ( 287.6  - 1.942 *zvmax + 7.799 *LOG(zrmw/1000.) + 1.819 *ABS( ztct(jtc,jp_lat) ) )*1000.   
210            zn   =   2.1340 + 0.0077*zvmax - 0.4522*LOG(zrmw/1000.) - 0.0038*ABS( ztct(jtc,jp_lat) )           
211            zA   =   0.5913 + 0.0029*zvmax - 0.1361*LOG(zrmw/1000.) - 0.0042*ABS( ztct(jtc,jp_lat) ) 
212            IF (zA < 0) THEN
213               zA=0
214            ENDIF           
215       
216            DO jj = 1, jpj
217               DO ji = 1, jpi
218                                 
219                  zzrglam = rad * glamt(ji,jj) - zrlon
220                  zzrgphi = rad * gphit(ji,jj)
221                  zdist = ra * ACOS(  SIN( zrlat ) * SIN( zzrgphi )   &
222                     &              + COS( zrlat ) * COS( zzrgphi ) * COS( zzrglam ) )
223
224                 IF (zdist < zrout2) THEN ! calculation of wind only to a given max radius
225               
226                  ! shape of the wind profile                     
227                  IF (zdist <= zrmw) THEN     ! inside the Radius of Maximum Wind
228                     zztmp  = zvmax * (zdist/zrmw)**zn
229                  ELSE
230                     zztmp  = zvmax * ( (1-zA) * EXP(- (zdist-zrmw)/zXX1 ) + zA * EXP(- (zdist-zrmw)/zXX2 ) )
231                  ENDIF
232
233                  IF (zdist > zrout1) THEN ! bring to zero between r_out1 and r_out2
234                     zztmp = zztmp * ( (zrout2-zdist)*1.e-6 )
235                  ENDIF
236
237                  ! !!! KILL EQ WINDS
238                  ! IF (SIGN( 1. , zrlat ) /= zhemi) THEN
239                  !    zztmp = 0.                              ! winds in other hemisphere
240                  !    IF (ABS(gphit(ji,jj)) <= 5.) zztmp=0.   ! kill between 5N-5S
241                  ! ENDIF
242                  ! IF (ABS(gphit(ji,jj)) <= 10. .and. ABS(gphit(ji,jj)) > 5.) THEN
243                  !    zztmp = zztmp * ( 1./5. * (ABS(gphit(ji,jj)) - 5.) )
244                  !    !linear to zero between 10 and 5
245                  ! ENDIF
246                  ! !!! / KILL EQ
247
248                  IF (ABS(gphit(ji,jj)) >= 55.) zztmp = 0. ! kill weak spurious winds at high latitude
249
250                  zwnd_t =   COS( zinfl ) * zztmp   
251                  zwnd_r = - SIN( zinfl ) * zztmp
252
253                  ! Project radial-tangential components on zonal-meridional components
254                  ! -------------------------------------------------------------------
255                 
256                  ! ztheta = azimuthal angle of the great circle between two points
257                  zztmp = COS( zrlat ) * SIN( zzrgphi ) &
258                     &  - SIN( zrlat ) * COS( zzrgphi ) * COS( zzrglam )
259                  ztheta = ATAN2(        COS( zzrgphi ) * SIN( zzrglam ) , zztmp )
260
261                  zwnd_x(ji,jj) = zwnd_x(ji,jj) - zhemi * COS(ztheta)*zwnd_t + SIN(ztheta)*zwnd_r
262                  zwnd_y(ji,jj) = zwnd_y(ji,jj) + zhemi * SIN(ztheta)*zwnd_t + COS(ztheta)*zwnd_r
263                 
264                 ENDIF
265               END DO
266            END DO
267         ENDIF                                         ! / vortex Holland or Wiloughby
268         ENDIF                                           ! / cyclone is defined in this slot ? yes--> begin
269      END DO ! / end simultaneous cyclones loop
270
271      CALL rot_rep ( zwnd_x, zwnd_y, 'T', 'en->i', pwnd_i ) !rotation of components on ORCA grid
272      CALL rot_rep ( zwnd_x, zwnd_y, 'T', 'en->j', pwnd_j ) !rotation of components on ORCA grid
273
274      CALL wrk_dealloc( jpi,jpj, zwnd_x, zwnd_y )
275
276   END SUBROUTINE wnd_cyc
277
278#endif
279
280   !!======================================================================
281END MODULE cyclone
Note: See TracBrowser for help on using the repository browser.