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 8369 for branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_da.F90 – NEMO

Ignore:
Timestamp:
2017-07-25T16:38:38+02:00 (7 years ago)
Author:
clem
Message:

STEP4 (4): put all thermodynamics in 1D (limitd_th OK)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_da.F90

    r8360 r8369  
    163163             
    164164            DO ji = 1, nidx 
    165                ! decrease of concentration for the category jl 
    166                !    each category contributes to melting in proportion to its concentration 
    167                zda = zda_tot(ji) * a_i_1d(ji) / at_i_1d(ji) 
    168                 
    169                ! Contribution to salt flux 
    170                sfx_lam_1d(ji) = sfx_lam_1d(ji) - rhoic *  ht_i_1d(ji) * zda * sm_i_1d(ji) * r1_rdtice 
    171                 
    172                ! Contribution to heat flux into the ocean [W.m-2], (<0)   
    173                hfx_thd_1d(ji) = hfx_thd_1d(ji) + zda_tot(ji) / at_i_1d(ji) * SUM( e_i_1d(ji,1:nlay_i) + e_s_1d(ji,1) ) * r1_rdtice  
    174                
    175                ! Contribution to mass flux 
    176                wfx_lam_1d(ji) =  wfx_lam_1d(ji) - zda * r1_rdtice * ( rhoic * ht_i_1d(ji) + rhosn * ht_s_1d(ji) ) 
    177             
    178                !! adjust e_i ??? 
    179                e_i_1d(ji,1:nlay_i) = e_i_1d(ji,1:nlay_i) * ( 1._wp + zda_tot(ji) / at_i_1d(ji) ) 
    180                e_s_1d(ji,1)        = e_s_1d(ji,1)        * ( 1._wp + zda_tot(ji) / at_i_1d(ji) ) 
    181   
    182                ! new concentration 
    183                a_i_1d(ji) = a_i_1d(ji) + zda 
    184  
    185                ! ensure that ht_i = 0 where a_i = 0 
    186                IF( a_i_1d(ji) == 0._wp ) THEN 
    187                   ht_i_1d(ji) = 0._wp 
    188                   ht_s_1d(ji) = 0._wp 
    189                ENDIF             
    190             END DO 
    191  
     165               IF( a_i_1d(ji) > 0._wp ) THEN 
     166                  ! decrease of concentration for the category jl 
     167                  !    each category contributes to melting in proportion to its concentration 
     168                  zda = zda_tot(ji) * a_i_1d(ji) / at_i_1d(ji) 
     169                   
     170                  ! Contribution to salt flux 
     171                  sfx_lam_1d(ji) = sfx_lam_1d(ji) - rhoic *  ht_i_1d(ji) * zda * sm_i_1d(ji) * r1_rdtice 
     172                   
     173                  ! Contribution to heat flux into the ocean [W.m-2], (<0)   
     174                  hfx_thd_1d(ji) = hfx_thd_1d(ji) + zda_tot(ji) / at_i_1d(ji) * SUM( e_i_1d(ji,1:nlay_i) + e_s_1d(ji,1) ) * r1_rdtice  
     175                   
     176                  ! Contribution to mass flux 
     177                  wfx_lam_1d(ji) =  wfx_lam_1d(ji) - zda * r1_rdtice * ( rhoic * ht_i_1d(ji) + rhosn * ht_s_1d(ji) ) 
     178                   
     179                  !! adjust e_i ??? 
     180                  e_i_1d(ji,1:nlay_i) = e_i_1d(ji,1:nlay_i) * ( 1._wp + zda_tot(ji) / at_i_1d(ji) ) 
     181                  e_s_1d(ji,1)        = e_s_1d(ji,1)        * ( 1._wp + zda_tot(ji) / at_i_1d(ji) ) 
     182                   
     183                  ! new concentration 
     184                  a_i_1d(ji) = a_i_1d(ji) + zda 
     185                   
     186                  ! ensure that ht_i = 0 where a_i = 0 
     187                  IF( a_i_1d(ji) == 0._wp ) THEN 
     188                     ht_i_1d(ji) = 0._wp 
     189                     ht_s_1d(ji) = 0._wp 
     190                  ENDIF 
     191               ENDIF 
     192            END DO 
     193             
    192194            CALL tab_1d_2d( nidx, idxice(1:nidx), a_i_1d    (1:nidx), a_i (:,:,jl) ) 
    193195            CALL tab_1d_2d( nidx, idxice(1:nidx), ht_i_1d   (1:nidx), ht_i(:,:,jl) ) 
Note: See TracChangeset for help on using the changeset viewer.