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 14789 for NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/ICE/icedyn_rdgrft.F90 – NEMO

Ignore:
Timestamp:
2021-05-05T13:18:04+02:00 (3 years ago)
Author:
mcastril
Message:

[2021/HPC-11_mcastril_HPDAonline_DiagGPU] Update externals

Location:
NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
         5^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
         8^/vendors/PPR@HEAD            ext/PPR 
        89 
        910# SETTE 
        10 ^/utils/CI/sette@13559        sette 
         11^/utils/CI/sette@14244        sette 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/ICE/icedyn_rdgrft.F90

    r13618 r14789  
    22   !!====================================================================== 
    33   !!                       ***  MODULE icedyn_rdgrft *** 
    4    !!    sea-ice : Mechanical impact on ice thickness distribution       
     4   !!    sea-ice : Mechanical impact on ice thickness distribution 
    55   !!====================================================================== 
    6    !! History :       !  2006-02  (M. Vancoppenolle) Original code  
     6   !! History :       !  2006-02  (M. Vancoppenolle) Original code 
    77   !!            4.0  !  2018     (many people)      SI3 [aka Sea Ice cube] 
    88   !!---------------------------------------------------------------------- 
     
    1616   !!---------------------------------------------------------------------- 
    1717   USE dom_oce        ! ocean domain 
    18    USE phycst         ! physical constants (ocean directory)  
     18   USE phycst         ! physical constants (ocean directory) 
    1919   USE sbc_oce , ONLY : sss_m, sst_m   ! surface boundary condition: ocean fields 
    2020   USE ice1D          ! sea-ice: thermodynamics 
     
    5959   LOGICAL  ::   ln_str_H79       ! ice strength parameterization (Hibler79) 
    6060   REAL(wp) ::   rn_pstar         ! determines ice strength, Hibler JPO79 
    61    REAL(wp) ::   rn_csrdg         ! fraction of shearing energy contributing to ridging             
     61   REAL(wp) ::   rn_csrdg         ! fraction of shearing energy contributing to ridging 
    6262   LOGICAL  ::   ln_partf_lin     ! participation function linear (Thorndike et al. (1975)) 
    6363   REAL(wp) ::   rn_gstar         !    fractional area of young ice contributing to ridging 
    6464   LOGICAL  ::   ln_partf_exp     ! participation function exponential (Lipscomb et al. (2007)) 
    6565   REAL(wp) ::   rn_astar         !    equivalent of G* for an exponential participation function 
    66    LOGICAL  ::   ln_ridging       ! ridging of ice or not                         
     66   LOGICAL  ::   ln_ridging       ! ridging of ice or not 
    6767   REAL(wp) ::   rn_hstar         !    thickness that determines the maximal thickness of ridged ice 
    6868   REAL(wp) ::   rn_porordg       !    initial porosity of ridges (0.3 regular value) 
    6969   REAL(wp) ::   rn_fsnwrdg       !    fractional snow loss to the ocean during ridging 
    7070   REAL(wp) ::   rn_fpndrdg       !    fractional pond loss to the ocean during ridging 
    71    LOGICAL  ::   ln_rafting       ! rafting of ice or not                         
    72    REAL(wp) ::   rn_hraft         !    threshold thickness (m) for rafting / ridging  
     71   LOGICAL  ::   ln_rafting       ! rafting of ice or not 
     72   REAL(wp) ::   rn_hraft         !    threshold thickness (m) for rafting / ridging 
    7373   REAL(wp) ::   rn_craft         !    coefficient for smoothness of the hyperbolic tangent in rafting 
    7474   REAL(wp) ::   rn_fsnwrft       !    fractional snow loss to the ocean during rafting 
     
    124124      !!                Hibler, W. D. III, 1980, MWR, 108, 1943-1973, 1980. 
    125125      !!                Rothrock, D. A., 1975: JGR, 80, 4514-4519. 
    126       !!                Thorndike et al., 1975, JGR, 80, 4501-4513.  
     126      !!                Thorndike et al., 1975, JGR, 80, 4501-4513. 
    127127      !!                Bitz et al., JGR, 2001 
    128128      !!                Amundrud and Melling, JGR 2005 
    129       !!                Babko et al., JGR 2002  
     129      !!                Babko et al., JGR 2002 
    130130      !! 
    131131      !!     This routine is based on CICE code and authors William H. Lipscomb, 
     
    135135      !! 
    136136      INTEGER  ::   ji, jj, jk, jl             ! dummy loop index 
    137       INTEGER  ::   iter, iterate_ridging      ! local integer  
     137      INTEGER  ::   iter, iterate_ridging      ! local integer 
    138138      INTEGER  ::   ipti                       ! local integer 
    139139      REAL(wp) ::   zfac                       ! local scalar 
    140140      INTEGER , DIMENSION(jpij) ::   iptidx        ! compute ridge/raft or not 
    141141      REAL(wp), DIMENSION(jpij) ::   zdivu, zdelt  ! 1D divu_i & delta_i 
    142       ! 
    143       INTEGER, PARAMETER ::   jp_itermax = 20     
     142      REAL(wp), DIMENSION(jpij) ::   zconv         ! 1D rdg_conv (if EAP rheology) 
     143      ! 
     144      INTEGER, PARAMETER ::   jp_itermax = 20 
    144145      !!------------------------------------------------------------------- 
    145146      ! controls 
     
    152153         IF(lwp) WRITE(numout,*)'ice_dyn_rdgrft: ice ridging and rafting' 
    153154         IF(lwp) WRITE(numout,*)'~~~~~~~~~~~~~~' 
    154       ENDIF       
     155      ENDIF 
    155156 
    156157      !-------------------------------- 
     
    167168         ENDIF 
    168169      END_2D 
    169        
     170 
    170171      !-------------------------------------------------------- 
    171172      ! 1) Dynamical inputs (closing rate, divergence, opening) 
    172173      !-------------------------------------------------------- 
    173174      IF( npti > 0 ) THEN 
    174          
     175 
    175176         ! just needed here 
    176177         CALL tab_2d_1d( npti, nptidx(1:npti), zdelt   (1:npti)      , delta_i ) 
     178         CALL tab_2d_1d( npti, nptidx(1:npti), zconv   (1:npti)      , rdg_conv ) 
    177179         ! needed here and in the iteration loop 
    178180         CALL tab_2d_1d( npti, nptidx(1:npti), zdivu   (1:npti)      , divu_i) ! zdivu is used as a work array here (no change in divu_i) 
     
    182184 
    183185         DO ji = 1, npti 
    184             ! closing_net = rate at which open water area is removed + ice area removed by ridging  
     186            ! closing_net = rate at which open water area is removed + ice area removed by ridging 
    185187            !                                                        - ice area added in new ridges 
    186             closing_net(ji) = rn_csrdg * 0.5_wp * ( zdelt(ji) - ABS( zdivu(ji) ) ) - MIN( zdivu(ji), 0._wp ) 
     188            IF( ln_rhg_EVP .OR. ln_rhg_VP ) & 
     189               &               closing_net(ji) = rn_csrdg * 0.5_wp * ( zdelt(ji) - ABS( zdivu(ji) ) ) - MIN( zdivu(ji), 0._wp ) 
     190            IF( ln_rhg_EAP )   closing_net(ji) = zconv(ji) 
    187191            ! 
    188192            IF( zdivu(ji) < 0._wp )   closing_net(ji) = MAX( closing_net(ji), -zdivu(ji) )   ! make sure the closing rate is large enough 
     
    221225      !----------------- 
    222226      IF( npti > 0 ) THEN 
    223           
     227 
    224228         CALL ice_dyn_1d2d( 1 )            ! --- Move to 1D arrays --- ! 
    225229 
    226230         iter            = 1 
    227          iterate_ridging = 1       
     231         iterate_ridging = 1 
    228232         !                                                        !----------------------! 
    229233         DO WHILE( iterate_ridging > 0 .AND. iter < jp_itermax )  !  ridging iterations  ! 
     
    264268 
    265269      ENDIF 
    266     
    267       CALL ice_var_agg( 1 )  
     270 
     271      CALL ice_var_agg( 1 ) 
    268272 
    269273      ! controls 
     
    283287      !! ** Purpose :   preparation for ridging calculations 
    284288      !! 
    285       !! ** Method  :   Compute the thickness distribution of the ice and open water  
     289      !! ** Method  :   Compute the thickness distribution of the ice and open water 
    286290      !!                participating in ridging and of the resulting ridges. 
    287291      !!------------------------------------------------------------------- 
    288       REAL(wp), DIMENSION(:)  , INTENT(in) ::   pato_i, pclosing_net  
    289       REAL(wp), DIMENSION(:,:), INTENT(in) ::   pa_i, pv_i  
     292      REAL(wp), DIMENSION(:)  , INTENT(in) ::   pato_i, pclosing_net 
     293      REAL(wp), DIMENSION(:,:), INTENT(in) ::   pa_i, pv_i 
    290294      !! 
    291295      INTEGER  ::   ji, jl                     ! dummy loop indices 
    292296      REAL(wp) ::   z1_gstar, z1_astar, zhmean, zfac   ! local scalar 
    293       REAL(wp), DIMENSION(jpij)        ::   zasum, z1_asum, zaksum   ! sum of a_i+ato_i and reverse  
     297      REAL(wp), DIMENSION(jpij)        ::   zasum, z1_asum, zaksum   ! sum of a_i+ato_i and reverse 
    294298      REAL(wp), DIMENSION(jpij,jpl)    ::   zhi                      ! ice thickness 
    295299      REAL(wp), DIMENSION(jpij,-1:jpl) ::   zGsum                    ! zGsum(n) = sum of areas in categories 0 to n 
     
    317321      ! This is analogous to 
    318322      !   a(h) = b(h)g(h) as defined in Thorndike et al. (1975). 
    319       !   assuming b(h) = (2/Gstar) * (1 - G(h)/Gstar).  
     323      !   assuming b(h) = (2/Gstar) * (1 - G(h)/Gstar). 
    320324      ! 
    321325      ! apartf = integrating b(h)g(h) between the category boundaries 
     
    342346      ! 
    343347      IF( ln_partf_lin ) THEN          !--- Linear formulation (Thorndike et al., 1975) 
    344          DO jl = 0, jpl     
     348         DO jl = 0, jpl 
    345349            DO ji = 1, npti 
    346350               IF    ( zGsum(ji,jl)   < rn_gstar ) THEN 
     
    357361         ! 
    358362      ELSEIF( ln_partf_exp ) THEN      !--- Exponential, more stable formulation (Lipscomb et al, 2007) 
    359          !                         
     363         ! 
    360364         zfac = 1._wp / ( 1._wp - EXP(-z1_astar) ) 
    361365         DO jl = -1, jpl 
     
    387391            END DO 
    388392         END DO 
    389       ELSEIF( ln_rafting .AND. .NOT. ln_ridging ) THEN   !- rafting alone    
     393      ELSEIF( ln_rafting .AND. .NOT. ln_ridging ) THEN   !- rafting alone 
    390394         DO jl = 1, jpl 
    391395            DO ji = 1, npti 
     
    398402            DO ji = 1, npti 
    399403               aridge(ji,jl) = 0._wp 
    400                araft (ji,jl) = 0._wp          
     404               araft (ji,jl) = 0._wp 
    401405            END DO 
    402406         END DO 
     
    407411      ! Compute max and min ridged ice thickness for each ridging category. 
    408412      ! Assume ridged ice is uniformly distributed between hrmin and hrmax. 
    409       !  
     413      ! 
    410414      ! This parameterization is a modified version of Hibler (1980). 
    411415      ! The mean ridging thickness, zhmean, is proportional to hi^(0.5) 
    412416      !  and for very thick ridging ice must be >= hrdg_hi_min*hi 
    413417      ! 
    414       ! The minimum ridging thickness, hrmin, is equal to 2*hi  
     418      ! The minimum ridging thickness, hrmin, is equal to 2*hi 
    415419      !  (i.e., rafting) and for very thick ridging ice is 
    416420      !  constrained by hrmin <= (zhmean + hi)/2. 
    417       !  
     421      ! 
    418422      ! The maximum ridging thickness, hrmax, is determined by zhmean and hrmin. 
    419423      ! 
     
    441445                  &                    + araft (ji,jl) * ( 1._wp - hi_hrft ) 
    442446            ELSE 
    443                hrmin  (ji,jl) = 0._wp  
    444                hrmax  (ji,jl) = 0._wp  
    445                hraft  (ji,jl) = 0._wp  
     447               hrmin  (ji,jl) = 0._wp 
     448               hrmax  (ji,jl) = 0._wp 
     449               hraft  (ji,jl) = 0._wp 
    446450               hi_hrdg(ji,jl) = 1._wp 
    447451            ENDIF 
     
    451455      ! 3) closing_gross 
    452456      !----------------- 
    453       ! Based on the ITD of ridging and ridged ice, convert the net closing rate to a gross closing rate.   
     457      ! Based on the ITD of ridging and ridged ice, convert the net closing rate to a gross closing rate. 
    454458      ! NOTE: 0 < aksum <= 1 
    455459      WHERE( zaksum(1:npti) > epsi10 )   ;   closing_gross(1:npti) = pclosing_net(1:npti) / zaksum(1:npti) 
    456460      ELSEWHERE                          ;   closing_gross(1:npti) = 0._wp 
    457461      END WHERE 
    458        
     462 
    459463      ! correction to closing rate if excessive ice removal 
    460464      !---------------------------------------------------- 
     
    468472            ENDIF 
    469473         END DO 
    470       END DO       
     474      END DO 
    471475 
    472476      ! 4) correction to opening if excessive open water removal 
     
    474478      ! Reduce the closing rate if more than 100% of the open water would be removed 
    475479      ! Reduce the opening rate in proportion 
    476       DO ji = 1, npti   
     480      DO ji = 1, npti 
    477481         zfac = pato_i(ji) + ( opning(ji) - apartf(ji,0) * closing_gross(ji) ) * rDt_ice 
    478482         IF( zfac < 0._wp ) THEN           ! would lead to negative ato_i 
    479             opning(ji) = apartf(ji,0) * closing_gross(ji) - pato_i(ji) * r1_Dt_ice  
     483            opning(ji) = apartf(ji,0) * closing_gross(ji) - pato_i(ji) * r1_Dt_ice 
    480484         ELSEIF( zfac > zasum(ji) ) THEN   ! would lead to ato_i > asum 
    481             opning(ji) = apartf(ji,0) * closing_gross(ji) + ( zasum(ji) - pato_i(ji) ) * r1_Dt_ice  
     485            opning(ji) = apartf(ji,0) * closing_gross(ji) + ( zasum(ji) - pato_i(ji) ) * r1_Dt_ice 
    482486         ENDIF 
    483487      END DO 
     
    499503      REAL(wp) ::   hL, hR, farea              ! left and right limits of integration and new area going to jl2 
    500504      REAL(wp) ::   vsw                        ! vol of water trapped into ridges 
    501       REAL(wp) ::   afrdg, afrft               ! fraction of category area ridged/rafted  
     505      REAL(wp) ::   afrdg, afrft               ! fraction of category area ridged/rafted 
    502506      REAL(wp)                  ::   airdg1, oirdg1, aprdg1, virdg1, sirdg1 
    503507      REAL(wp)                  ::   airft1, oirft1, aprft1 
     
    512516      REAL(wp), DIMENSION(jpij,nlay_s) ::   esrft     ! snow energy of rafting ice 
    513517      REAL(wp), DIMENSION(jpij,nlay_i) ::   eirft     ! ice  energy of rafting ice 
    514       REAL(wp), DIMENSION(jpij,nlay_s) ::   esrdg     ! enth*volume of new ridges       
     518      REAL(wp), DIMENSION(jpij,nlay_s) ::   esrdg     ! enth*volume of new ridges 
    515519      REAL(wp), DIMENSION(jpij,nlay_i) ::   eirdg     ! enth*volume of new ridges 
    516520      ! 
     
    525529         ato_i_1d(ji) = MAX( 0._wp, ato_i_1d(ji) + ( opning(ji) - apartf(ji,0) * closing_gross(ji) ) * rDt_ice ) 
    526530      END DO 
    527        
    528       ! 2) compute categories in which ice is removed (jl1)  
     531 
     532      ! 2) compute categories in which ice is removed (jl1) 
    529533      !---------------------------------------------------- 
    530534      DO jl1 = 1, jpl 
    531535 
    532          IF( nn_icesal /= 2 )  THEN       
     536         IF( nn_icesal /= 2 )  THEN 
    533537            CALL tab_2d_1d( npti, nptidx(1:npti), s_i_1d(1:npti), s_i(:,:,jl1) ) 
    534538         ENDIF 
     
    541545               ELSE                                 ;   z1_ai(ji) = 0._wp 
    542546               ENDIF 
    543                 
     547 
    544548               ! area of ridging / rafting ice (airdg1) and of new ridge (airdg2) 
    545549               airdg1 = aridge(ji,jl1) * closing_gross(ji) * rDt_ice 
     
    567571               sirdg2(ji) = sv_i_2d(ji,jl1)   * afrdg + vsw * sss_1d(ji) 
    568572               oirdg1     = oa_i_2d(ji,jl1)   * afrdg 
    569                oirdg2(ji) = oa_i_2d(ji,jl1)   * afrdg * hi_hrdg(ji,jl1)  
     573               oirdg2(ji) = oa_i_2d(ji,jl1)   * afrdg * hi_hrdg(ji,jl1) 
    570574 
    571575               virft(ji)  = v_i_2d (ji,jl1)   * afrft 
    572576               vsrft(ji)  = v_s_2d (ji,jl1)   * afrft 
    573                sirft(ji)  = sv_i_2d(ji,jl1)   * afrft  
    574                oirft1     = oa_i_2d(ji,jl1)   * afrft  
    575                oirft2(ji) = oa_i_2d(ji,jl1)   * afrft * hi_hrft  
    576  
    577                IF ( ln_pnd_LEV ) THEN 
     577               sirft(ji)  = sv_i_2d(ji,jl1)   * afrft 
     578               oirft1     = oa_i_2d(ji,jl1)   * afrft 
     579               oirft2(ji) = oa_i_2d(ji,jl1)   * afrft * hi_hrft 
     580 
     581               IF ( ln_pnd_LEV .OR. ln_pnd_TOPO ) THEN 
    578582                  aprdg1     = a_ip_2d(ji,jl1) * afrdg 
    579583                  aprdg2(ji) = a_ip_2d(ji,jl1) * afrdg * hi_hrdg(ji,jl1) 
     
    591595               wfx_dyn_1d(ji) = wfx_dyn_1d(ji) - vsw * rhoi * r1_Dt_ice   ! increase in ice volume due to seawater frozen in voids 
    592596               sfx_dyn_1d(ji) = sfx_dyn_1d(ji) - vsw * sss_1d(ji) * rhoi * r1_Dt_ice 
    593                hfx_dyn_1d(ji) = hfx_dyn_1d(ji) + ersw(ji) * r1_Dt_ice          ! > 0 [W.m-2]  
     597               hfx_dyn_1d(ji) = hfx_dyn_1d(ji) + ersw(ji) * r1_Dt_ice          ! > 0 [W.m-2] 
    594598 
    595599               ! Put the snow lost by ridging into the ocean 
     
    602606                  sirdg2(ji)     = sirdg2(ji)     - vsw * ( sss_1d(ji) - s_i_1d(ji) )       ! ridge salinity = s_i 
    603607                  sfx_bri_1d(ji) = sfx_bri_1d(ji) + sss_1d(ji) * vsw * rhoi * r1_Dt_ice  &  ! put back sss_m into the ocean 
    604                      &                            - s_i_1d(ji) * vsw * rhoi * r1_Dt_ice     ! and get  s_i  from the ocean  
     608                     &                            - s_i_1d(ji) * vsw * rhoi * r1_Dt_ice     ! and get  s_i  from the ocean 
    605609               ENDIF 
    606610 
     
    612616               sv_i_2d(ji,jl1) = sv_i_2d(ji,jl1) - sirdg1    - sirft(ji) 
    613617               oa_i_2d(ji,jl1) = oa_i_2d(ji,jl1) - oirdg1    - oirft1 
    614                IF ( ln_pnd_LEV ) THEN 
     618               IF ( ln_pnd_LEV .OR. ln_pnd_TOPO ) THEN 
    615619                  a_ip_2d(ji,jl1) = a_ip_2d(ji,jl1) - aprdg1    - aprft1 
    616620                  v_ip_2d(ji,jl1) = v_ip_2d(ji,jl1) - vprdg(ji) - vprft(ji) 
     
    639643                  ! Remove energy of new ridge to each category jl1 
    640644                  !------------------------------------------------- 
    641                   ze_s_2d(ji,jk,jl1) = ze_s_2d(ji,jk,jl1) * ( 1._wp - afrdg - afrft )  
     645                  ze_s_2d(ji,jk,jl1) = ze_s_2d(ji,jk,jl1) * ( 1._wp - afrdg - afrft ) 
    642646               ENDIF 
    643647            END DO 
    644648         END DO 
    645                    
     649 
    646650         ! special loop for e_i because of layers jk 
    647651         DO jk = 1, nlay_i 
     
    657661                  ! Remove energy of new ridge to each category jl1 
    658662                  !------------------------------------------------- 
    659                   ze_i_2d(ji,jk,jl1) = ze_i_2d(ji,jk,jl1) * ( 1._wp - afrdg - afrft )  
     663                  ze_i_2d(ji,jk,jl1) = ze_i_2d(ji,jk,jl1) * ( 1._wp - afrdg - afrft ) 
    660664               ENDIF 
    661665            END DO 
    662666         END DO 
    663           
    664          ! 3) compute categories in which ice is added (jl2)  
     667 
     668         ! 3) compute categories in which ice is added (jl2) 
    665669         !-------------------------------------------------- 
    666670         itest_rdg(1:npti) = 0 
    667671         itest_rft(1:npti) = 0 
    668          DO jl2  = 1, jpl  
     672         DO jl2  = 1, jpl 
    669673            ! 
    670674            DO ji = 1, npti 
     
    681685                     itest_rdg(ji) = 1   ! test for conservation 
    682686                  ELSE 
    683                      farea    = 0._wp  
    684                      fvol(ji) = 0._wp                   
     687                     farea    = 0._wp 
     688                     fvol(ji) = 0._wp 
    685689                  ENDIF 
    686690 
     
    697701                  ! Sometimes thickness is larger than hi_max(jpl) because of advection scheme (for very small areas) 
    698702                  ! Then ice volume is removed from one category but the ridging/rafting scheme 
    699                   ! does not know where to move it, leading to a conservation issue.   
     703                  ! does not know where to move it, leading to a conservation issue. 
    700704                  IF( itest_rdg(ji) == 0 .AND. jl2 == jpl ) THEN   ;   farea = 1._wp   ;   fvol(ji) = 1._wp   ;   ENDIF 
    701705                  IF( itest_rft(ji) == 0 .AND. jl2 == jpl )      zswitch(ji) = 1._wp 
     
    709713                  v_s_2d (ji,jl2) = v_s_2d (ji,jl2) + ( vsrdg (ji) * rn_fsnwrdg * fvol(ji)  +  & 
    710714                     &                                  vsrft (ji) * rn_fsnwrft * zswitch(ji) ) 
    711                   IF ( ln_pnd_LEV ) THEN 
     715                  IF ( ln_pnd_LEV .OR. ln_pnd_TOPO ) THEN 
    712716                     v_ip_2d (ji,jl2) = v_ip_2d(ji,jl2) + (   vprdg (ji) * rn_fpndrdg * fvol   (ji)   & 
    713717                        &                                   + vprft (ji) * rn_fpndrft * zswitch(ji)   ) 
    714                      a_ip_2d (ji,jl2) = a_ip_2d(ji,jl2) + (   aprdg2(ji) * rn_fpndrdg * farea         &  
     718                     a_ip_2d (ji,jl2) = a_ip_2d(ji,jl2) + (   aprdg2(ji) * rn_fpndrdg * farea         & 
    715719                        &                                   + aprft2(ji) * rn_fpndrft * zswitch(ji)   ) 
    716720                     IF ( ln_pnd_lids ) THEN 
     
    719723                     ENDIF 
    720724                  ENDIF 
    721                    
     725 
    722726               ENDIF 
    723727 
     
    737741               DO ji = 1, npti 
    738742                  IF( apartf(ji,jl1) > 0._wp .AND. closing_gross(ji) > 0._wp )   & 
    739                      &   ze_i_2d(ji,jk,jl2) = ze_i_2d(ji,jk,jl2) + eirdg(ji,jk) * fvol(ji) + eirft(ji,jk) * zswitch(ji)                   
     743                     &   ze_i_2d(ji,jk,jl2) = ze_i_2d(ji,jk,jl2) + eirdg(ji,jk) * fvol(ji) + eirft(ji,jk) * zswitch(ji) 
    740744               END DO 
    741745            END DO 
     
    759763      !! ** Purpose :   computes ice strength used in dynamics routines of ice thickness 
    760764      !! 
    761       !! ** Method  :   Compute the strength of the ice pack, defined as the energy (J m-2)  
     765      !! ** Method  :   Compute the strength of the ice pack, defined as the energy (J m-2) 
    762766      !!              dissipated per unit area removed from the ice pack under compression, 
    763767      !!              and assumed proportional to the change in potential energy caused 
     
    776780      !                              !--------------------------------------------------! 
    777781         strength(:,:) = rn_pstar * SUM( v_i(:,:,:), dim=3 ) * EXP( -rn_crhg * ( 1._wp - SUM( a_i(:,:,:), dim=3 ) ) ) 
    778          ismooth = 1 
     782         ismooth = 1    ! original code 
     783!        ismooth = 0    ! try for EAP stability 
    779784         !                           !--------------------------------------------------! 
    780785      ELSE                           ! Zero strength                                    ! 
     
    788793      CASE( 1 )               !--- Spatial smoothing 
    789794         DO_2D( 0, 0, 0, 0 ) 
    790             IF ( SUM( a_i(ji,jj,:) ) > 0._wp ) THEN  
     795            IF ( SUM( a_i(ji,jj,:) ) > 0._wp ) THEN 
    791796               zworka(ji,jj) = ( 4.0 * strength(ji,jj)              & 
    792                   &                  + strength(ji-1,jj) * tmask(ji-1,jj,1) + strength(ji+1,jj) * tmask(ji+1,jj,1) &   
     797                  &                  + strength(ji-1,jj) * tmask(ji-1,jj,1) + strength(ji+1,jj) * tmask(ji+1,jj,1) & 
    793798                  &                  + strength(ji,jj-1) * tmask(ji,jj-1,1) + strength(ji,jj+1) * tmask(ji,jj+1,1) & 
    794799                  &            ) / ( 4.0 + tmask(ji-1,jj,1) + tmask(ji+1,jj,1) + tmask(ji,jj-1,1) + tmask(ji,jj+1,1) ) 
     
    797802            ENDIF 
    798803         END_2D 
    799           
     804 
    800805         DO_2D( 0, 0, 0, 0 ) 
    801806            strength(ji,jj) = zworka(ji,jj) 
     
    810815         ! 
    811816         DO_2D( 0, 0, 0, 0 ) 
    812             IF ( SUM( a_i(ji,jj,:) ) > 0._wp ) THEN  
     817            IF ( SUM( a_i(ji,jj,:) ) > 0._wp ) THEN 
    813818               itframe = 1 ! number of time steps for the running mean 
    814819               IF ( zstrp1(ji,jj) > 0._wp ) itframe = itframe + 1 
     
    826831   END SUBROUTINE ice_strength 
    827832 
    828     
     833 
    829834   SUBROUTINE ice_dyn_1d2d( kn ) 
    830835      !!----------------------------------------------------------------------- 
    831       !!                   ***  ROUTINE ice_dyn_1d2d ***  
    832       !!                  
     836      !!                   ***  ROUTINE ice_dyn_1d2d *** 
     837      !! 
    833838      !! ** Purpose :   move arrays from 1d to 2d and the reverse 
    834839      !!----------------------------------------------------------------------- 
     
    900905      ! 
    901906   END SUBROUTINE ice_dyn_1d2d 
    902     
     907 
    903908 
    904909   SUBROUTINE ice_dyn_rdgrft_init 
     
    906911      !!                  ***  ROUTINE ice_dyn_rdgrft_init *** 
    907912      !! 
    908       !! ** Purpose :   Physical constants and parameters linked  
     913      !! ** Purpose :   Physical constants and parameters linked 
    909914      !!                to the mechanical ice redistribution 
    910915      !! 
    911       !! ** Method  :   Read the namdyn_rdgrft namelist  
    912       !!                and check the parameters values  
     916      !! ** Method  :   Read the namdyn_rdgrft namelist 
     917      !!                and check the parameters values 
    913918      !!                called at the first timestep (nit000) 
    914919      !! 
     
    920925         &                    rn_csrdg  ,                    & 
    921926         &                    ln_partf_lin, rn_gstar,        & 
    922          &                    ln_partf_exp, rn_astar,        &  
    923          &                    ln_ridging, rn_hstar, rn_porordg, rn_fsnwrdg, rn_fpndrdg,  &  
     927         &                    ln_partf_exp, rn_astar,        & 
     928         &                    ln_ridging, rn_hstar, rn_porordg, rn_fsnwrdg, rn_fpndrdg,  & 
    924929         &                    ln_rafting, rn_hraft, rn_craft  , rn_fsnwrft, rn_fpndrft 
    925930      !!------------------------------------------------------------------- 
     
    936941         WRITE(numout,*) '~~~~~~~~~~~~~~~~~~' 
    937942         WRITE(numout,*) '   Namelist namdyn_rdgrft:' 
    938          WRITE(numout,*) '      ice strength parameterization Hibler (1979)              ln_str_H79   = ', ln_str_H79  
     943         WRITE(numout,*) '      ice strength parameterization Hibler (1979)              ln_str_H79   = ', ln_str_H79 
    939944         WRITE(numout,*) '            1st bulk-rheology parameter                        rn_pstar     = ', rn_pstar 
    940945         WRITE(numout,*) '            2nd bulk-rhelogy parameter                         rn_crhg      = ', rn_crhg 
    941          WRITE(numout,*) '      Fraction of shear energy contributing to ridging         rn_csrdg     = ', rn_csrdg  
     946         WRITE(numout,*) '      Fraction of shear energy contributing to ridging         rn_csrdg     = ', rn_csrdg 
    942947         WRITE(numout,*) '      linear ridging participation function                    ln_partf_lin = ', ln_partf_lin 
    943948         WRITE(numout,*) '            Fraction of ice coverage contributing to ridging   rn_gstar     = ', rn_gstar 
     
    947952         WRITE(numout,*) '            max ridged ice thickness                           rn_hstar     = ', rn_hstar 
    948953         WRITE(numout,*) '            Initial porosity of ridges                         rn_porordg   = ', rn_porordg 
    949          WRITE(numout,*) '            Fraction of snow volume conserved during ridging   rn_fsnwrdg   = ', rn_fsnwrdg  
    950          WRITE(numout,*) '            Fraction of pond volume conserved during ridging   rn_fpndrdg   = ', rn_fpndrdg  
     954         WRITE(numout,*) '            Fraction of snow volume conserved during ridging   rn_fsnwrdg   = ', rn_fsnwrdg 
     955         WRITE(numout,*) '            Fraction of pond volume conserved during ridging   rn_fpndrdg   = ', rn_fpndrdg 
    951956         WRITE(numout,*) '      Rafting of ice sheets or not                             ln_rafting   = ', ln_rafting 
    952957         WRITE(numout,*) '            Parmeter thickness (threshold between ridge-raft)  rn_hraft     = ', rn_hraft 
    953          WRITE(numout,*) '            Rafting hyperbolic tangent coefficient             rn_craft     = ', rn_craft   
    954          WRITE(numout,*) '            Fraction of snow volume conserved during rafting   rn_fsnwrft   = ', rn_fsnwrft  
    955          WRITE(numout,*) '            Fraction of pond volume conserved during rafting   rn_fpndrft   = ', rn_fpndrft  
     958         WRITE(numout,*) '            Rafting hyperbolic tangent coefficient             rn_craft     = ', rn_craft 
     959         WRITE(numout,*) '            Fraction of snow volume conserved during rafting   rn_fsnwrft   = ', rn_fsnwrft 
     960         WRITE(numout,*) '            Fraction of pond volume conserved during rafting   rn_fpndrft   = ', rn_fpndrft 
    956961      ENDIF 
    957962      ! 
     
    967972            WRITE(numout,*) '      ==> only ice dynamics is activated, thus some parameters must be changed' 
    968973            WRITE(numout,*) '            rn_porordg   = ', rn_porordg 
    969             WRITE(numout,*) '            rn_fsnwrdg   = ', rn_fsnwrdg  
    970             WRITE(numout,*) '            rn_fpndrdg   = ', rn_fpndrdg  
    971             WRITE(numout,*) '            rn_fsnwrft   = ', rn_fsnwrft  
    972             WRITE(numout,*) '            rn_fpndrft   = ', rn_fpndrft  
     974            WRITE(numout,*) '            rn_fsnwrdg   = ', rn_fsnwrdg 
     975            WRITE(numout,*) '            rn_fpndrdg   = ', rn_fpndrdg 
     976            WRITE(numout,*) '            rn_fsnwrft   = ', rn_fsnwrft 
     977            WRITE(numout,*) '            rn_fpndrft   = ', rn_fpndrft 
    973978         ENDIF 
    974979      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.