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 8179 for branches/2016/dev_r6859_LIM3_meltponds/NEMOGCM/NEMO/LIM_SRC_3/limmp.F90 – NEMO

Ignore:
Timestamp:
2017-06-15T12:01:17+02:00 (7 years ago)
Author:
vancop
Message:

Replace total snow flux by snow meltwater flux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6859_LIM3_meltponds/NEMOGCM/NEMO/LIM_SRC_3/limmp.F90

    r8142 r8179  
    129129      ENDIF 
    130130 
     131      IF ( ln_pnd .AND. ( nn_pnd_scheme == 0 ) .AND. ( ln_pnd_fw ) ) THEN 
     132         WRITE(numout,*) ' Prescribed melt ponds do not conserve fresh water mass, hence ln_pnd_fw must be set to false '  
     133         ln_pnd_fw     = .FALSE. 
     134         IF(lwp) THEN                     ! control print 
     135            WRITE(numout,*) '    Active melt ponds freshwater coupling                       ln_pnd_fw     = ', ln_pnd_fw 
     136         ENDIF 
     137      ENDIF 
     138 
    131139      IF ( ln_pnd .AND. ( nn_pnd_scheme == 2 ) .AND. ( jpl == 1 ) ) THEN 
    132140         WRITE(numout,*) ' Topographic melt ponds are incompatible with jpl = 1 ' 
     
    280288        !------------------------------------------------------------------ 
    281289  
    282         zwfx_mlw(:,:) = MAX( wfx_sum(:,:) + wfx_snw(:,:), 0._wp )        ! available meltwater for melt ponding 
     290        zwfx_mlw(:,:) = MAX( wfx_sum(:,:) + wfx_snw_sum(:,:), 0._wp )        ! available meltwater for melt ponding 
    283291 
    284292                ! NB: zwfx_mlw can be slightly negative for very small values (why?) 
     
    289297                ! if we understand and remove why wfx_sum or wfx_snw could be 
    290298                ! negative, then, we can remove the MAX 
     299                ! NB: I now changed to wfx_snw_sum, this may fix the problem.  
     300                ! We should check 
    291301  
    292302        zrfrac(:,:,:) = zrmin + ( zrmax - zrmin ) * a_i(:,:,:)   
     
    352362  
    353363                a_ip_frac(ji,jj,jl) = MIN( 1._wp , SQRT( v_ip(ji,jj,jl) * z1_zpnd_aspect / a_i(ji,jj,jl) ) ) 
     364                   !NB: the SQRT has been a recurring source of crash when v_ip or a_i tuns to be even only slightly negative 
    354365  
    355366                h_ip(ji,jj,jl)      = zpnd_aspect * a_ip_frac(ji,jj,jl) 
     
    374385        IF ( ln_pnd_fw ) THEN 
    375386  
    376             wfx_snw(:,:) = wfx_snw(:,:) *  ( 1. - zrmin - ( zrmax - zrmin ) * at_i(:,:) ) 
    377   
    378             wfx_sum(:,:) = wfx_sum(:,:) * ( 1. - zrmin - ( zrmax - zrmin ) * at_i(:,:) ) 
    379   
     387            wfx_snw_sum(:,:) = wfx_snw_sum(:,:) *  ( 1. - zrmin - ( zrmax - zrmin ) * at_i(:,:) )  
     388 
     389            wfx_sum(:,:)     = wfx_sum(:,:) * ( 1. - zrmin - ( zrmax - zrmin ) * at_i(:,:) ) 
     390 
    380391        ENDIF 
    381392 
     
    496507       kcells(:)   = 0 
    497508 
    498        zvolp(:,:) = wfx_sum(:,:) + wfx_snw(:,:) + vt_ip(:,:) ! Total available melt water, to be distributed as melt ponds 
     509       zvolp(:,:) = wfx_sum(:,:) + wfx_snw_sum(:,:) + vt_ip(:,:) ! Total available melt water, to be distributed as melt ponds 
    499510       zTsfcn(:,:,:) = zTsfcn(:,:,:) - rt0                   ! Convert in Celsius 
    500511  
Note: See TracChangeset for help on using the changeset viewer.