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 15344 – NEMO

Changeset 15344


Ignore:
Timestamp:
2021-10-07T17:06:57+02:00 (3 years ago)
Author:
emmafiedler
Message:

Include Rothrock ice strength formulation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_ice_strength/src/ICE/icedyn_rdgrft.F90

    r14075 r15344  
    4343   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:)     ::   opning          ! rate of opening due to divergence/shear 
    4444   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:)     ::   closing_gross   ! rate at which area removed, not counting area of new ridges 
     45   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:)     ::   zaksum          ! normalisation factor    
     46   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:)     ::   zasum           ! sum of ice area plus open water    
    4547   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   apartf          ! participation function; fraction of ridging/closing associated w/ category n 
     48   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   zhi             ! ice thickness in category n 
    4649   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   hrmin           ! minimum ridge thickness 
    4750   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   hrmax           ! maximum ridge thickness 
     51   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   hrexp           ! e-folding ridge thickness 
    4852   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   hraft           ! thickness of rafted ice 
    4953   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   hi_hrdg         ! thickness of ridging ice / mean ridge thickness 
     
    5458   ! 
    5559   REAL(wp), PARAMETER ::   hrdg_hi_min = 1.1_wp    ! min ridge thickness multiplier: min(hrdg/hi) 
    56    REAL(wp), PARAMETER ::   hi_hrft     = 0.5_wp    ! rafting multipliyer: (hi/hraft) 
     60   REAL(wp), PARAMETER ::   hi_hrft     = 0.5_wp    ! rafting multiplier: (hi/hraft) 
    5761   ! 
    5862   ! ** namelist (namdyn_rdgrft) ** 
    5963   LOGICAL  ::   ln_str_H79       ! ice strength parameterization (Hibler79) 
    6064   REAL(wp) ::   rn_pstar         ! determines ice strength, Hibler JPO79 
     65   LOGICAL  ::   ln_str_R75       ! ice strength parameterization (Rothrock75) 
     66   REAL(wp) ::   rn_Cf            !    ratio of ridging work to PE change in ridging, R75 
     67   REAL(wp) ::   rn_murdg         !    gives e-folding scale of ridged ice (m^.5), R75 
    6168   REAL(wp) ::   rn_csrdg         ! fraction of shearing energy contributing to ridging             
    6269   LOGICAL  ::   ln_partf_lin     ! participation function linear (Thorndike et al. (1975)) 
     
    8693      !!                ***  ROUTINE ice_dyn_rdgrft_alloc *** 
    8794      !!------------------------------------------------------------------- 
    88       ALLOCATE( closing_net(jpij)  , opning(jpij)      , closing_gross(jpij) ,               & 
    89          &      apartf(jpij,0:jpl) , hrmin  (jpij,jpl) , hraft(jpij,jpl) , aridge(jpij,jpl), & 
    90          &      hrmax (jpij,jpl)   , hi_hrdg(jpij,jpl) , araft(jpij,jpl) ,                   & 
     95      ALLOCATE( closing_net(jpij)  , opning(jpij)      , closing_gross(jpij) ,  & 
     96         &      apartf(jpij,0:jpl) , hrmin(jpij,jpl)   , hrmax(jpij,jpl)     , zhi(jpij,jpl),  & 
     97         &      zaksum(jpij)       , hraft(jpij,jpl)   , hrexp(jpij,jpl)     ,  & 
     98         &      hi_hrdg(jpij,jpl)  , araft(jpij,jpl)   , aridge(jpij,jpl)    ,  zasum(jpij), & 
    9199         &      ze_i_2d(jpij,nlay_i,jpl), ze_s_2d(jpij,nlay_s,jpl), STAT=ice_dyn_rdgrft_alloc ) 
    92100 
     
    138146      INTEGER , DIMENSION(jpij) ::   iptidx        ! compute ridge/raft or not 
    139147      REAL(wp), DIMENSION(jpij) ::   zdivu, zdelt  ! 1D divu_i & delta_i 
     148      REAL(wp), DIMENSION(jpij) ::   zdivu_adv     ! 1D divu_i as implied by transport scheme 
    140149      ! 
    141150      INTEGER, PARAMETER ::   jp_itermax = 20     
     
    186195            closing_net(ji) = rn_csrdg * 0.5_wp * ( zdelt(ji) - ABS( zdivu(ji) ) ) - MIN( zdivu(ji), 0._wp ) 
    187196            ! 
     197 !           zdivu_adv(ji) = (1._wp - zasum(ji)) / rdt_ice  ! Need to do more testing/checking on this 
     198 
     199!            WRITE(numout,*)'velocity div ',zdivu(ji), 'transport div ',zdivu_adv(ji) 
     200      
    188201            IF( zdivu(ji) < 0._wp )   closing_net(ji) = MAX( closing_net(ji), -zdivu(ji) )   ! make sure the closing rate is large enough 
     202!              IF( zdivu_adv(ji) < 0._wp )   closing_net(ji) = MAX( closing_net(ji), -zdivu_adv(ji) ) 
     203 
    189204            !                                                                                ! to give asum = 1.0 after ridging 
    190205            ! Opening rate (non-negative) that will give asum = 1.0 after ridging. 
    191206            opning(ji) = closing_net(ji) + zdivu(ji) 
     207!            opning(ji) = closing_net(ji) + zdivu_adv(ji) 
     208 
    192209         END DO 
    193210         ! 
     
    277294 
    278295 
    279    SUBROUTINE rdgrft_prep( pa_i, pv_i, pato_i, pclosing_net ) 
     296 
     297   SUBROUTINE rdgrft_prep( pa_i_in, pv_i, pato_i, pclosing_net ) 
    280298      !!------------------------------------------------------------------- 
    281299      !!                ***  ROUTINE rdgrft_prep *** 
     
    287305      !!------------------------------------------------------------------- 
    288306      REAL(wp), DIMENSION(:)  , INTENT(in) ::   pato_i, pclosing_net  
    289       REAL(wp), DIMENSION(:,:), INTENT(in) ::   pa_i, pv_i  
     307      REAL(wp), DIMENSION(:,:), INTENT(in) ::   pa_i_in, pv_i  
     308      REAL(wp), DIMENSION(jpij,jpl)        ::   pa_i                     ! area adjusted for minimum zhi 
    290309      !! 
    291310      INTEGER  ::   ji, jl                     ! dummy loop indices 
    292311      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  
    294       REAL(wp), DIMENSION(jpij,jpl)    ::   zhi                      ! ice thickness 
     312!      REAL(wp), DIMENSION(jpij)        ::   zasum, z1_asum           ! sum of a_i+ato_i and inverse  
     313      REAL(wp), DIMENSION(jpij)        ::   z1_asum                  ! inverse of sum of a_i+ato_i 
    295314      REAL(wp), DIMENSION(jpij,-1:jpl) ::   zGsum                    ! zGsum(n) = sum of areas in categories 0 to n 
    296315      !-------------------------------------------------------------------- 
     
    298317      z1_gstar = 1._wp / rn_gstar 
    299318      z1_astar = 1._wp / rn_astar 
     319 
     320      pa_i(:,:) = pa_i_in(:,:) 
    300321 
    301322      !                       ! Ice thickness needed for rafting 
     
    303324      ELSEWHERE                          ;   zhi(1:npti,:) = 0._wp 
    304325      END WHERE 
     326      ! Make sure ice thickness is not below minimum in any category (from iceitd.F90; no minimum was causing issues for R75 strength) 
     327      WHERE( pa_i(1:npti,:) > epsi10 .AND. zhi(1:npti,:) < rn_himin )  
     328        pa_i(1:npti,:) = pa_i(1:npti,:) * zhi(1:npti,:) / rn_himin 
     329        zhi(1:npti,:) = rn_himin 
     330      END WHERE 
     331 
    305332 
    306333      ! 1) Participation function (apartf): a(h) = b(h).g(h) 
     
    317344      ! Compute total area of ice plus open water. 
    318345      ! This is in general not equal to one because of divergence during transport 
    319       zasum(1:npti) = pato_i(1:npti) + SUM( pa_i(1:npti,:), dim=2 ) 
    320       ! 
     346     ! zasum(1:npti) = pato_i(1:npti) + SUM( pa_i(1:npti,:), dim=2 ) 
     347     ! EF: to match CICE, this should be the following. What is pa_i(:,0)? Very small. 
     348      zasum(1:npti) = pato_i(1:npti) + SUM( pa_i(1:npti,1:jpl), dim=2 )    
     349 
    321350      WHERE( zasum(1:npti) > epsi10 )   ;   z1_asum(1:npti) = 1._wp / zasum(1:npti) 
    322351      ELSEWHERE                         ;   z1_asum(1:npti) = 0._wp 
    323352      END WHERE 
    324       ! 
     353 
    325354      ! Compute cumulative thickness distribution function 
    326355      ! Compute the cumulative thickness distribution function zGsum, 
     
    330359      zGsum(1:npti,0 ) = pato_i(1:npti) * z1_asum(1:npti) 
    331360      DO jl = 1, jpl 
    332          zGsum(1:npti,jl) = ( pato_i(1:npti) + SUM( pa_i(1:npti,1:jl), dim=2 ) ) * z1_asum(1:npti)  ! sum(1:jl) is ok (and not jpl) 
     361         zGsum(1:npti,jl) = ( pato_i(1:npti) + SUM( pa_i(1:npti,1:jl), dim=2 ) ) * z1_asum(1:npti)  ! sum(1:jl) is ok (and not jpl)  
    333362      END DO 
    334363      ! 
     
    395424      ENDIF 
    396425 
     426 
     427 
    397428      ! 2) Transfer function 
    398429      !----------------------------------------------------------------- 
     
    413444      ! (relative to the Hibler formulation) when very thick ice is ridging. 
    414445      ! 
    415       ! zaksum = net area removed/ total area removed 
    416       ! where total area removed = area of ice that ridges 
    417       !         net area removed = total area removed - area of new ridges 
     446      ! zaksum = net area removed/ total area participating 
     447      ! where total area participating = area of ice that ridges 
     448      !         net area removed = total area participating - area of new ridges 
    418449      !----------------------------------------------------------------- 
    419450      zfac = 1._wp / hi_hrft 
     
    422453      DO jl = 1, jpl 
    423454         DO ji = 1, npti 
    424             IF ( apartf(ji,jl) > 0._wp ) THEN 
     455            IF ( apartf(ji,jl) > 0._wp ) THEN  
     456           ! IF ( pa_i(ji,jl) > epsi10 .and. apartf(ji,jl) > 0._wp ) THEN 
    425457               zhmean         = MAX( SQRT( rn_hstar * zhi(ji,jl) ), zhi(ji,jl) * hrdg_hi_min ) 
    426458               hrmin  (ji,jl) = MIN( 2._wp * zhi(ji,jl), 0.5_wp * ( zhmean + zhi(ji,jl) ) ) 
    427459               hrmax  (ji,jl) = 2._wp * zhmean - hrmin(ji,jl) 
     460               hrexp  (ji,jl) = rn_murdg * SQRT( zhi(ji,jl) ) 
    428461               hraft  (ji,jl) = zhi(ji,jl) * zfac 
    429462               hi_hrdg(ji,jl) = zhi(ji,jl) / MAX( zhmean, epsi20 ) 
     
    435468               hrmin  (ji,jl) = 0._wp  
    436469               hrmax  (ji,jl) = 0._wp  
     470               hrexp  (ji,jl) = 0._wp  
    437471               hraft  (ji,jl) = 0._wp  
    438472               hi_hrdg(ji,jl) = 1._wp 
     473               zaksum (ji)    = 0._wp 
    439474            ENDIF 
    440475         END DO 
     
    754789      !!              dissipated per unit area removed from the ice pack under compression, 
    755790      !!              and assumed proportional to the change in potential energy caused 
    756       !!              by ridging. Note that only Hibler's formulation is stable and that 
    757       !!              ice strength has to be smoothed 
     791      !!              by ridging. [**UPDATE THIS ---> Note that only Hibler's formulation is stable and that 
     792      !!              ice strength has to be smoothed**] 
    758793      !!---------------------------------------------------------------------- 
    759794      INTEGER             ::   ji, jj, jl  ! dummy loop indices 
     
    761796      INTEGER             ::   itframe     ! number of time steps for the P smoothing 
    762797      REAL(wp)            ::   zp, z1_3    ! local scalars 
     798      REAL(wp)            ::   Cp          ! proportional constant for PE 
     799      !REAL(wp)            ::   hi          ! ice thickness of category (m) 
     800      REAL(wp)            ::   h2rdg       ! mean value of h^2 for new ridge 
     801      REAL(wp)            ::   dh2rdg      ! change in mean value of h^2 per unit area consumed by ridging  
    763802      REAL(wp), DIMENSION(jpi,jpj) ::   zworka           ! temporary array used here 
    764803      REAL(wp), DIMENSION(jpi,jpj) ::   zstrp1, zstrp2   ! strength at previous time steps 
     804      REAL(wp), DIMENSION(jpij,jpl) ::   krdg             ! mean ridge thickness / thickness of ridging ice 
     805      REAL(wp), DIMENSION(jpij)     ::   strength_1d      ! 1-dimensional strength 
     806      REAL(wp), DIMENSION(jpij,jpl) ::   strength_pe      ! PE component of R75 strength 
     807      REAL(wp), DIMENSION(jpij)     ::   strength_pe_sum  ! PE component of R75 strength  
    765808      !!---------------------------------------------------------------------- 
    766809      !                              !--------------------------------------------------! 
     
    769812         strength(:,:) = rn_pstar * SUM( v_i(:,:,:), dim=3 ) * EXP( -rn_crhg * ( 1._wp - SUM( a_i(:,:,:), dim=3 ) ) ) 
    770813         ismooth = 1 
     814      !                              !--------------------------------------------------! 
     815      ELSE IF( ln_str_R75 ) THEN     ! Ice strength => Rothrock (1975) method           ! 
     816      !                              !--------------------------------------------------!  
     817      IF ( kt_ice == nit000 ) THEN 
     818 
     819        ! Replace this with input from start file 
     820        strength(:,:) = rn_pstar * SUM( v_i(:,:,:), dim=3 ) * EXP( -rn_crhg * ( 1._wp - SUM( a_i(:,:,:), dim=3 ) ) ) 
     821        ismooth = 1 
     822 
     823      ELSE 
     824 
     825      !-------------------------------- 
     826      ! 0) Identify grid cells with ice 
     827      !-------------------------------- 
     828      at_i(:,:) = SUM( a_i(:,:,:), dim=3 ) 
     829      vt_i(:,:) = SUM( v_i(:,:,:), dim=3 ) 
     830 
     831    !  ato_i(:,:) = 1._wp - at_i(:,:) 
     832 
     833    !  DO jj = 1, jpj 
     834    !    ato_i_1d   (ji) = MAX( 0._wp, 1._wp - SUM( at_i(ji,:) ) ) 
     835    !  END DO 
     836      ! 
     837      npti = 0   ;   nptidx(:) = 0 
     838      DO jj = 1, jpj 
     839         DO ji = 1, jpi 
     840            IF ( at_i(ji,jj) > epsi10 ) THEN 
     841               npti           = npti + 1 
     842               nptidx( npti ) = (jj - 1) * jpi + ji 
     843            ENDIF 
     844         END DO 
     845      END DO 
     846 
     847         CALL tab_3d_2d( npti, nptidx(1:npti), a_i_2d  (1:npti,1:jpl), a_i   ) 
     848         CALL tab_3d_2d( npti, nptidx(1:npti), v_i_2d  (1:npti,1:jpl), v_i   ) 
     849         CALL tab_2d_1d( npti, nptidx(1:npti), ato_i_1d(1:npti)      , ato_i ) 
     850 
     851 
     852      !----------------------------------- 
     853      ! Get thickness distribution of ice 
     854      !----------------------------------- 
     855 
     856      CALL rdgrft_prep( a_i_2d, v_i_2d, ato_i_1d, closing_net ) 
     857       
     858      ! Don't need closing rate here (unless only calculating strength for ridging ice), could split this function up. 
     859 
     860      Cp = 0.5_wp * grav * (rhow-rhoi) * rhoi / rhow  ! put this elsewhere, perhaps ice_prep?   
     861 
     862 
     863      IF ( npti > 0 ) THEN 
     864 
     865      DO jl = 1, jpl              ! categories 
     866        DO ji = 1, npti           ! grid cells 
     867 
     868          IF ( a_i_2d(ji,jl) > epsi10 .and. apartf(ji,jl) > 0._wp ) THEN 
     869 
     870          ! Move this to rdgrft_prep 
     871           krdg(ji,jl) = (hrmin(ji,jl) + hrmax(ji,jl))/2._wp * 1._wp/zhi(ji,jl) 
     872 
     873 
     874         ! Add a logical for distribution    
     875         ! Uniform distribution 
     876           h2rdg = (1._wp/3._wp) * (hrmax(ji,jl)**3._wp - hrmin(ji,jl)**3._wp)  & 
     877                           / (hrmax(ji,jl) - hrmin(ji,jl))         
     878 
     879     
     880         ! Exponential distribution 
     881         !  h2rdg =          hrmin(ji,jl) * hrmin(ji,jl) & 
     882         !         + 2._wp * hrmin(ji,jl) * hrexp(ji,jl) & 
     883         !         + 2._wp * hrexp(ji,jl) * hrexp(ji,jl) 
     884 
     885           dh2rdg = -zhi(ji,jl)*zhi(ji,jl) + h2rdg / krdg(ji,jl) 
     886           
     887           strength_pe(ji,jl) = apartf(ji,jl) * dh2rdg           
     888 
     889         !  strength_pe(ji,jl) = strength_pe(ji,jl) + apartf(ji,jl) * dh2rdg  !CICE format 
     890 
     891          ELSE 
     892 
     893           strength_pe(ji,jl) = 0._wp 
     894          ! strength_pe(ji,jl) = strength_pe(ji,jl) + 0._wp  !CICE format 
     895 
     896          END IF 
     897 
     898        END DO                    ! grid cells 
     899      END DO                      ! categories 
     900 
     901 
     902      strength_pe_sum(:) = SUM(strength_pe(:,:), dim=2)  ! Sum over all categories 
     903     ! strength_pe_1d(:) = ???  ! CICE format, already summed so how to convert to 1D?? 
     904 
     905      DO ji = 1, npti   
     906         IF ( zaksum(ji) > epsi10 ) THEN   
     907          strength_1d(ji) = rn_Cf * Cp * strength_pe_sum(ji) / zaksum(ji) 
     908        ELSE 
     909          strength_1d(ji) = 0._wp 
     910        END IF 
     911      END DO 
     912          
     913      ! Convert strength_1d to 2d 
     914 
     915      CALL tab_1d_2d( npti, nptidx(1:npti), strength_1d(1:npti), strength(:,:) ) 
     916 
     917      ! Enforce a maximum for strength (- Look into why numbers can be so large) 
     918      WHERE( strength(:,:) > 1.5e5) ; strength(:,:) = 1.5e5 
     919      END WHERE 
     920 
     921      ismooth = 0  ! Buffer size error with lbc_lnk... 
     922 
     923      END IF  ! number of ice points 
     924      END IF  ! timestep 
     925 
     926 
    771927         !                           !--------------------------------------------------! 
    772       ELSE                           ! Zero strength                                    ! 
     928      ELSE                           ! Zero strength      (this just crashes)           ! 
    773929         !                           !--------------------------------------------------! 
    774930         strength(:,:) = 0._wp 
    775931         ismooth = 0 
    776932      ENDIF 
    777       !                              !--------------------------------------------------! 
     933      !       
     934 
     935                                     !--------------------------------------------------! 
    778936      SELECT CASE( ismooth )         ! Smoothing ice strength                           ! 
    779937      !                              !--------------------------------------------------! 
     938      CASE( 0 )               !--- No smoothing 
     939 
     940  
     941      !CALL lbc_lnk( 'icedyn_rdgrft', strength, 'T', 1. ) 
     942 
    780943      CASE( 1 )               !--- Spatial smoothing 
    781944         DO jj = 2, jpjm1 
     
    9151078      INTEGER :: ios                 ! Local integer output status for namelist read 
    9161079      !! 
    917       NAMELIST/namdyn_rdgrft/ ln_str_H79, rn_pstar, rn_crhg, & 
    918          &                    rn_csrdg  ,                    & 
     1080      NAMELIST/namdyn_rdgrft/ ln_str_H79, rn_pstar,          & 
     1081         &                    ln_str_R75, rn_Cf, rn_murdg,   & 
     1082         &                    rn_crhg, rn_csrdg,             & 
    9191083         &                    ln_partf_lin, rn_gstar,        & 
    9201084         &                    ln_partf_exp, rn_astar,        &  
     
    9361100         WRITE(numout,*) '~~~~~~~~~~~~~~~~~~' 
    9371101         WRITE(numout,*) '   Namelist namdyn_rdgrft:' 
    938          WRITE(numout,*) '      ice strength parameterization Hibler (1979)              ln_str_H79   = ', ln_str_H79  
     1102         WRITE(numout,*) '      ice strength parameterization Hibler (1979)              ln_str_H79   = ', ln_str_H79 
    9391103         WRITE(numout,*) '            1st bulk-rheology parameter                        rn_pstar     = ', rn_pstar 
    9401104         WRITE(numout,*) '            2nd bulk-rhelogy parameter                         rn_crhg      = ', rn_crhg 
     1105         WRITE(numout,*) '      ice strength parameterization Rothrock (1975)            ln_str_R75   = ', ln_str_R75 
     1106         WRITE(numout,*) '            ratio of ridging work to PE change in ridging      rn_Cf        = ', rn_Cf 
     1107         WRITE(numout,*) '            gives e-folding scale of ridged ice (m^.5)         rn_murdg     = ', rn_murdg 
    9411108         WRITE(numout,*) '      Fraction of shear energy contributing to ridging         rn_csrdg     = ', rn_csrdg  
    9421109         WRITE(numout,*) '      linear ridging participation function                    ln_partf_lin = ', ln_partf_lin 
Note: See TracChangeset for help on using the changeset viewer.