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 13284 for NEMO/releases/r4.0/r4.0-HEAD/src/ICE/iceitd.F90 – NEMO

Ignore:
Timestamp:
2020-07-09T17:12:23+02:00 (4 years ago)
Author:
smasson
Message:

4.0-HEAD: merge 4.0-HEAD_r12713_clem_dan_fixcpl into 4.0-HEAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/releases/r4.0/r4.0-HEAD/src/ICE/iceitd.F90

    r11732 r13284  
    4747   LOGICAL                    ::   ln_cat_usr   ! ice categories are defined by rn_catbnd 
    4848   REAL(wp), DIMENSION(0:100) ::   rn_catbnd    ! ice categories bounds 
     49   REAL(wp)                   ::   rn_himax     ! maximum ice thickness allowed 
    4950   ! 
    5051   !!---------------------------------------------------------------------- 
     
    304305            IF ( a_i_1d(ji) > epsi10 .AND. h_i_1d(ji) < rn_himin ) THEN 
    305306               a_i_1d(ji) = a_i_1d(ji) * h_i_1d(ji) / rn_himin  
    306                IF( ln_pnd_H12 )   a_ip_1d(ji) = a_ip_1d(ji) * h_i_1d(ji) / rn_himin 
     307               IF( ln_pnd_LEV )   a_ip_1d(ji) = a_ip_1d(ji) * h_i_1d(ji) / rn_himin 
    307308               h_i_1d(ji) = rn_himin 
    308309            ENDIF 
     
    410411      CALL tab_3d_2d( npti, nptidx(1:npti), a_ip_2d(1:npti,1:jpl), a_ip ) 
    411412      CALL tab_3d_2d( npti, nptidx(1:npti), v_ip_2d(1:npti,1:jpl), v_ip ) 
     413      CALL tab_3d_2d( npti, nptidx(1:npti), v_il_2d(1:npti,1:jpl), v_il ) 
    412414      CALL tab_3d_2d( npti, nptidx(1:npti), t_su_2d(1:npti,1:jpl), t_su ) 
    413415      DO jl = 1, jpl 
     
    474476               zaTsfn(ji,jl2)  = zaTsfn(ji,jl2) + ztrans 
    475477               !   
    476                IF ( ln_pnd_H12 ) THEN 
     478               IF ( ln_pnd_LEV ) THEN 
    477479                  ztrans          = a_ip_2d(ji,jl1) * zworka(ji)     ! Pond fraction 
    478480                  a_ip_2d(ji,jl1) = a_ip_2d(ji,jl1) - ztrans 
     
    482484                  v_ip_2d(ji,jl1) = v_ip_2d(ji,jl1) - ztrans 
    483485                  v_ip_2d(ji,jl2) = v_ip_2d(ji,jl2) + ztrans 
     486                  ! 
     487                  IF ( ln_pnd_lids ) THEN                            ! Pond lid volume 
     488                     ztrans          = v_il_2d(ji,jl1) * zworka(ji) 
     489                     v_il_2d(ji,jl1) = v_il_2d(ji,jl1) - ztrans 
     490                     v_il_2d(ji,jl2) = v_il_2d(ji,jl2) + ztrans 
     491                  ENDIF 
    484492               ENDIF 
    485493               ! 
     
    526534      ! clem: The transfer between one category to another can lead to very small negative values (-1.e-20) 
    527535      !       because of truncation error ( i.e. 1. - 1. /= 0 ) 
    528       CALL ice_var_roundoff( a_i_2d, v_i_2d, v_s_2d, sv_i_2d, oa_i_2d, a_ip_2d, v_ip_2d, ze_s_2d, ze_i_2d ) 
     536      CALL ice_var_roundoff( a_i_2d, v_i_2d, v_s_2d, sv_i_2d, oa_i_2d, a_ip_2d, v_ip_2d, v_il_2d, ze_s_2d, ze_i_2d ) 
    529537 
    530538      ! at_i must be <= rn_amax 
     
    554562      CALL tab_2d_3d( npti, nptidx(1:npti), a_ip_2d(1:npti,1:jpl), a_ip ) 
    555563      CALL tab_2d_3d( npti, nptidx(1:npti), v_ip_2d(1:npti,1:jpl), v_ip ) 
     564      CALL tab_2d_3d( npti, nptidx(1:npti), v_il_2d(1:npti,1:jpl), v_il ) 
    556565      CALL tab_2d_3d( npti, nptidx(1:npti), t_su_2d(1:npti,1:jpl), t_su ) 
    557566      DO jl = 1, jpl 
     
    683692      REAL(wp) ::   zhmax, znum, zden, zalpha   !   -      - 
    684693      ! 
    685       NAMELIST/namitd/ ln_cat_hfn, rn_himean, ln_cat_usr, rn_catbnd, rn_himin 
     694      NAMELIST/namitd/ ln_cat_hfn, rn_himean, ln_cat_usr, rn_catbnd, rn_himin, rn_himax 
    686695      !!------------------------------------------------------------------ 
    687696      ! 
     
    702711         WRITE(numout,*) '         mean ice thickness in the domain                               rn_himean  = ', rn_himean 
    703712         WRITE(numout,*) '      Ice categories are defined by rn_catbnd                           ln_cat_usr = ', ln_cat_usr 
    704          WRITE(numout,*) '      minimum ice thickness                                             rn_himin   = ', rn_himin  
     713         WRITE(numout,*) '      minimum ice thickness allowed                                     rn_himin   = ', rn_himin  
     714         WRITE(numout,*) '      maximum ice thickness allowed                                     rn_himax   = ', rn_himax  
    705715      ENDIF 
    706716      ! 
     
    739749      END DO 
    740750      ! 
    741       hi_max(jpl) = 99._wp          ! set to a big value to ensure that all ice is thinner than hi_max(jpl) 
     751      hi_max(jpl) = rn_himax        ! set to a big value to ensure that all ice is thinner than hi_max(jpl) 
    742752      ! 
    743753      IF(lwp) WRITE(numout,*) 
Note: See TracChangeset for help on using the changeset viewer.