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.
Changeset 9190 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ICB/icbdyn.F90 – NEMO

Ignore:
Timestamp:
2018-01-06T15:18:23+01:00 (6 years ago)
Author:
gm
Message:

dev_merge_2017: OPA_SRC: style only, results unchanged

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ICB/icbdyn.F90

    r5215 r9190  
    11MODULE icbdyn 
    2  
    32   !!====================================================================== 
    43   !!                       ***  MODULE  icbdyn  *** 
    54   !! Iceberg:  time stepping routine for iceberg tracking 
    65   !!====================================================================== 
    7    !! History : 3.3.1 !  2010-01  (Martin&Adcroft) Original code 
    8    !!            -    !  2011-03  (Madec)          Part conversion to NEMO form 
    9    !!            -    !                            Removal of mapping from another grid 
    10    !!            -    !  2011-04  (Alderson)       Split into separate modules 
    11    !!            -    !  2011-05  (Alderson)       Replace broken grounding routine 
    12    !!            -    !                            with one of Gurvan's suggestions (just like 
    13    !!            -    !                            the broken one) 
     6   !! History :  3.3  !  2010-01  (Martin&Adcroft)  Original code 
     7   !!             -   !  2011-03  (Madec)  Part conversion to NEMO form 
     8   !!             -   !                    Removal of mapping from another grid 
     9   !!             -   !  2011-04  (Alderson)  Split into separate modules 
     10   !!             -   !  2011-05  (Alderson)  Replace broken grounding routine with one of 
     11   !!             -   !                       Gurvan's suggestions (just like the broken one) 
    1412   !!---------------------------------------------------------------------- 
    1513   USE par_oce        ! NEMO parameters 
     
    4139      !! ** Method  : - See Martin & Adcroft, Ocean Modelling 34, 2010 
    4240      !!---------------------------------------------------------------------- 
    43       REAL(wp)                        ::   zuvel1 , zvvel1 , zu1, zv1, zax1, zay1, zxi1 , zyj1 
    44       REAL(wp)                        ::   zuvel2 , zvvel2 , zu2, zv2, zax2, zay2, zxi2 , zyj2 
    45       REAL(wp)                        ::   zuvel3 , zvvel3 , zu3, zv3, zax3, zay3, zxi3 , zyj3 
    46       REAL(wp)                        ::   zuvel4 , zvvel4 , zu4, zv4, zax4, zay4, zxi4 , zyj4 
    47       REAL(wp)                        ::   zuvel_n, zvvel_n, zxi_n   , zyj_n 
    48       REAL(wp)                        ::   zdt, zdt_2, zdt_6, ze1, ze2 
    49       LOGICAL                         ::   ll_bounced 
    50       TYPE(iceberg), POINTER          ::   berg 
    51       TYPE(point)  , POINTER          ::   pt 
    52       INTEGER                         ::   kt 
    53       !!---------------------------------------------------------------------- 
    54  
     41      INTEGER, INTENT(in) ::   kt   ! 
     42      ! 
     43      LOGICAL  ::   ll_bounced 
     44      REAL(wp) ::   zuvel1 , zvvel1 , zu1, zv1, zax1, zay1, zxi1 , zyj1 
     45      REAL(wp) ::   zuvel2 , zvvel2 , zu2, zv2, zax2, zay2, zxi2 , zyj2 
     46      REAL(wp) ::   zuvel3 , zvvel3 , zu3, zv3, zax3, zay3, zxi3 , zyj3 
     47      REAL(wp) ::   zuvel4 , zvvel4 , zu4, zv4, zax4, zay4, zxi4 , zyj4 
     48      REAL(wp) ::   zuvel_n, zvvel_n, zxi_n   , zyj_n 
     49      REAL(wp) ::   zdt, zdt_2, zdt_6, ze1, ze2 
     50      TYPE(iceberg), POINTER ::   berg 
     51      TYPE(point)  , POINTER ::   pt 
     52      !!---------------------------------------------------------------------- 
     53      ! 
    5554      ! 4th order Runge-Kutta to solve:   d/dt X = V,  d/dt V = A 
    5655      !                    with I.C.'s:   X=X1 and V=V1 
     
    7574         pt => berg%current_point 
    7675 
    77          ll_bounced = .false. 
     76         ll_bounced = .FALSE. 
    7877 
    7978 
     
    9998         ! 
    10099         CALL icb_ground( zxi2, zxi1, zu1,   & 
    101          &                zyj2, zyj1, zv1, ll_bounced ) 
     100            &             zyj2, zyj1, zv1, ll_bounced ) 
    102101 
    103102         !                                         !**   A2 = A(X2,V2) 
     
    115114         ! 
    116115         CALL icb_ground( zxi3, zxi1, zu3,   & 
    117          &                zyj3, zyj1, zv3, ll_bounced ) 
     116            &                zyj3, zyj1, zv3, ll_bounced ) 
    118117 
    119118         !                                         !**   A3 = A(X3,V3) 
     
    131130 
    132131         CALL icb_ground( zxi4, zxi1, zu4,   & 
    133          &                zyj4, zyj1, zv4, ll_bounced ) 
     132            &             zyj4, zyj1, zv4, ll_bounced ) 
    134133 
    135134         !                                         !**   A4 = A(X4,V4) 
     
    150149 
    151150         CALL icb_ground( zxi_n, zxi1, zuvel_n,   & 
    152          &                      zyj_n, zyj1, zvvel_n, ll_bounced ) 
     151            &             zyj_n, zyj1, zvvel_n, ll_bounced ) 
    153152 
    154153         pt%uvel = zuvel_n                        !** save in berg structure 
     
    169168 
    170169   SUBROUTINE icb_ground( pi, pi0, pu,   & 
    171       &                         pj, pj0, pv, ld_bounced ) 
     170      &                   pj, pj0, pv, ld_bounced ) 
    172171      !!---------------------------------------------------------------------- 
    173172      !!                  ***  ROUTINE icb_ground  *** 
     
    216215      ibounce_method = 2 
    217216      SELECT CASE ( ibounce_method ) 
    218          CASE ( 1 ) 
    219             pi = pi0 
    220             pj = pj0 
    221             pu = 0._wp 
    222             pv = 0._wp 
    223          CASE ( 2 ) 
    224             IF( ii0 /= ii ) THEN 
    225                pi = pi0                   ! return back to the initial position 
    226                pu = 0._wp                 ! zeroing of velocity in the direction of the grounding 
    227             ENDIF 
    228             IF( ij0 /= ij ) THEN 
    229                pj = pj0                   ! return back to the initial position 
    230                pv = 0._wp                 ! zeroing of velocity in the direction of the grounding 
    231             ENDIF 
     217      CASE ( 1 ) 
     218         pi = pi0 
     219         pj = pj0 
     220         pu = 0._wp 
     221         pv = 0._wp 
     222      CASE ( 2 ) 
     223         IF( ii0 /= ii ) THEN 
     224            pi = pi0                   ! return back to the initial position 
     225            pu = 0._wp                 ! zeroing of velocity in the direction of the grounding 
     226         ENDIF 
     227         IF( ij0 /= ij ) THEN 
     228            pj = pj0                   ! return back to the initial position 
     229            pv = 0._wp                 ! zeroing of velocity in the direction of the grounding 
     230         ENDIF 
    232231      END SELECT 
    233232      ! 
     
    259258      ! 
    260259      INTEGER  ::   itloop 
    261       REAL(wp) ::   zuo, zvo, zui, zvi, zua, zva, zuwave, zvwave, zssh_x, zssh_y, zsst, zcn, zhi 
     260      REAL(wp) ::   zuo, zui, zua, zuwave, zssh_x, zsst, zcn, zhi 
     261      REAL(wp) ::   zvo, zvi, zva, zvwave, zssh_y 
    262262      REAL(wp) ::   zff, zT, zD, zW, zL, zM, zF 
    263263      REAL(wp) ::   zdrag_ocn, zdrag_atm, zdrag_ice, zwave_rad 
     
    339339            zaxe = zaxe - zdrag_ocn*(puvel -zuo) - zdrag_atm*(puvel -zua) -zdrag_ice*(puvel -zui) 
    340340            zaye = zaye - zdrag_ocn*(pvvel -zvo) - zdrag_atm*(pvvel -zva) -zdrag_ice*(pvvel -zvi) 
    341          endif 
     341         ENDIF 
    342342 
    343343         ! Solve for implicit accelerations 
     
    349349            pax     = zdetA * ( zA11*zaxe + zA12*zaye ) 
    350350            pay     = zdetA * ( zA11*zaye - zA12*zaxe ) 
    351          else 
     351         ELSE 
    352352            pax = zaxe   ;   pay = zaye 
    353          endif 
     353         ENDIF 
    354354 
    355355         zuveln = puvel0 + pdt*pax 
     
    362362         IF( zspeed > 0._wp ) THEN 
    363363            zloc_dx = MIN( pe1, pe2 )                          ! minimum grid spacing 
    364             zspeed_new = zloc_dx / pdt * rn_speed_limit     ! Speed limit as a factor of dx / dt 
     364            zspeed_new = zloc_dx / pdt * rn_speed_limit        ! Speed limit as a factor of dx / dt 
    365365            IF( zspeed_new < zspeed ) THEN 
    366366               zuveln = zuveln * ( zspeed_new / zspeed )        ! Scale velocity to reduce speed 
Note: See TracChangeset for help on using the changeset viewer.