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 5078 for branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90 – NEMO

Ignore:
Timestamp:
2015-02-11T16:15:11+01:00 (9 years ago)
Author:
clem
Message:

LIM3: cosmetic changes to increase readability and performance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90

    r5070 r5078  
    362362         DO ji = 1, nbpac 
    363363 
    364             zEi           = - ze_newice(ji) / rhoic                ! specific enthalpy of forming ice [J/kg] 
    365  
    366             zEw           = rcp * ( t_bo_1d(ji) - rt0 )             ! specific enthalpy of seawater at t_bo_1d [J/kg] 
     364            zEi           = - ze_newice(ji) * r1_rhoic             ! specific enthalpy of forming ice [J/kg] 
     365 
     366            zEw           = rcp * ( t_bo_1d(ji) - rt0 )            ! specific enthalpy of seawater at t_bo_1d [J/kg] 
    367367                                                                   ! clem: we suppose we are already at the freezing point (condition qlead<0 is satisfyied)  
    368368                                                                    
     
    371371            zfmdt         = - qlead_1d(ji) / zdE                   ! Fm.dt [kg/m2] (<0)  
    372372                                                                   ! clem: we use qlead instead of zqld (limthd) because we suppose we are at the freezing point    
    373             zv_newice(ji) = - zfmdt / rhoic 
     373            zv_newice(ji) = - zfmdt * r1_rhoic 
    374374 
    375375            zQm           = zfmdt * zEw                            ! heat to the ocean >0 associated with mass flux   
     
    458458            DO jk = 1, nlay_i 
    459459               DO ji = 1, nbpac 
    460                   h_i_old (ji,jk) = zv_i_1d(ji,jl) / REAL( nlay_i ) 
     460                  h_i_old (ji,jk) = zv_i_1d(ji,jl) * r1_nlay_i 
    461461                  qh_i_old(ji,jk) = ze_i_1d(ji,jk,jl) * h_i_old(ji,jk) 
    462462               END DO 
     
    525525               DO ji = 1, jpi 
    526526                  ! heat content in J/m2 
    527                   e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * v_i(ji,jj,jl) / REAL( nlay_i ,wp )  
     527                  e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * v_i(ji,jj,jl) * r1_nlay_i  
    528528               END DO 
    529529            END DO 
Note: See TracChangeset for help on using the changeset viewer.