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

Ignore:
Timestamp:
2017-09-27T12:09:10+02:00 (7 years ago)
Author:
clem
Message:

trying to respect naming convention

File:
1 edited

Legend:

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

    r8562 r8565  
    7878      !  1) Cumulative integral of old enthalpy * thickness and layers interfaces 
    7979      !-------------------------------------------------------------------------- 
    80       zeh_cum0(1:nidx,0) = 0._wp  
    81       zh_cum0 (1:nidx,0) = 0._wp 
     80      zeh_cum0(1:npti,0) = 0._wp  
     81      zh_cum0 (1:npti,0) = 0._wp 
    8282      DO jk0 = 1, nlay_i+2 
    83          DO ji = 1, nidx 
     83         DO ji = 1, npti 
    8484            zeh_cum0(ji,jk0) = zeh_cum0(ji,jk0-1) + eh_i_old(ji,jk0-1) 
    8585            zh_cum0 (ji,jk0) = zh_cum0 (ji,jk0-1) + h_i_old (ji,jk0-1) 
     
    9191      !------------------------------------ 
    9292      ! new layer thickesses 
    93       DO ji = 1, nidx 
     93      DO ji = 1, npti 
    9494         zhnew(ji) = SUM( h_i_old(ji,0:nlay_i+1) ) * r1_nlay_i   
    9595      END DO 
    9696 
    9797      ! new layers interfaces 
    98       zh_cum1(1:nidx,0) = 0._wp 
     98      zh_cum1(1:npti,0) = 0._wp 
    9999      DO jk1 = 1, nlay_i 
    100          DO ji = 1, nidx 
     100         DO ji = 1, npti 
    101101            zh_cum1(ji,jk1) = zh_cum1(ji,jk1-1) + zhnew(ji) 
    102102         END DO 
    103103      END DO 
    104104 
    105       zeh_cum1(1:nidx,0) = 0._wp  
     105      zeh_cum1(1:npti,0) = 0._wp  
    106106      ! new cumulative q*h => linear interpolation 
    107107      DO jk0 = 1, nlay_i+1 
    108108         DO jk1 = 1, nlay_i-1 
    109             DO ji = 1, nidx 
     109            DO ji = 1, npti 
    110110               IF( zh_cum1(ji,jk1) <= zh_cum0(ji,jk0) .AND. zh_cum1(ji,jk1) > zh_cum0(ji,jk0-1) ) THEN 
    111111                  zeh_cum1(ji,jk1) = ( zeh_cum0(ji,jk0-1) * ( zh_cum0(ji,jk0) - zh_cum1(ji,jk1  ) ) +  & 
     
    117117      END DO 
    118118      ! to ensure that total heat content is strictly conserved, set: 
    119       zeh_cum1(1:nidx,nlay_i) = zeh_cum0(1:nidx,nlay_i+2)  
     119      zeh_cum1(1:npti,nlay_i) = zeh_cum0(1:npti,nlay_i+2)  
    120120 
    121121      ! new enthalpies 
    122122      DO jk1 = 1, nlay_i 
    123          DO ji = 1, nidx 
     123         DO ji = 1, npti 
    124124            rswitch      = MAX( 0._wp , SIGN( 1._wp , zhnew(ji) - epsi20 ) )  
    125125            qnew(ji,jk1) = rswitch * ( zeh_cum1(ji,jk1) - zeh_cum1(ji,jk1-1) ) / MAX( zhnew(ji), epsi20 ) 
     
    130130      ! comment: if input h_i_old and eh_i_old are already multiplied by a_i (as in icethd_do),  
    131131      ! then we should not (* a_i) again but not important since this is just to check that remap error is ~0 
    132       DO ji = 1, nidx 
     132      DO ji = 1, npti 
    133133         hfx_err_rem_1d(ji) = hfx_err_rem_1d(ji) + a_i_1d(ji) * r1_rdtice *  & 
    134134            &               ( SUM( qnew(ji,1:nlay_i) ) * zhnew(ji) - SUM( eh_i_old(ji,0:nlay_i+1) ) )  
Note: See TracChangeset for help on using the changeset viewer.