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

Ignore:
Timestamp:
2017-07-15T13:00:17+02:00 (7 years ago)
Author:
clem
Message:

correct the heat conservation (all fine except limthd_da for a reason I do not understand)

File:
1 edited

Legend:

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

    r8326 r8341  
    426426 
    427427      ! Iterative procedure 
    428       DO iter = 1, num_iter_max 
    429          DO ji = kideb, kiut 
    430             IF(  zf_tt(ji) < 0._wp  ) THEN 
     428      DO ji = kideb, kiut 
     429         IF(  zf_tt(ji) < 0._wp  ) THEN 
     430            DO iter = 1, num_iter_max 
    431431 
    432432               ! New bottom ice salinity (Cox & Weeks, JGR88 ) 
     
    460460               e_i_1d(ji,nlay_i+1) = -zEi * rhoic                        ! New ice energy of melting (J/m3, >0) 
    461461                
    462             ENDIF 
    463          END DO 
    464       END DO 
    465  
    466       ! Contribution to Energy and Salt Fluxes 
    467       DO ji = kideb, kiut 
    468          IF(  zf_tt(ji) < 0._wp  ) THEN 
    469             ! New ice growth 
    470                                      
     462            END DO 
     463            ! Contribution to Energy and Salt Fluxes                                     
    471464            zfmdt          = - rhoic * dh_i_bott(ji)             ! Mass flux x time step (kg/m2, < 0) 
    472465 
     
    498491            eh_i_old(ji,nlay_i+1) = eh_i_old(ji,nlay_i+1) + dh_i_bott(ji) * e_i_1d(ji,nlay_i+1) 
    499492            h_i_old (ji,nlay_i+1) = h_i_old (ji,nlay_i+1) + dh_i_bott(ji) 
     493 
    500494         ENDIF 
     495 
    501496      END DO 
    502497 
     
    611606      END DO 
    612607 
    613       ! Water fluxes 
    614       DO ji = kideb, kiut 
    615          wfx_sub_1d(ji) = wfx_snw_sub_1d(ji) + wfx_ice_sub_1d(ji) ! sum ice and snow sublimation contributions 
    616       END DO 
    617  
    618608      ! 
    619609      !------------------------------------------------------------------------------| 
     
    648638         ! Contribution to mass flux 
    649639         ! All snow is thrown in the ocean, and seawater is taken to replace the volume 
    650          wfx_sni_1d(ji) = wfx_sni_1d(ji) - a_i_1d(ji) * dh_snowice(ji) * rhoic * r1_rdtice 
    651          wfx_snw_1d(ji) = wfx_snw_1d(ji) + a_i_1d(ji) * dh_snowice(ji) * rhosn * r1_rdtice 
     640         wfx_sni_1d(ji)     = wfx_sni_1d(ji)    - a_i_1d(ji) * dh_snowice(ji) * rhoic * r1_rdtice 
     641         wfx_snw_sni_1d(ji) = wfx_snw_sni_1d(ji) + a_i_1d(ji) * dh_snowice(ji) * rhosn * r1_rdtice 
    652642 
    653643         ! update heat content (J.m-2) and layer thickness 
Note: See TracChangeset for help on using the changeset viewer.