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 834 for trunk/NEMO/LIM_SRC_3/limitd_me.F90 – NEMO

Ignore:
Timestamp:
2008-03-07T18:11:35+01:00 (16 years ago)
Author:
ctlod
Message:

Clean comments and useless lines, see ticket:#72

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/LIM_SRC_3/limitd_me.F90

    r825 r834  
    22 
    33#if defined key_lim3 
     4   !!---------------------------------------------------------------------- 
     5   !!   'key_lim3' :                                    LIM3 sea-ice model 
     6   !!---------------------------------------------------------------------- 
     7   !! 
    48   !!====================================================================== 
    59   !!                       ***  MODULE limitd_me *** 
     
    711   !!                     computation of changes in g(h)       
    812   !!====================================================================== 
    9  
     13   !! 
    1014   !!---------------------------------------------------------------------- 
    1115   !! * Modules used 
     
    1721   USE ice_oce          ! ice variables 
    1822   USE thd_ice 
    19    USE limicepoints 
    2023   USE limistate 
    2124   USE in_out_manager 
    2225   USE ice 
    2326   USE par_ice 
    24    USE limthd_lab 
    2527   USE limthd_lac 
    2628   USE limvar 
     
    7476      REAL(wp) :: &                                
    7577         Cp  
    76  
    7778! 
    7879!----------------------------------------------------------------------- 
    79 !     Ridging diagnostic arrays for history files 
     80! Ridging diagnostic arrays for history files 
    8081!----------------------------------------------------------------------- 
    8182! 
     
    8889 
    8990   !!---------------------------------------------------------------------- 
    90    !!   LIM-@ 3.0,  UCL-ASTR (2005-2006) 
     91   !!   LIM-@ 3.0,  UCL-ASTR (2008) 
    9192   !!   (c) UCL-ASTR and Martin Vancoppenolle 
    9293   !!---------------------------------------------------------------------- 
     
    114115        !! ** External :  
    115116        !! 
     117        !! ** Steps : 
     118        !!  1) Thickness categories boundaries, ice / o.w. concentrations 
     119        !!     Ridge preparation 
     120        !!  2) Dynamical inputs (closing rate, divu_adv, opning) 
     121        !!  3) Ridging iteration 
     122        !!  4) Ridging diagnostics 
     123        !!  5) Heat, salt and freshwater fluxes 
     124        !!  6) Compute increments of tate variables and come back to old values 
     125        !! 
    116126        !! ** References : There are a lot of references and can be difficult /  
    117127        !!                 boring to read 
     
    138148        !! 
    139149        !! ** History : 
    140         !!           This routine was freely inpired from CICE 
    141         !!           authors William H. Lipscomb, LANL 
    142         !!                   Elizabeth C. Hunke (LANL) 
    143         !!                the routines were available online  
    144         !!                so, big thanks to the authors and to LANL 
    145         !!           The modified features are the ridging/rafting algorithm 
     150        !!           This routine is based on CICE code 
     151        !!           and authors William H. Lipscomb, 
     152        !!           and Elizabeth C. Hunke, LANL 
     153        !!           are gratefully acknowledged 
    146154        !! 
    147155        !!           (02-2006) Martin Vancoppenolle, UCL-ASTR  
    148         !!           Voila, c'est la derniere etape du codage!!! J'en ai   
    149         !!           plein le cul mais je m'en sors mieux qu'avant!!!  
    150         !!           je ne sais pas quand ca va marcher 
    151         !!           O toi, futur utilisateur, si tu pestes sur ce code 
    152         !!           Pardonne moi, sache que j'ai bien peste dessus aussi 
    153156        !! 
    154157        !!--------------------------------------------------------------------! 
    155158        !! * Arguments 
    156159 
    157        !! * Local variables 
    158        INTEGER ::   ji,       &   ! spatial dummy loop index 
    159                     jj,       &   ! spatial dummy loop index 
    160                     jk,       &   ! vertical layering dummy loop index 
    161                     jl,       &   ! ice category dummy loop index 
    162                     jm,       &   ! ice types    dummy loop index 
    163                     index,    &   ! indexes for ice points debugging 
    164                     jbnd1,    & 
    165                     jbnd2,    &   
    166                     niter,    &   ! iteration counter 
    167                     nitermax = 20 ! max number of ridging iterations (it used to 
    168 !                    be 20 
    169  
    170        REAL(wp)  ::           &  ! constant values 
    171           zeps      =  1.0e-10, & 
    172           epsi10    =  1.0e-10, & 
    173           epsi06    =  1.0e-6 
    174  
    175        REAL(wp)  ::           &  ! constant values for ice enthalpy 
    176           zindb                 
    177  
    178        REAL(wp), DIMENSION(jpi,jpj) :: & 
    179           closing_net,        &  ! net rate at which area is removed    (1/s) 
    180                                  ! (ridging ice area - area of new ridges) / dt 
    181           divu_adv   ,        &  ! divu as implied by transport scheme  (1/s) 
    182           opning     ,        &  ! rate of opening due to divergence/shear 
    183           closing_gross,      &  ! rate at which area removed, not counting 
    184                                  ! area of new ridges 
    185           msnow_mlt  ,        &  ! mass of snow added to ocean (kg m-2) 
    186           esnow_mlt              ! energy needed to melt snow in ocean (J m-2) 
    187  
    188        REAL(wp) ::            & 
    189           w1,                 &  ! temporary variable 
    190           tmpfac,             &  ! factor by which opening/closing rates are cut 
    191           dti                    ! 1 / dt 
    192  
    193        LOGICAL   ::           & 
    194          iterate_ridging,     &  ! if true, repeat the ridging 
    195          asum_error              ! flag for asum .ne. 1 
    196  
    197        REAL(wp) ::  &          
    198          big = 1.0e8 
    199  
    200       REAL (wp), DIMENSION(jpi,jpj) :: &  !  
    201               vt_i_init, vt_i_final,   &  !  ice volume summed over categories 
    202               vt_s_init, vt_s_final,   &  !  snow volume summed over categories 
    203               et_i_init, et_i_final,   &  !  ice energy summed over categories 
    204               et_s_init, et_s_final       !  snow energy summed over categories 
    205  
    206       CHARACTER (len = 15) :: fieldid 
     160        !! * Local variables 
     161        INTEGER ::   ji,       &   ! spatial dummy loop index 
     162                     jj,       &   ! spatial dummy loop index 
     163                     jk,       &   ! vertical layering dummy loop index 
     164                     jl,       &   ! ice category dummy loop index 
     165                     niter,    &   ! iteration counter 
     166                     nitermax = 20 ! max number of ridging iterations  
     167 
     168        REAL(wp)  ::             &  ! constant values 
     169           zeps      =  1.0e-10, & 
     170           epsi10    =  1.0e-10, & 
     171           epsi06    =  1.0e-6 
     172 
     173        REAL(wp), DIMENSION(jpi,jpj) :: & 
     174           closing_net,        &  ! net rate at which area is removed    (1/s) 
     175                                  ! (ridging ice area - area of new ridges) / dt 
     176           divu_adv   ,        &  ! divu as implied by transport scheme  (1/s) 
     177           opning     ,        &  ! rate of opening due to divergence/shear 
     178           closing_gross,      &  ! rate at which area removed, not counting 
     179                                  ! area of new ridges 
     180           msnow_mlt  ,        &  ! mass of snow added to ocean (kg m-2) 
     181           esnow_mlt              ! energy needed to melt snow in ocean (J m-2) 
     182 
     183        REAL(wp) ::            & 
     184           w1,                 &  ! temporary variable 
     185           tmpfac,             &  ! factor by which opening/closing rates are cut 
     186           dti                    ! 1 / dt 
     187 
     188        LOGICAL   ::           & 
     189           iterate_ridging,    &  ! if true, repeat the ridging 
     190           asum_error              ! flag for asum .ne. 1 
     191 
     192        REAL(wp) ::  &          
     193           big = 1.0e8 
     194 
     195        REAL (wp), DIMENSION(jpi,jpj) :: &  !  
     196           vt_i_init, vt_i_final       !  ice volume summed over categories 
     197 
     198        CHARACTER (len = 15) :: fieldid 
    207199 
    208200!!-- End of declarations 
     
    223215! Set hi_max(ncat) to a big value to ensure that all ridged ice  
    224216! is thinner than hi_max(ncat). 
     217 
    225218      Cp = 0.5* grav * (rau0-rhoic)*rhoic/rau0    ! proport const for PE 
    226 ! BACK TO LIMA_MEC 
    227 !     hi_max(ice_cat_bounds(2,2)) = big 
    228  
    229       CALL lim_itd_me_ridgeprep 
    230  
    231 !     ! conservation check 
    232 !     CALL lim_column_sum (jpl,   v_i, vt_i_init) 
     219      CALL lim_itd_me_ridgeprep ! prepare ridging 
     220 
     221      ! conservation check 
     222      IF ( con_i) CALL lim_column_sum (jpl,   v_i, vt_i_init) 
    233223 
    234224! Initialize arrays. 
     
    288278      END DO 
    289279 
    290 !+++++ [ 
    291       WRITE(numout,*) ' 2. Dynamical inputs ' 
    292       WRITE(numout,*) ' closing_net ', closing_net(jiindex,jjindex) 
    293       WRITE(numout,*) ' divu_adv    ', divu_adv   (jiindex,jjindex) 
    294       WRITE(numout,*) ' opning      ', opning     (jiindex,jjindex) 
    295 !+++++ ] 
    296  
    297  
    298280!-----------------------------------------------------------------------------! 
    299281! 3) Ridging iteration 
     
    304286 
    305287      DO WHILE ( iterate_ridging .AND. niter < nitermax ) 
    306  
    307 !+++++ [ 
    308 !     WRITE(numout,*) 
    309       WRITE(numout,*) ' 3. Ridging iteration : ', niter 
    310       WRITE(numout,*) ' ---------------------- ' 
    311 !     WRITE(numout,*) 
    312 !     WRITE(numout,*) 'a_i ', a_i(jiindex, jjindex,1:jpl) 
    313 !     WRITE(numout,*) 'v_i ', v_i(jiindex, jjindex,1:jpl) 
    314 !+++++ ] 
    315  
    316 ! 3.1 ice / o.w. concentrationts, participation and transfer functions 
    317288 
    318289      DO jj = 1, jpj 
     
    342313      END DO ! jj 
    343314 
    344 !+++++ [ 
    345       WRITE(numout,*) ' correction 1' 
    346       WRITE(numout,*) ' closing_gross   ', closing_gross(jiindex,jjindex) 
    347       WRITE(numout,*) ' opning          ', opning       (jiindex,jjindex) 
    348 !+++++ [ 
    349  
    350315! correction to closing rate / opening if excessive ice removal 
    351316!--------------------------------------------------------------- 
     
    356321         DO jj = 1, jpj 
    357322            DO ji = 1, jpi 
    358 !              IF (numit.GE.565) WRITE(numout,*) 'Stop Hier : ',ji,jj,jl 
    359323               IF ( a_i(ji,jj,jl) .GT. epsi11 .AND. athorn(ji,jj,jl) .GT. 0.0 ) THEN 
    360324                  w1 = athorn(ji,jj,jl) * closing_gross(ji,jj) * rdt_ice 
     
    369333      END DO !jl 
    370334 
    371 !+++++ [ 
    372       WRITE(numout,*) ' correction 2' 
    373       WRITE(numout,*) ' closing_gross   ', closing_gross(jiindex,jjindex) 
    374       WRITE(numout,*) ' opning          ', opning(jiindex,jjindex)  
    375 !+++++ ] 
    376  
    377335! 3.3 Redistribute area, volume, and energy. 
    378336!-----------------------------------------------------------------------------! 
     
    385343 
    386344      CALL lim_itd_me_asumr 
    387  
    388 !+++++ [ 
    389       WRITE(numout,*) 
    390       WRITE(numout,*) ' back from asumr' 
    391       WRITE(numout,*) ' asum, ato_i, at_i : ', asum(jiindex,jjindex), & 
    392       ato_i(jiindex,jjindex), at_i(jiindex, jjindex) 
    393       WRITE(numout,*) ' a_i : ', a_i(jiindex,jjindex,1:jpl) 
    394       WRITE(numout,*) ' v_i : ', v_i(jiindex,jjindex,1:jpl) 
    395 !+++++ ] 
    396345 
    397346! 3.5 Do we keep on iterating ??? 
     
    457406!-----------------------------------------------------------------------------! 
    458407         ! fresh water source for ocean 
    459          fmmec(ji,jj)      = fmmec(ji,jj)      + msnow_mlt(ji,jj)*dti  !in kg / m2 /s !!! very important 
    460 !        fresh_hist(ji,jj) = fresh_hist(ji,jj) + msnow_mlt(ji,jj)*dti 
     408         fmmec(ji,jj)      = fmmec(ji,jj)      + msnow_mlt(ji,jj)*dti   
    461409       
    462410         ! heat sink for ocean 
    463411         fhmec(ji,jj)      = fhmec(ji,jj)      + esnow_mlt(ji,jj)*dti 
    464 !        fhnet_hist(ji,jj) = fhnet_hist(ji,jj) + esnow_mlt(ji,jj)*dti 
    465412 
    466413         END DO 
     
    486433 
    487434      ! Conservation check 
    488 !     CALL lim_column_sum (jpl,   v_i, vt_i_final) 
    489 !     fieldid = ' v_i : limitd_me ' 
    490 !     CALL lim_cons_check (vt_i_init, vt_i_final, 1.0e-6, fieldid)  
     435      IF ( con_i ) THEN 
     436         CALL lim_column_sum (jpl,   v_i, vt_i_final) 
     437         fieldid = ' v_i : limitd_me ' 
     438         CALL lim_cons_check (vt_i_init, vt_i_final, 1.0e-6, fieldid)  
     439      ENDIF 
    491440 
    492441!-----------------------------------------------------------------------------! 
     
    494443!-----------------------------------------------------------------------------! 
    495444 
    496      !+++++ 
    497 ! BACK TO LIMA_MEC 
    498 !     hi_max(ice_cat_bounds(2,2)) = 20.0 
    499      ! only for debugging 
    500      CALL lim_var_glo2eqv 
    501  
    502       WRITE(numout,*) ' End of lim_itd_me ****** ' 
    503       WRITE(numout,*) ' u_ice      : ', u_ice(jiindex,jjindex) 
    504       WRITE(numout,*) ' v_ice      : ', v_ice(jiindex,jjindex) 
    505  
    506       DO jl = 1, jpl 
    507          WRITE(numout,*) '* - category number ', jl 
    508          WRITE(numout,*) ' a_i        : ', a_i(jiindex,jjindex,jl) 
    509          WRITE(numout,*) ' ht_i       : ', ht_i(jiindex,jjindex,jl) 
    510          WRITE(numout,*) ' v_i        : ', v_i(jiindex,jjindex,jl) 
    511          WRITE(numout,*) ' v_s        : ', v_s(jiindex,jjindex,jl) 
    512          WRITE(numout,*) ' e_s        : ', e_s(jiindex,jjindex,1,jl)/1.0e9 
    513          WRITE(numout,*) ' e_i1       : ', e_i(jiindex,jjindex,1,jl)/1.0e9 
    514          WRITE(numout,*) ' e_i2       : ', e_i(jiindex,jjindex,2,jl)/1.0e9 
    515          WRITE(numout,*) ' smv_i      : ', smv_i(jiindex,jjindex,jl) 
    516          WRITE(numout,*) ' sm_i       : ', sm_i(jiindex,jjindex,jl) 
    517          WRITE(numout,*) ' oa_i       : ', oa_i (jiindex,jjindex,jl) 
    518          WRITE(numout,*) ' o_i        : ', o_i (jiindex,jjindex,jl) 
    519          WRITE(numout,*) ' t_snow     : ', t_s(jiindex,jjindex,1,jl) 
    520          WRITE(numout,*) ' t_su       : ', t_su(jiindex,jjindex,jl) 
    521          WRITE(numout,*) ' t_i1       : ', t_i(jiindex,jjindex,1,jl) 
    522          WRITE(numout,*) ' t_i2       : ', t_i(jiindex,jjindex,2,jl) 
    523          WRITE(numout,*) 
    524       END DO 
    525  
    526 !        DO jl = 1, jpl 
    527 !           DO jj = 1, jpj 
    528 !              DO ji = 1, jpi 
    529 !                 IF (old_a_i(ji,jj,jl).eq.0.00) THEN 
    530 !                     o_i(ji,jj,jl) = MAX( MIN( rdt_ice*float(numit)/86400.0, o_i(ji,jj,jl) ), 0.0 ) 
    531 !                 ENDIF 
    532 !              END DO 
    533 !           END DO 
    534 !        END DO 
    535      !+++++ 
    536  
    537 !     ! Zero out categories with very small areas 
     445      CALL lim_var_glo2eqv 
    538446      CALL lim_itd_me_zapsmall 
    539447 
     
    615523         END DO 
    616524      END DO 
    617  
    618  
    619525          
    620526   END SUBROUTINE lim_itd_me 
     
    624530   SUBROUTINE lim_itd_me_icestrength (kstrngth) ! (subroutine 2/6) 
    625531 
    626         !!----------------------------------------------------------------------------- 
     532        !!---------------------------------------------------------------------- 
    627533        !!                ***  ROUTINE lim_itd_me_icestrength *** 
    628534        !! ** Purpose : 
     
    634540        !! dissipated per unit area removed from the ice pack under compression, 
    635541        !! and assumed proportional to the change in potential energy caused 
    636         !! by ridging.   
     542        !! by ridging. Note that only Hibler's formulation is stable and that 
     543        !! ice strength has to be smoothed 
    637544        !! 
    638545        !! ** Inputs / Ouputs : kstrngth (what kind of ice strength we are using) 
     
    640547        !! ** External :  
    641548        !! 
    642         !! ** References : There are a lot of references and they are difficult to read 
    643         !!                 so the best thing to do is to accept what is here 
    644         !! 
    645         !! ** History : 
    646         !!           This routine was freely inpired from CICE 
    647         !!           authors William H. Lipscomb, LANL 
    648         !!                   Elizabeth C. Hunke (LANL) 
    649         !!                the routines were available online  
    650         !!                so, big thanks to the authors and to LANL 
    651         !!           The modified features are the ridging/rafting algorithm 
    652         !! 
    653         !!           (02-2006) Martin Vancoppenolle, UCL-ASTR  
    654         !!           Voila, c'est la derniere etape du codage!!! J'en ai   
    655         !!           plein le cul mais je m'en sors mieux qu'avant!!!  
    656         !!------------------------------------------------------------------ 
     549        !! ** References : 
     550        !!                 
     551        !!---------------------------------------------------------------------- 
    657552        !! * Arguments 
    658553  
     
    674569      REAL(wp), DIMENSION(jpi,jpj) :: & 
    675570         zworka              !: temporary array used here 
    676  
    677       WRITE(numout,*) ' lim_itd_me_icestrength : compute ice strength        ' 
    678       WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~ ' 
    679571 
    680572!------------------------------------------------------------------------------! 
     
    707599                     hi * hi 
    708600 
    709 !                    strength(ji,jj) = strength(ji,jj)                         & 
    710 !                    + athorn(ji,jj,jl)/krdg(ji,jj,jl)                         & 
    711 !                    * 1.0/3.0 * (hrmax(ji,jj,jl)**3 - hrmin(ji,jj,jl)**3)     & 
    712 !                    / (hrmax(ji,jj,jl)-hrmin(ji,jj,jl))                       
    713601                     !-------------------------- 
    714602                     ! PE gain from rafting ice 
     
    720608                     ! PE gain from ridging ice 
    721609                     !---------------------------- 
    722                      ! anything from ridge porosity ? 
    723610                     strength(ji,jj) = strength(ji,jj)                         & 
    724611                     + aridge(ji,jj,jl)/krdg(ji,jj,jl)                         & 
     
    753640         END DO                 ! i 
    754641 
    755          WRITE(numout,*) ' Pstar    : ', Pstar 
    756          WRITE(numout,*) ' vt_i     : ', vt_i(jiindex,jjindex) 
    757          WRITE(numout,*) ' C_rhg    : ', C_rhg 
    758          WRITE(numout,*) ' at_i     : ', at_i(jiindex,jjindex) 
    759  
    760642         ksmooth = 1 
    761643 
     
    766648! 5) Impact of brine volume 
    767649!------------------------------------------------------------------------------! 
     650! CAN BE REMOVED 
    768651! 
    769652      IF ( brinstren_swi .EQ. 1 ) THEN 
    770  
    771          WRITE(numout,*) ' mean brine volume : ', bv_i(jiindex,jjindex) 
    772653 
    773654         DO jj = 1, jpj 
     
    778659                  zdummy = 0.0 
    779660               ENDIF 
    780 !              zdummy = 0.0 
    781 !              strength(ji,jj) = strength(ji,jj) * ( 1.0 - zdummy ) 
    782 ! Timco and O'brien, CRST, 1994, Flexural strength equation for sea ice 
    783661               strength(ji,jj) = strength(ji,jj) * exp(-5.88*SQRT(MAX(bv_i(ji,jj),0.0))) 
    784662            END DO              ! j 
    785663         END DO                 ! i 
    786664 
    787          WRITE(numout,*) ' strength after brine volume correction : ', & 
    788                            strength(jiindex,jjindex) 
    789           
    790665      ENDIF 
    791666 
     
    861736      ENDIF ! ksmooth 
    862737       
    863       WRITE(numout,*) ' Ice strength : ', strength(jiindex,jjindex) 
    864  
    865738      ! Boundary conditions 
    866739      CALL lbc_lnk( strength, 'T', 1. ) 
     
    885758        !! ** External :  
    886759        !! 
    887         !! ** History : 
    888         !!           This routine was freely inspired from CICE 
    889         !!           authors William H. Lipscomb, LANL 
    890         !!                   Elizabeth C. Hunke (LANL) 
    891         !!                the routines were available online  
    892         !!                so, big thanks to the authors and to LANL 
    893         !!           The modified features are the ridging/rafting algorithm 
    894         !! 
    895         !!           (02-2006) Martin Vancoppenolle, UCL-ASTR  
    896         !!           J'espere que nos lignes sont courbes 
    897         !!           Mais j'ai bien peur qu'elles ne soient droites 
    898760        !!---------------------------------------------------------------------! 
    899761        !! * Arguments 
     
    901763      INTEGER :: & 
    902764         ji,jj,  &          ! horizontal indices 
    903          jl,jl1, &          ! thickness category index 
    904          jm,     &          ! ice type index 
    905          index,  & 
     765         jl,     &          ! thickness category index 
    906766         krdg_index         ! which participation function using 
    907767 
     
    913773         Gsum             ! Gsum(n) = sum of areas in categories 0 to n 
    914774 
    915       REAL(wp), DIMENSION(jpi,jpj,-1:jpl) ::    & 
    916          Gsumra           ! Gsum(n) = sum of areas in categories 0 to n 
    917  
    918       REAL(wp), DIMENSION(jpi,jpj,jpm)    ::    & 
    919          ai_typ           ! Surface of  respective ice types 
    920  
    921775      REAL(wp) ::    & 
    922776         hi,         &    ! ice thickness for each cat (m) 
     
    927781 
    928782      REAL(wp)            ::     & 
    929          zindb, zdummy,          & 
    930          zweight,                & 
     783         zdummy,                 & 
    931784         epsi06 = 1.0e-6 
    932785 
    933       INTEGER, DIMENSION(jpi,jpj,-1:jpl) :: & 
    934          index_cumul       ! temporary array used here 
    935786!------------------------------------------------------------------------------! 
    936787 
     
    958809      ! because of divergence during transport 
    959810 
    960 !+++++ 
    961 ! 0.0 Compute surfaces of relative ice types 
    962 ! BACK TO LIMA_MEC 
    963 !     ai_typ(:,:,:) = 0.0 
    964 !     DO jm = 1, jpm 
    965 !        DO jl = ice_cat_bounds(jm,1), ice_cat_bounds(jm,2) 
    966 !           DO jj = 1, jpj 
    967 !              DO ji = 1, jpi 
    968 !                 ai_typ(ji,jj,jm) = ai_typ(ji,jj,jm) + a_i(ji,jj,jl)  
    969 !              END DO 
    970 !           END DO 
    971 !        END DO 
    972 !     END DO 
    973 !     WRITE(numout,*) ' ai_typ ', ai_typ(jiindex,jjindex,1:3) 
    974 ! BACK TO LIMA_MEC 
    975  
    976811      ! Compute cumulative thickness distribution function 
    977812      ! Compute the cumulative thickness distribution function Gsum, 
    978813      ! where Gsum(n) is the fractional area in categories 0 to n. 
    979  
    980814      ! initial value (in h = 0) equals open water area 
    981815 
     
    1006840 
    1007841      ! Normalize the cumulative distribution to 1 
    1008       !former line 
    1009 !     zworka(:,:) = 1.0 / Gsum(:,:,jpl) 
    1010       WRITE(numout,*) ' AVANT : numit ' 
    1011       !new lines 
    1012842      DO jj = 1, jpj  
    1013843         DO ji = 1, jpi 
    1014 !           IF (numit.GE.46365) THEN  
    1015             IF ( (ji .EQ. jiindex) .AND. ( jj.EQ.jjindex ) ) THEN 
    1016                WRITE(numout,*) ' ji ,jj : ',ji,jj, 'Gsum:', & 
    1017                                                  Gsum(ji,jj,jpl) 
    1018             ENDIF 
    1019844            zworka(ji,jj) = 1.0 / Gsum(ji,jj,jpl) 
    1020845         END DO 
    1021846      END DO 
    1022847 
    1023       WRITE(numout,*) ' APRES ' 
    1024848      DO jl = 0, jpl 
    1025849         DO jj = 1, jpj  
    1026850            DO ji = 1, jpi 
    1027             IF ( (ji .EQ. jiindex) .AND. ( jj.EQ.jjindex ) ) THEN 
    1028                WRITE(numout,*) ' ji ,jj : ',ji,jj,jl, 'Gsum:', & 
    1029                                                  Gsum(ji,jj,jl) 
    1030                WRITE(numout,*) ' zworka ', zworka(ji,jj) 
    1031             ENDIF 
    1032  
    1033851               Gsum(ji,jj,jl) = Gsum(ji,jj,jl) * zworka(ji,jj) 
    1034852            END DO  
    1035853         END DO 
    1036854      END DO 
    1037  
    1038 ! BACK TO LIMA_MEC 
    1039 ! For rafted ice 
    1040 !     jm = 3 
    1041 !     DO jj = 1, jpj 
    1042 !        DO ji = 1, jpi 
    1043 !           Gsumra(ji,jj,ice_cat_bounds(jm,1)-1) = 0.0 
    1044 !!          zworka(ji,jj)  = 1.0 / ai_typ(ji,jj,jm) ! used to normalize Gsum 
    1045 !        END DO 
    1046 !     END DO 
    1047  
    1048 !     DO jl = ice_cat_bounds(jm,1), ice_cat_bounds(jm,2) 
    1049 !        DO jj = 1, jpj  
    1050 !           DO ji = 1, jpi 
    1051 !              Gsumra(ji,jj,jl) = Gsumra(ji,jj,jl-1) + a_i(ji,jj,jl)*zworka(ji,jj) 
    1052 !           END DO 
    1053 !        END DO 
    1054 !     END DO 
    1055  
    1056 ! +++++ [ 
    1057       WRITE(numout,*)  
    1058       WRITE(numout,*) ' Gsum : ', Gsum(jiindex,jjindex,-1:jpl) 
    1059 ! +++++ ] 
    1060  
    1061855 
    1062856! 1.3 Compute participation function a(h) = b(h).g(h) (athorn) 
     
    1098892      ! precompute exponential terms using Gsum as a work array 
    1099893      zdummy = 1.0 / (1.0-EXP(-astari)) 
    1100       WRITE(numout,*) ' zdummy : ', zdummy 
    1101894 
    1102895      DO jl = -1, jpl 
     
    1119912      ENDIF ! krdg_index 
    1120913 
    1121       WRITE(numout,*) ' astari : ', astari 
    1122       WRITE(numout,*) ' athorn : ', athorn(jiindex,jjindex,0:jpl) 
    1123  
    1124 ! BACK TO LIMA_MEC 
    1125 !     jm = 3 
    1126 !     DO jl = ice_cat_bounds(3,1), ice_cat_bounds(3,2) ! only undeformed ice participates 
    1127 !        DO jj = 1, jpj  
    1128 !           DO ji = 1, jpi 
    1129 !           IF (Gsumra(ji,jj,jl) < Gstar) THEN 
    1130 !              athorn(ji,jj,jl) = Gstari * (Gsumra(ji,jj,jl)-Gsumra(ji,jj,jl-1)) * & 
    1131 !                   (2.0 - (Gsumra(ji,jj,jl-1)+Gsumra(ji,jj,jl))*Gstari) 
    1132 !           ELSEIF (Gsumra(ji,jj,jl-1) < Gstar) THEN 
    1133 !              athorn(ji,jj,jl) = Gstari * (Gstar-Gsumra(ji,jj,jl-1)) *  & 
    1134 !                   (2.0 - (Gsumra(ji,jj,jl-1)+Gstar)*Gstari) 
    1135 !           ELSE 
    1136 !              athorn(ji,jj,jl) = 0.0 
    1137 !           ENDIF 
    1138 !           END DO ! ji 
    1139 !        END DO ! jj 
    1140 !     END DO ! jl  
    1141 ! BACK TO LIMA_MEC 
    1142  
    1143 !!! 
    1144 ! BACK TO LIMA_MEC 
    1145       ! Weighting 
    1146       ! Undeformed ice 
    1147 !     DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) 
    1148 !        DO jj = 1, jpj 
    1149 !           DO ji = 1, jpi 
    1150 !              zindb            = MAX( 0.0, SIGN( 1.0, a_i(ji,jj,jl) - epsi06 ) ) 
    1151 !              zweight          = zindb*ai_typ(ji,jj,1) /  & 
    1152 !                                 MAX( ai_typ(ji,jj,1) + ai_typ(ji,jj,3), epsi06 ) 
    1153 !              athorn(ji,jj,jl) = zweight*athorn(ji,jj,jl)   
    1154 !           END DO 
    1155 !        END DO 
    1156 !     END DO 
    1157  
    1158       ! Rafted ice 
    1159 !     jm = 3 
    1160 !     DO jl = ice_cat_bounds(jm,1), ice_cat_bounds(jm,2) 
    1161 !        DO jj = 1, jpj 
    1162 !           DO ji = 1, jpi 
    1163 !              zindb              = MAX( 0.0, SIGN( 1.0, a_i(ji,jj,jl) - epsi06 ) ) 
    1164 !              zweight            = zindb*ai_typ(ji,jj,jm) /  &  
    1165 !                                   MAX( ai_typ(ji,jj,1) + ai_typ(ji,jj,3) , epsi06) 
    1166 !              athorn(ji,jj,jl) = zweight*athorn(ji,jj,jl)   
    1167 !           END DO 
    1168 !        END DO 
    1169 !     END DO 
    1170        
    1171 !+++++ 
    1172 ! BACK TO LIMA_MEC 
    1173 !!! 
    1174        
    1175914      ! Ridging and rafting ice participation functions 
    1176915      IF ( raftswi .EQ. 1 ) THEN 
     
    1224963 
    1225964      ENDIF 
    1226 !+++++ 
    1227       WRITE(numout,*) 
    1228       WRITE(numout,*) ' aridge : ', aridge(jiindex, jjindex, 1:jpl) 
    1229       WRITE(numout,*) ' araft  : ', araft (jiindex, jjindex, 1:jpl) 
    1230 !+++++ 
    1231965 
    1232966!----------------------------------------------------------------- 
     
    12901024            DO ji = 1, jpi 
    12911025               aksum(ji,jj)    = aksum(ji,jj)                          & 
    1292 !                      + athorn(ji,jj,jl) * (1.0 - 1.0/krdg(ji,jj,jl)) 
    12931026                       + aridge(ji,jj,jl) * (1.0 - 1.0/krdg(ji,jj,jl))    & 
    12941027                       + araft (ji,jj,jl) * (1.0 - 1.0/kraft) 
     
    12971030      END DO 
    12981031 
    1299       WRITE(numout,*) ' krdg  : ', krdg(jiindex,jjindex,1:jpl) 
    1300       WRITE(numout,*) ' hraft : ', hraft(jiindex,jjindex,1:jpl) 
    1301       WRITE(numout,*) ' aksum : ', aksum(jiindex,jjindex) 
    1302  
    13031032      END SUBROUTINE lim_itd_me_ridgeprep 
    13041033 
     
    13241053        !! ** External :  
    13251054        !! 
    1326         !! ** History : 
    1327         !!           This routine was freely inpired from CICE 
    1328         !!           authors William H. Lipscomb, LANL 
    1329         !!                   Elizabeth C. Hunke (LANL) 
    1330         !!                the routines were available online  
    1331         !!                so, big thanks to the authors and to LANL 
    1332         !!           The modified features are the ridging/rafting algorithm 
    1333         !! 
    1334         !!           (02-2006) Martin Vancoppenolle, UCL-ASTR  
    1335         !!     Dans 5 mois je suis sensé avoir fini ma thèse alors j'ai interet a cavaler 
    1336         !!     sinon ca va mal se passer 
    1337         !!     J'ai trop chaud, je suis fatigué 
    1338         !!     Mon ame se desseche t elle ?? 
    1339         !!     Suis je en train de changer ??? 
    1340         !!     Oublie-je l'essentiel de mon histoire ?? 
    1341         !! 
    13421055 
    13431056      REAL (wp), DIMENSION(jpi,jpj), INTENT(IN)   :: & 
     
    13551068         jk,           &   ! ice layer index 
    13561069         ij,           &   ! horizontal index, combines i and j loops 
    1357          icells,       &   ! number of cells with aicen > puny 
    1358          index             ! index for debug ice points 
     1070         icells            ! number of cells with aicen > puny 
    13591071 
    13601072      INTEGER, DIMENSION(1:(jpi+1)*(jpj+1)) :: & 
     
    13701082         vsnon_init,            &  ! snow volume before ridging 
    13711083         esnon_init,            &  ! snow energy before ridging 
    1372          smv_i_init,             &  ! ice salinity before ridging 
    1373          oa_i_init                  ! ice age before ridging 
     1084         smv_i_init,            &  ! ice salinity before ridging 
     1085         oa_i_init                 ! ice age before ridging 
    13741086 
    13751087      REAL(wp), DIMENSION(jpi,jpj,jkmax,jpl) :: & 
     
    13801092         ardg1      , &     ! area of ice ridged 
    13811093         ardg2      , &     ! area of new ridges 
    1382          virdg      , &     ! ice volume of ridging ice 
    13831094         vsrdg      , &     ! snow volume of ridging ice 
    13841095         esrdg      , &     ! snow energy of ridging ice 
    1385          smrdg      , &     ! salinity of ridging ice 
    1386          oirdg      , &     ! volumic age content of ridging ice 
    13871096         oirdg1     , &     ! areal age content of ridged ice 
    13881097         oirdg2     , &     ! areal age content of ridging ice 
     
    13971106         srdg1      , &     ! sal*volume of ice ridged 
    13981107         srdg2      , &     ! sal*volume of new ridges 
    1399          smsw       , &     ! sal*volume of water trapped into ridges 
    1400          totvrdg1   , &     ! total volume of ice ridged 
    1401          totvrdg2           ! total volume of new ridges 
     1108         smsw               ! sal*volume of water trapped into ridges 
    14021109 
    14031110      REAL(wp), DIMENSION(jpi,jpj) ::           & 
     
    14091116         esrft      , &     ! snow energy of rafting ice 
    14101117         smrft      , &     ! salinity of rafting ice 
    1411          oirft      , &     ! volumic age content of rafting ice 
    14121118         oirft1     , &     ! areal age content of rafted ice 
    14131119         oirft2             ! areal age content of rafting ice 
    14141120 
    14151121      REAL(wp), DIMENSION(jpi,jpj,jkmax) ::    & 
    1416          eirdg      , &     ! ice energy of ridging ice 
    14171122         eirft      , &     ! ice energy of rafting ice 
    14181123         erdg1      , &     ! enth*volume of ice ridged 
     
    14771182         END DO !jj 
    14781183      END DO !ji 
    1479  
    1480       !+++++ 
    1481 !     WRITE(numout,*) ' 1. Change in open water area ' 
    1482 !     WRITE(numout,*) ' closing_gross', closing_gross(jiindex, jjindex) 
    1483 !     WRITE(numout,*) ' opning       ', opning       (jiindex, jjindex) 
    1484 !     WRITE(numout,*) ' ato_i        ', ato_i        (jiindex, jjindex) 
    1485 !     WRITE(numout,*)  
    1486       !+++++  
    14871184 
    14881185      ! if negative open water area alert it 
     
    15271224      END DO !jl 
    15281225 
    1529       !+++++ 
    1530       WRITE(numout,*) ' State variables before ridging is computed ' 
    1531       WRITE(numout,*) ' a_i         ', a_i(jiindex, jjindex, 1:jpl) 
    1532       WRITE(numout,*) ' v_i         ', v_i(jiindex, jjindex, 1:jpl) 
    1533       WRITE(numout,*) ' v_s         ', v_s(jiindex, jjindex, 1:jpl) 
    1534       WRITE(numout,*) ' e_s         ', e_s(jiindex, jjindex, 1, 1:jpl) 
    1535       WRITE(numout,*) ' smv_i       ', smv_i(jiindex, jjindex, 1:jpl) 
    1536       WRITE(numout,*) ' oa_i        ', oa_i (jiindex, jjindex, 1:jpl) 
    1537       WRITE(numout,*) ' e_i 1       ', e_i (jiindex, jjindex, 1, 1:jpl) 
    1538       WRITE(numout,*) ' e_i 2       ', e_i (jiindex, jjindex, 2, 1:jpl) 
    1539       WRITE(numout,*) 
    1540 !     !+++++ 
    1541  
     1226! 
    15421227!----------------------------------------------------------------- 
    15431228! 3) Pump everything from ice which is being ridged / rafted 
     
    15521237      !------------------------------------------------ 
    15531238 
    1554       !+++++ 
    1555 !     WRITE(numout,*) 
    1556 !     WRITE(numout,*) ' *** jl1 ***  ', jl1 
    1557       !+++++ 
    15581239         icells = 0 
    15591240         DO jj = 1, jpj 
     
    15711252         large_afrft = .false. 
    15721253 
    1573 !        !+++++  
    1574 !        WRITE(numout,*) ' 3.1 ridging cells ' 
    1575 !        WRITE(numout,*) ' icells     ', icells 
    1576 !        WRITE(numout,*) 
    1577          !+++++ 
    1578  
    15791254         DO ij = 1, icells 
    15801255            ji = indxi(ij) 
     
    15941269            oirdg2(ji,jj)= oirdg1(ji,jj) / krdg(ji,jj,jl1) 
    15951270            oirft2(ji,jj)= oirft1(ji,jj) / kraft 
    1596  
    1597             !+++++ 
    1598 !           IF ( ( ji.EQ.jiindex ) .AND. (jj.EQ.jjindex) ) THEN 
    1599 !              WRITE(numout,*) ' 3.2 area of ridging ice and of new ridge ' 
    1600 !              WRITE(numout,*) ' aridge    ', aridge(ji,jj,jl1) 
    1601 !              WRITE(numout,*) ' araft     ', araft (ji,jj,jl1) 
    1602 !              WRITE(numout,*) ' krdg      ', krdg  (ji,jj,jl1) 
    1603 !              WRITE(numout,*) ' kraft     ', kraft 
    1604 !              WRITE(numout,*) ' clogross  ', closing_gross(ji,jj) 
    1605 !              WRITE(numout,*) ' ardg1 : ', ardg1(jiindex,jjindex) 
    1606 !              WRITE(numout,*) ' arft1 : ', arft1(jiindex,jjindex) 
    1607 !              WRITE(numout,*) ' ardg2 : ', ardg2(jiindex,jjindex) 
    1608 !              WRITE(numout,*) ' arft2 : ', arft2(jiindex,jjindex) 
    1609 !              WRITE(numout,*) 
    1610 !           ENDIF 
    1611             !+++++ 
    16121271 
    16131272      !--------------------------------------------------------------- 
     
    16291288            ENDIF 
    16301289 
    1631 !           !+++++ 
    1632 !           IF ( ( ji.EQ.jiindex ) .AND. (jj.EQ.jjindex) ) THEN 
    1633 !              WRITE(numout,*) ' 3.3 Ridging / rafting fractions ' 
    1634 !              WRITE(numout,*) ' afrac : ', afrac(ji,jj) 
    1635 !              WRITE(numout,*) ' afrft : ', afrft(ji,jj) 
    1636 !              WRITE(numout,*) 
    1637 !           ENDIF 
    1638 !           !+++++  
    1639  
    16401290      !-------------------------------------------------------------------------- 
    16411291      ! 3.4) Subtract area, volume, and energy from ridging  
    16421292      !     / rafting category n1. 
    16431293      !-------------------------------------------------------------------------- 
    1644 !        jl1 looping 1-jpl 
    1645 !           ij looping 1-icells 
    1646  
    1647             ! ridging volumes, heat contents ... 
    1648             ! virdg is the volume of ridged ice, at the end of ridging process 
    1649             ! i.e., it includes 30% porosity 
    1650 !           virdg(ji,jj) = vicen_init(ji,jj,jl1) * afrac(ji,jj)  
    16511294            vrdg1(ji,jj) = vicen_init(ji,jj,jl1) * afrac(ji,jj) /             & 
    16521295                           ( 1.0 + ridge_por ) 
     
    16591302                            ( 1. + ridge_por ) 
    16601303            srdg2(ji,jj) = smv_i_init(ji,jj,jl1) * afrac(ji,jj) 
    1661 !           oirdg(ji,jj) = oa_i_init(ji,jj,jl1)  * afrac(ji,jj) * & 
    1662 !                          ( 1.0 - ridge_por ) 
    16631304 
    16641305            ! rafting volumes, heat contents ... 
     
    16671308            esrft(ji,jj) = esnon_init(ji,jj,jl1) * afrft(ji,jj) 
    16681309            smrft(ji,jj) = smv_i_init(ji,jj,jl1) * afrft(ji,jj)  
    1669 !           oirft(ji,jj) = oa_i_init(ji,jj,jl1)  * afrft(ji,jj)  
    16701310 
    16711311            ! substract everything 
     
    16831323            ! Salinity 
    16841324            !------------- 
    1685             ! salinity times volume of the seawater into ridges 
    1686 !           WRITE(numout,*) ' sss_io : ', sss_io(ji,jj) 
    1687 !           WRITE(numout,*) ' vsw    : ', vsw(ji,jj) 
    1688 !           WRITE(numout,*) ' ridge_por : ', ridge_por 
    1689              
    16901325            smsw(ji,jj)       = sss_io(ji,jj) * vsw(ji,jj) * ridge_por  
    16911326 
     
    17041339            srdg2(ji,jj)      = sm_newridge * vrdg2(ji,jj)  
    17051340 
    1706  
    17071341      !------------------------------------             
    1708       ! 3.5 Increment ridging diagnostics 
     1342      ! 3.6 Increment ridging diagnostics 
    17091343      !------------------------------------             
    17101344 
     
    17201354 
    17211355      !------------------------------------------             
    1722       ! 3.6 Put the snow somewhere in the ocean 
     1356      ! 3.7 Put the snow somewhere in the ocean 
    17231357      !------------------------------------------             
    17241358 
     
    17421376 
    17431377      !----------------------------------------------------------------- 
    1744       ! 3.7) Compute quantities used to apportion ice among categories 
     1378      ! 3.8 Compute quantities used to apportion ice among categories 
    17451379      ! in the n2 loop below 
    17461380      !----------------------------------------------------------------- 
     
    17541388 
    17551389 
    1756          !++++++++ 
    1757          IF ( vrdg1(ji,jj) .GT. 0.0 ) THEN 
    1758             IF ( ( vrdg2(ji,jj) / vrdg1(ji,jj) - ( 1. + ridge_por ) .GT. epsi10 ) ) &  
    1759             THEN  
    1760             WRITE(numout,*) ' ALERTE in ridging routine  ' 
    1761             WRITE(numout,*) ' difference : ', vrdg2(ji,jj) / vrdg1(ji,jj) - ( 1. + ridge_por ) 
    1762             WRITE(numout,*) ' vrdg2/vrdg1              ', vrdg2(ji,jj) / & 
    1763             vrdg1(ji,jj) 
    1764             WRITE(numout,*) ' should be equal to 1+p : ', 1 + ridge_por 
    1765             WRITE(numout,*) ' vrdg1 : ', vrdg1(ji,jj) 
    1766             WRITE(numout,*) ' vrdg2 : ', vrdg2(ji,jj) 
    1767             ENDIF 
    1768          ENDIF 
    1769  
    1770          !++++++++ 
    1771          ! 
    1772  
    17731390         END DO                 ! ij 
    17741391 
    1775 !        !+++++ 
    1776 !        !+++++ 
    1777  
    1778 !        !+++++ 
    1779 !        WRITE(numout,*) 
    1780 !        WRITE(numout,*) ' Mass of salt of ridging ice 1 : ', srdg1(jiindex,jjindex) 
    1781 !        WRITE(numout,*) ' Mass of salt of ridging ice 2 : ', srdg2(jiindex,jjindex) 
    1782 !        WRITE(numout,*) ' Salinity of ridging ice     : ', smrdg(jiindex,jjindex) / &  
    1783 !                                                           virdg(jiindex,jjindex) / (1.0-ridge_por) 
    1784 !        WRITE(numout,*) ' Mass of salt after ridging  : ', sm_i(ji,jj,jl1) 
    1785 !        WRITE(numout,*) ' Sal after removal of ridg.ice ', sm_i(ji,jj,jl1) / & 
    1786 !                                                           vicen_init(ji,jj,jl1) 
    1787          !+++++ 
    1788  
    1789  
    17901392      !-------------------------------------------------------------------- 
    1791       ! 3.8) Compute ridging ice enthalpy, remove it from ridging ice and 
     1393      ! 3.9 Compute ridging ice enthalpy, remove it from ridging ice and 
    17921394      !      compute ridged ice enthalpy  
    17931395      !-------------------------------------------------------------------- 
     
    18381440                  ji = indxi(ij) 
    18391441                  jj = indxj(ij) 
    1840             ! ridging diagnostics 
    1841 !           WRITE(numout,*) ' debut ', eice_init(ji,jj) 
    1842 !           WRITE(numout,*) ' erdg2 ', erdg2(ji,jj,jk)   
    1843 !           WRITE(numout,*) ' erdg1 ', erdg1(ji,jj,jk)   
    1844 !           WRITE(numout,*) ' ersw  ', ersw(ji,jj,jk)   
    1845 !           WRITE(numout,*) ' vsw   ', vsw(ji,jj)   
    18461442                  eice_init(ji,jj) = eice_init(ji,jj) + erdg2(ji,jj,jk) - & 
    18471443                  erdg1(ji,jj,jk) 
     
    18491445            END DO !jk 
    18501446         ENDIF 
    1851  
    1852 !+++++ [ 
    1853 !        WRITE(numout,*) 
    1854 !        WRITE(numout,*) ' ridging ice enthalpy ', jl1 
    1855 !        WRITE(numout,*) ' eird1     ', erdg1(jiindex,jjindex,1:nlay_i) 
    1856 !        WRITE(numout,*) ' eird2 old ', erdg2(jiindex,jjindex,1:nlay_i) 
    1857 !        WRITE(numout,*) ' eirft     ', eirft(jiindex,jjindex,1:2) 
    1858 !        WRITE(numout,*) ' e_i       ', e_i  (jiindex,jjindex,1:nlay_i,jl1) 
    1859 !+++++ ] 
    18601447 
    18611448         IF (large_afrac) THEN  ! there is a bug 
     
    18841471         ENDIF                  ! large_afrft 
    18851472 
    1886 !+++++ [ 
    1887 !           IF ( ( ji.EQ.jiindex ) .AND. (jj.EQ.jjindex) ) THEN 
    1888 !              WRITE(numout,*) ' 3.4 Substract area, volume and energy ' 
    1889 !              WRITE(numout,*) ' virdg : ', virdg(ji,jj) 
    1890 !              WRITE(numout,*) ' vsrdg     ', vsrdg(ji,jj) 
    1891 !              WRITE(numout,*) ' esrdg     ', esrdg(ji,jj) 
    1892 !              WRITE(numout,*) ' smrdg     ', smrdg(ji,jj) 
    1893 !              WRITE(numout,*) ' oirdg     ', oirdg(ji,jj) 
    1894 !              WRITE(numout,*) 
    1895 !              WRITE(numout,*) ' virft : ', virft(ji,jj) 
    1896 !              WRITE(numout,*) ' vsrft     ', vsrft(ji,jj) 
    1897 !              WRITE(numout,*) ' esrft     ', esrft(ji,jj) 
    1898 !              WRITE(numout,*) ' smrft     ', smrft(ji,jj) 
    1899 !              WRITE(numout,*) ' oirft     ', oirft(ji,jj) 
    1900 !              WRITE(numout,*)   
    1901  
    1902 !              WRITE(numout,*) ' a_i   : ', a_i(ji,jj,jl1) 
    1903 !              WRITE(numout,*) ' v_i   : ', v_i(ji,jj,jl1) 
    1904 !              WRITE(numout,*) ' v_s       ', v_s(ji,jj,jl1) 
    1905 !              WRITE(numout,*) ' e_s       ', e_s(ji,jj,1,jl1) 
    1906 !              WRITE(numout,*) ' smv_i      ', smv_i(ji,jj,jl1) 
    1907 !              WRITE(numout,*) ' oa_i       ', oa_i(ji,jj,jl1) 
    1908 !           ENDIF 
    1909 !+++++ ] 
    1910  
    19111473!------------------------------------------------------------------------------- 
    19121474! 4) Add area, volume, and energy of new ridge to each category jl2 
     
    19461508 
    19471509            END DO ! ij 
    1948 !           WRITE(numout,*) ' new ridges being built from ', jl1 
    1949 !           WRITE(numout,*) ' added to ', jl2 
    1950 !           WRITE(numout,*) ' a_i   : ', a_i(jiindex,jjindex,jl2) 
    1951 !           WRITE(numout,*) ' v_i   : ', v_i(jiindex,jjindex,jl2) 
    19521510 
    19531511            ! Transfer ice energy to category jl2 by ridging 
     
    19641522         END DO                 ! jl2 (new ridges)             
    19651523 
    1966 !        WRITE(numout,*) ' new ridges built ' 
    1967 !        WRITE(numout,*) ' a_i   : ', a_i(jiindex,jjindex,jl1) 
    1968 !        WRITE(numout,*) ' v_i   : ', v_i(jiindex,jjindex,jl1) 
    1969 !        WRITE(numout,*) ' e_i   : ', e_i(jiindex,jjindex,:,jl1) 
    1970  
    19711524         DO jl2  = ice_cat_bounds(1,1), ice_cat_bounds(1,2)  
    1972                ! jl2  = ice_cat_bounds(3,1) ! rafted category 
    19731525 
    19741526            DO ij = 1, icells 
     
    19901542                  oa_i(ji,jj,jl2)  = oa_i(ji,jj,jl2)                  & 
    19911543                                   + oirft2(ji,jj)     
    1992  
    1993 !                 IF ( (ji.EQ.jiindex) .AND. (jj.EQ.jjindex) ) THEN 
    1994 !                         WRITE(numout,*) ' raft ice from jl1 ', jl1 , & 
    1995 !                                         ' to jl2 :', jl2 
    1996 !                         WRITE(numout,*) ' hraft (jl1) ', hraft(ji,jj,jl1) 
    1997 !                         WRITE(numout,*) ' hi_maxs ', hi_max(jl2-1), hi_max(jl2) 
    1998 !                 ENDIF 
    1999  
    20001544               ENDIF ! hraft 
    20011545 
     
    20171561         END DO ! jl2 
    20181562 
    2019 !        WRITE(numout,*) ' new rafted ice built ' 
    2020 !        WRITE(numout,*) ' a_i   : ', a_i(jiindex,jjindex,jl1) 
    2021 !        WRITE(numout,*) ' v_i   : ', v_i(jiindex,jjindex,jl1) 
    2022 !        WRITE(numout,*) ' e_i   : ', e_i(jiindex,jjindex,:,jl1) 
    2023  
    20241563      END DO ! jl1 (deforming categories) 
    20251564 
     
    20601599 
    20611600      INTEGER :: ji, jj, jl 
    2062  
    2063 !     WRITE(numout,*) ' lim_itd_me_asumr : sum the ice / open water fractions' 
    2064 !     WRITE(numout,*) ' ~~~~~~~~~~~~~~~~ ' 
    20651601 
    20661602      !----------------------------------------------------------------- 
     
    21721708           xtmp      ! temporary variable 
    21731709 
    2174       WRITE(numout,*) ' lim_itd_me_zapsmall ' 
    2175       WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~ ' 
    2176        
    21771710      DO jl = 1, jpl 
    21781711 
Note: See TracChangeset for help on using the changeset viewer.