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 14072 for NEMO/trunk/src/ICE/icethd_pnd.F90 – NEMO

Ignore:
Timestamp:
2020-12-04T08:48:38+01:00 (3 years ago)
Author:
laurent
Message:

Merging branch "2020/dev_r13648_ASINTER-04_laurent_bulk_ice", ticket #2369

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/ICE/icethd_pnd.F90

    r14005 r14072  
    1 MODULE icethd_pnd  
     1MODULE icethd_pnd 
    22   !!====================================================================== 
    33   !!                     ***  MODULE  icethd_pnd   *** 
     
    4141   INTEGER, PARAMETER ::   np_pndTOPO = 3   ! Level ice pond scheme 
    4242 
    43    !--------------------------------------------------------------------------  
     43   !-------------------------------------------------------------------------- 
    4444   ! Diagnostics for pond volume per area 
    4545   ! 
     
    5656   REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   diag_dvpn_drn       ! pond volume lost by drainage     [-] 
    5757   REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   diag_dvpn_lid       ! exchange with lid / refreezing   [-] 
    58    REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   diag_dvpn_rnf       ! meltwater pond lost to runoff    [-]       
     58   REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   diag_dvpn_rnf       ! meltwater pond lost to runoff    [-] 
    5959   REAL(wp), ALLOCATABLE, DIMENSION(:)   ::   diag_dvpn_mlt_1d    ! meltwater pond volume input      [-] 
    6060   REAL(wp), ALLOCATABLE, DIMENSION(:)   ::   diag_dvpn_drn_1d    ! pond volume lost by drainage     [-] 
     
    7575      !!------------------------------------------------------------------- 
    7676      !!               ***  ROUTINE ice_thd_pnd   *** 
    77       !!                
     77      !! 
    7878      !! ** Purpose :   change melt pond fraction and thickness 
    7979      !! 
     
    8484      INTEGER ::   ji, jj, jl        ! loop indices 
    8585      !!------------------------------------------------------------------- 
    86        
     86 
    8787      ALLOCATE( diag_dvpn_mlt(jpi,jpj), diag_dvpn_lid(jpi,jpj), diag_dvpn_drn(jpi,jpj), diag_dvpn_rnf(jpi,jpj) ) 
    8888      ALLOCATE( diag_dvpn_mlt_1d(jpij), diag_dvpn_lid_1d(jpij), diag_dvpn_drn_1d(jpij), diag_dvpn_rnf_1d(jpij) ) 
     
    111111         END_2D 
    112112      END DO 
    113        
     113 
    114114      !------------------------------ 
    115115      !  Identify grid cells with ice 
     
    148148      DEALLOCATE( diag_dvpn_mlt   , diag_dvpn_lid   , diag_dvpn_drn   , diag_dvpn_rnf    ) 
    149149      DEALLOCATE( diag_dvpn_mlt_1d, diag_dvpn_lid_1d, diag_dvpn_drn_1d, diag_dvpn_rnf_1d ) 
    150        
    151    END SUBROUTINE ice_thd_pnd  
    152  
    153  
    154    SUBROUTINE pnd_CST  
     150 
     151   END SUBROUTINE ice_thd_pnd 
     152 
     153 
     154   SUBROUTINE pnd_CST 
    155155      !!------------------------------------------------------------------- 
    156156      !!                ***  ROUTINE pnd_CST  *** 
     
    158158      !! ** Purpose :   Compute melt pond evolution 
    159159      !! 
    160       !! ** Method  :   Melt pond fraction and thickness are prescribed  
     160      !! ** Method  :   Melt pond fraction and thickness are prescribed 
    161161      !!                to non-zero values when t_su = 0C 
    162162      !! 
    163163      !! ** Tunable parameters : pond fraction (rn_apnd), pond depth (rn_hpnd) 
    164       !!                 
     164      !! 
    165165      !! ** Note   : Coupling with such melt ponds is only radiative 
    166166      !!             Advection, ridging, rafting... are bypassed 
     
    172172      !!------------------------------------------------------------------- 
    173173      DO jl = 1, jpl 
    174           
     174 
    175175         CALL tab_2d_1d( npti, nptidx(1:npti), a_i_1d    (1:npti), a_i    (:,:,jl) ) 
    176176         CALL tab_2d_1d( npti, nptidx(1:npti), t_su_1d   (1:npti), t_su   (:,:,jl) ) 
     
    185185            ! 
    186186            IF( a_i_1d(ji) >= 0.01_wp .AND. t_su_1d(ji) >= rt0 ) THEN 
    187                h_ip_1d(ji)      = rn_hpnd     
     187               h_ip_1d(ji)      = rn_hpnd 
    188188               a_ip_1d(ji)      = rn_apnd * a_i_1d(ji) 
    189189               h_il_1d(ji)      = 0._wp    ! no pond lids whatsoever 
    190190            ELSE 
    191                h_ip_1d(ji)      = 0._wp     
     191               h_ip_1d(ji)      = 0._wp 
    192192               a_ip_1d(ji)      = 0._wp 
    193193               h_il_1d(ji)      = 0._wp 
     
    222222      !! ** Method  : A fraction of meltwater is accumulated in ponds and sent to ocean when surface is freezing 
    223223      !!              We  work with volumes and then redistribute changes into thickness and concentration 
    224       !!              assuming linear relationship between the two.  
     224      !!              assuming linear relationship between the two. 
    225225      !! 
    226226      !! ** Action  : - pond growth:      Vp = Vp + dVmelt                                          --- from Holland et al 2012 --- 
     
    237237      !!                                     dH = lid thickness change. Retrieved from this eq.:    --- from Flocco et al 2010 --- 
    238238      !! 
    239       !!                                                                   rhoi * Lf * dH/dt = ki * MAX(Tp-Tsu,0) / H  
     239      !!                                                                   rhoi * Lf * dH/dt = ki * MAX(Tp-Tsu,0) / H 
    240240      !!                                                                      H = lid thickness 
    241241      !!                                                                      Lf = latent heat of fusion 
     
    260260      !! 
    261261      !! ** Tunable parameters : rn_apnd_max, rn_apnd_min, rn_pnd_flush 
    262       !!  
    263       !! ** Note       :   Mostly stolen from CICE but not only. These are between level-ice ponds and CESM ponds.  
     262      !! 
     263      !! ** Note       :   Mostly stolen from CICE but not only. These are between level-ice ponds and CESM ponds. 
    264264      !! 
    265265      !! ** References :   Flocco and Feltham (JGR, 2007) 
     
    267267      !!                   Holland et al      (J. Clim, 2012) 
    268268      !!                   Hunke et al        (OM 2012) 
    269       !!-------------------------------------------------------------------   
     269      !!------------------------------------------------------------------- 
    270270      REAL(wp), DIMENSION(nlay_i) ::   ztmp           ! temporary array 
    271271      !! 
     
    287287      INTEGER  ::   ji, jk, jl                        ! loop indices 
    288288      !!------------------------------------------------------------------- 
    289       z1_rhow   = 1._wp / rhow  
     289      z1_rhow   = 1._wp / rhow 
    290290      z1_aspect = 1._wp / zaspect 
    291       z1_Tp     = 1._wp / zTp  
    292        
     291      z1_Tp     = 1._wp / zTp 
     292 
    293293      CALL tab_2d_1d( npti, nptidx(1:npti), at_i_1d          (1:npti), at_i          ) 
    294294      CALL tab_2d_1d( npti, nptidx(1:npti), wfx_pnd_1d       (1:npti), wfx_pnd       ) 
    295        
     295 
    296296      CALL tab_2d_1d( npti, nptidx(1:npti), diag_dvpn_mlt_1d (1:npti), diag_dvpn_mlt ) 
    297297      CALL tab_2d_1d( npti, nptidx(1:npti), diag_dvpn_drn_1d (1:npti), diag_dvpn_drn ) 
     
    315315            CALL tab_2d_1d( npti, nptidx(1:npti), t_i_1d (1:npti,jk), t_i (:,:,jk,jl) ) 
    316316         END DO 
    317           
     317 
    318318         !----------------------- 
    319319         ! Melt pond calculations 
     
    342342               zdv_avail = -( dh_i_sum(ji)*rhoi + dh_s_mlt(ji)*rhos ) * z1_rhow * a_i_1d(ji) ! > 0 
    343343               zfr_mlt   = rn_apnd_min + ( rn_apnd_max - rn_apnd_min ) * at_i_1d(ji) !  = ( 1 - r ) = fraction of melt water that is not flushed 
    344                zdv_mlt   = MAX( 0._wp, zfr_mlt * zdv_avail ) ! max for roundoff errors?  
     344               zdv_mlt   = MAX( 0._wp, zfr_mlt * zdv_avail ) ! max for roundoff errors? 
    345345               ! 
    346346               !--- overflow ---! 
     
    349349               !    If pond area exceeds zfr_mlt * a_i_1d(ji) then reduce the pond volume 
    350350               !       a_ip_max = zfr_mlt * a_i 
    351                !       => from zaspect = h_ip / (a_ip / a_i), set v_ip_max as:  
     351               !       => from zaspect = h_ip / (a_ip / a_i), set v_ip_max as: 
    352352               zv_ip_max = zfr_mlt**2 * a_i_1d(ji) * zaspect 
    353353               zdv_mlt   = MAX( 0._wp, MIN( zdv_mlt, zv_ip_max - v_ip_1d(ji) ) ) 
     
    356356               !    If pond depth exceeds half the ice thickness then reduce the pond volume 
    357357               !       h_ip_max = 0.5 * h_i 
    358                !       => from zaspect = h_ip / (a_ip / a_i), set v_ip_max as:  
     358               !       => from zaspect = h_ip / (a_ip / a_i), set v_ip_max as: 
    359359               zv_ip_max = z1_aspect * a_i_1d(ji) * 0.25 * h_i_1d(ji) * h_i_1d(ji) 
    360360               zdv_mlt   = MAX( 0._wp, MIN( zdv_mlt, zv_ip_max - v_ip_1d(ji) ) ) 
     
    375375               IF( ln_pnd_lids ) THEN 
    376376                  ! 
    377                   !--- Lid growing and subsequent pond shrinking ---!  
     377                  !--- Lid growing and subsequent pond shrinking ---! 
    378378                  zdv_frz = - 0.5_wp * MAX( 0._wp, -v_il_1d(ji) + & ! Flocco 2010 (eq. 5) solved implicitly as aH**2 + bH + c = 0 
    379379                     &                    SQRT( v_il_1d(ji)**2 + a_ip_1d(ji)**2 * 4._wp * rcnd_i * zdT * rDt_ice / (rLfus * rhow) ) ) ! max for roundoff errors 
     
    386386 
    387387               ELSE 
    388                   zdv_frz = v_ip_1d(ji) * ( EXP( 0.01_wp * zdT * z1_Tp ) - 1._wp )  ! Holland 2012 (eq. 6)  
     388                  zdv_frz = v_ip_1d(ji) * ( EXP( 0.01_wp * zdT * z1_Tp ) - 1._wp )  ! Holland 2012 (eq. 6) 
    389389                  ! Pond shrinking 
    390390                  v_ip_1d(ji) = MAX( 0._wp, v_ip_1d(ji) + zdv_frz ) 
     
    398398               ! 
    399399 
    400                !------------------------------------------------!             
     400               !------------------------------------------------! 
    401401               ! Pond drainage through brine network (flushing) ! 
    402402               !------------------------------------------------! 
     
    420420               ! Do the drainage using Darcy's law 
    421421               zdv_flush   = -zperm * rho0 * grav * zhp * rDt_ice / (zvisc * h_i_1d(ji)) * a_ip_1d(ji) * rn_pnd_flush ! zflush comes from Hunke et al. (2012) 
    422                zdv_flush   = MAX( zdv_flush, -v_ip_1d(ji) ) ! < 0  
     422               zdv_flush   = MAX( zdv_flush, -v_ip_1d(ji) ) ! < 0 
    423423               v_ip_1d(ji) = v_ip_1d(ji) + zdv_flush 
    424424 
     
    479479 
    480480 
    481    SUBROUTINE pnd_TOPO     
    482                                           
     481   SUBROUTINE pnd_TOPO 
     482 
    483483      !!------------------------------------------------------------------- 
    484484      !!                ***  ROUTINE pnd_TOPO  *** 
     
    488488      !! 
    489489      !! ** Method  :   This code is initially based on Flocco and Feltham 
    490       !!                (2007) and Flocco et al. (2010).  
     490      !!                (2007) and Flocco et al. (2010). 
    491491      !! 
    492492      !!                - Calculate available pond water base on surface meltwater 
     
    532532      REAL(wp), DIMENSION(jpi,jpj) ::   zvolp, &     !! total melt pond water available before redistribution and drainage 
    533533                                        zvolp_res    !! remaining melt pond water available after drainage 
    534                                          
     534 
    535535      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   z1_a_i 
    536536 
     
    545545 
    546546      CALL ctl_stop( 'STOP', 'icethd_pnd : topographic melt ponds are still an ongoing work' ) 
    547        
     547 
    548548      !--------------------------------------------------------------- 
    549549      ! Initialise 
     
    553553      zrhoi_L   = rhoi * rLfus      ! volumetric latent heat (J/m^3) 
    554554      zTp       = rt0 - 0.15_wp          ! pond freezing point, slightly below 0C (ponds are bid saline) 
    555       z1_rhow   = 1._wp / rhow  
     555      z1_rhow   = 1._wp / rhow 
    556556 
    557557      ! Set required ice variables (hard-coded here for now) 
    558 !      zfpond(:,:) = 0._wp          ! contributing freshwater flux (?)  
    559        
     558!      zfpond(:,:) = 0._wp          ! contributing freshwater flux (?) 
     559 
    560560      at_i (:,:) = SUM( a_i (:,:,:), dim=3 ) ! ice fraction 
    561561      vt_i (:,:) = SUM( v_i (:,:,:), dim=3 ) ! volume per grid area 
    562562      vt_ip(:,:) = SUM( v_ip(:,:,:), dim=3 ) ! pond volume per grid area 
    563563      vt_il(:,:) = SUM( v_il(:,:,:), dim=3 ) ! lid volume per grid area 
    564        
     564 
    565565      ! thickness 
    566566      WHERE( a_i(:,:,:) > epsi20 )   ;   z1_a_i(:,:,:) = 1._wp / a_i(:,:,:) 
     
    568568      END WHERE 
    569569      h_i(:,:,:) = v_i (:,:,:) * z1_a_i(:,:,:) 
    570        
     570 
    571571      !--------------------------------------------------------------- 
    572572      ! Change 2D to 1D 
    573573      !--------------------------------------------------------------- 
    574       ! MV  
     574      ! MV 
    575575      ! a less computing-intensive version would have 2D-1D passage here 
    576576      ! use what we have in iceitd.F90 (incremental remapping) 
     
    582582      ! Holland et al (2012) suggest that the fraction of runoff decreases with total ice fraction 
    583583      ! I cite her words, they are very talkative 
    584       ! "grid cells with very little ice cover (and hence more open water area)  
     584      ! "grid cells with very little ice cover (and hence more open water area) 
    585585      ! have a higher runoff fraction to rep- resent the greater proximity of ice to open water." 
    586586      ! "This results in the same runoff fraction r for each ice category within a grid cell" 
    587        
     587 
    588588      zvolp(:,:) = 0._wp 
    589589 
    590590      DO jl = 1, jpl 
    591591         DO_2D( 1, 1, 1, 1 ) 
    592                   
     592 
    593593               IF ( a_i(ji,jj,jl) > epsi10 ) THEN 
    594              
     594 
    595595                  !--- Available and contributing meltwater for melt ponding ---! 
    596596                  zv_mlt  = - ( dh_i_sum_2d(ji,jj,jl) * rhoi + dh_s_mlt_2d(ji,jj,jl) * rhos ) &        ! available volume of surface melt water per grid area 
     
    601601 
    602602                  diag_dvpn_mlt(ji,jj) = diag_dvpn_mlt(ji,jj) + zv_mlt * r1_Dt_ice                     ! diags 
    603                   diag_dvpn_rnf(ji,jj) = diag_dvpn_rnf(ji,jj) + ( 1. - zfr_mlt ) * zv_mlt * r1_Dt_ice    
     603                  diag_dvpn_rnf(ji,jj) = diag_dvpn_rnf(ji,jj) + ( 1. - zfr_mlt ) * zv_mlt * r1_Dt_ice 
    604604 
    605605                  !--- Create possible new ponds 
     
    610610                     a_ip_frac(ji,jj,jl)  = 1.0_wp    ! pond fraction of sea ice (apnd for CICE) 
    611611                  ENDIF 
    612                    
     612 
    613613                  !--- Deepen existing ponds with no change in pond fraction, before redistribution and drainage 
    614614                  v_ip(ji,jj,jl) = v_ip(ji,jj,jl) +  zv_pnd                                            ! use pond water to increase thickness 
    615615                  h_ip(ji,jj,jl) = v_ip(ji,jj,jl) / a_ip(ji,jj,jl) 
    616                    
     616 
    617617                  !--- Total available pond water volume (pre-existing + newly produced)j 
    618                   zvolp(ji,jj)   = zvolp(ji,jj)   + v_ip(ji,jj,jl)  
     618                  zvolp(ji,jj)   = zvolp(ji,jj)   + v_ip(ji,jj,jl) 
    619619!                 zfpond(ji,jj) = zfpond(ji,jj) + zpond * a_ip_frac(ji,jj,jl) ! useless for now 
    620                     
     620 
    621621               ENDIF ! a_i 
    622622 
    623623         END_2D 
    624624      END DO ! ji 
    625                    
     625 
    626626      !-------------------------------------------------------------- 
    627627      ! Redistribute and drain water from ponds 
    628       !--------------------------------------------------------------    
     628      !-------------------------------------------------------------- 
    629629      CALL ice_thd_pnd_area( zvolp, zvolp_res ) 
    630                                     
     630 
    631631      !-------------------------------------------------------------- 
    632632      ! Melt pond lid growth and melt 
    633       !--------------------------------------------------------------    
    634        
     633      !-------------------------------------------------------------- 
     634 
    635635      IF( ln_pnd_lids ) THEN 
    636636 
     
    638638 
    639639            IF ( at_i(ji,jj) > 0.01 .AND. hm_i(ji,jj) > rn_himin .AND. vt_ip(ji,jj) > zvp_min * at_i(ji,jj) ) THEN 
    640                    
     640 
    641641               !-------------------------- 
    642642               ! Pond lid growth and melt 
     
    648648               END DO 
    649649               zTavg = zTavg / a_i(ji,jj,jl) !!! could get a division by zero here 
    650           
     650 
    651651               DO jl = 1, jpl-1 
    652              
     652 
    653653                  IF ( v_il(ji,jj,jl) > epsi10 ) THEN 
    654                 
     654 
    655655                     !---------------------------------------------------------------- 
    656656                     ! Lid melting: floating upper ice layer melts in whole or part 
     
    660660 
    661661                        zdvice = MIN( dh_i_sum_2d(ji,jj,jl)*a_ip(ji,jj,jl), v_il(ji,jj,jl) ) 
    662                          
     662 
    663663                        IF ( zdvice > epsi10 ) THEN 
    664                          
     664 
    665665                           v_il (ji,jj,jl) = v_il (ji,jj,jl)   - zdvice 
    666                            v_ip(ji,jj,jl)  = v_ip(ji,jj,jl)    + zdvice ! MV: not sure i understand dh_i_sum seems counted twice -  
     666                           v_ip(ji,jj,jl)  = v_ip(ji,jj,jl)    + zdvice ! MV: not sure i understand dh_i_sum seems counted twice - 
    667667                                                                        ! as it is already counted in surface melt 
    668668!                          zvolp(ji,jj)     = zvolp(ji,jj)     + zdvice ! pointless to calculate total volume (done in icevar) 
    669669!                          zfpond(ji,jj)    = fpond(ji,jj)     + zdvice ! pointless to follow fw budget (ponds have no fw) 
    670                       
     670 
    671671                           IF ( v_il(ji,jj,jl) < epsi10 .AND. v_ip(ji,jj,jl) > epsi10) THEN 
    672672                           ! ice lid melted and category is pond covered 
    673                               v_ip(ji,jj,jl)  = v_ip(ji,jj,jl)  + v_il(ji,jj,jl)  
    674 !                             zfpond(ji,jj)    = zfpond (ji,jj)    + v_il(ji,jj,jl)  
     673                              v_ip(ji,jj,jl)  = v_ip(ji,jj,jl)  + v_il(ji,jj,jl) 
     674!                             zfpond(ji,jj)    = zfpond (ji,jj)    + v_il(ji,jj,jl) 
    675675                              v_il(ji,jj,jl)   = 0._wp 
    676676                           ENDIF 
    677677                           h_ip(ji,jj,jl) = v_ip(ji,jj,jl) / a_ip(ji,jj,jl) !!! could get a division by zero here 
    678                             
     678 
    679679                           diag_dvpn_lid(ji,jj) = diag_dvpn_lid(ji,jj) + zdvice   ! diag 
    680                             
     680 
    681681                        ENDIF 
    682                          
     682 
    683683                     !---------------------------------------------------------------- 
    684                      ! Freeze pre-existing lid  
     684                     ! Freeze pre-existing lid 
    685685                     !---------------------------------------------------------------- 
    686686 
     
    688688 
    689689                        ! differential growth of base of surface floating ice layer 
    690                         zdTice = MAX( - t_su(ji,jj,jl) - zTd , 0._wp ) ! > 0    
     690                        zdTice = MAX( - t_su(ji,jj,jl) - zTd , 0._wp ) ! > 0 
    691691                        zomega = rcnd_i * zdTice / zrhoi_L 
    692692                        zdHui  = SQRT( 2._wp * zomega * rDt_ice + ( v_il(ji,jj,jl) / a_i(ji,jj,jl) )**2 ) & 
    693693                               - v_il(ji,jj,jl) / a_i(ji,jj,jl) 
    694694                        zdvice = min( zdHui*a_ip(ji,jj,jl) , v_ip(ji,jj,jl) ) 
    695                    
     695 
    696696                        IF ( zdvice > epsi10 ) THEN 
    697697                           v_il (ji,jj,jl)  = v_il(ji,jj,jl)   + zdvice 
     
    700700!                          zfpond(ji,jj)   = zfpond(ji,jj)    - zdvice 
    701701                           h_ip(ji,jj,jl)   = v_ip(ji,jj,jl) / a_ip(ji,jj,jl) 
    702                             
     702 
    703703                           diag_dvpn_lid(ji,jj) = diag_dvpn_lid(ji,jj) - zdvice    ! diag 
    704                             
     704 
    705705                        ENDIF 
    706                    
     706 
    707707                     ENDIF ! Tsfcn(i,j,n) 
    708708 
     
    714714 
    715715                  ELSE ! v_il < epsi10 
    716                      
     716 
    717717                     ! thickness of newly formed ice 
    718718                     ! the surface temperature of a meltpond is the same as that 
    719                      ! of the ice underneath (0C), and the thermodynamic surface  
     719                     ! of the ice underneath (0C), and the thermodynamic surface 
    720720                     ! flux is the same 
    721                       
     721 
    722722                     !!! we need net surface energy flux, excluding conduction 
    723723                     !!! fsurf is summed over categories in CICE 
    724724                     !!! we have the category-dependent flux, let us use it ? 
    725                      zfsurf = qns_ice(ji,jj,jl) + qsr_ice(ji,jj,jl)                      
     725                     zfsurf = qns_ice(ji,jj,jl) + qsr_ice(ji,jj,jl) 
    726726                     zdHui  = MAX ( -zfsurf * rDt_ice/zrhoi_L , 0._wp ) 
    727727                     zdvice = MIN ( zdHui * a_ip(ji,jj,jl) , v_ip(ji,jj,jl) ) 
     
    729729                        v_il (ji,jj,jl)  = v_il(ji,jj,jl)   + zdvice 
    730730                        v_ip(ji,jj,jl)   = v_ip(ji,jj,jl)   - zdvice 
    731                          
     731 
    732732                        diag_dvpn_lid(ji,jj) = diag_dvpn_lid(ji,jj) - zdvice      ! diag 
    733733!                       zvolp(ji,jj)     = zvolp(ji,jj)     - zdvice 
     
    735735                        h_ip(ji,jj,jl)   = v_ip(ji,jj,jl) / a_ip(ji,jj,jl) ! MV - in principle, this is useless as h_ip is computed in icevar 
    736736                     ENDIF 
    737                 
     737 
    738738                  ENDIF  ! v_il 
    739              
     739 
    740740               END DO ! jl 
    741741 
     
    745745               v_il(ji,jj,:) = 0._wp 
    746746!              zfpond(ji,jj) = zfpond(ji,jj)- zvolp(ji,jj) 
    747 !                 zvolp(ji,jj)    = 0._wp          
     747!                 zvolp(ji,jj)    = 0._wp 
    748748 
    749749            ENDIF 
     
    769769!                 v_il(ji,jj,jl) = 0._wp ! probably uselesss now since we get zap_small 
    770770!              ENDIF 
    771        
     771 
    772772               ! recalculate equivalent pond variables 
    773773               IF ( a_ip(ji,jj,jl) > epsi10) THEN 
     
    779779!                 h_il(ji,jj,jl)      = 0._wp ! MV in principle, useless as omputed in icevar 
    780780!              ENDIF 
    781                 
     781 
    782782         END_2D 
    783783 
     
    787787   END SUBROUTINE pnd_TOPO 
    788788 
    789     
     789 
    790790   SUBROUTINE ice_thd_pnd_area( zvolp , zdvolp ) 
    791791 
     
    793793       !!                ***  ROUTINE ice_thd_pnd_area *** 
    794794       !! 
    795        !! ** Purpose : Given the total volume of available pond water,  
     795       !! ** Purpose : Given the total volume of available pond water, 
    796796       !!              redistribute and drain water 
    797797       !! 
     
    823823       !! 
    824824       !!------------------------------------------------------------------ 
    825         
     825 
    826826       REAL (wp), DIMENSION(jpi,jpj), INTENT(INOUT) :: & 
    827827          zvolp,                                       &  ! total available pond water 
     
    865865       a_ip(:,:,:) = 0._wp 
    866866       h_ip(:,:,:) = 0._wp 
    867   
     867 
    868868       DO_2D( 1, 1, 1, 1 ) 
    869   
     869 
    870870             IF ( at_i(ji,jj) > 0.01 .AND. hm_i(ji,jj) > rn_himin .AND. zvolp(ji,jj) > zvp_min * at_i(ji,jj) ) THEN 
    871   
     871 
    872872        !------------------------------------------------------------------- 
    873873        ! initialize 
    874874        !------------------------------------------------------------------- 
    875   
     875 
    876876        DO jl = 1, jpl 
    877   
     877 
    878878           !---------------------------------------- 
    879879           ! compute the effective snow fraction 
    880880           !---------------------------------------- 
    881   
     881 
    882882           IF (a_i(ji,jj,jl) < epsi10)  THEN 
    883883              hicen(jl) =  0._wp 
     
    889889              hsnon(jl) = v_s(ji,jj,jl) / a_i(ji,jj,jl) 
    890890              reduced_aicen(jl) = 1._wp ! n=jpl 
    891   
     891 
    892892              !js: initial code in NEMO_DEV 
    893893              !IF (n < jpl) reduced_aicen(jl) = aicen(jl) & 
    894894              !                     * (-0.024_wp*hicen(jl) + 0.832_wp) 
    895   
     895 
    896896              !js: from CICE 5.1.2: this limit reduced_aicen to 0.2 when hicen is too large 
    897               IF (jl < jpl) reduced_aicen(jl) = a_i(ji,jj,jl) &  
     897              IF (jl < jpl) reduced_aicen(jl) = a_i(ji,jj,jl) & 
    898898                                   * max(0.2_wp,(-0.024_wp*hicen(jl) + 0.832_wp)) 
    899   
     899 
    900900              asnon(jl) = reduced_aicen(jl)  ! effective snow fraction (empirical) 
    901901              ! MV should check whether this makes sense to have the same effective snow fraction in here 
    902902              ! OLI: it probably doesn't 
    903903           END IF 
    904   
     904 
    905905  ! This choice for alfa and beta ignores hydrostatic equilibium of categories. 
    906906  ! Hydrostatic equilibium of the entire ITD is accounted for below, assuming 
     
    911911  ! alfan = 60% of the ice volume) in each category lies above the reference line, 
    912912  ! and 40% below. Note: p6 is an arbitrary choice, but alfa+beta=1 is required. 
    913   
     913 
    914914  ! MV: 
    915915  ! Note that this choice is not in the original FF07 paper and has been adopted in CICE 
    916916  ! No reason why is explained in the doc, but I guess there is a reason. I'll try to investigate, maybe 
    917   
     917 
    918918  ! Where does that choice come from ? => OLI : Coz' Chuck Norris said so... 
    919   
     919 
    920920           alfan(jl) = 0.6 * hicen(jl) 
    921921           betan(jl) = 0.4 * hicen(jl) 
    922   
     922 
    923923           cum_max_vol(jl)     = 0._wp 
    924924           cum_max_vol_tmp(jl) = 0._wp 
    925   
     925 
    926926        END DO ! jpl 
    927   
     927 
    928928        cum_max_vol_tmp(0) = 0._wp 
    929929        drain = 0._wp 
    930930        zdvolp(ji,jj) = 0._wp 
    931   
     931 
    932932        !---------------------------------------------------------- 
    933933        ! Drain overflow water, update pond fraction and volume 
    934934        !---------------------------------------------------------- 
    935   
     935 
    936936        !-------------------------------------------------------------------------- 
    937937        ! the maximum amount of water that can be contained up to each ice category 
     
    940940        ! Then the excess volume cum_max_vol(jl) drains out of the system 
    941941        ! It should be added to wfx_pnd_out 
    942   
     942 
    943943        DO jl = 1, jpl-1 ! last category can not hold any volume 
    944   
     944 
    945945           IF (alfan(jl+1) >= alfan(jl) .AND. alfan(jl+1) > 0._wp ) THEN 
    946   
     946 
    947947              ! total volume in level including snow 
    948948              cum_max_vol_tmp(jl) = cum_max_vol_tmp(jl-1) + & 
    949949                 (alfan(jl+1) - alfan(jl)) * sum(reduced_aicen(1:jl)) 
    950   
     950 
    951951              ! subtract snow solid volumes from lower categories in current level 
    952952              DO ns = 1, jl 
     
    956956                      max(min(hsnon(ns)+alfan(ns)-alfan(jl), alfan(jl+1)-alfan(jl)), 0._wp) 
    957957              END DO 
    958   
     958 
    959959           ELSE ! assume higher categories unoccupied 
    960960              cum_max_vol_tmp(jl) = cum_max_vol_tmp(jl-1) 
     
    966966        cum_max_vol_tmp(jpl) = cum_max_vol_tmp(jpl-1)  ! last category holds no volume 
    967967        cum_max_vol  (1:jpl) = cum_max_vol_tmp(1:jpl) 
    968   
     968 
    969969        !---------------------------------------------------------------- 
    970970        ! is there more meltwater than can be held in the floe? 
     
    973973           drain = zvolp(ji,jj) - cum_max_vol(jpl) + epsi10 
    974974           zvolp(ji,jj) = zvolp(ji,jj) - drain ! update meltwater volume available 
    975   
     975 
    976976           diag_dvpn_rnf(ji,jj) = - drain      ! diag - overflow counted in the runoff part (arbitrary choice) 
    977             
     977 
    978978           zdvolp(ji,jj) = drain         ! this is the drained water 
    979979           IF (zvolp(ji,jj) < epsi10) THEN 
     
    982982           END IF 
    983983        END IF 
    984   
     984 
    985985        ! height and area corresponding to the remaining volume 
    986986        ! routine leaves zvolp unchanged 
    987987        CALL ice_thd_pnd_depth(reduced_aicen, asnon, hsnon, alfan, zvolp(ji,jj), cum_max_vol, hpond, m_index) 
    988   
     988 
    989989        DO jl = 1, m_index 
    990990           !h_ip(jl) = hpond - alfan(jl) + alfan(1) ! here oui choulde update 
     
    996996        END DO 
    997997        !zapond = sum(a_ip(1:m_index))     !js: from CICE 5.1.2; not in Icepack1.1.0-6-gac6195d 
    998   
     998 
    999999        !------------------------------------------------------------------------ 
    10001000        ! Drainage through brine network (permeability) 
    10011001        !------------------------------------------------------------------------ 
    10021002        !!! drainage due to ice permeability - Darcy's law 
    1003   
     1003 
    10041004        ! sea water level 
    1005         msno = 0._wp  
     1005        msno = 0._wp 
    10061006        DO jl = 1 , jpl 
    10071007          msno = msno + v_s(ji,jj,jl) * rhos 
     
    10101010        hsl_rel = floe_weight / rho0 & 
    10111011                - ( ( sum(betan(:)*a_i(ji,jj,:)) / at_i(ji,jj) ) + alfan(1) ) 
    1012   
     1012 
    10131013        deltah = hpond - hsl_rel 
    10141014        pressure_head = grav * rho0 * max(deltah, 0._wp) 
    1015   
     1015 
    10161016        ! drain if ice is permeable 
    10171017        permflag = 0 
    1018   
     1018 
    10191019        IF (pressure_head > 0._wp) THEN 
    10201020           DO jl = 1, jpl-1 
    10211021              IF ( hicen(jl) /= 0._wp ) THEN 
    1022   
     1022 
    10231023              !IF (hicen(jl) > 0._wp) THEN           !js: from CICE 5.1.2 
    1024   
     1024 
    10251025                 perm = 0._wp ! MV ugly dummy patch 
    1026                  CALL ice_thd_pnd_perm(t_i(ji,jj,:,jl),  sz_i(ji,jj,:,jl), perm) ! bof  
     1026                 CALL ice_thd_pnd_perm(t_i(ji,jj,:,jl),  sz_i(ji,jj,:,jl), perm) ! bof 
    10271027                 IF (perm > 0._wp) permflag = 1 
    1028   
     1028 
    10291029                 drain = perm*a_ip(ji,jj,jl)*pressure_head*rDt_ice / & 
    10301030                                          (viscosity*hicen(jl)) 
    10311031                 zdvolp(ji,jj) = zdvolp(ji,jj) + min(drain, zvolp(ji,jj)) 
    10321032                 zvolp(ji,jj) = max(zvolp(ji,jj) - drain, 0._wp) 
    1033   
     1033 
    10341034                 diag_dvpn_drn(ji,jj) = - drain ! diag (could be better coded) 
    1035                   
     1035 
    10361036                 IF (zvolp(ji,jj) < epsi10) THEN 
    10371037                    zdvolp(ji,jj) = zdvolp(ji,jj) + zvolp(ji,jj) 
     
    10401040             END IF 
    10411041          END DO 
    1042   
     1042 
    10431043           ! adjust melt pond dimensions 
    10441044           IF (permflag > 0) THEN 
     
    10521052           END IF 
    10531053        END IF ! pressure_head 
    1054   
     1054 
    10551055        !------------------------------- 
    10561056        ! remove water from the snow 
     
    10601060        ! snow in melt ponds is not melted 
    10611061        !------------------------------------------------------------------------ 
    1062          
     1062 
    10631063        ! MV here, it seems that we remove some meltwater from the ponds, but I can't really tell 
    10641064        ! how much, so I did not diagnose it 
    10651065        ! so if there is a problem here, nobody is going to see it... 
    1066          
    1067   
     1066 
     1067 
    10681068        ! Calculate pond volume for lower categories 
    10691069        DO jl = 1,m_index-1 
     
    10711071                          - (rhos/rhow) * asnon(jl) * min(hsnon(jl), h_ip(ji,jj,jl)) 
    10721072        END DO 
    1073   
     1073 
    10741074        ! Calculate pond volume for highest category = remaining pond volume 
    1075   
     1075 
    10761076        ! The following is completely unclear to Martin at least 
    10771077        ! Could we redefine properly and recode in a more readable way ? 
    1078   
     1078 
    10791079        ! m_index = last category with melt pond 
    1080   
     1080 
    10811081        IF (m_index == 1) v_ip(ji,jj,m_index) = zvolp(ji,jj) ! volume of mw in 1st category is the total volume of melt water 
    1082   
     1082 
    10831083        IF (m_index > 1) THEN 
    10841084          IF (zvolp(ji,jj) > sum( v_ip(ji,jj,1:m_index-1))) THEN 
    10851085             v_ip(ji,jj,m_index) = zvolp(ji,jj) - sum(v_ip(ji,jj,1:m_index-1)) 
    10861086          ELSE 
    1087              v_ip(ji,jj,m_index) = 0._wp  
     1087             v_ip(ji,jj,m_index) = 0._wp 
    10881088             h_ip(ji,jj,m_index) = 0._wp 
    10891089             a_ip(ji,jj,m_index) = 0._wp 
     
    10941094          END IF 
    10951095        END IF 
    1096   
     1096 
    10971097        DO jl = 1,m_index 
    10981098           IF (a_ip(ji,jj,jl) > epsi10) THEN 
     
    11001100           ELSE 
    11011101              zdvolp(ji,jj) = zdvolp(ji,jj) + v_ip(ji,jj,jl) 
    1102               h_ip(ji,jj,jl) = 0._wp  
     1102              h_ip(ji,jj,jl) = 0._wp 
    11031103              v_ip(ji,jj,jl)  = 0._wp 
    11041104              a_ip(ji,jj,jl) = 0._wp 
     
    11061106        END DO 
    11071107        DO jl = m_index+1, jpl 
    1108            h_ip(ji,jj,jl) = 0._wp  
    1109            a_ip(ji,jj,jl) = 0._wp  
    1110            v_ip(ji,jj,jl) = 0._wp  
     1108           h_ip(ji,jj,jl) = 0._wp 
     1109           a_ip(ji,jj,jl) = 0._wp 
     1110           v_ip(ji,jj,jl) = 0._wp 
    11111111        END DO 
    1112          
     1112 
    11131113           ENDIF 
    11141114 
     
    13191319 
    13201320       DO k = 1, nlay_i 
    1321         
     1321 
    13221322          Sbr    = - Tin(k) / rTmlt ! Consistent expression with SI3 (linear liquidus) 
    13231323          ! Best expression to date is that one (Vancoppenolle et al JGR 2019) 
    13241324          ! Sbr  = - 18.7 * Tin(k) - 0.519 * Tin(k)**2 - 0.00535 * Tin(k) **3 
    13251325          phi(k) = salin(k) / Sbr 
    1326            
     1326 
    13271327       END DO 
    13281328 
     
    13351335   END SUBROUTINE ice_thd_pnd_perm 
    13361336 
    1337    SUBROUTINE ice_thd_pnd_init  
     1337   SUBROUTINE ice_thd_pnd_init 
    13381338      !!------------------------------------------------------------------- 
    13391339      !!                  ***  ROUTINE ice_thd_pnd_init   *** 
     
    13421342      !!              over sea ice 
    13431343      !! 
    1344       !! ** Method  :  Read the namthd_pnd  namelist and check the melt pond   
     1344      !! ** Method  :  Read the namthd_pnd  namelist and check the melt pond 
    13451345      !!               parameter values called at the first timestep (nit000) 
    13461346      !! 
    1347       !! ** input   :   Namelist namthd_pnd   
     1347      !! ** input   :   Namelist namthd_pnd 
    13481348      !!------------------------------------------------------------------- 
    13491349      INTEGER  ::   ios, ioptio   ! Local integer 
     
    13891389      ! 
    13901390      SELECT CASE( nice_pnd ) 
    1391       CASE( np_pndNO )          
     1391      CASE( np_pndNO ) 
    13921392         IF( ln_pnd_alb  ) THEN ; ln_pnd_alb  = .FALSE. ; CALL ctl_warn( 'ln_pnd_alb=false when no ponds' )  ; ENDIF 
    13931393         IF( ln_pnd_lids ) THEN ; ln_pnd_lids = .FALSE. ; CALL ctl_warn( 'ln_pnd_lids=false when no ponds' ) ; ENDIF 
    1394       CASE( np_pndCST )          
     1394      CASE( np_pndCST ) 
    13951395         IF( ln_pnd_lids ) THEN ; ln_pnd_lids = .FALSE. ; CALL ctl_warn( 'ln_pnd_lids=false when constant ponds' ) ; ENDIF 
    13961396      END SELECT 
    13971397      ! 
    13981398   END SUBROUTINE ice_thd_pnd_init 
    1399     
     1399 
    14001400#else 
    14011401   !!---------------------------------------------------------------------- 
    14021402   !!   Default option          Empty module          NO SI3 sea-ice model 
    14031403   !!---------------------------------------------------------------------- 
    1404 #endif  
     1404#endif 
    14051405 
    14061406   !!====================================================================== 
    1407 END MODULE icethd_pnd  
     1407END MODULE icethd_pnd 
Note: See TracChangeset for help on using the changeset viewer.